EMAC PRIMER Instruction Manual page 54

Table of Contents

Advertisement

ADDRESS
FF01
FF02
FF03
FF04
FF05
FF06
FF07
FF08
FF09
FF0A
FF0B
FF0C
FF0D
FF0E
FF0F
FF10
FF11
FF12
FF13
FF14
FF15
FF16
FF17
FF18
FF19
FF1A
FF1B
FF1C
FF1D
FF1E
FF1F
FF20
FF21
FF22
FF23
FF24
Enter the program into memory and do the following:
CURRENT PC
FF01
Single step once and HL will be loaded with the constant 8000h.
FF04
Single step again and DE will be loaded with -100h (FF00h) so subtraction can be performed by using DAD D.
FF07
Single step and the A register will be 1.
FF09
Single step and the A register will be copied to the variable space at FF24.
FF0C
Load the PC register with FF24 and you will see that the data that was there before (FF) has been changed to 01.
Restore the original value of the PC register by loading it with FF0C. Single step and DE will be added to HL
which will change HL to 7F00h which is the same result that would occur if 100h was subtracted from it.
FF0D
Single step and HL will be stored in the 16 bit variable space. Load the PC register with FF22 and you will see that
the L register has been stored at FF22. Press enter and you will see that the H register has been stored at FF23.
Load the PC register with FF10.
FF10
Set a breakpoint at FF16 and run the program from the current address (FF10). This is done because the
instruction at this address and the 3 that follow will be repeated until the HL register equals 0, which in this case
will be 32,512 times.
FF16
Examine the A register then single step and examine it again. You will see that it has been loaded with the value
that was stored at FF24 earlier.
FF19
Single step twice and the A register will be output to the digital output LEDs and then its value will be rotated left.
FF1C
Examine the HL register pair then single step and examine it again. HL has now been loaded with the variable that
DATA
INSTRUCTION
21
LXI
H,8000
00
80
11
LXI
D,FF00
00
FF
3E
MVI
A,1
01
32
STA
FF24
24
FF
19
DAD
D
22
SHLD FF22
22
FF
2B
DCX
H
7C
MOV
A,H
B5
ORA
L
C2
JNZ
FF10
10
FF
3A
LDA
FF24
24
FF
D3
OUT
11
11
07
RLC
2A
LHLD FF22
22
FF
C3
JMP
FF09
09
FF
FF
(dlaytm least significant byte)
FF
(dlaytm most significant byte)
FF
(leddta)
54

Advertisement

Table of Contents
loading

Table of Contents