|
| Address Range | |
Jumpers |
| ||
inserted |
|
|
|
none | RAM |
| RAM |
CFG0 | EPROM |
| RAM |
CFG1 | RAM |
| EPROM |
CFG0 and | EPROM |
| EPROM |
CFG1 |
|
|
|
The EPROM at low memory may contain
With the jumpers CFG0 or CFG1 (or both) installed, the
5.4Moving 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
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 -
;