コード例 #1
0
ファイル: debugger.go プロジェクト: pda/go6502
// BeforeExecute receives each cpu.Instruction just before the program
// counter is incremented and the instruction executed.
func (d *Debugger) BeforeExecute(in cpu.Instruction) {

	d.doBreakpoints(in)

	if d.run {
		return
	}

	fmt.Println(d.cpu)

	var symbols []string
	if in.IsAbsolute() {
		symbols = d.symbols.labelsFor(in.Op16)
	}

	if len(symbols) > 0 {
		fmt.Printf("Next: %v (%s)\n", in, strings.Join(symbols, ","))
	} else {
		fmt.Println("Next:", in)
	}

	for !d.commandLoop(in) {
		// next
	}
}