summaryrefslogtreecommitdiffstats
path: root/src/emu/test4.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/test4.S')
-rw-r--r--src/emu/test4.S54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/emu/test4.S b/src/emu/test4.S
new file mode 100644
index 0000000..08e5375
--- /dev/null
+++ b/src/emu/test4.S
@@ -0,0 +1,54 @@
+.REGS 7
+JMP 17
+PUSH r8
+ADD r8, r0, r9
+PUSH r1
+PUSH r2
+LW r8, r1, 8
+MOV r2, 2
+MUL r1, r1, r2
+ADD r10, r0, r1
+JMP 3
+ADD r10, r0, r0
+JMP 1
+POP r2
+POP r1
+ADD r9, r0, r8
+POP r8
+RET
+PUSH r8
+ADD r8, r0, r9
+PUSH r0
+PUSH r0
+PUSH r3
+PUSH r4
+PUSH r5
+PUSH r6
+PUSH r7
+MOV r3, 10
+MOV r4, 5
+ADD r3, r3, r4
+SW r8, r3, -4
+LW r8, r5, -4
+PUSH r5
+CALL -31
+ADD r6, r0, r10
+POP r0
+SW r8, r6, -8
+LW r8, r7, -8
+ADD r10, r0, r7
+JMP 3
+ADD r10, r0, r0
+JMP 1
+POP r0
+POP r0
+POP r7
+POP r6
+POP r5
+POP r4
+POP r3
+ADD r9, r0, r8
+POP r8
+PUSH r10
+PUSH r0
+SYS