Skip to content

hd1fernando/DotMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DotMachine

A toy virtual machine based on the blog post https://felixangell.com/blogs/virtual-machine-in-c

operations:

  • PUSH
  • POP
  • MOV
  • ADD
  • MUL
  • DIV
  • SUB
  • XOR
  • CMP (Compare)
  • JMP (Jump)
  • GT (Greater Than)
  • LT (Less Than)
  • HTL (End of program)
  • CALL (Call a O.S. function)

registers:

  • EAX (General)
  • EBX (General)
  • ECX (General)
  • SP (Stack Pointer)
  • IP (Instruction Pointer)
  • ZF (Zero Flag)

stack:

  • 256 positions
  • 512 positions
  • 1024 positions

TODO:

  • Implements CLI
  • Read from a file (.asm or .dotm)
  • Ignore comments
  • Labels

Use example:

  ; Add two numbers
  PUSH 5
  PUSH 5
  ADD
  POP
  HLT ; End of program

About

A toy virtual machine made in C#

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages