summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Isom <kyle@tyrfingr.is>2014-06-28 17:35:11 -0700
committerKyle Isom <kyle@tyrfingr.is>2014-06-28 17:35:11 -0700
commit6132769b386722cd0d10ffeaf4ffabdefffb82f1 (patch)
treed0e5e0be042f904d6df657189bdf0e4c321029cb
parentd7b21817cc577b0231c38b062987d9963f49f2fa (diff)
downloadkram-6132769b386722cd0d10ffeaf4ffabdefffb82f1.tar.gz
kram-6132769b386722cd0d10ffeaf4ffabdefffb82f1.tar.bz2
kram-6132769b386722cd0d10ffeaf4ffabdefffb82f1.zip
Update twoplustwo source.
-rw-r--r--sources/twoplustwo.rm32
1 files changed, 16 insertions, 16 deletions
diff --git a/sources/twoplustwo.rm b/sources/twoplustwo.rm
index 23587c4..11476dc 100644
--- a/sources/twoplustwo.rm
+++ b/sources/twoplustwo.rm
@@ -3,20 +3,20 @@ message: .string "2 + 2 = "
newline: .string "\n"
.text
-ADD $A #2 #2
+MOV $A #02
+ADD $A #02
+POKE $A #0100
+MOV $A #01
+MOV $X #00
+MOV $Y #64
+SYSCALL ; print message
+MOV $A #02
MOV $X #01
-POKE $A
-MOV $A #1
-MOV $X #0
-MOV $Y #64 ; message
-SYSCALL
-MOV $A #2
-MOV $X #1
-MOV $Y #0
-SYSCALL
-MOV $A #1
-MOV $X #0
-MOV $Y #74 ; newline
-SYSCALL
-MOV $A #0
-SYSCALL
+MOV $Y #00
+SYSCALL ; print result of 2+2
+MOV $A #01
+MOV $X #00
+MOV $Y #74
+SYSCALL ; print newline
+MOV $A #00
+SYSCALL ; exit