Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 685 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 685 Bytes

C-VM

My try to implement a virtual CPU in C

More details on my blog article.

This VM implements the following features:

  • mov reg, reg/val
  • add reg, reg/val
  • sub reg, reg/val
  • exit
  • cmp reg, reg/val
  • push reg/val
  • pop reg
  • jmp addr
  • call label
  • Registers
    • a b c d: common operations
  • Flags (one register with flags in it)
    • Zero flag 0x10000000
  • Virtual stack
  • Virtual heap