Remote Processing RPC-220 User Manual

Page 15

Advertising
background image

WRITING, DEBUGGING, AND SAVING PROGRAMS

SECTION 3

Page 3-4

DI

All internal memory fr om 0 to FF H are displayed.

DP D isplay I/O port

Addresses for I/O devices (and monitor EPROM)
are show n in the I/O mem ory m ap above. This
comm and autom atically sets the I/ O contr ol CP U bit
P 4 . 0 . T he D P co m m an d is us ed to a cc e ss I/ O
devices (RTC , expa nsion). C omma nd forma t is:

DP address<cr>

You can view the contents of the monitor EPROM
in U3 using this command. T he address i s f r om 0
to 0x7fff.

DR D isplay Registers

CPU registers A, B, R0-R7, DPTR, CPU ports P1
and P3, stack pointer (SP), program status word
(PS), interrupt (IE), and program counter (PC) are
displayed. These registers are displayed after a
program break is encountered and are loaded on a
GOTO command.

When using this com mand after a power up or push
button reset, certain registers default to a variety of
states. The SP is always 7, DPTR and PSW (PS) are
0. P1 and P 3 are set to a state that forces bank 0 and
memory segment. Additionally, the PC (program
counter) is not valid. Comm and format is simply:

DR

The term inal outputs:

A B R0 R1 R2 R3 R4 R5 R6 R7 P1 P3 PS SP DPTR IE PC

12 34 56 78 9A BC DE F0 12 34 C7 CE 04 4E 0123 00 2114

Number s under the registers are for illustration only.
Upon reset or program break, register values are stored
in external RAM. Register values after reset reflect
default conditions. PC is not reliable and IE is always 0.
Registers may be modified using the MX com mand. The
starting address is displayed on a break command.

DS Display SF R' s
S p ec i al fu n ct io n r eg is te r s a r e ac c es se d by th e D S
comm and. F ormat is:

DS

A < cr> is not necessary.

S p ec i al fu n ct io n r eg is te r s a r e th o se b et w ee n 80 H - F F H .
These include timers, A and B accumulators, P SW, and
other register s. Since ther e are only 128 locations, 8
l in e s a r e di sp la y ed . T h is c om m a n d i s d if f er e n t f r om D R
in that the current contents is displayed. DR show s those
saved after a break or
reset.

NOTE: A short pr ogram is run from RAM at address

0xfffa to directly access these registers. You
may have to reload your program after
executing this command.

Modify Commands
There are 4 com mands to modify mem ory, r egisters, or
I/O:

MX

Modify eXternal memory

MI

Modify Internal memory

MS

Modify Special function registers

MO

M o d if y I / O

Data or status to be mo dified is displayed one byte at a
time. The mem ory segment, if appropriate, is displayed
at the start of the line followed by its address. The
current data is then displayed. If the data is modified or
skipped (by pressing the space bar), the next address and
its data is displayed. A max imum of 4 addr esses and data
are displayed on a line.

For ex ample, MX c an display the following at address
0x0000:

00:0000 0A 0001 0D 03 0002 52 43 0003 43 51

Segment:addr ess is first displayed followed by the
current data at that address. If < space> is hit, nothing
is modified and the next address and data are displayed.
To modify, simply enter the new value.

Addresses and data are displayed in hex notation.
Modifications are entered in hex.

Data is modified or not modified depending upon the
number of data character s entered, if any, and type of
continuation character hit. Pressing < space> always
continues to the next address. If any characters were
entered, then data at the address displayed gets modified
by the value displayed. If no characters were enter ed,
then no modifications are made. Pressing < Enter>
ends the modification routine. If any digits were
entered, then data at the last address is modified.

Advertising