2019-01-26 17:57:03 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
func main() {
|
2019-02-09 23:15:14 +00:00
|
|
|
var s state
|
2019-02-14 23:41:56 +00:00
|
|
|
var t textPages
|
2019-01-26 17:57:03 +00:00
|
|
|
|
2019-02-14 23:41:56 +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 {
|
2019-02-14 23:41:56 +00:00
|
|
|
log := true
|
2019-02-10 22:47:54 +00:00
|
|
|
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
|
|
|
}
|
2019-02-14 23:41:56 +00:00
|
|
|
t.dumpIfDirty()
|
2019-02-09 23:15:14 +00:00
|
|
|
}
|
2019-01-26 17:57:03 +00:00
|
|
|
}
|