return address using the L directive. That may then be pushed down with the S directive, so that the starting address may be loaded into the first subroutine level, or the process may be repeated up to three times. If it is desired to force an inter~ rupt at the first occurrence of a JMS instruction, the stack pointer may be set to 3 initially, so that the first JMS instruction causes a stack overflow. If it is desired to achieve more than one breakpoint, illegal instructions may be assembled or in- serted into the program at the desired points. When the simulation attempts execution of one of these locations, an inter- rupt occurs, and the instruction may be replaced, or the program counter incremented around it to proceed.
6.4Execute Program Simulation
To start the execution simulation, type a T (for Trace mode) or an N (for
6.5Edit Program
To make corrections to the program, the I directive is used, giving an address, and the value(s) to be entered. The I directive alters the contents of the current location counter. Thus, it should either be noted and restored, or the stack pointer may be incremented first and decremented afterwards - (unless of course, the simulation is interrupted at subroutine nest level 3).
6.6Punch New "BNPF" Tape
After the program works correctly, an amended ROM tape may be punched in the "BNPF" format using the P directive. Four inches of leader and trailer are punched by this directive. If more is needed, rubouts or nulls
6.7Simulation of Segmented Programs
If a program is not very large, but is scattered over a wide range of addresses, it may be possible to accomodate the program in segments. Suppose the program occupies the first 32 locations in each of four ROMs. 128 locations must be reserved by the 0 directive to hold all of this. Suppose further that the program accesses only bank zero in RAM. The 0 directive would be something like this:
016,0,127
Then the first 32 locations of the program tape are read in using the I directive. The entire tape may be read with no deleterious effects, if that is convenient, or an F may be typed in manually at the end of the first 32 locations' worth of data. Then the 0 directive is used again, to
099,224,355
Note that the address limits have been offset by 32, to prevent the obliteration of the first 32 locations. The object tape may be read in again, or at least that part of it which includes the next block of data or instructions. Then the area is reassigned again:
099,448,575
The process is repeated until the whole program is loaded. To execute, the 0 directive for the starting block of code is typed in again. If the segments are placed correctly, each time a jump is made to another segment, an
00,0,255
10(program)
00,1,256
P1,256
7.0JUMPS TO PAGE 0
Because of the nuisance of doing
5