fill with 1s by word

This commit is contained in:
2025-08-02 01:58:48 -04:00
parent 53daafff1f
commit 0a4dd81318
+3 -3
View File
@@ -10,11 +10,11 @@ BASE_ADDR equ 0x0000
Main:
li $t0, 0xA000 ; $t0 = 0xA000
li $t1, 0xA100 ; $t1 = 0xA100
li $t2, 0x11 ; $t2 = 0x11
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