initial commit

This commit is contained in:
2019-02-19 22:02:06 +01:00
commit 59e78f996f
14 changed files with 405 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
@ <intstruction> <destination> , <operand>, <operand>
.global _start
/*
CMP R1. R2
if R1 < R2 then N is enabled
if R1 > R2 then N is disabled
if R1 == R2 then Z is enabled
*/
_start:
MOV R1, #20
MOV R2, #10
CMP R1, R2
BEQ values_equal
BGT values_greater
values_less:
MOV R0, #2
B end
values_equal:
MOV R0, #1
B end
values_greater:
MOV R0, #3
end:
MOV R7, #1 @ exit to terminal
SWI 0 @ system reads R7 after interrupt