Commit Graph

7 Commits

Author SHA1 Message Date
0ea3406b71 Add storeimm32 and storeimm64 syntax
These explicitly allow usage of storeimm32 and storeimm64 in the
assembler syntax. It will also warn you if you try to store a value
that's too large using the storeimm32 instruction

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-02-10 18:59:23 -05:00
15423502f3 Remove data section from test.asm example file
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-02-10 18:03:50 -05:00
c982be553f Add execution to VM via file, starting to iron out bugs
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-02-09 15:43:07 -05:00
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
f98a53654e Update/add instructions in parser
* 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>
2020-01-28 18:35:41 -05:00
7e6c621c2b Update test.asm to conform to newest syntax
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-01-28 18:35:41 -05:00
ddfcec0427 Initial commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-01-25 19:17:39 -05:00