Download Print this page

Intel EV80Cl96KB User Manual page 48

Microcontroller evaluation board

Advertisement

-5O-
EV80C196KB Microcontroller Evaluation Board User's Manual
READ-PSW ( Code OCH )
This command loads the RISM-DATA register with the PSW (Program Status Word)
associated with the user's code. Most RISM implementations will have to check
RUN-FLAG to determine how to access the user's PSW.
WRITE-PSW (Code OxOD)
This command loads the PSW (Program Status Word) associated with the user's
code from the RISM-DATA register. The host software will only invoke this com-
mand while user code is not running.
READ-SP (Code OxOE)
This command loads the RISM-DATA register with the SP (Stack Pointer) associ-
ated+with the user's code.
WRITESP (Code OxOF)
This command loads the SP (Stack Pointer) from the RISM-DATA register. This
command must also push two values into the newly created stack area. These
values are the PC (first) and PSW (second) associated with the idle loop which
executes while user code is not running. The host software will only invoke this
command while user code is not running.
READ-PC (Code 0x10)
This command loads the RISM-DATA register with the PC (Program Counter)
associated with the user's code. Most RISM implementations will have to check
RUN-FLAG to determine how to access the user's PC.
WRITE-PC (Code 0x11)
This command loads the PC (Program Counter) associated with the user's code
from the RISM DATA register. The host software will only invoke this command
while user code is not running.
START-USER (Code 0x12)
This command is responsible for starting the execution of user code, clearing the
TRAP-FLAG, and setting RUN-FLAG. The action of this command relies on it
being executed as part of an ISR (interrupt service routine). At the start of the ISR
the current PC and PSW are pushed into the stack. If the user code is not running
the PC and PSW which are pushed into the stack will be associated with an idle loop
which the RISM runs while it waits for an interrupt. The START-USER command
deletes the PC and PSW from the stack and replaces them with USER-PC and
USER-PSW. When control returns from the ISR the user's code will execute rather
than the idle loop. The host software will not issue a GO command if the user code
is already running.
STOP-USER (code 0x13)
This command is responsible for stopping the execution of user code and clearing
the RUN-FLAG. The action of the HALT command mirrors that of the GO com-
mand. In the case of the HALT command the user's PC and PSW are pushed into
the stack upon entry to the ISR. The STOP-USER command saves this user infor-
mation in USER PC and USER-PSW and replaces it with PC and PSW values
which are asso&ted with the idle loop. When control returns from the ISR the idle
loop will execute rather than the user's code. The host software will not issue a
HALT command unless the user code is running.

Advertisement

loading