From 379075260f5d29ae32a277b156cc83813bbecf13 Mon Sep 17 00:00:00 2001 From: Daniel Loffgren Date: Sat, 26 Sep 2015 20:09:56 +0000 Subject: [PATCH] Added "woz" debugger command git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@62 64f78de7-aa59-e511-a0e8-0002a5492df0 --- apple1/main.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/apple1/main.c b/apple1/main.c index eda0a4c..157bcc4 100644 --- a/apple1/main.c +++ b/apple1/main.c @@ -131,8 +131,31 @@ int main(int argc, const char * argv[]) } if (v6502_handleDebuggerCommand(cpu, command, commandLen, breakpoint_list, table, run, &verbose)) { + if (v6502_compareDebuggerCommand(command, commandLen, "help")) { + printf("woz Print relevant woz monitor parameters and registers.\n"); + } continue; } + else if (v6502_compareDebuggerCommand(command, commandLen, "woz")) { + printf("KBD 0x%02x\n" + "XAML 0x%02x\n" + "XAMH 0x%02x\n" + "STL 0x%02x\n" + "STH 0x%02x\n" + "L 0x%02x\n" + "H 0x%02x\n" + "YSAV 0x%02x\n" + "MODE 0x%02x\n", + v6502_read(cpu->memory, A1PIA_KEYBOARD_INPUT_REGISTER, NO), + v6502_read(cpu->memory, 0x24, NO), // XAML + v6502_read(cpu->memory, 0x25, NO), // XAMH + v6502_read(cpu->memory, 0x26, NO), // STL + v6502_read(cpu->memory, 0x27, NO), // STH + v6502_read(cpu->memory, 0x28, NO), // L + v6502_read(cpu->memory, 0x29, NO), // H + v6502_read(cpu->memory, 0x2A, NO), // YSAV + v6502_read(cpu->memory, 0x2B, NO));// MODE + } else if (command[0] != ';') { currentLineText = command; as6502_executeAsmLineOnCPU(cpu, command, strlen(command));