1 |
74 |
ja_rd |
0001 0000 ;***********************************************************************
|
2 |
|
|
0002 0000 ; MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980
|
3 |
|
|
0003 0000 ;***********************************************************************
|
4 |
|
|
0004 0000 ;
|
5 |
|
|
0005 0000 ;DONATED TO THE "SIG/M" CP/M USER'S GROUP BY:
|
6 |
|
|
0006 0000 ;KELLY SMITH, MICROCOSM ASSOCIATES
|
7 |
|
|
0007 0000 ;3055 WACO AVENUE
|
8 |
|
|
0008 0000 ;SIMI VALLEY, CALIFORNIA, 93065
|
9 |
|
|
0009 0000 ;(805) 527-9321 (MODEM, CP/M-NET (TM))
|
10 |
|
|
0010 0000 ;(805) 527-0518 (VERBAL)
|
11 |
|
|
0011 0000 ;
|
12 |
|
|
0012 0000 ;***********************************************************************
|
13 |
|
|
0013 0000 ; Modified 2001/02/28 by Richard Cini for use in the Altair32 Emulator
|
14 |
|
|
0014 0000 ; Project
|
15 |
|
|
0015 0000 ;
|
16 |
|
|
0016 0000 ; Need to somehow connect this code to Windows so that failure messages
|
17 |
|
|
0017 0000 ; can be posted to Windows. Maybe just store error code in
|
18 |
|
|
0018 0000 ; Mem[0xffff]. Maybe trap NOP in the emulator code?
|
19 |
|
|
0019 0000 ;
|
20 |
|
|
0020 0000 ;***********************************************************************
|
21 |
|
|
0021 0000 ; Modified 2006/11/16 by Scott Moore to work on CPU8080 FPGA core
|
22 |
|
|
0022 0000 ;
|
23 |
|
|
0023 0000 ;***********************************************************************
|
24 |
|
|
0024 0000 ; Modified 2007/09/24 by Jose Ruiz for use in light8080 FPGA core
|
25 |
|
|
0025 0000 ;
|
26 |
|
|
0026 0000 ; 1.- Changed formatting for compatibility to CP/M's ASM
|
27 |
|
|
0027 0000 ; 2.- Commented out all Altair / MITS hardware related stuff
|
28 |
|
|
0028 0000 ; 3.- Set origin at 0H
|
29 |
|
|
0029 0000 ;
|
30 |
|
|
0030 0000 ; Modified again in 2008 to make it compatible with TASM assembler.
|
31 |
|
|
0031 0000 ;
|
32 |
|
|
0032 0000 ; Modified 2012/02/12 to add a few CY checks.
|
33 |
|
|
0033 0000 ; Flags go almost completely unchecked in this test.
|
34 |
|
|
0034 0000 ;***********************************************************************
|
35 |
|
|
0035 0000
|
36 |
|
|
0036 0000 ; DS pseudo-directive; reserve space in bytes, without initializing it
|
37 |
|
|
0037 0000 ; (TASM does not have a DS directive)
|
38 |
|
|
0038 0000 #define ds(n) \.org $+n
|
39 |
|
|
0039 0000
|
40 |
|
|
0040 0000 ;
|
41 |
|
|
0041 0000 ; Select controller defines
|
42 |
|
|
0042 0000 ;
|
43 |
|
|
0043 0000 ;selmain: equ 00H ; offset of main control register
|
44 |
|
|
0044 0000 ;sel1msk: equ 02H ; offset of select 1 mask
|
45 |
|
|
0045 0000 ;sel1cmp: equ 03H ; offset of select 1 compare
|
46 |
|
|
0046 0000 ;sel2msk: equ 04H ; offset of select 1 mask
|
47 |
|
|
0047 0000 ;sel2cmp: equ 05H ; offset of select 1 compare
|
48 |
|
|
0048 0000 ;sel3msk: equ 06H ; offset of select 1 mask
|
49 |
|
|
0049 0000 ;sel3cmp: equ 07H ; offset of select 1 compare
|
50 |
|
|
0050 0000 ;sel4msk: equ 08H ; offset of select 1 mask
|
51 |
|
|
0051 0000 ;sel4cmp: equ 09H ; offset of select 1 compare
|
52 |
|
|
0052 0000 ;
|
53 |
|
|
0053 0000 ; bits
|
54 |
|
|
0054 0000 ;
|
55 |
|
|
0055 0000 ;selenb: equ 01H ; enable select
|
56 |
|
|
0056 0000 ;selio: equ 02H ; I/O address or memory
|
57 |
|
|
0057 0000
|
58 |
|
|
0058 0000 ;
|
59 |
|
|
0059 0000 ; Note: select 1 is ROM, 2, is RAM, 3 is interrupt controller, 4 is serial I/O.
|
60 |
|
|
0060 0000 ;
|
61 |
|
|
0061 0000
|
62 |
|
|
0062 0000 ;
|
63 |
|
|
0063 0000 ; Where to place ROM and RAM for this test
|
64 |
|
|
0064 0000 ;
|
65 |
|
|
0065 0000 ;rombas: equ 0000H
|
66 |
|
|
0066 0000 ;rambas: equ rombas+4*1024
|
67 |
|
|
0067 0000 ;
|
68 |
|
|
0068 0000 ; Interrupt controller defines
|
69 |
|
|
0069 0000 ;
|
70 |
|
|
0070 0000 ;intbas: equ 10H
|
71 |
|
|
0071 0000 ;intmsk: equ intbas+00H ; mask
|
72 |
|
|
0072 0000 ;intsts: equ intbas+01H ; status
|
73 |
|
|
0073 0000 ;intact: equ intbas+02H ; active interrupt
|
74 |
|
|
0074 0000 ;intpol: equ intbas+03H ; polarity select
|
75 |
|
|
0075 0000 ;intedg: equ intbas+04H ; edge/level select
|
76 |
|
|
0076 0000 ;intvec: equ intbas+05H ; vector base page
|
77 |
|
|
0077 0000 ;
|
78 |
|
|
0078 0000 ; Mits Serial I/O card
|
79 |
|
|
0079 0000 ;
|
80 |
|
|
0080 0000 ;siobas: equ 20H
|
81 |
|
|
0081 0000 ;sioctl: equ siobas+00H ; control register
|
82 |
|
|
0082 0000 ;siodat: equ siobas+01H ; data
|
83 |
|
|
0083 0000
|
84 |
|
|
0084 0000 ;
|
85 |
|
|
0085 0000 ; Set up selectors
|
86 |
|
|
0086 0000 ;
|
87 |
|
|
0087 0000
|
88 |
|
|
0088 0000 ;
|
89 |
|
|
0089 0000 ; ROM
|
90 |
|
|
0090 0000 ;
|
91 |
|
|
0091 0000 ; mvi a,rombas shr 8 ; enable select 1 to 4kb at base
|
92 |
|
|
0092 0000 ; out sel1cmp
|
93 |
|
|
0093 0000 ; mvi a,(0f000H shr 8) or selenb
|
94 |
|
|
0094 0000 ; out sel1msk
|
95 |
|
|
0095 0000 ;
|
96 |
|
|
0096 0000 ; RAM
|
97 |
|
|
0097 0000 ;
|
98 |
|
|
0098 0000 ; mvi a,rambas shr 8 ; enable select 2 to 1kb at base
|
99 |
|
|
0099 0000 ; out sel2cmp
|
100 |
|
|
0100 0000 ; mvi a,(0fc00H shr 8) or selenb
|
101 |
|
|
0101 0000 ; out sel2msk
|
102 |
|
|
0102 0000 ;
|
103 |
|
|
0103 0000 ; ROM and RAM set up, exit bootstrap mode
|
104 |
|
|
0104 0000 ;
|
105 |
|
|
0105 0000 ; mvi a,00H ; exit bootstrap mode
|
106 |
|
|
0106 0000 ; out selmain
|
107 |
|
|
0107 0000 ;
|
108 |
|
|
0108 0000 ; Serial I/O
|
109 |
|
|
0109 0000 ;
|
110 |
|
|
0110 0000 ; mvi a,siobas ; enable serial controller for 4 addresses
|
111 |
|
|
0111 0000 ; out sel4cmp
|
112 |
|
|
0112 0000 ; mvi a,0fcH or selio or selenb
|
113 |
|
|
0113 0000 ; out sel4msk
|
114 |
|
|
0114 0000
|
115 |
|
|
0115 0000 ;************************************************************
|
116 |
|
|
0116 0000 ; 8080/8085 CPU TEST/DIAGNOSTIC
|
117 |
|
|
0117 0000 ;************************************************************
|
118 |
|
|
0118 0000 ;
|
119 |
|
|
0119 0000 ;note: (1) program assumes "call",and "lxi sp" instructions work;
|
120 |
|
|
0120 0000 ;
|
121 |
|
|
0121 0000 ; (2) instructions not tested are "hlt","di","ei",
|
122 |
|
|
0122 0000 ; and "rst 0" thru "rst 7"
|
123 |
|
|
0123 0000 ;
|
124 |
|
|
0124 0000 ;
|
125 |
|
|
0125 0000 ;
|
126 |
|
|
0126 0000 ;test jump instructions and flags
|
127 |
|
|
0127 0000 ;
|
128 |
|
|
0128 0000 .org 0H
|
129 |
|
|
0129 0000
|
130 |
|
|
0130 0000 31 1D 06 cpu: lxi sp,stack ;set the stack pointer
|
131 |
|
|
0131 0003 3E 77 mvi a,077H ;@ initialize A to remove X values from simulation
|
132 |
|
|
0132 0005 E6 00 ani 0 ;initialize a reg. and clear all flags
|
133 |
|
|
0133 0007 CA 0D 00 jz j010 ;test "jz"
|
134 |
|
|
0134 000A CD 0A 05 call cpuer
|
135 |
|
|
0135 000D D2 13 00 j010: jnc j020 ;test "jnc"
|
136 |
|
|
0136 0010 CD 0A 05 call cpuer
|
137 |
|
|
0137 0013 EA 19 00 j020: jpe j030 ;test "jpe"
|
138 |
|
|
0138 0016 CD 0A 05 call cpuer
|
139 |
|
|
0139 0019 F2 1F 00 j030: jp j040 ;test "jp"
|
140 |
|
|
0140 001C CD 0A 05 call cpuer
|
141 |
|
|
0141 001F C2 2E 00 j040: jnz j050 ;test "jnz"
|
142 |
|
|
0142 0022 DA 2E 00 jc j050 ;test "jc"
|
143 |
|
|
0143 0025 E2 2E 00 jpo j050 ;test "jpo"
|
144 |
|
|
0144 0028 FA 2E 00 jm j050 ;test "jm"
|
145 |
|
|
0145 002B C3 31 00 jmp j060 ;test "jmp" (it's a little late,but what the hell;
|
146 |
|
|
0146 002E CD 0A 05 j050: call cpuer
|
147 |
|
|
0147 0031 C6 06 j060: adi 6 ;a=6,c=0,p=1,s=0,z=0
|
148 |
|
|
0148 0033 C2 39 00 jnz j070 ;test "jnz"
|
149 |
|
|
0149 0036 CD 0A 05 call cpuer
|
150 |
|
|
0150 0039 DA 42 00 j070: jc j080 ;test "jc"
|
151 |
|
|
0151 003C E2 42 00 jpo j080 ;test "jpo"
|
152 |
|
|
0152 003F F2 45 00 jp j090 ;test "jp"
|
153 |
|
|
0153 0042 CD 0A 05 j080: call cpuer
|
154 |
|
|
0154 0045 C6 70 j090: adi 70H ;a=76h,c=0,p=0,s=0,z=0
|
155 |
|
|
0155 0047 E2 4D 00 jpo j100 ;test "jpo"
|
156 |
|
|
0156 004A CD 0A 05 call cpuer
|
157 |
|
|
0157 004D FA 56 00 j100: jm j110 ;test "jm"
|
158 |
|
|
0158 0050 CA 56 00 jz j110 ;test "jz"
|
159 |
|
|
0159 0053 D2 59 00 jnc j120 ;test "jnc"
|
160 |
|
|
0160 0056 CD 0A 05 j110: call cpuer
|
161 |
|
|
0161 0059 C6 81 j120: adi 81H ;a=f7h,c=0,p=0,s=1,z=0
|
162 |
|
|
0162 005B FA 61 00 jm j130 ;test "jm"
|
163 |
|
|
0163 005E CD 0A 05 call cpuer
|
164 |
|
|
0164 0061 CA 6A 00 j130: jz j140 ;test "jz"
|
165 |
|
|
0165 0064 DA 6A 00 jc j140 ;test "jc"
|
166 |
|
|
0166 0067 E2 6D 00 jpo j150 ;test "jpo"
|
167 |
|
|
0167 006A CD 0A 05 j140: call cpuer
|
168 |
|
|
0168 006D C6 FE j150: adi 0feH ;a=f5h,c=1,p=1,s=1,z=0
|
169 |
|
|
0169 006F DA 75 00 jc j160 ;test "jc"
|
170 |
|
|
0170 0072 CD 0A 05 call cpuer
|
171 |
|
|
0171 0075 CA 7E 00 j160: jz j170 ;test "jz"
|
172 |
|
|
0172 0078 E2 7E 00 jpo j170 ;test "jpo"
|
173 |
|
|
0173 007B FA 81 00 jm aimm ;test "jm"
|
174 |
|
|
0174 007E CD 0A 05 j170: call cpuer
|
175 |
|
|
0175 0081 ;
|
176 |
|
|
0176 0081 ;
|
177 |
|
|
0177 0081 ;
|
178 |
|
|
0178 0081 ;test accumulator immediate instructions
|
179 |
|
|
0179 0081 ;
|
180 |
|
|
0180 0081 FE 00 aimm: cpi 0 ;a=f5h,c=0,z=0
|
181 |
|
|
0181 0083 DA 99 00 jc cpie ;test "cpi" for re-set carry
|
182 |
|
|
0182 0086 CA 99 00 jz cpie ;test "cpi" for re-set zero
|
183 |
|
|
0183 0089 FE F5 cpi 0f5H ;a=f5h,c=0,z=1
|
184 |
|
|
0184 008B DA 99 00 jc cpie ;test "cpi" for re-set carry ("adi")
|
185 |
|
|
0185 008E C2 99 00 jnz cpie ;test "cpi" for re-set zero
|
186 |
|
|
0186 0091 FE FF cpi 0ffH ;a=f5h,c=1,z=0
|
187 |
|
|
0187 0093 CA 99 00 jz cpie ;test "cpi" for re-set zero
|
188 |
|
|
0188 0096 DA 9C 00 jc acii ;test "cpi" for set carry
|
189 |
|
|
0189 0099 CD 0A 05 cpie: call cpuer
|
190 |
|
|
0190 009C CE 0A acii: aci 00aH ;a=f5h+0ah+carry(1)=0,c=1
|
191 |
|
|
0191 009E CE 0A aci 00aH ;a=0+0ah+carry(0)=0bh,c=0
|
192 |
|
|
0192 00A0 FE 0B cpi 00bH
|
193 |
|
|
0193 00A2 CA A8 00 jz suii ;test "aci"
|
194 |
|
|
0194 00A5 CD 0A 05 call cpuer
|
195 |
|
|
0195 00A8 D6 0C suii: sui 00cH ;a=ffh,c=0
|
196 |
|
|
0196 00AA D6 0F sui 00fH ;a=f0h,c=1
|
197 |
|
|
0197 00AC FE F0 cpi 0f0H
|
198 |
|
|
0198 00AE CA B4 00 jz sbii ;test "sui"
|
199 |
|
|
0199 00B1 CD 0A 05 call cpuer
|
200 |
|
|
0200 00B4 DE F1 sbii: sbi 0f1H ;a=f0h-0f1h-carry(0)=ffh,c=1
|
201 |
|
|
0201 00B6 DE 0E sbi 0eH ;a=ffh-oeh-carry(1)=f0h,c=0
|
202 |
|
|
0202 00B8 FE F0 cpi 0f0H
|
203 |
|
|
0203 00BA CA C0 00 jz anii ;test "sbi"
|
204 |
|
|
0204 00BD CD 0A 05 call cpuer
|
205 |
|
|
0205 00C0 E6 55 anii: ani 055H ;a=f0h55h=50h,c=0,p=1,s=0,z=0
|
206 |
|
|
0206 00C2 DC 0A 05 cc cpuer
|
207 |
|
|
0207 00C5 CC 0A 05 cz cpuer
|
208 |
|
|
0208 00C8 FE 50 cpi 050H
|
209 |
|
|
0209 00CA CA D0 00 jz orii ;test "ani"
|
210 |
|
|
0210 00CD CD 0A 05 call cpuer
|
211 |
|
|
0211 00D0 F6 3A orii: ori 03aH ;a=50h3ah=7ah,c=0,p=0,s=0,z=0
|
212 |
|
|
0212 00D2 DC 0A 05 cc cpuer
|
213 |
|
|
0213 00D5 CC 0A 05 cz cpuer
|
214 |
|
|
0214 00D8 FE 7A cpi 07aH
|
215 |
|
|
0215 00DA CA E0 00 jz xrii ;test "ori"
|
216 |
|
|
0216 00DD CD 0A 05 call cpuer
|
217 |
|
|
0217 00E0 EE 0F xrii: xri 00fH ;a=7ah0fh=75h,c=0,p=0,s=0,z=0
|
218 |
|
|
0218 00E2 DC 0A 05 cc cpuer
|
219 |
|
|
0219 00E5 CC 0A 05 cz cpuer
|
220 |
|
|
0220 00E8 FE 75 cpi 075H
|
221 |
|
|
0221 00EA CA F0 00 jz c010 ;test "xri"
|
222 |
|
|
0222 00ED CD 0A 05 call cpuer
|
223 |
|
|
0223 00F0 ;
|
224 |
|
|
0224 00F0 ;
|
225 |
|
|
0225 00F0 ;
|
226 |
|
|
0226 00F0 ;test calls and returns
|
227 |
|
|
0227 00F0 ;
|
228 |
|
|
0228 00F0 E6 00 c010: ani 0H ;a=0,c=0,p=1,s=0,z=1
|
229 |
|
|
0229 00F2 DC 0A 05 cc cpuer ;test "cc"
|
230 |
|
|
0230 00F5 E4 0A 05 cpo cpuer ;test "cpo"
|
231 |
|
|
0231 00F8 FC 0A 05 cm cpuer ;test "cm"
|
232 |
|
|
0232 00FB C4 0A 05 cnz cpuer ;test "cnz"
|
233 |
|
|
0233 00FE FE 00 cpi 0H
|
234 |
|
|
0234 0100 CA 06 01 jz c020 ;a=0,c=0,p=0,s=0,z=1
|
235 |
|
|
0235 0103 CD 0A 05 call cpuer
|
236 |
|
|
0236 0106 D6 77 c020: sui 077H ;a=89h,c=1,p=0,s=1,z=0
|
237 |
|
|
0237 0108 D4 0A 05 cnc cpuer ;test "cnc"
|
238 |
|
|
0238 010B EC 0A 05 cpe cpuer ;test "cpe"
|
239 |
|
|
0239 010E F4 0A 05 cp cpuer ;test "cp"
|
240 |
|
|
0240 0111 CC 0A 05 cz cpuer ;test "cz"
|
241 |
|
|
0241 0114 FE 89 cpi 089H
|
242 |
|
|
0242 0116 CA 1C 01 jz c030 ;test for "calls" taking branch
|
243 |
|
|
0243 0119 CD 0A 05 call cpuer
|
244 |
|
|
0244 011C E6 FF c030: ani 0ffH ;set flags back;
|
245 |
|
|
0245 011E E4 29 01 cpo cpoi ;test "cpo"
|
246 |
|
|
0246 0121 FE D9 cpi 0d9H
|
247 |
|
|
0247 0123 CA 86 01 jz movi ;test "call" sequence success
|
248 |
|
|
0248 0126 CD 0A 05 call cpuer
|
249 |
|
|
0249 0129 E8 cpoi: rpe ;test "rpe"
|
250 |
|
|
0250 012A C6 10 adi 010H ;a=99h,c=0,p=0,s=1,z=0
|
251 |
|
|
0251 012C EC 35 01 cpe cpei ;test "cpe"
|
252 |
|
|
0252 012F C6 02 adi 002H ;a=d9h,c=0,p=0,s=1,z=0
|
253 |
|
|
0253 0131 E0 rpo ;test "rpo"
|
254 |
|
|
0254 0132 CD 0A 05 call cpuer
|
255 |
|
|
0255 0135 E0 cpei: rpo ;test "rpo"
|
256 |
|
|
0256 0136 C6 20 adi 020H ;a=b9h,c=0,p=0,s=1,z=0
|
257 |
|
|
0257 0138 FC 41 01 cm cmi ;test "cm"
|
258 |
|
|
0258 013B C6 04 adi 004H ;a=d7h,c=0,p=1,s=1,z=0
|
259 |
|
|
0259 013D E8 rpe ;test "rpe"
|
260 |
|
|
0260 013E CD 0A 05 call cpuer
|
261 |
|
|
0261 0141 F0 cmi: rp ;test "rp"
|
262 |
|
|
0262 0142 C6 80 adi 080H ;a=39h,c=1,p=1,s=0,z=0
|
263 |
|
|
0263 0144 F4 4D 01 cp tcpi ;test "cp"
|
264 |
|
|
0264 0147 C6 80 adi 080H ;a=d3h,c=0,p=0,s=1,z=0
|
265 |
|
|
0265 0149 F8 rm ;test "rm"
|
266 |
|
|
0266 014A CD 0A 05 call cpuer
|
267 |
|
|
0267 014D F8 tcpi: rm ;test "rm"
|
268 |
|
|
0268 014E C6 40 adi 040H ;a=79h,c=0,p=0,s=0,z=0
|
269 |
|
|
0269 0150 D4 59 01 cnc cnci ;test "cnc"
|
270 |
|
|
0270 0153 C6 40 adi 040H ;a=53h,c=0,p=1,s=0,z=0
|
271 |
|
|
0271 0155 F0 rp ;test "rp"
|
272 |
|
|
0272 0156 CD 0A 05 call cpuer
|
273 |
|
|
0273 0159 D8 cnci: rc ;test "rc"
|
274 |
|
|
0274 015A C6 8F adi 08fH ;a=08h,c=1,p=0,s=0,z=0
|
275 |
|
|
0275 015C DC 65 01 cc cci ;test "cc"
|
276 |
|
|
0276 015F D6 02 sui 002H ;a=13h,c=0,p=0,s=0,z=0
|
277 |
|
|
0277 0161 D0 rnc ;test "rnc"
|
278 |
|
|
0278 0162 CD 0A 05 call cpuer
|
279 |
|
|
0279 0165 D0 cci: rnc ;test "rnc"
|
280 |
|
|
0280 0166 C6 F7 adi 0f7H ;a=ffh,c=0,p=1,s=1,z=0
|
281 |
|
|
0281 0168 C4 71 01 cnz cnzi ;test "cnz"
|
282 |
|
|
0282 016B C6 FE adi 0feH ;a=15h,c=1,p=0,s=0,z=0
|
283 |
|
|
0283 016D D8 rc ;test "rc"
|
284 |
|
|
0284 016E CD 0A 05 call cpuer
|
285 |
|
|
0285 0171 C8 cnzi: rz ;test "rz"
|
286 |
|
|
0286 0172 C6 01 adi 001H ;a=00h,c=1,p=1,s=0,z=1
|
287 |
|
|
0287 0174 CC 7D 01 cz czi ;test "cz"
|
288 |
|
|
0288 0177 C6 D0 adi 0d0H ;a=17h,c=1,p=1,s=0,z=0
|
289 |
|
|
0289 0179 C0 rnz ;test "rnz"
|
290 |
|
|
0290 017A CD 0A 05 call cpuer
|
291 |
|
|
0291 017D C0 czi: rnz ;test "rnz"
|
292 |
|
|
0292 017E C6 47 adi 047H ;a=47h,c=0,p=1,s=0,z=0
|
293 |
|
|
0293 0180 FE 47 cpi 047H ;a=47h,c=0,p=1,s=0,z=1
|
294 |
|
|
0294 0182 C8 rz ;test "rz"
|
295 |
|
|
0295 0183 CD 0A 05 call cpuer
|
296 |
|
|
0296 0186 ;
|
297 |
|
|
0297 0186 ;
|
298 |
|
|
0298 0186 ;
|
299 |
|
|
0299 0186 ;test "mov","inr",and "dcr" instructions
|
300 |
|
|
0300 0186 ;
|
301 |
|
|
0301 0186 3E 77 movi: mvi a,077H
|
302 |
|
|
0302 0188 3C inr a
|
303 |
|
|
0303 0189 47 mov b,a
|
304 |
|
|
0304 018A 04 inr b
|
305 |
|
|
0305 018B 48 mov c,b
|
306 |
|
|
0306 018C 0D dcr c
|
307 |
|
|
0307 018D 51 mov d,c
|
308 |
|
|
0308 018E 5A mov e,d
|
309 |
|
|
0309 018F 63 mov h,e
|
310 |
|
|
0310 0190 6C mov l,h
|
311 |
|
|
0311 0191 7D mov a,l ;test "mov" a,l,h,e,d,c,b,a
|
312 |
|
|
0312 0192 3D dcr a
|
313 |
|
|
0313 0193 4F mov c,a
|
314 |
|
|
0314 0194 59 mov e,c
|
315 |
|
|
0315 0195 6B mov l,e
|
316 |
|
|
0316 0196 45 mov b,l
|
317 |
|
|
0317 0197 50 mov d,b
|
318 |
|
|
0318 0198 62 mov h,d
|
319 |
|
|
0319 0199 7C mov a,h ;test "mov" a,h,d,b,l,e,c,a
|
320 |
|
|
0320 019A 57 mov d,a
|
321 |
|
|
0321 019B 14 inr d
|
322 |
|
|
0322 019C 6A mov l,d
|
323 |
|
|
0323 019D 4D mov c,l
|
324 |
|
|
0324 019E 0C inr c
|
325 |
|
|
0325 019F 61 mov h,c
|
326 |
|
|
0326 01A0 44 mov b,h
|
327 |
|
|
0327 01A1 05 dcr b
|
328 |
|
|
0328 01A2 58 mov e,b
|
329 |
|
|
0329 01A3 7B mov a,e ;test "mov" a,e,b,h,c,l,d,a
|
330 |
|
|
0330 01A4 5F mov e,a
|
331 |
|
|
0331 01A5 1C inr e
|
332 |
|
|
0332 01A6 43 mov b,e
|
333 |
|
|
0333 01A7 60 mov h,b
|
334 |
|
|
0334 01A8 24 inr h
|
335 |
|
|
0335 01A9 4C mov c,h
|
336 |
|
|
0336 01AA 69 mov l,c
|
337 |
|
|
0337 01AB 55 mov d,l
|
338 |
|
|
0338 01AC 15 dcr d
|
339 |
|
|
0339 01AD 7A mov a,d ;test "mov" a,d,l,c,h,b,e,a
|
340 |
|
|
0340 01AE 67 mov h,a
|
341 |
|
|
0341 01AF 25 dcr h
|
342 |
|
|
0342 01B0 54 mov d,h
|
343 |
|
|
0343 01B1 42 mov b,d
|
344 |
|
|
0344 01B2 68 mov l,b
|
345 |
|
|
0345 01B3 2C inr l
|
346 |
|
|
0346 01B4 5D mov e,l
|
347 |
|
|
0347 01B5 1D dcr e
|
348 |
|
|
0348 01B6 4B mov c,e
|
349 |
|
|
0349 01B7 79 mov a,c ;test "mov" a,c,e,l,b,d,h,a
|
350 |
|
|
0350 01B8 6F mov l,a
|
351 |
|
|
0351 01B9 2D dcr l
|
352 |
|
|
0352 01BA 65 mov h,l
|
353 |
|
|
0353 01BB 5C mov e,h
|
354 |
|
|
0354 01BC 53 mov d,e
|
355 |
|
|
0355 01BD 4A mov c,d
|
356 |
|
|
0356 01BE 41 mov b,c
|
357 |
|
|
0357 01BF 78 mov a,b
|
358 |
|
|
0358 01C0 FE 77 cpi 077H
|
359 |
|
|
0359 01C2 C4 0A 05 cnz cpuer ;test "mov" a,b,c,d,e,h,l,a
|
360 |
|
|
0360 01C5 ;
|
361 |
|
|
0361 01C5 ;
|
362 |
|
|
0362 01C5 ;
|
363 |
|
|
0363 01C5 ;test arithmetic and logic instructions
|
364 |
|
|
0364 01C5 ;
|
365 |
|
|
0365 01C5 AF xra a
|
366 |
|
|
0366 01C6 06 01 mvi b,001H
|
367 |
|
|
0367 01C8 0E 03 mvi c,003H
|
368 |
|
|
0368 01CA 16 07 mvi d,007H
|
369 |
|
|
0369 01CC 1E 0F mvi e,00fH
|
370 |
|
|
0370 01CE 26 1F mvi h,01fH
|
371 |
|
|
0371 01D0 2E 3F mvi l,03fH
|
372 |
|
|
0372 01D2 80 add b
|
373 |
|
|
0373 01D3 81 add c
|
374 |
|
|
0374 01D4 82 add d
|
375 |
|
|
0375 01D5 83 add e
|
376 |
|
|
0376 01D6 84 add h
|
377 |
|
|
0377 01D7 85 add l
|
378 |
|
|
0378 01D8 87 add a
|
379 |
|
|
0379 01D9 FE F0 cpi 0f0H
|
380 |
|
|
0380 01DB C4 0A 05 cnz cpuer ;test "add" b,c,d,e,h,l,a
|
381 |
|
|
0381 01DE 90 sub b
|
382 |
|
|
0382 01DF 91 sub c
|
383 |
|
|
0383 01E0 92 sub d
|
384 |
|
|
0384 01E1 93 sub e
|
385 |
|
|
0385 01E2 94 sub h
|
386 |
|
|
0386 01E3 95 sub l
|
387 |
|
|
0387 01E4 FE 78 cpi 078H
|
388 |
|
|
0388 01E6 C4 0A 05 cnz cpuer ;test "sub" b,c,d,e,h,l
|
389 |
|
|
0389 01E9 97 sub a
|
390 |
|
|
0390 01EA C4 0A 05 cnz cpuer ;test "sub" a
|
391 |
|
|
0391 01ED 3E 80 mvi a,080H
|
392 |
|
|
0392 01EF 87 add a
|
393 |
|
|
0393 01F0 06 01 mvi b,001H
|
394 |
|
|
0394 01F2 0E 02 mvi c,002H
|
395 |
|
|
0395 01F4 16 03 mvi d,003H
|
396 |
|
|
0396 01F6 1E 04 mvi e,004H
|
397 |
|
|
0397 01F8 26 05 mvi h,005H
|
398 |
|
|
0398 01FA 2E 06 mvi l,006H
|
399 |
|
|
0399 01FC 88 adc b
|
400 |
|
|
0400 01FD 06 80 mvi b,080H
|
401 |
|
|
0401 01FF 80 add b
|
402 |
|
|
0402 0200 80 add b
|
403 |
|
|
0403 0201 89 adc c
|
404 |
|
|
0404 0202 80 add b
|
405 |
|
|
0405 0203 80 add b
|
406 |
|
|
0406 0204 8A adc d
|
407 |
|
|
0407 0205 80 add b
|
408 |
|
|
0408 0206 80 add b
|
409 |
|
|
0409 0207 8B adc e
|
410 |
|
|
0410 0208 80 add b
|
411 |
|
|
0411 0209 80 add b
|
412 |
|
|
0412 020A 8C adc h
|
413 |
|
|
0413 020B 80 add b
|
414 |
|
|
0414 020C 80 add b
|
415 |
|
|
0415 020D 8D adc l
|
416 |
|
|
0416 020E 80 add b
|
417 |
|
|
0417 020F 80 add b
|
418 |
|
|
0418 0210 8F adc a
|
419 |
|
|
0419 0211 FE 37 cpi 037H
|
420 |
|
|
0420 0213 C4 0A 05 cnz cpuer ;test "adc" b,c,d,e,h,l,a
|
421 |
|
|
0421 0216 3E 80 mvi a,080H
|
422 |
|
|
0422 0218 87 add a
|
423 |
|
|
0423 0219 06 01 mvi b,001H
|
424 |
|
|
0424 021B 98 sbb b
|
425 |
|
|
0425 021C 06 FF mvi b,0ffH
|
426 |
|
|
0426 021E 80 add b
|
427 |
|
|
0427 021F 99 sbb c
|
428 |
|
|
0428 0220 80 add b
|
429 |
|
|
0429 0221 9A sbb d
|
430 |
|
|
0430 0222 80 add b
|
431 |
|
|
0431 0223 9B sbb e
|
432 |
|
|
0432 0224 80 add b
|
433 |
|
|
0433 0225 9C sbb h
|
434 |
|
|
0434 0226 80 add b
|
435 |
|
|
0435 0227 9D sbb l
|
436 |
|
|
0436 0228 FE E0 cpi 0e0H
|
437 |
|
|
0437 022A C4 0A 05 cnz cpuer ;test "sbb" b,c,d,e,h,l
|
438 |
|
|
0438 022D 3E 80 mvi a,080H
|
439 |
|
|
0439 022F 87 add a
|
440 |
|
|
0440 0230 9F sbb a
|
441 |
|
|
0441 0231 FE FF cpi 0ffH
|
442 |
|
|
0442 0233 C4 0A 05 cnz cpuer ;test "sbb" a
|
443 |
|
|
0443 0236 3E FF mvi a,0ffH
|
444 |
|
|
0444 0238 06 FE mvi b,0feH
|
445 |
|
|
0445 023A 0E FC mvi c,0fcH
|
446 |
|
|
0446 023C 16 EF mvi d,0efH
|
447 |
|
|
0447 023E 1E 7F mvi e,07fH
|
448 |
|
|
0448 0240 26 F4 mvi h,0f4H
|
449 |
|
|
0449 0242 2E BF mvi l,0bfH
|
450 |
|
|
0450 0244 37 stc
|
451 |
|
|
0451 0245 A7 ana a
|
452 |
|
|
0452 0246 DC 0A 05 cc cpuer
|
453 |
|
|
0453 0249 A1 ana c
|
454 |
|
|
0454 024A A2 ana d
|
455 |
|
|
0455 024B A3 ana e
|
456 |
|
|
0456 024C A4 ana h
|
457 |
|
|
0457 024D A5 ana l
|
458 |
|
|
0458 024E A7 ana a
|
459 |
|
|
0459 024F FE 24 cpi 024H
|
460 |
|
|
0460 0251 C4 0A 05 cnz cpuer ;test "ana" b,c,d,e,h,l,a
|
461 |
|
|
0461 0254 AF xra a
|
462 |
|
|
0462 0255 06 01 mvi b,001H
|
463 |
|
|
0463 0257 0E 02 mvi c,002H
|
464 |
|
|
0464 0259 16 04 mvi d,004H
|
465 |
|
|
0465 025B 1E 08 mvi e,008H
|
466 |
|
|
0466 025D 26 10 mvi h,010H
|
467 |
|
|
0467 025F 2E 20 mvi l,020H
|
468 |
|
|
0468 0261 37 stc
|
469 |
|
|
0469 0262 B0 ora b
|
470 |
|
|
0470 0263 DC 0A 05 cc cpuer
|
471 |
|
|
0471 0266 B1 ora c
|
472 |
|
|
0472 0267 B2 ora d
|
473 |
|
|
0473 0268 B3 ora e
|
474 |
|
|
0474 0269 B4 ora h
|
475 |
|
|
0475 026A B5 ora l
|
476 |
|
|
0476 026B B7 ora a
|
477 |
|
|
0477 026C FE 3F cpi 03fH
|
478 |
|
|
0478 026E C4 0A 05 cnz cpuer ;test "ora" b,c,d,e,h,l,a
|
479 |
|
|
0479 0271 3E 00 mvi a,0H
|
480 |
|
|
0480 0273 26 8F mvi h,08fH
|
481 |
|
|
0481 0275 2E 4F mvi l,04fH
|
482 |
|
|
0482 0277 37 stc
|
483 |
|
|
0483 0278 A8 xra b
|
484 |
|
|
0484 0279 DC 0A 05 cc cpuer
|
485 |
|
|
0485 027C A9 xra c
|
486 |
|
|
0486 027D AA xra d
|
487 |
|
|
0487 027E AB xra e
|
488 |
|
|
0488 027F AC xra h
|
489 |
|
|
0489 0280 AD xra l
|
490 |
|
|
0490 0281 FE CF cpi 0cfH
|
491 |
|
|
0491 0283 C4 0A 05 cnz cpuer ;test "xra" b,c,d,e,h,l
|
492 |
|
|
0492 0286 AF xra a
|
493 |
|
|
0493 0287 C4 0A 05 cnz cpuer ;test "xra" a
|
494 |
|
|
0494 028A 06 44 mvi b,044H
|
495 |
|
|
0495 028C 0E 45 mvi c,045H
|
496 |
|
|
0496 028E 16 46 mvi d,046H
|
497 |
|
|
0497 0290 1E 47 mvi e,047H
|
498 |
|
|
0498 0292 26 05 mvi h,temp0 / 0ffH ;high byte of test memory location
|
499 |
|
|
0499 0294 2E 16 mvi l,temp0 & 0ffH ;low byte of test memory location
|
500 |
|
|
0500 0296 70 mov m,b
|
501 |
|
|
0501 0297 06 00 mvi b,0H
|
502 |
|
|
0502 0299 46 mov b,m
|
503 |
|
|
0503 029A 3E 44 mvi a,044H
|
504 |
|
|
0504 029C B8 cmp b
|
505 |
|
|
0505 029D C4 0A 05 cnz cpuer ;test "mov" m,b and b,m
|
506 |
|
|
0506 02A0 72 mov m,d
|
507 |
|
|
0507 02A1 16 00 mvi d,0H
|
508 |
|
|
0508 02A3 56 mov d,m
|
509 |
|
|
0509 02A4 3E 46 mvi a,046H
|
510 |
|
|
0510 02A6 BA cmp d
|
511 |
|
|
0511 02A7 C4 0A 05 cnz cpuer ;test "mov" m,d and d,m
|
512 |
|
|
0512 02AA 73 mov m,e
|
513 |
|
|
0513 02AB 1E 00 mvi e,0H
|
514 |
|
|
0514 02AD 5E mov e,m
|
515 |
|
|
0515 02AE 3E 47 mvi a,047H
|
516 |
|
|
0516 02B0 BB cmp e
|
517 |
|
|
0517 02B1 C4 0A 05 cnz cpuer ;test "mov" m,e and e,m
|
518 |
|
|
0518 02B4 74 mov m,h
|
519 |
|
|
0519 02B5 26 05 mvi h,temp0 / 0ffH
|
520 |
|
|
0520 02B7 2E 16 mvi l,temp0 & 0ffH
|
521 |
|
|
0521 02B9 66 mov h,m
|
522 |
|
|
0522 02BA 3E 05 mvi a,temp0 / 0ffH
|
523 |
|
|
0523 02BC BC cmp h
|
524 |
|
|
0524 02BD C4 0A 05 cnz cpuer ;test "mov" m,h and h,m
|
525 |
|
|
0525 02C0 75 mov m,l
|
526 |
|
|
0526 02C1 26 05 mvi h,temp0 / 0ffH
|
527 |
|
|
0527 02C3 2E 16 mvi l,temp0 & 0ffH
|
528 |
|
|
0528 02C5 6E mov l,m
|
529 |
|
|
0529 02C6 3E 16 mvi a,temp0 & 0ffH
|
530 |
|
|
0530 02C8 BD cmp l
|
531 |
|
|
0531 02C9 C4 0A 05 cnz cpuer ;test "mov" m,l and l,m
|
532 |
|
|
0532 02CC 26 05 mvi h,temp0 / 0ffH
|
533 |
|
|
0533 02CE 2E 16 mvi l,temp0 & 0ffH
|
534 |
|
|
0534 02D0 3E 32 mvi a,032H
|
535 |
|
|
0535 02D2 77 mov m,a
|
536 |
|
|
0536 02D3 BE cmp m
|
537 |
|
|
0537 02D4 C4 0A 05 cnz cpuer ;test "mov" m,a
|
538 |
|
|
0538 02D7 86 add m
|
539 |
|
|
0539 02D8 FE 64 cpi 064H
|
540 |
|
|
0540 02DA C4 0A 05 cnz cpuer ;test "add" m
|
541 |
|
|
0541 02DD AF xra a
|
542 |
|
|
0542 02DE 7E mov a,m
|
543 |
|
|
0543 02DF FE 32 cpi 032H
|
544 |
|
|
0544 02E1 C4 0A 05 cnz cpuer ;test "mov" a,m
|
545 |
|
|
0545 02E4 26 05 mvi h,temp0 / 0ffH
|
546 |
|
|
0546 02E6 2E 16 mvi l,temp0 & 0ffH
|
547 |
|
|
0547 02E8 7E mov a,m
|
548 |
|
|
0548 02E9 96 sub m
|
549 |
|
|
0549 02EA C4 0A 05 cnz cpuer ;test "sub" m
|
550 |
|
|
0550 02ED 3E 80 mvi a,080H
|
551 |
|
|
0551 02EF 87 add a
|
552 |
|
|
0552 02F0 8E adc m
|
553 |
|
|
0553 02F1 FE 33 cpi 033H
|
554 |
|
|
0554 02F3 C4 0A 05 cnz cpuer ;test "adc" m
|
555 |
|
|
0555 02F6 3E 80 mvi a,080H
|
556 |
|
|
0556 02F8 87 add a
|
557 |
|
|
0557 02F9 9E sbb m
|
558 |
|
|
0558 02FA FE CD cpi 0cdH
|
559 |
|
|
0559 02FC C4 0A 05 cnz cpuer ;test "sbb" m
|
560 |
|
|
0560 02FF 37 stc
|
561 |
|
|
0561 0300 A6 ana m
|
562 |
|
|
0562 0301 DC 0A 05 cc cpuer
|
563 |
|
|
0563 0304 C4 0A 05 cnz cpuer ;test "ana" m
|
564 |
|
|
0564 0307 3E 25 mvi a,025H
|
565 |
|
|
0565 0309 37 stc
|
566 |
|
|
0566 030A B6 ora m
|
567 |
|
|
0567 030B DC 0A 05 cc cpuer
|
568 |
|
|
0568 030E FE 37 cpi 37H
|
569 |
|
|
0569 0310 C4 0A 05 cnz cpuer ;test "ora" m
|
570 |
|
|
0570 0313 37 stc
|
571 |
|
|
0571 0314 AE xra m
|
572 |
|
|
0572 0315 DC 0A 05 cc cpuer
|
573 |
|
|
0573 0318 FE 05 cpi 005H
|
574 |
|
|
0574 031A C4 0A 05 cnz cpuer ;test "xra" m
|
575 |
|
|
0575 031D 36 55 mvi m,055H
|
576 |
|
|
0576 031F 34 inr m
|
577 |
|
|
0577 0320 35 dcr m
|
578 |
|
|
0578 0321 86 add m
|
579 |
|
|
0579 0322 FE 5A cpi 05aH
|
580 |
|
|
0580 0324 C4 0A 05 cnz cpuer ;test "inr","dcr",and "mvi" m
|
581 |
|
|
0581 0327 01 FF 12 lxi b,12ffH
|
582 |
|
|
0582 032A 11 FF 12 lxi d,12ffH
|
583 |
|
|
0583 032D 21 FF 12 lxi h,12ffH
|
584 |
|
|
0584 0330 03 inx b
|
585 |
|
|
0585 0331 13 inx d
|
586 |
|
|
0586 0332 23 inx h
|
587 |
|
|
0587 0333 3E 13 mvi a,013H
|
588 |
|
|
0588 0335 B8 cmp b
|
589 |
|
|
0589 0336 C4 0A 05 cnz cpuer ;test "lxi" and "inx" b
|
590 |
|
|
0590 0339 BA cmp d
|
591 |
|
|
0591 033A C4 0A 05 cnz cpuer ;test "lxi" and "inx" d
|
592 |
|
|
0592 033D BC cmp h
|
593 |
|
|
0593 033E C4 0A 05 cnz cpuer ;test "lxi" and "inx" h
|
594 |
|
|
0594 0341 3E 00 mvi a,0H
|
595 |
|
|
0595 0343 B9 cmp c
|
596 |
|
|
0596 0344 C4 0A 05 cnz cpuer ;test "lxi" and "inx" b
|
597 |
|
|
0597 0347 BB cmp e
|
598 |
|
|
0598 0348 C4 0A 05 cnz cpuer ;test "lxi" and "inx" d
|
599 |
|
|
0599 034B BD cmp l
|
600 |
|
|
0600 034C C4 0A 05 cnz cpuer ;test "lxi" and "inx" h
|
601 |
|
|
0601 034F 0B dcx b
|
602 |
|
|
0602 0350 1B dcx d
|
603 |
|
|
0603 0351 2B dcx h
|
604 |
|
|
0604 0352 3E 12 mvi a,012H
|
605 |
|
|
0605 0354 B8 cmp b
|
606 |
|
|
0606 0355 C4 0A 05 cnz cpuer ;test "dcx" b
|
607 |
|
|
0607 0358 BA cmp d
|
608 |
|
|
0608 0359 C4 0A 05 cnz cpuer ;test "dcx" d
|
609 |
|
|
0609 035C BC cmp h
|
610 |
|
|
0610 035D C4 0A 05 cnz cpuer ;test "dcx" h
|
611 |
|
|
0611 0360 3E FF mvi a,0ffH
|
612 |
|
|
0612 0362 B9 cmp c
|
613 |
|
|
0613 0363 C4 0A 05 cnz cpuer ;test "dcx" b
|
614 |
|
|
0614 0366 BB cmp e
|
615 |
|
|
0615 0367 C4 0A 05 cnz cpuer ;test "dcx" d
|
616 |
|
|
0616 036A BD cmp l
|
617 |
|
|
0617 036B C4 0A 05 cnz cpuer ;test "dcx" h
|
618 |
|
|
0618 036E 32 16 05 sta temp0
|
619 |
|
|
0619 0371 AF xra a
|
620 |
|
|
0620 0372 3A 16 05 lda temp0
|
621 |
|
|
0621 0375 FE FF cpi 0ffH
|
622 |
|
|
0622 0377 C4 0A 05 cnz cpuer ;test "lda" and "sta"
|
623 |
|
|
0623 037A 2A 14 05 lhld tempp
|
624 |
|
|
0624 037D 22 16 05 shld temp0
|
625 |
|
|
0625 0380 3A 14 05 lda tempp
|
626 |
|
|
0626 0383 47 mov b,a
|
627 |
|
|
0627 0384 3A 16 05 lda temp0
|
628 |
|
|
0628 0387 B8 cmp b
|
629 |
|
|
0629 0388 C4 0A 05 cnz cpuer ;test "lhld" and "shld"
|
630 |
|
|
0630 038B 3A 15 05 lda tempp+1
|
631 |
|
|
0631 038E 47 mov b,a
|
632 |
|
|
0632 038F 3A 17 05 lda temp0+1
|
633 |
|
|
0633 0392 B8 cmp b
|
634 |
|
|
0634 0393 C4 0A 05 cnz cpuer ;test "lhld" and "shld"
|
635 |
|
|
0635 0396 3E AA mvi a,0aaH
|
636 |
|
|
0636 0398 32 16 05 sta temp0
|
637 |
|
|
0637 039B 44 mov b,h
|
638 |
|
|
0638 039C 4D mov c,l
|
639 |
|
|
0639 039D AF xra a
|
640 |
|
|
0640 039E 0A ldax b
|
641 |
|
|
0641 039F FE AA cpi 0aaH
|
642 |
|
|
0642 03A1 C4 0A 05 cnz cpuer ;test "ldax" b
|
643 |
|
|
0643 03A4 3C inr a
|
644 |
|
|
0644 03A5 02 stax b
|
645 |
|
|
0645 03A6 3A 16 05 lda temp0
|
646 |
|
|
0646 03A9 FE AB cpi 0abH
|
647 |
|
|
0647 03AB C4 0A 05 cnz cpuer ;test "stax" b
|
648 |
|
|
0648 03AE 3E 77 mvi a,077H
|
649 |
|
|
0649 03B0 32 16 05 sta temp0
|
650 |
|
|
0650 03B3 2A 14 05 lhld tempp
|
651 |
|
|
0651 03B6 11 00 00 lxi d,00000H
|
652 |
|
|
0652 03B9 EB xchg
|
653 |
|
|
0653 03BA AF xra a
|
654 |
|
|
0654 03BB 1A ldax d
|
655 |
|
|
0655 03BC FE 77 cpi 077H
|
656 |
|
|
0656 03BE C4 0A 05 cnz cpuer ;test "ldax" d and "xchg"
|
657 |
|
|
0657 03C1 AF xra a
|
658 |
|
|
0658 03C2 84 add h
|
659 |
|
|
0659 03C3 85 add l
|
660 |
|
|
0660 03C4 C4 0A 05 cnz cpuer ;test "xchg"
|
661 |
|
|
0661 03C7 3E CC mvi a,0ccH
|
662 |
|
|
0662 03C9 12 stax d
|
663 |
|
|
0663 03CA 3A 16 05 lda temp0
|
664 |
|
|
0664 03CD FE CC cpi 0ccH
|
665 |
|
|
0665 03CF 12 stax d
|
666 |
|
|
0666 03D0 3A 16 05 lda temp0
|
667 |
|
|
0667 03D3 FE CC cpi 0ccH
|
668 |
|
|
0668 03D5 C4 0A 05 cnz cpuer ;test "stax" d
|
669 |
|
|
0669 03D8 21 77 77 lxi h,07777H
|
670 |
|
|
0670 03DB 29 dad h
|
671 |
|
|
0671 03DC 3E EE mvi a,0eeH
|
672 |
|
|
0672 03DE BC cmp h
|
673 |
|
|
0673 03DF C4 0A 05 cnz cpuer ;test "dad" h
|
674 |
|
|
0674 03E2 BD cmp l
|
675 |
|
|
0675 03E3 C4 0A 05 cnz cpuer ;test "dad" h
|
676 |
|
|
0676 03E6 21 55 55 lxi h,05555H
|
677 |
|
|
0677 03E9 01 FF FF lxi b,0ffffH
|
678 |
|
|
0678 03EC 09 dad b
|
679 |
|
|
0679 03ED 3E 55 mvi a,055H
|
680 |
|
|
0680 03EF D4 0A 05 cnc cpuer ;test "dad" b
|
681 |
|
|
0681 03F2 BC cmp h
|
682 |
|
|
0682 03F3 C4 0A 05 cnz cpuer ;test "dad" b
|
683 |
|
|
0683 03F6 3E 54 mvi a,054H
|
684 |
|
|
0684 03F8 BD cmp l
|
685 |
|
|
0685 03F9 C4 0A 05 cnz cpuer ;test "dad" b
|
686 |
|
|
0686 03FC 21 AA AA lxi h,0aaaaH
|
687 |
|
|
0687 03FF 11 33 33 lxi d,03333H
|
688 |
|
|
0688 0402 19 dad d
|
689 |
|
|
0689 0403 3E DD mvi a,0ddH
|
690 |
|
|
0690 0405 BC cmp h
|
691 |
|
|
0691 0406 C4 0A 05 cnz cpuer ;test "dad" d
|
692 |
|
|
0692 0409 BD cmp l
|
693 |
|
|
0693 040A C4 0A 05 cnz cpuer ;test "dad" b
|
694 |
|
|
0694 040D 37 stc
|
695 |
|
|
0695 040E D4 0A 05 cnc cpuer ;test "stc"
|
696 |
|
|
0696 0411 3F cmc
|
697 |
|
|
0697 0412 DC 0A 05 cc cpuer ;test "cmc
|
698 |
|
|
0698 0415 3E AA mvi a,0aaH
|
699 |
|
|
0699 0417 2F cma
|
700 |
|
|
0700 0418 FE 55 cpi 055H
|
701 |
|
|
0701 041A C4 0A 05 cnz cpuer ;test "cma"
|
702 |
|
|
0702 041D B7 ora a ;re-set auxiliary carry
|
703 |
|
|
0703 041E 27 daa
|
704 |
|
|
0704 041F FE 55 cpi 055H
|
705 |
|
|
0705 0421 C4 0A 05 cnz cpuer ;test "daa"
|
706 |
|
|
0706 0424 3E 88 mvi a,088H
|
707 |
|
|
0707 0426 87 add a
|
708 |
|
|
0708 0427 27 daa
|
709 |
|
|
0709 0428 FE 76 cpi 076H
|
710 |
|
|
0710 042A C4 0A 05 cnz cpuer ;test "daa"
|
711 |
|
|
0711 042D AF xra a
|
712 |
|
|
0712 042E 3E AA mvi a,0aaH
|
713 |
|
|
0713 0430 27 daa
|
714 |
|
|
0714 0431 D4 0A 05 cnc cpuer ;test "daa"
|
715 |
|
|
0715 0434 FE 10 cpi 010H
|
716 |
|
|
0716 0436 C4 0A 05 cnz cpuer ;test "daa"
|
717 |
|
|
0717 0439 AF xra a
|
718 |
|
|
0718 043A 3E 9A mvi a,09aH
|
719 |
|
|
0719 043C 27 daa
|
720 |
|
|
0720 043D D4 0A 05 cnc cpuer ;test "daa"
|
721 |
|
|
0721 0440 C4 0A 05 cnz cpuer ;test "daa"
|
722 |
|
|
0722 0443 37 stc
|
723 |
|
|
0723 0444 3E 42 mvi a,042H
|
724 |
|
|
0724 0446 07 rlc
|
725 |
|
|
0725 0447 DC 0A 05 cc cpuer ;test "rlc" for re-set carry
|
726 |
|
|
0726 044A 07 rlc
|
727 |
|
|
0727 044B D4 0A 05 cnc cpuer ;test "rlc" for set carry
|
728 |
|
|
0728 044E FE 09 cpi 009H
|
729 |
|
|
0729 0450 C4 0A 05 cnz cpuer ;test "rlc" for rotation
|
730 |
|
|
0730 0453 0F rrc
|
731 |
|
|
0731 0454 D4 0A 05 cnc cpuer ;test "rrc" for set carry
|
732 |
|
|
0732 0457 0F rrc
|
733 |
|
|
0733 0458 FE 42 cpi 042H
|
734 |
|
|
0734 045A C4 0A 05 cnz cpuer ;test "rrc" for rotation
|
735 |
|
|
0735 045D 17 ral
|
736 |
|
|
0736 045E 17 ral
|
737 |
|
|
0737 045F D4 0A 05 cnc cpuer ;test "ral" for set carry
|
738 |
|
|
0738 0462 FE 08 cpi 008H
|
739 |
|
|
0739 0464 C4 0A 05 cnz cpuer ;test "ral" for rotation
|
740 |
|
|
0740 0467 1F rar
|
741 |
|
|
0741 0468 1F rar
|
742 |
|
|
0742 0469 DC 0A 05 cc cpuer ;test "rar" for re-set carry
|
743 |
|
|
0743 046C FE 02 cpi 002H
|
744 |
|
|
0744 046E C4 0A 05 cnz cpuer ;test "rar" for rotation
|
745 |
|
|
0745 0471 01 34 12 lxi b,01234H
|
746 |
|
|
0746 0474 11 AA AA lxi d,0aaaaH
|
747 |
|
|
0747 0477 21 55 55 lxi h,05555H
|
748 |
|
|
0748 047A AF xra a
|
749 |
|
|
0749 047B C5 push b
|
750 |
|
|
0750 047C D5 push d
|
751 |
|
|
0751 047D E5 push h
|
752 |
|
|
0752 047E F5 push psw
|
753 |
|
|
0753 047F 01 00 00 lxi b,00000H
|
754 |
|
|
0754 0482 11 00 00 lxi d,00000H
|
755 |
|
|
0755 0485 21 00 00 lxi h,00000H
|
756 |
|
|
0756 0488 3E C0 mvi a,0c0H
|
757 |
|
|
0757 048A C6 F0 adi 0f0H
|
758 |
|
|
0758 048C F1 pop psw
|
759 |
|
|
0759 048D E1 pop h
|
760 |
|
|
0760 048E D1 pop d
|
761 |
|
|
0761 048F C1 pop b
|
762 |
|
|
0762 0490 DC 0A 05 cc cpuer ;test "push psw" and "pop psw"
|
763 |
|
|
0763 0493 C4 0A 05 cnz cpuer ;test "push psw" and "pop psw"
|
764 |
|
|
0764 0496 E4 0A 05 cpo cpuer ;test "push psw" and "pop psw"
|
765 |
|
|
0765 0499 FC 0A 05 cm cpuer ;test "push psw" and "pop psw"
|
766 |
|
|
0766 049C 3E 12 mvi a,012H
|
767 |
|
|
0767 049E B8 cmp b
|
768 |
|
|
0768 049F C4 0A 05 cnz cpuer ;test "push b" and "pop b"
|
769 |
|
|
0769 04A2 3E 34 mvi a,034H
|
770 |
|
|
0770 04A4 B9 cmp c
|
771 |
|
|
0771 04A5 C4 0A 05 cnz cpuer ;test "push b" and "pop b"
|
772 |
|
|
0772 04A8 3E AA mvi a,0aaH
|
773 |
|
|
0773 04AA BA cmp d
|
774 |
|
|
0774 04AB C4 0A 05 cnz cpuer ;test "push d" and "pop d"
|
775 |
|
|
0775 04AE BB cmp e
|
776 |
|
|
0776 04AF C4 0A 05 cnz cpuer ;test "push d" and "pop d"
|
777 |
|
|
0777 04B2 3E 55 mvi a,055H
|
778 |
|
|
0778 04B4 BC cmp h
|
779 |
|
|
0779 04B5 C4 0A 05 cnz cpuer ;test "push h" and "pop h"
|
780 |
|
|
0780 04B8 BD cmp l
|
781 |
|
|
0781 04B9 C4 0A 05 cnz cpuer ;test "push h" and "pop h"
|
782 |
|
|
0782 04BC 21 00 00 lxi h,00000H
|
783 |
|
|
0783 04BF 39 dad sp
|
784 |
|
|
0784 04C0 22 1B 05 shld savstk ;save the "old" stack-pointer;
|
785 |
|
|
0785 04C3 31 1A 05 lxi sp,temp4
|
786 |
|
|
0786 04C6 3B dcx sp
|
787 |
|
|
0787 04C7 3B dcx sp
|
788 |
|
|
0788 04C8 33 inx sp
|
789 |
|
|
0789 04C9 3B dcx sp
|
790 |
|
|
0790 04CA 3E 55 mvi a,055H
|
791 |
|
|
0791 04CC 32 18 05 sta temp2
|
792 |
|
|
0792 04CF 2F cma
|
793 |
|
|
0793 04D0 32 19 05 sta temp3
|
794 |
|
|
0794 04D3 C1 pop b
|
795 |
|
|
0795 04D4 B8 cmp b
|
796 |
|
|
0796 04D5 C4 0A 05 cnz cpuer ;test "lxi","dad","inx",and "dcx" sp
|
797 |
|
|
0797 04D8 2F cma
|
798 |
|
|
0798 04D9 B9 cmp c
|
799 |
|
|
0799 04DA C4 0A 05 cnz cpuer ;test "lxi","dad","inx", and "dcx" sp
|
800 |
|
|
0800 04DD 21 1A 05 lxi h,temp4
|
801 |
|
|
0801 04E0 F9 sphl
|
802 |
|
|
0802 04E1 21 33 77 lxi h,07733H
|
803 |
|
|
0803 04E4 3B dcx sp
|
804 |
|
|
0804 04E5 3B dcx sp
|
805 |
|
|
0805 04E6 E3 xthl
|
806 |
|
|
0806 04E7 3A 19 05 lda temp3
|
807 |
|
|
0807 04EA FE 77 cpi 077H
|
808 |
|
|
0808 04EC C4 0A 05 cnz cpuer ;test "sphl" and "xthl"
|
809 |
|
|
0809 04EF 3A 18 05 lda temp2
|
810 |
|
|
0810 04F2 FE 33 cpi 033H
|
811 |
|
|
0811 04F4 C4 0A 05 cnz cpuer ;test "sphl" and "xthl"
|
812 |
|
|
0812 04F7 3E 55 mvi a,055H
|
813 |
|
|
0813 04F9 BD cmp l
|
814 |
|
|
0814 04FA C4 0A 05 cnz cpuer ;test "sphl" and "xthl"
|
815 |
|
|
0815 04FD 2F cma
|
816 |
|
|
0816 04FE BC cmp h
|
817 |
|
|
0817 04FF C4 0A 05 cnz cpuer ;test "sphl" and "xthl"
|
818 |
|
|
0818 0502 2A 1B 05 lhld savstk ;restore the "old" stack-pointer
|
819 |
|
|
0819 0505 F9 sphl
|
820 |
|
|
0820 0506 21 0F 05 lxi h,cpuok
|
821 |
|
|
0821 0509 E9 pchl ;test "pchl"
|
822 |
|
|
0822 050A
|
823 |
|
|
0823 050A 3E AA cpuer: mvi a, 0aaH ; set exit code (failure)
|
824 |
|
|
0824 050C D3 20 out 20h
|
825 |
|
|
0825 050E 76 hlt ; stop here
|
826 |
|
|
0826 050F
|
827 |
|
|
0827 050F 3E 55 cpuok: mvi a, 55H ;
|
828 |
|
|
0828 0511 D3 20 out 20h
|
829 |
|
|
0829 0513 76 hlt ; stop here - no trap
|
830 |
|
|
0830 0514
|
831 |
|
|
0831 0514
|
832 |
|
|
0832 0514 ;
|
833 |
|
|
0833 0514 ; Data area in program space
|
834 |
|
|
0834 0514 ;
|
835 |
|
|
0835 0514 16 05 tempp: .dw temp0 ;pointer used to test "lhld","shld",
|
836 |
|
|
0836 0516 ; and "ldax" instructions
|
837 |
|
|
0837 0516 ;
|
838 |
|
|
0838 0516 ; Data area in variable space
|
839 |
|
|
0839 0516 ;
|
840 |
|
|
0840 0516 temp0: ds(1) ;temporary storage for cpu test memory locations
|
841 |
|
|
0840 0517
|
842 |
|
|
0841 0517 temp1: ds(1) ;temporary storage for cpu test memory locations
|
843 |
|
|
0841 0518
|
844 |
|
|
0842 0518 temp2: ds(1) ;temporary storage for cpu test memory locations
|
845 |
|
|
0842 0519
|
846 |
|
|
0843 0519 temp3: ds(1) ;temporary storage for cpu test memory locations
|
847 |
|
|
0843 051A
|
848 |
|
|
0844 051A temp4: ds(1) ;temporary storage for cpu test memory locations
|
849 |
|
|
0844 051B
|
850 |
|
|
0845 051B savstk: ds(2) ;temporary stack-pointer storage location
|
851 |
|
|
0845 051D
|
852 |
|
|
0846 051D
|
853 |
|
|
0847 051D ds(256) ;de-bug stack pointer storage area
|
854 |
|
|
0847 061D
|
855 |
|
|
0848 061D 00 00 stack: .dw 0
|
856 |
|
|
0849 061F
|
857 |
|
|
0850 061F .end
|
858 |
|
|
0851 061F
|
859 |
|
|
tasm: Number of errors = 0
|