RCA RMB-167 User Manual

Page 31

Advertising
background image

- -

25

9.1 MON167 Monitor

The monitor program RMON167 allows inspecting and modifying the first 64K segment of RMB-
167 memory, configuring the ports, inputting and outputting from the general purpose ports,
downloading code in the Intel Hex format, and branching to user code. RMON167 features are
invoked by single-letter commands. RMON167 assumes a 20MHz (40 MHz) system crystal.
Serial port 0 is initialized to run at 9600 Baud with 8 bits of data, 1 stop bit and no parity bits.

RMON167 is intended to be downloaded after bootstrapping the RMB-167 board. RMON167 is
placed starting at address 0C000h. The first 256 bytes are reserved for monitor variables. The
entry point to RMON167 is at address C100h. To set up RMON167, initialize READS166 and the
RMB-167 board and invoke the Bootstrap command as explained in the previous section. From
the TTY menu, select Download to download RMON167.HEX. Branch to and execute
RMON167 using the Run command under the TTY menu. Specify address C100 since the entry
point to RMON167 is at 0C000h. Note that RMON167 places a jump to C100 at the nonmaskable
interrupt vector. Thus, RMON167 may subsequently be invoked by pressing the NMI pushbutton
on the RMB167-CRI. RMON167 initializes the stack and resets the interrupts. Thus, even after
the NMI button is pressed, RMON167 clears the NMI interrupt by executing a dummy ’return from
interrupt’ instruction.

Alternatively, RMON167 may be placed in EPROM and invoked upon reset. The source code for
RMON167 is given on the distribution disk. RMON167 is not optimized for speed or size, but
rather for clarity and pedagogical value. The legal users are encouraged to modify RMON167
and use portions of it in applications programs.

The single-letter commands of RMON167 are explained below.
D

Download HEX file

The D command places RMON167 in a download mode. The monitor expects to receive code in
the Intel Hex format through serial port 0. The download mode is terminated when the last line of
Intel Hex code is received (when the byte count is 0).
C

Port Configuration

The C command is used to configure the ports, i.e., the port direction registers DPnn. Cn displays
the current setting of DPn. Cn=mmmm writes the word mmmm to register DPn.
G

Go

The user code at address xxxx is branched to by the Gxxxx command. Note that the user
program may return to RMON167 by a branching instruction to address 0C000h. RMON167
initializes the stack, thus, either a jump or a call instruction may be used to return to RMON167.
H

Help

The H command displays a summary of available monitor commands.
M

Memory

The first 64K segment of the RMB167-CRI memory may be inspected or modified by the M
command. The M command is also useful to poke short programs into memory.
M XXXX displays the current contents of memory address XXXX.
M XXXX=nn inserts the byte nn into memory address XXXX. When this command is used,
RMON167 displays the current contents as well as the new contents. The address XXXX is
incremented and the current contents of (XXXX+1) are displayed. Consecutive bytes may be
written starting at XXXX. The process is terminated if a carriage return or an illegal hexadecimal
digit is keyed in.
M XXXX-YYYY displays the block of memory between addresses XXXX and YYYY.
M XXXX-YYYY=nn fills the memory block XXXX to YYYY with byte nn.

Advertising