This was the first really usable monitor for the NASCOM 1. The first monitor (just named NASBUG but referred to in this document as the T1 version), although supplied with early machines, proved to be too limited and every Nascom owner that I’ve ever met quickly upgraded to the T2 version.

The T1 version was, however, a very creditable programming feat. I have been told that it was written without the aid of an assembler and simply hand coded from mnemonics into hex for the programmer unit. And it worked (mostly) first time. 1k of code is a lot of work (and paper)! I’ve included the assembly listing here: Nasbug 1

The T1 and T2 monitors were both supplied in single 1k x 8 EPROMs. These were, at that time, 2708 devices which are both difficult to find and almost impossible to program nowadays!

Commands

B – set breakpoint

Bxxxx

Set a breakpoint at xxxx. B 0 de-activates the breakpoint. This must only be set as the first byte of an instruction, as it temporarily replaces the instruction with E7H.

C – copy

Cxxxx yyyy zzzz

Copy a block of length zzzz from xxxx to yyyy. One byte is copied at a time, starting with the first byte, so if there is an overlap in the two areas data may be destroyed. This command is useful for filling a block with a single value. Make yyyy one greater than xxxx and put the required value into address xxxx. Set zzzz to the number of bytes required.

D – dump

Dxxxx yyyy

Dump the contents of the area from xxxx to yyyy to the serial interface. The data is transmitted in groups of 8 bytes preceded by the location of the first byte in the group and followed by a checksum and LF character. The command terminates by sending a full stop as the last character. The cassette motor output is automatically controlled by this command. No data is written to the tape for about 1 second after start up to allow the motor to reach running speed.

E – execute

Exxxx

Execute program at xxxx. If xxxx is omitted then the stored program counter is used. This means that to continue execution after a breakpoint, just enter E.

L – load from serial interface

L

Loads incoming data into memory. This is compatible with the Dump command. The loaded data is checked and any lines containing errors are scrolled up the screen (and are not stored in memory)so that they can be re-loaded or corrected. All correct lines are displayed for a moment and then vanish. The cassette motor output is automatically controlled by this command and is switched off when the final full stop is received.

M – modify store

Mxxxx

Modify memory starting at address xxxx. The address is displayed followed by the current data. This value may be changed. Enter a “.” at the end of the line to end the command. If you enter several values then the successive address values are changed. This allows several values to be entered at once. All data is, of course, entered in hexadecimal notation.

S – single step

Sxxxx

Executes the single instruction at address xxxx. If xxxx is not specified then the stored program counter is used. This means that to continue single stepping after a breakpoint, just enter S. If the previous command was S then even this need not be re-typed for successive steps – just the enter key. Program registers are stored and displayed after each step.

T – tabulate

Txxxx yyyy

Tabulate (display) a block of memory starting at xxxx and continuing to yyyy-1. It is inadvisable to display more than 68H addresses as the top line scrolls off the screen.

Program register display:
The registers are displayed in the following format during the S command or when an E7H (breakpoint) is encountered

ssss   pppp   aaff   hhll   ddee   bbcc

where:

ssss is the stack pointer pppp is the program counter
aa is the accumulator ff is the flag register
hh is the H register ll is the L register
dd is the D register ee is the E register
bb is the B register cc is the C register

ROM calls

Restart instructions:

C7 RST 0 (0) START Reset the computer. Initialise NASBUG
E7 RST 20h (4) BRKPT Breakpoint – stop & display registers
EF RST 28h (5) PRS Output following string until 0H found

The remaining restart instructions were not made available to the user. They actually jumped into the middle of routines (and sometimes instructions!).

0035H KDEL Approx 7mS delay
0051H MOTFLP Invert the status of the cassette motor output
0069H KBD Scan keyboard & return with C set if present in A
005DH SRLOUT Sends contents of A to serial device
013BH CRT Place character in A onto screen in current posn.
003EH CHIN Get char from serial or keyboard (like KBD)
0244H B2HEX Display contents of A as 2 hex digits on screen
023CH SPACE Print a blank space on screen
0240H CRLF Scroll screen up 1 line and put cursor on next

These were the “official” calls of course. Some software used others, which probably gave the writers of some of the later monitors something to think about!

Advertisement

Nascom Pages