aboutsummaryrefslogtreecommitdiff
path: root/sw/test.asm
diff options
context:
space:
mode:
Diffstat (limited to 'sw/test.asm')
-rw-r--r--sw/test.asm8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/test.asm b/sw/test.asm
index 7712165..496cf37 100644
--- a/sw/test.asm
+++ b/sw/test.asm
@@ -1,14 +1,18 @@
.global entry
.data /* data section*/
- .word 0x0001
+ .word 0x0001
+ .word 0x0002
.word 0xFFFF
.text /* code goes to text section*/
.ent entry
entry:
lw $t0, 0x200 /* t0 = 1*/
- lw $t1, 0x200 /* t1 = 1*/
+ sw $t0, 0x202
+ lw $t1, 0x201 /* t1 = 1*/
+ lw $t1, 0x200 /* t0 = 1*/
add $t0, $t0, $t1 /* t0 = t0 + t1 = 2*/
+ sw $t0, 0x400
add $t0, $t0, 0xB /* t0 = t0 + 0xB == 0xD*/
sub $t0, $t0, $t1 /* t0 = t0 - $t1 == 0xC*/
or $t0, $t0, 0x10 /* t0 = t0 | 0x10 == 0x1C*/