From be3ea1c23086c04c8f3ae6fc2150ed86f1ca48e9 Mon Sep 17 00:00:00 2001 From: mpabi Date: Tue, 18 Mar 2025 11:18:50 +0000 Subject: [PATCH] ok --- counter.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/counter.S b/counter.S index 2ef12b3..9c89a14 100644 --- a/counter.S +++ b/counter.S @@ -2,7 +2,7 @@ sentence: .ascii "Become a Prograammermmmmmrr\0" match: - .ascii "abc \0" + .ascii "Babc m\0" out: .space 256, 0 @@ -22,17 +22,19 @@ 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 s11, 0(s2) + lbu s10, 0(s2) addi s10, s10, 1 sb s10, 0(s2) 1: - addi s0, s0, 1 + addi a0, a0, 1 + addi s2, s2, 1 j iteruj_match done_match: