PROBUG - MONITOR FOR THE MC6801/MC68701/MC6803 INTRODUCTION The PROBUG ROM monitor is a program contained in a single 2k ROM device. It is used to develop, evaluate, and debug a user program. This standard type of monitor is useful with an MC6801 or with an MC6803 system. It must allow addressing of PROBUG at $B800 -> $BFFF with RAM at $80 -> $FF. The PROBUG monitor commands do the following: * Examine and change data in a memory location (including I/O) * Calculate the offset for relative addressing * Examine and change data in the users program registers * Display blocks of memory * Move a block of data * Insert, display, and remove a breakpoint * Freerun or trace through the users program * Check for the erased state of the EPROM * Declare the crystal frequency * Program the EPROM * Compare memory values to EPROM contents * Load a program from tape * Verify that a program was properly loaded * Punch (record) the program on tape COMMANDS B Display the breakpoint address. B Set the breakpoint address and display. B- Remove the breakpoint and display null breakpoint (0). D [ [,]] Display memory from to . G [] , if specified, becomes the new program counter. Start executing from address in program counter. HI Set speed for on-chip I/O to 1200 bps (%1024). HY Set speed for on-chip I/O to 9600 bps (%128). M (space) Open memory, examine, and print value at memory location . The following inputs control examination and modification of memory. Change one byte in memory to . (LF) Print next address and memory value. (UA) Up arrow, print previous address and memory value. ( ) Space, print next memory byte on same line. , Comma, increment internal address value with no print of address or value. / Slash, print current address and memory byte. (CR) End memory examine command. / Same as M ,. must start with 0 -> 9, zero may precede the hex address. / Print address and value of location last referenced by memory examine. MV Move the block of data at address to to start address . O Calculate relative offset from to for branching instructions. R Display / modify users MPU registers. Change value of register to . ( ) Space, display register value and move to the next register. (CR) Terminate register change command. T [] Trace number of commands. (.) Trace one instruction. (No carriage return after period). L [] Load a program from tape. Add offset, if specified, to load address on tape. P , Punch or record contents of memory from to . V [] Verify that a program was properly loaded. Add offset, if specified, to load address on tape. (CTRL-W) Halt (wait) print from display or trace command. Any input causes continuation. (CTRL-X) Terminates print from display, or trace command. CHCK Check that through are in the EPROM and erased. PROG Program EPROM starting at with values from to . VERF Verify EPROM starting at with values from to . XTAL Declare crystal frequency. Command prompts for 0 (2.45 MHz) or 1 (4.91 MHz). USER CALLABLE ROUTINES Frequently used subrotines and entries are in a jump table at the beginning of PROBUG. Other routines can be referrenced but care must be taken since addresses may vary with new versions of PROBUG. Following is the table: B000 7E B8CD BEGIN: JMP START ;TO THE BEGINNING B003 7E B866 JMP INCHNP ;INPUT A CHAR, NO PARITY B006 7E B892 JMP OUTCH ;OUTPUT A CHAR FROM REG A B009 7E BAA8 JMP PDATA1 ;PRINT DATA STRING B00C 7E BA7C JMP OUT2HS ;REG X PNT TO 2 HEX, PRINT W/ SPACE B00F 7E BA79 JMP OUT4HS ;REG X PNT TO 4 HEX, PRINT W/ SPACE The following describes the entry points in the jump table: START ($B800) is the beginning of the PROBUG monitor. INCHNP ($B803) waits for and reads a character into register A from the serial input. Rubouts are ignored. Parity is removed. The input is echoed to serial output if OUTSW ($FF)is zero. Serial initialisation is assumed. OUTCH ($B806) writes a character from register A to serial output. OUTCH outputs nulls (padding characters) after each character. OUTSW ($FF) and CHRNL ($E6) control padding. OUTSW is the tape flag (set to the number of nulls to follow each character if writing to tape; if not writing to tape, OUTSW is zero). The upper six-bit value of CHRNL is the padding for a carriage return. the low two-bit value is the padding for other characters. PDATA1 ($B809) prints data string pointed to by register X. An $04 character terminates the data string. PDATA1 calls OUTCH to output one character at a time. OUT2HS ($B80C) prints two hexadecimal characters pointed to by register X, then prints a space. OUT4HS ($B80F) prints four hexadecimal characters pointed to by register X, then prints a space. Other useful routines which are not in the jump table are: SPACE ($BA7E) outputs a space. PCRLF ($BAB3) prints a carriage return and line feed. PDATA ($BA82) prints a carriage return and line feed followed by a data string pointed to by register X. OUT2H ($BAAF) prints two hexadecimal characters (one byte) pointed to by register X. OUTHL ($BA8A) converts left four bits of a byte to display code and prints. OUTHR ($BA8E) converts right four bits of a byte to display code and prints.