Download Print this page

IMS IMSAI 8080 User Manual page 33

Advertisement

OCTAL
ADD.
INST.
000 000
257
0000
001
147
333
002
003
377
004
157
005
371
006
257
007
201
010
302
011
023
012
000
013
123
014
333
015
377
016
137
017
252
020
302
021
041
022
000
023
071
024
322
025
006
026
000
027
170
030
007
031
107
032
323
033
377
034
257
035
117
GAME PROGRAM LISTING
HEX
ADD.
INST.
AF
01
67
DB
02
03
FF
04
6F
05
F9
06
AF
07
81
08
C2
09
13
OA
00
OB
53
OC
DB
OD
FF
OE
5F
OF
AA
10
C2
11
21
12
00
13
39
14
D2
15
06
16
00
17
78
18
07
19
47
D3
1A
IB
FF
1C
AF
ID
4F
DESCRIPTION
MNEMONIC
XRA, A
.Exclusive OR A to itself (put zero in A)
MOV H, A
Move A to H (put zero in H)
Input data
INP
from front panel switches
Move A to L
MOV L, A
Put HAL regjnto SP
SPHL
XRA, A
Exclusive OR A to itself (put zero in A)
Put C in A, affecting flag bits
ADD C
JNZ
Jump if not zero
(skip switch test for debounce after a switch change)
i f NORMAL, CONTINUE
Move E to D
MOV D, E
Input data
INP
from front panel switches
Move A to E
MOV E, A
Exclusive OR D to A
XRA, D
Jump if result not all O's
JNZ
(change display if switch position changed from last time)
IF SWITCHES UNCHANGED, CONTINUE
Add SP to HL
DAD SP
JNC
Jump if no carry results
(return to read switch loop if no carry yet)
IF CARRY, CONTINUE
MOV A, B
Move B to A
RLC
Rotate left 1
MOV B, A
Store A in B
OUT
Output A
in front panel lights
XRA, A
Exclusive OR A to Itself (put zero in A)
MOV C, A
Move A to C (Reset debounce indicator)
General Assembly and
Test Instructions

Advertisement

loading