From 0a4dd8131818001341cf1a959b6a5c3b11275d5d Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 2 Aug 2025 01:58:48 -0400 Subject: [PATCH] fill with 1s by word --- code/fillmem/fillmem.s | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/fillmem/fillmem.s b/code/fillmem/fillmem.s index 02d0e0c..b94b072 100644 --- a/code/fillmem/fillmem.s +++ b/code/fillmem/fillmem.s @@ -8,13 +8,13 @@ BASE_ADDR equ 0x0000 Main: - li $t0, 0xA000 ; $t0 = 0xA000 - li $t1, 0xA100 ; $t1 = 0xA100 - li $t2, 0x11 ; $t2 = 0x11 + li $t0, 0xA000 ; $t0 = 0xA000 + li $t1, 0xA100 ; $t1 = 0xA100 + li $t2, 0x11111111 ; $t2 = 0x11111111 Loop: - sb $t2, BASE_ADDR($t0) ; $Store byte at 0x0000 + t0 - addi $t0, $t0, 1 ; ++ t0 + sw $t2, BASE_ADDR($t0) ; Store byte at 0x0000 + t0 + addi $t0, $t0, 4 ; ++ t0 blt $t0, $t1, Loop ; while (t0 < t1) keep looping .close