izapple2/main.go

22 lines
421 B
Go
Raw Normal View History

2019-01-26 17:57:03 +00:00
package main
func main() {
2019-02-09 23:15:14 +00:00
var s state
var t textPages
2019-01-26 17:57:03 +00:00
s.memory.initWithRomAndText("../roms/APPLE2.ROM", &t)
startAddress := s.memory.getWord(0xfffc)
s.registers.setPC(startAddress)
2019-02-09 23:15:14 +00:00
for true {
log := true
pc := s.registers.getPC()
executeInstruction(&s, log)
if pc == s.registers.getPC() {
//s.memory.printPage(0x00)
//s.memory.printPage(0x01)
panic("No change in PC")
2019-02-09 23:15:14 +00:00
}
t.dumpIfDirty()
2019-02-09 23:15:14 +00:00
}
2019-01-26 17:57:03 +00:00
}