HP 64793 Series User Manual page 21

H8/338/329 emulator softkey interface
Table of Contents

Advertisement

;****************************************************
;* The destination area is cleared.
;****************************************************
Write_Msg
MOV.W
Clear_Old
MOV.B
Clear_Loop
MOV.B
ADDS.W
DEC.B
BNE
;****************************************************
;* Message is written to the destination.
;****************************************************
MOV.W
Write_Loop
MOV.B
MOV.B
ADDS.W
DEC.B
BNE
;****************************************************
;* Go back and scan for next command.
;****************************************************
BRA
.SECTION
;****************************************************
;* Command input byte.
;****************************************************
Cmd_Input
.RES.B
.RES.B
;****************************************************
;* Destination of the command messages.
;****************************************************
Msg_Dest
.RES.W
Stack
.END
2-4 Getting Started
#Msg_Dest,R5
#h'20,R6L
R0L,@R5
#1,R5
R6L
Clear_Loop
#Msg_Dest,R5
@R4+,R6L
R6L,@R5
#1,R5
R3L
Write_Loop
Clear
Data,COMMON
1
1
H'7f
Init
Figure 2-1. Sample Program Listing (Cont'd)
Initialization
The program instruction at the Init label initializes the stack pointer.
Reading Input
The instruction at the Clear label clears any random data or previous
commands from the Cmd_Input byte. The Scan loop continually
reads the Cmd_Input byte to see if a command is entered (a value
other than 0 hex).

Advertisement

Table of Contents
loading

This manual is also suitable for:

64793a64793b

Table of Contents