diff options
Diffstat (limited to 'ROMs')
| -rw-r--r-- | ROMs/hello_c.asm | 12 | ||||
| -rw-r--r-- | ROMs/hello_c.c | 4 | ||||
| -rw-r--r-- | ROMs/hello_c.q1 | bin | 22 -> 56 bytes |
3 files changed, 10 insertions, 6 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 diff --git a/ROMs/hello_c.c b/ROMs/hello_c.c index 1f79a53..d0abdd5 100644 --- a/ROMs/hello_c.c +++ b/ROMs/hello_c.c @@ -1,4 +1,6 @@ int main() { - return 0 | 1; + //comment + int a = 5; + return a += 5; }
\ No newline at end of file diff --git a/ROMs/hello_c.q1 b/ROMs/hello_c.q1 Binary files differindex 5e4d71e..0ca60e8 100644 --- a/ROMs/hello_c.q1 +++ b/ROMs/hello_c.q1 |
