Skip to content

Repository files navigation

STR: A Custom CPU in C#

A little CPU made in C# running ASM

ISA (Instruction Set Architecture)

  • LOAD (reg, val) = 1 - Loads val in to reg
  • ADD (reg, imm) = 2 - Adds imm to reg (addition)
  • JMP (addr) = 3 - Sets the pc(program counter) to addr
  • JZ (addr) = 4 - IF ZF equals zero, jump to addr
  • CMP (reg, reg) = 5 - Compares reg with reg (then sets ZF)
  • CLR (val) = 6 - Clear all registers to val
  • INT (imm) = 7 - Interrupt, calls a function based on the imm
  • HALT () = 99 - Halts the CPU

Credits:

raic.e: CPU and Raylib functions (framebuffer)
nixxlte: Assembly 8086 interpreter and compiler, and Raylib functions (keyboard)

About

A CPU based on the Intel 8086

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages