+=/-=/etc with immediates!!
This commit is contained in:
parent
06309dbf76
commit
eb2aadf9bf
2 changed files with 49 additions and 1 deletions
1
03/ex03
1
03/ex03
|
@ -1,3 +1,4 @@
|
|||
D+=d4
|
||||
D]=d7
|
||||
D]=C
|
||||
D^=C
|
||||
|
|
49
03/in02
49
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue