Lecture 6
Lecture 6
Example :
Write a program that displays the
word HELP on the Trainer Address
Field for 10 seconds.
Display HELP Example
Label Mnemonic Comment
NAME HELP ;Program Name
DELAY EQU 1200H ;Delay Routine ROM Address
DISPLAY EQU 1000H ;Display Routine ROM Address
ORG 8100H ;Program Starting Address
LXI SP, 8200H ;Initialise Stack Pointer
LXI H, CHARS ;Point to display characters Buffer
CALL DISPLAY ;Display HELP
MVI B, 0AH ;10 seconds loop counter
WAIT: CALL DELAY ;1 second delay
DCR B ;Is 10 seconds Interval over?
JNZ WAIT ;No – Another one second Delay
RST 0 ;Yes - Done.
CHARS: DB 11H, 0EH, 15H, 19H ;HELP Characters
DB 24H, 24H ;Blank characters for Display Data field
Exercise
CHARS: DB 24H,24H,24H ;Initialize BLANK characters
DB 24H,24H,24H ;for the entire Display Unit
END
Exercise