mirror of
https://github.com/freewilll/apple2-go.git
synced 2024-11-15 20:10:08 +00:00
32 lines
519 B
Go
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)
|
|
}
|