RCA RMB-167 User Manual

Page 16

Advertising
background image

- -

10

Address Range

Jumpers
inserted

0-7FFFh

8000h-FFFFh

none

RAM

RAM

CFG0

EPROM

RAM

CFG1

RAM

EPROM

CFG0 and
CFG1

EPROM

EPROM

The EPROM at low memory may contain start-up code which is executed upon reset. In this case
the jumper at P0.4 must be removed so that the microcontroller does not enter the bootstrap
loader mode. The microcontroller simply starts executing from address 0.

With the jumpers CFG0 or CFG1 (or both) installed, the RMB-167 may still be bootstrapped.
Again, the jumper P0.4 must be installed. This forces the SAB-C167 to enter the bootstrap mode
upon reset. The bootstrap sequence terminates with a software reset instruction which starts
executing the program starting at address 0. With CFG0 installed, this is the beginning of
EPROM. That is, upon bootstrap, the code in EPROM is executed. While possible, first
bootstrapping and then executing the code in EPROM is somewhat superfluous since any
initialization code of the bootstrap loader may be placed in EPROM.

5.4

Moving RMON167 to EPROM

As an example of placing a valid program in EPROM, consider modifying the monitor program
RMON167 as given below. It is assumed that the lower 32K of memory is EPROM, and the
higher 32K is RAM. The origin of the program is changed to 1000h. Note that the monitor needs
buffers to store the commands and the parameters. These buffers are defined to occupy the
beginning of RAM at 8000h. Also, the greeting message is changed to indicate that it is the
EPROM version of the monitor.

Only the beginning few instructions and the greeting message are changed. Namely,

1.

The buffers are moved to 8000h and 8020h, respectively,

2.

Jump statements are placed at RESET and NMI vectors,

3.

The origin of the monitor program is moved to 1000h

4.

The initialization to CPS is now accomplished by an inter-segment jump to 1010h,

5.

And finally, the greeting message is changed.

Also note that the address of register SYSCON is different in the SAB80C166 and SAB C167
microcontrollers. The monitor program must be assembled by specifying the C167 register
definitions. The program listing follows.

CODE0 section code AT 0000h
; r15 is used for flags:
; bit 0 - error
; 1 - dash
; 2 - equal
; 3 -
;---------------------------------------------------
; --- monitor system variables ---

Advertising