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 non-Trace mode). If at any time it is desired to stop execution simulation, whether because of program errors, to examine register contents, or to make corrections, the BREAK key may be depressed, and the simulation will be interrupted at the completion of the current instruction. Execu- tion will resume as if uninterrupted, if the T or N directive is typed in after a break.

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 (shift-control-P) may be punched while the simulation program is waiting for a directive. This will not in any way interfere with normal operation of the program. The user should remember to turn on the paper tape punch after typing in the second address in the P directive if a tape is to be made. If it is desired only to examine the contents of a simulated ROM location, this is not necessary.

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 re-assign the same locations to the next block of addresses:

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 out-of-range interrupt occurs. The 0 directive for the segment jumped to is entered; and the program may proceed. This technique may also be used to relocate a program in ROM: for example, the following sequence of commands will effectively move (shift) a program up one position in ROM:

00,0,255

10(program)

00,1,256

P1,256

7.0JUMPS TO PAGE 0

Because of the nuisance of doing serial-to parallel conversion, and properly timing the bit frames in teletype input and output, the simulation program is provided with an option to perform subroutine calls and unconditional jumps to ROM page 0 directly, returning to simulation mode upon return. ROM page 0 contains subroutines to perform teletype reader and keyboard input, 7 bits wide (the parity bit is ignored), teletype output 8 bits wide, binary to decimal conversion and output,

5

Page 7
Image 7
Intel SIM4-02 manual Jumps to, 016,0,127