* StoreImm just uses a u64 instead of u32 - we'll figure out the layout later * Jmp implementation added (can't believe I forgot this) * Add Inst AST item, whose immediates don't have to be a u64 right away Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
29 lines
331 B
NASM
29 lines
331 B
NASM
.section data
|
|
|
|
.section code
|
|
|
|
main:
|
|
storeimm %r00, $0xDEAD
|
|
storeimm %r01, $16
|
|
|
|
shl %r00, %r01
|
|
|
|
storeimm %r01, $0xBEEF
|
|
or %r00, %r01
|
|
|
|
storeimm %r01, $0xDEADBEEF
|
|
|
|
storeimm %r00, failure
|
|
storeimm %r01, ok
|
|
cmpeq %r00, %r01
|
|
|
|
jz %r00
|
|
|
|
jmp %r01
|
|
|
|
failure:
|
|
storeimm %status, $1
|
|
halt
|
|
|
|
ok:
|