Compare commits
No commits in common. "be3ea1c23086c04c8f3ae6fc2150ed86f1ca48e9" and "4fe958dbd68ee086c9e5713227348bbb4cce783f" have entirely different histories.
be3ea1c230
...
4fe958dbd6
10
counter.S
10
counter.S
@ -2,13 +2,13 @@
|
||||
sentence:
|
||||
.ascii "Become a Prograammermmmmmrr\0"
|
||||
match:
|
||||
.ascii "Babc m\0"
|
||||
.ascii "abc \0"
|
||||
out:
|
||||
.space 256, 0
|
||||
|
||||
.text
|
||||
.align 2
|
||||
.globl _start
|
||||
.globl _start addi t0, t0, 1 # Increment pointer to the next character in sentence
|
||||
|
||||
|
||||
_start:
|
||||
@ -22,19 +22,17 @@ read_str:
|
||||
la s2, out # Load address of out into s0
|
||||
|
||||
iteruj_match:
|
||||
|
||||
lbu a1, 0(a0)
|
||||
beq a1, zero, done_match
|
||||
|
||||
bne t1, a1, 1f
|
||||
|
||||
lbu s10, 0(s2)
|
||||
lbu s11, 0(s2)
|
||||
addi s10, s10, 1
|
||||
sb s10, 0(s2)
|
||||
|
||||
1:
|
||||
addi a0, a0, 1
|
||||
addi s2, s2, 1
|
||||
addi s0, s0, 1
|
||||
j iteruj_match
|
||||
done_match:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user