Files
rasp/test.asm
Alek Ratzloff e198da5825 Finish up parser and assembler with more-or-less complete syntax
Major changes inlude:

* Bit the bullet and now instructions have their length hard-coded
* Move from_utf8 object parsing to be done by their objects (instead of
  a Parser god object)
* A list of AST sections are assembled into an Object using the new
  vm::obj::assemble module.
* Changed the object layout some in the spec, and adjusted code to match
  this.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-02-09 13:04:56 -05:00

36 lines
452 B
NASM

data $0x1000 .. $0x2000 {
}
code $0x0 {
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:
.export main
}
meta {
entry: main
}