aboutsummaryrefslogtreecommitdiff
path: root/sw/test.asm
diff options
context:
space:
mode:
Diffstat (limited to 'sw/test.asm')
-rw-r--r--sw/test.asm18
1 files changed, 5 insertions, 13 deletions
diff --git a/sw/test.asm b/sw/test.asm
index eac3c7e..a77f76e 100644
--- a/sw/test.asm
+++ b/sw/test.asm
@@ -1,20 +1,12 @@
.global entry
.data /* data section*/
- .word 0x0001
- .word 0x0002
- .word 0xFFFF
+ .word 0x00AF
+ .word 0x0400
.text /* code goes to text section*/
.ent entry
entry:
- lw $t0, 0x200 /* t0 = 1*/
- lw $t1, 0x201 /* t1 = 1*/
- add $t0, $t0, $t1 /* t0 = t0 + t1 = 2*/
- add $t0, $t0, 0xB /* t0 = t0 + 0xB == 0xD*/
- sub $t0, $t0, $t1 /* t0 = t0 - $t1 == 0xC*/
- or $t0, $t0, 0x10 /* t0 = t0 | 0x10 == 0x1C*/
- xor $t0, $t0, $t1 /* t0 = t0 ^ t1 == 0x1D*/
- slt $t0, $t0, $t1 /* t0 = t0 < t1 == 0*/
- add $t0, $t0, $t1 /* t0 = t0 + t1 == 1*/
- beq $t0, $t1, entry /* PC = entry if t0 == t1*/
+ lw $t2, 0x200
+ lw $t0, 0x201
+ sw $t2, ($t0)
.end entry