summaryrefslogtreecommitdiff
path: root/ROMs/hello_c.asm
diff options
context:
space:
mode:
Diffstat (limited to 'ROMs/hello_c.asm')
-rw-r--r--ROMs/hello_c.asm12
1 files changed, 7 insertions, 5 deletions
diff --git a/ROMs/hello_c.asm b/ROMs/hello_c.asm
index 8cdf58b..6eba849 100644
--- a/ROMs/hello_c.asm
+++ b/ROMs/hello_c.asm
@@ -1,8 +1,10 @@
_main:
- push 0
- mov 1, V1
- pop V0
- or V0, V1
- mov DX, V0
+ ; comment
+ mov 5, [$51FF] ; int a = 5
+ add [$51FF], 5 ; compute addition
+ mov AX, [$51FF] ; store back into left param
+ mov [$51FF], V0 ; return value
+ ret
+ mov 0, V0 ; fallback return 0
ret