!! Incomplete !!! Work in progress..... P2 Debugger 1.2 =============== The default base is hexadecimal in the debugger. To specify a decimal value preceed the value with a "#" symbol (i.e #123) Binary values can be used also, by preceeding value with a % symbol (i.e %1011) Pressing * initaites a step. Pressing ? shows a HELP screen. Pressing ESC during a repeat cycle terminates the cycle. Quick reference =============== Status flag control SETC Set C flag SETZ Set Z flag CLRC Clear C flag CLRZ Clear Z flag CLRF Clear both C & Z flags SETF Set both C & Z flags Cog registers REG nnn nnn View cog registers LUT nnn nnn View lut registers IO pin SET #n Set pin n CLR #n Clear pin n TOG #n Toggle pin n FLT #n Float pin n HUB examine DHB Dump hub bytes DHW Dump hub words DHL Dump hub longs DHT Dump hub as text Misc commands ISR Show ISR vectors RUN Leave debuuger and continue CLS Clear screen and show next instruction(s) REP #nnn Repeat single step nnn tims RST Reset debugger PC="reset_entry" label in test code RST nnnn Reset debugger PC=nnnn DIS adr1 adr2 Disassemble code from addr(hex) for n lines(dec) View options SWL Show watchlist SWL+/SWL- Enable/Disable show watchlist INP Show INA/INB pin states INP+/INP- Enable/Disable INP view OUT Show OUTA/OUTB status OUT+/OUT- Enable/Disable OUT view STK Show stack contents STK+/STK- Enable/Disable stck view ALL Show all flags,stack,inp,out ALL+/ALL- Enable/Disable all views > --------------------------------------------------------------------------- DHB - Dump hub bytes Example >DHB 7000 70FF 07000: 00 88 04 F6 01 04 DC FC 01 82 04 F1 02 84 84 F1 07010: 02 86 04 FA 13 88 9C F9 31 00 60 FD 00 00 00 00 07020: 64 84 04 F6 20 04 DC FC 01 82 04 F1 02 84 84 F1 07030: 02 86 04 FA 20 04 DC FC 01 82 84 F1 02 84 04 F1 07040: 02 86 04 FA 20 04 DC FC 01 82 04 F1 02 84 84 F1 07050: 02 86 04 FA 13 88 9C F9 31 00 60 FD 00 00 00 00 07060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 070F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > --------------------------------------------------------------------------- DHW - Dump hub words >DHW 7000 70FF 07000: 8800 F604 0401 FCDC 8201 F104 8402 F184 8602 FA04 8813 F99C 0031 FD60 0000 0000 07020: 8464 F604 0420 FCDC 8201 F104 8402 F184 8602 FA04 0420 FCDC 8201 F184 8402 F104 07040: 8602 FA04 0420 FCDC 8201 F104 8402 F184 8602 FA04 8813 F99C 0031 FD60 0000 0000 07060: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 07080: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 070A0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 070C0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 070E0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 > --------------------------------------------------------------------------- DHL - Dump Hub lomgs >DHL 7000 70FF 07000: F6048800 FCDC0401 F1048201 F1848402 FA048602 F99C8813 FD600031 00000000 07020: F6048464 FCDC0420 F1048201 F1848402 FA048602 FCDC0420 F1848201 F1048402 07040: FA048602 FCDC0420 F1048201 F1848402 FA048602 F99C8813 FD600031 00000000 07060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 07080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 070A0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 070C0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 070E0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > --------------------------------------------------------------------------- DHT - Dump hub text >DHT 800 8FF 00800: B...C...D.......Bravo.Charlie.Alpha.Delta....................... 00840: ................................................................ 00880: ................................................................ 008C0: ................................................................ > --------------------------------------------------------------------------- DIS - Disassembler COG/LUT/HUB :for COG disassembly >DIS 0 F 00000: FDA01B64 CALL #$1B64 00001: FE804959 LOC PA,#$4959 00002: FC6803F6 WRLONG #$001,PA 00003: FEC051A5 LOC PTRA,#$51A5 00004: FD644017 SETQ2 #$020 00005: FB050100 RDLONG $080,PTRA 00006: F6048800 MOV $044,#$000 00007: FCDC0401 REP #$002,#$001 00008: F1048201 ADD $041,#$001 00009: F1848402 SUB $042,#$002 0000A: FA048602 MUL $043,#$002 0000B: FCDC0401 REP #$002,#$001 0000C: F1048201 ADD $041,#$001 0000D: F1848402 SUB $042,#$002 0000E: FA048602 MUL $043,#$002 0000F: F99C8813 BMASK $044,#$013 :for LUT disassembly >DIS 280 288 00280: FF00007F AUGS #$7F 00281: F547F7FF OR DIRB,#$1FF 00282: F6048800 MOV $044,#$000 00283: FCDC0420 REP #$002,#$020 00284: F1048201 ADD $041,#$001 00285: F1848402 SUB $042,#$002 00286: FA048602 MUL $043,#$002 00287: F99C8813 BMASK $044,#$013 00288: FDA07000 CALL #$7000 :for HUB disassembly >DIS 7000 701F 07000: F6048800 MOV $044,#$000 07004: FCDC0401 REP #$002,#$001 07008: F1048201 ADD $041,#$001 0700C: F1848402 SUB $042,#$002 07010: FA048602 MUL $043,#$002 07014: F99C8813 BMASK $044,#$013 07018: FD600031 RET 0701C: 00000000 IF_NEVER ROR $000,$000 > --------------------------------------------------------------------------- REG - View cog registers >REG 0 7 000: $FDA01B64 %11111101_10100000_00011011_01100100 #4255128420 #-39838876 001: $FE804959 %11111110_10000000_01001001_01011001 #4269820249 #-25147047 002: $FC6803F6 %11111100_01101000_00000011_11110110 #4234675190 #-60292106 003: $FEC051A5 %11111110_11000000_01010001_10100101 #4274016677 #-20950619 004: $FD644017 %11111101_01100100_01000000_00010111 #4251205655 #-43761641 005: $FB050100 %11111011_00000101_00000001_00000000 #4211409152 #-83558144 006: $F6048800 %11110110_00000100_10001000_00000000 #4127492096 #-167475200 007: $FCDC0401 %11111100_11011100_00000100_00000001 #4242277377 #-52689919 --------------------------------------------------------------------------- LUT - View LUT contents >LUT 280 288 280: $FF00007F %11111111_00000000_00000000_01111111 #4278190207 #-16777089 281: $F547F7FF %11110101_01000111_11110111_11111111 #4115134463 #-179832833 282: $F6048800 %11110110_00000100_10001000_00000000 #4127492096 #-167475200 283: $FCDC0420 %11111100_11011100_00000100_00100000 #4242277408 #-52689888 284: $F1048201 %11110001_00000100_10000010_00000001 #4043604481 #-251362815 285: $F1848402 %11110001_10000100_10000100_00000010 #4051993602 #-242973694 286: $FA048602 %11111010_00000100_10000110_00000010 #4194600450 #-100366846 287: $F99C8813 %11111001_10011100_10001000_00010011 #4187785235 #-107182061 288: $FDA07000 %11111101_10100000_01110000_00000000 #4255150080 #-39817216 > --------------------------------------------------------------------------- ISR - View debug interrupt vectors >ISR FFFC0: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFC4: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFC8: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFCC: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFD0: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFD4: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFD8: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFDC: FD801000 JMP #$1000 FFFE0: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFE4: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFE8: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFEC: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFF0: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFF4: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFF8: FB3BFFFF CALLD INB,INB (-1) WC, WZ FFFFC: FB3BFFFF CALLD INB,INB (-1) WC, WZ > --------------------------------------------------------------------------- STK - Show hardware stack contents (22 bits wide) 2 flags + 20 bit address >STK STACK : CZ_0028A -Z_00012 --_00000 --_00000 --_00000 --_00000 --_00000 --_00000