Commodore 2001-8 User Manual page 99

Table of Contents

Advertisement

zero page
absolute RAM
WRITING MONITOR
Likewise, no defaults on the SAVE command. Any start and ending address may be specified.
To cancel a command either type RETURN or press STOP to cancel a Display Memory, LOAD or SAVE.
INTERRUPT AND BREAKPOINT ACTION
BRK is a software interrupt instruction which causes the CPU to interrupt execution, save PC and P
registers on the stack and then branch through a vector at locations $0218 and $021C. TIM initializes this
vector to point at itself on entry by CALL. Unless the user modifies this vector, TIM will gain control when
a BRK instruction is executed, print B* indicating entry via breakpoint (instead of C* entry via call) and
the registers (as in the A command), and wait for user commands. Note that after a BRK which vectors to
TIM, the user's PC points to the byte following the BRK: however, users who choose to handle BRK
instructions themselves should note that BRK acts as a two-byte instruction, leaving the PC (on return
via RTl}two bytes past the BRK instruction.
IRQ is vectored normally in PETto an ISR which updates the clock and scans the keyboard every 60th of a
second. If the·vector is altered and the machine language subroutine does not restore it, a power1)n reset
must be performed.
NMI is not provided for in the PET. The processor line corresponding to this interrupt is permanently
pulled UP.
REST vectors to a cold-start of BASIC. Memory is cleared. Reload and re-enter TIM via SYS command.
TIM MONITORS CALLS AND SPECIAL LOCATIONS
JSR
WRT
$FF02
type a character
JSR
ROT
$FFCF
input a character
JSR
GET
$FFE4
Get a character
JSR
CRLF
$04F2
type a C R ' -
JSR
SPACE
$063A
type a space
JSR
WROB
$0613
type a byte
JSR
RDOB
$065E
read a byte
JSR
HEXIT
$0685
Ascii to hex in A
MEMORY USAGE
$OA'$22
$400,$76A
523·55A are zero page locations In the BASIC input buffer which may be used when BASIC is not using
these locations. The second cassette buffer 533A·$3FF is a well protected location if that device is not
used. Other memory locations may be used with considerable risk, depending upon which piece of PET
software wants to use it also.
MONITOR CHECKOUT PROCEDURE
1) Power up your PET normally into BASIC command mode. Insert the cassette containing a monitor and
use the SHIFT-RUN sequence to initiate a program load. You should see a display something like:
PC
SRAC
XR
YR
SP
.,
29
00
88 89
FE
Exact values may vary, although the first and last values should be as shown.
2) The display of registers is the standard entry display message. It consists of C· to identify entry by
call, followed by the CPU register contents: program counter, processor status, accumulator, X index,
Y index, and stack pointer. Note that all TIM inputs and outputs are in base 16 which is referred to as
97

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pet 2001-8

Table of Contents