A Look at the
Sample Program
The sample program "COMMAND_READER" used in this chapter is
shown figure 2-1. The program emulates a primitive command
interpreter.
Data Declarations
Msg_A, Msg_B and Msg_I are the messages used by the program to
respond to various command inputs.
Initialization
The locations of stack and input area(Cmd_Input) are moved into
address registers for use by the program. Next, the CLEAR routine
clears the command byte(the first location pointed to by Cmd_Input -
0ff800 hex). Cmd_Input contains 00 hex for late use.
Scan
This routine continuously reads the byte at location of Cmd_Input until
it is something other than a null character (00 hex); when this occurs,
the Exe_Cmd routine is executed.
Exe_Cmd
Compares the input byte (now something other than a null) to the
possible command bytes of "A" (ASCII 41 hex) and "B" (ASCII 42
hex), then jumps to the appropriate set up routine for the command
message. If the input byte does not match either of these values, a
branch to a set up routine for an error message is executed.
Cmd_A, Cmd_B, Cmd_I
These routines set up the proper parameters for writing the output
message: the number of bytes in the message is moved to the R3L
register and the base address of the message in the data area is moved
to address register ER4.
Getting Started 2-3
Summary of Contents for H8/3003
Page 2: ......
Page 12: ...Figure 1 1 HP 64784 Emulator for the H8 3003 1 2 Introduction to the H8 3003 Emulator ...
Page 56: ...Notes 2 36 Getting Started ...
Page 63: ...Figure 3 3 Installing the PGA adaptor 3001 mode 3 4 3 7 In Circuit Emulation ...
Page 64: ...Figure 3 4 Installing the PGA adaptor 3004 5 mode 3 3 8 In Circuit Emulation ...
Page 82: ...Target System Interface ø RES STBY NMI MD0 2 3 26 In Circuit Emulation ...
Page 83: ... RESO P1 P2 P5 A0 23 P3 P4 D0 15 3 27 In Circuit Emulation ...
Page 84: ...P6 P8 P9 PA PB PC 3 28 In Circuit Emulation ...
Page 85: ...P7 AVcc Vref AVss 3 29 In Circuit Emulation ...
Page 105: ...Notes 4 20 Configuring the Emulator ...
Page 121: ...Notes A 16 H8 3003 Emulator Specific Command Syntax ...