summaryrefslogtreecommitdiff
path: root/03/in02
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2021-11-13 15:02:23 -0500
committerpommicket <pommicket@gmail.com>2021-11-13 15:02:23 -0500
commiteb2aadf9bfd14d95e27050bc24c6fb70c10d885e (patch)
tree26499d18b85bc53d4b51439651b58be89801e5b9 /03/in02
parent06309dbf76c289794619029b9eed3411efa531d0 (diff)
+=/-=/etc with immediates!!
Diffstat (limited to '03/in02')
-rw-r--r--03/in0249
1 files changed, 48 insertions, 1 deletions
diff --git a/03/in02 b/03/in02
index 93dce7b..11e8cf6 100644
--- a/03/in02
+++ b/03/in02
@@ -1070,8 +1070,55 @@ BA
zA
lb
BA
+// note: for this we allow numerical operands, e.g. 'C+=d1'
+// we don't need this for ::B2 because it's only used for load instructions
+// (you don't normally need to dereference numerical literals)
+im
+##41. 'A'
+je
+:-r0
+im
+##42. 'B'
+je
+:-AB
+im
+##43. 'C'
+je
+:-AC
+im
+##44. 'D'
+je
+:-AD
+im
+##49. 'I'
+je
+:-AI
+im
+##4a. 'J'
+je
+:-AJ
+im
+##52. 'R'
+je
+:-AR
+im
+##53. 'S'
+je
+:-AS
+// it's a number
+im
+##3.
+BA
+im
+--LI
++B
+BA
+im
+--nu convert string to number
+cl
+BA
jm
-:-Ar
+:-im emit 'mov rax, <number>'
// emit 'put operand 2 in rbx'
::B2
im