apple2-go/cmd/disasm.go
2018-05-20 13:45:06 +01:00

32 lines
519 B
Go

package main
import (
"flag"
"mos6502go/cpu"
"mos6502go/mmu"
"mos6502go/utils"
)
func main() {
startString := flag.String("start", "", "Start address")
endString := flag.String("end", "", "End address")
flag.Parse()
start := utils.DecodeCmdLineAddress(startString)
end := utils.DecodeCmdLineAddress(endString)
if start == nil {
panic("Must include -start")
}
if end == nil {
e := uint16(0xffff)
end = &e
}
cpu.InitInstructionDecoder()
mmu.InitApple2eROM()
utils.Disassemble(*start, *end)
}