Skip to content

Instantly share code, notes, and snippets.

View 8080.go
func (mc *microcontroller) run() {
instruction := (*mc.memory)[mc.programCounter]
fmt.Printf("%X : %X\n", mc.programCounter, instruction)
switch instruction {
case 0x00:
mc.nop()
case 0xC3:
mc.jmp()
case 0x01, 0x11, 0x21, 0x31:
mc.lxi()