Skip to content

OxNinja/C-VM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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