Implement a very simple assembler. Notably, the way I'd like it work is like this...
pushl 7 ; push 7 as 4 byte int
pushl 4.0 ; floats but pushl pushes it as 4-byte int
pushq 4.0 ; pushes 4.0 as an int64
call myfunc ; labels for functions
halt
myfunc:
pushq 11
pushbpsub
loadspl
pushl 1
uleql
jzl over ; labels for jump opcodes
over:
ret
Implement a very simple assembler. Notably, the way I'd like it work is like this...