OpenCores
URL https://opencores.org/ocsvn/light8080/light8080/trunk

Subversion Repositories light8080

[/] [light8080/] [trunk/] [sw/] [demos/] [exer/] [8080EXER.MAC] - Blame information for rev 87

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 87 ja_rd
        title   'Z80 instruction set exerciser'
2
 
3
; zexlax.z80 - Z80 instruction set exerciser
4
; Copyright (C) 1994  Frank D. Cringle
5
;
6
; This program is free software; you can redistribute it and/or
7
; modify it under the terms of the GNU General Public License
8
; as published by the Free Software Foundation; either version 2
9
; of the License, or (at your option) any later version.
10
;
11
; This program is distributed in the hope that it will be useful,
12
; but WITHOUT ANY WARRANTY; without even the implied warranty of
13
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
; GNU General Public License for more details.
15
;
16
; You should have received a copy of the GNU General Public License
17
; along with this program; if not, write to the Free Software
18
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
;
20
;******************************************************************************
21
;
22
; Modified to exercise an 8080 by Ian Bartholomew, February 2009
23
;
24
; I have made the following changes -
25
;
26
; Converted all mnemonics to 8080 and rewritten any Z80 code used
27
; in the original exerciser.  Changes are tagged with a #idb in the
28
; source code listing.
29
;
30
; Removed any test descriptors that are not used.
31
;
32
; Changed the macro definitions to work in M80
33
;
34
; The machine state snapshot has been changed to remove the IX/IY registers.
35
; They have been replaced by two more copies of HL to obviate the need
36
; for major changes in the exerciser code.
37
;
38
; Changed flag mask in all tests to 0ffh to reflect that the 8080, unlike the 8085
39
; and Z80, does define the unused bits in the flag register - [S Z 0 AC 0 P 1 C]
40
;
41
;******************************************************************************
42
 
43
MASK_RX_IRQ   equ 20h
44
MASK_TX_IRQ   equ 10h
45
MASK_RX_RDY   equ 02h
46
MASK_TX_RDY   equ 01h
47
 
48
UART_DATA     equ 80h
49
UART_STATUS   equ 81h
50
UART_BAUDL    equ 82h
51
UART_BAUDH    equ 83h
52
IRQ_ENABLE    equ 88h
53
 
54
P1IN          equ 84h
55
P2OUT         equ 86h
56
 
57
 
58
 
59
        .8080
60
        aseg
61
 
62
          org   0H              ; Reset entry point
63
          jmp   100h            ; Jump to program start
64
 
65
          ;***** Interrupt vectors in area 0008h-0038h *****************
66
          org   5h              ; BDOS entry point
67
          jmp   bdos$entry
68
 
69
          org   0h+(1*8)        ; interrupt vector 1
70
          ei
71
          ret
72
          org   0h+(2*8)        ; interrupt vector 2
73
          ei
74
          ret
75
          org   0h+(3*8)        ; interrupt vector 3
76
          ei
77
          ret
78
          org   0h+(4*8)        ; interrupt vector 4
79
          ei
80
          ret
81
          org   0h+(5*8)        ; interrupt vector 5
82
          ei
83
          ret
84
          org   0h+(6*8)        ; interrupt vector 6
85
          ei
86
          ret
87
          org   0h+(7*8)        ; interrupt vector 7
88
        ei
89
        ret
90
 
91
 
92
 
93
        org     100h
94
 
95
begin:  jmp     start
96
 
97
; machine state before test (needs to be at predictably constant address)
98
msbt:   ds      14
99
spbt:   ds      2
100
 
101
; For the purposes of this test program, the machine state consists of:
102
;       a 2 byte memory operand, followed by
103
;       the registers iy,ix,hl,de,bc,af,sp
104
; for a total of 16 bytes.
105
 
106
; The program tests instructions (or groups of similar instructions)
107
; by cycling through a sequence of machine states, executing the test
108
; instruction for each one and running a 32-bit crc over the resulting
109
; machine states.  At the end of the sequence the crc is compared to
110
; an expected value that was found empirically on a real Z80.
111
 
112
; A test case is defined by a descriptor which consists of:
113
;       a flag mask byte,
114
;       the base case,
115
;       the incement vector,
116
;       the shift vector,
117
;       the expected crc,
118
;       a short descriptive message.
119
;
120
; The flag mask byte is used to prevent undefined flag bits from
121
; influencing the results.  Documented flags are as per Mostek Z80
122
; Technical Manual.
123
;
124
; The next three parts of the descriptor are 20 byte vectors
125
; corresponding to a 4 byte instruction and a 16 byte machine state.
126
; The first part is the base case, which is the first test case of
127
; the sequence.  This base is then modified according to the next 2
128
; vectors.  Each 1 bit in the increment vector specifies a bit to be
129
; cycled in the form of a binary counter.  For instance, if the byte
130
; corresponding to the accumulator is set to 0ffh in the increment
131
; vector, the test will be repeated for all 256 values of the
132
; accumulator.  Note that 1 bits don't have to be contiguous.  The
133
; number of test cases 'caused' by the increment vector is equal to
134
; 2^(number of 1 bits).  The shift vector is similar, but specifies a
135
; set of bits in the test case that are to be successively inverted.
136
; Thus the shift vector 'causes' a number of test cases equal to the
137
; number of 1 bits in it.
138
 
139
; The total number of test cases is the product of those caused by the
140
; counter and shift vectors and can easily become unweildy.  Each
141
; individual test case can take a few milliseconds to execute, due to
142
; the overhead of test setup and crc calculation, so test design is a
143
; compromise between coverage and execution time.
144
 
145
; This program is designed to detect differences between
146
; implementations and is not ideal for diagnosing the causes of any
147
; discrepancies.  However, provided a reference implementation (or
148
; real system) is available, a failing test case can be isolated by
149
; hand using a binary search of the test space.
150
 
151
 
152
start:  ;lhld   6
153
        lxi     h,8000
154
        sphl
155
        lxi     d,msg1
156
        mvi     c,9
157
        call    bdos
158
 
159
        lxi     h,tests         ; first test case
160
loop:   mov     a,m             ; end of list ?
161
        inx     h
162
        ora     m
163
        jz      done
164
        dcx     h
165
        call    stt
166
        jmp     loop
167
 
168
done:   lxi     d,msg2
169
        mvi     c,9
170
        call    bdos
171
  di
172
  hlt
173
        jmp     0                ; warm boot
174
 
175
tests:
176
        dw      add16
177
        dw      alu8i
178
        dw      alu8r
179
        dw      daa
180
        dw      inca
181
        dw      incb
182
        dw      incbc
183
        dw      incc
184
        dw      incd
185
        dw      incde
186
        dw      ince
187
        dw      inch
188
        dw      inchl
189
        dw      incl
190
        dw      incm
191
        dw      incsp
192
        dw      ld162
193
        dw      ld166
194
        dw      ld16im
195
        dw      ld8bd
196
        dw      ld8im
197
        dw      ld8rr
198
        dw      lda
199
        dw      rot8080
200
        dw      stabd
201
        dw      0
202
 
203
tstr    macro   insn,memop,hliy,hlix,hl,de,bc,flags,acc,sp
204
        local   lab
205
lab:    db      insn
206
        ds      lab+4-$,0
207
        dw      memop,hliy,hlix,hl,de,bc
208
        db      flags
209
        db      acc
210
        dw      sp
211
        if      $-lab ne 20
212
        error   'missing parameter'
213
        endif
214
        endm
215
 
216
tmsg    macro   m
217
        local   lab
218
lab:    db      m
219
        if      $ ge lab+30
220
        error   'message too long'
221
        else
222
        ds      lab+30-$,'.'
223
        endif
224
        db      '$'
225
        endm
226
 
227
; add hl, (19,456 cycles)
228
add16:  db      0ffh            ; flag mask
229
        tstr    9,0c4a5h,0c4c7h,0d226h,0a050h,058eah,08566h,0c6h,0deh,09bc9h
230
        tstr    030h,0,0,0,0f821h,0,0,0,0,0             ; (512 cycles)
231
        tstr    0,0,0,0,-1,-1,-1,0d7h,0,-1              ; (38 cycles)
232
        db        014h,047h,04bh,0a6h                                   ; expected crc
233
        tmsg    'dad '
234
 
235
; aluop a,nn (28,672 cycles)
236
alu8i:  db      0ffh            ; flag mask
237
        tstr    0c6h,09140h,07e3ch,07a67h,0df6dh,05b61h,00b29h,010h,066h,085b2h
238
        tstr    038h,0,0,0,0,0,0,0,-1,0                 ; (2048 cycles)
239
        tstr    <0,-1>,0,0,0,0,0,0,0d7h,0,0           ; (14 cycles)
240
        db        09eh,092h,02fh,09eh                                   ; expected crc
241
        tmsg    'aluop nn'
242
 
243
; aluop a, (753,664 cycles)
244
alu8r:  db      0ffh            ; flag mask
245
        tstr    080h,0c53eh,0573ah,04c4dh,msbt,0e309h,0a666h,0d0h,03bh,0adbbh
246
        tstr    03fh,0,0,0,0,0,0,0,-1,0                         ; (16,384 cycles)
247
        tstr    0,0ffh,0,0,0,-1,-1,0d7h,0,0             ; (46 cycles)
248
        db        0cfh,076h,02ch,086h                                   ; expected crc
249
        tmsg    'aluop '
250
 
251
; 
252
daa:    db      0ffh            ; flag mask
253
        tstr    027h,02141h,009fah,01d60h,0a559h,08d5bh,09079h,004h,08eh,0299dh
254
        tstr    018h,0,0,0,0,0,0,0d7h,-1,0              ; (65,536 cycles)
255
        tstr    0,0,0,0,0,0,0,0,0,0                     ; (1 cycle)
256
        db        0bbh,03fh,003h,00ch                                   ; expected crc
257
        tmsg    ''
258
 
259
;  a (3072 cycles)
260
inca:   db      0ffh            ; flag mask
261
        tstr    03ch,04adfh,0d5d8h,0e598h,08a2bh,0a7b0h,0431bh,044h,05ah,0d030h
262
        tstr    001h,0,0,0,0,0,0,0,-1,0                 ; (512 cycles)
263
        tstr    0,0,0,0,0,0,0,0d7h,0,0                  ; (6 cycles)
264
        db        0adh,0b6h,046h,00eh                                     ; expected crc
265
        tmsg    ' a'
266
 
267
;  b (3072 cycles)
268
incb:   db      0ffh            ; flag mask
269
        tstr    004h,0d623h,0432dh,07a61h,08180h,05a86h,01e85h,086h,058h,09bbbh
270
        tstr    001h,0,0,0,0,0,0ff00h,0,0,0             ; (512 cycles)
271
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
272
        db        083h,0edh,013h,045h                                   ; expected crc
273
        tmsg    ' b'
274
 
275
;  bc (1536 cycles)
276
incbc:  db      0ffh            ; flag mask
277
        tstr    003h,0cd97h,044abh,08dc9h,0e3e3h,011cch,0e8a4h,002h,049h,02a4dh
278
        tstr    008h,0,0,0,0,0,0f821h,0,0,0             ; (256 cycles)
279
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
280
        db        0f7h,092h,087h,0cdh                                   ; expected crc
281
        tmsg    ' b'
282
 
283
;  c (3072 cycles)
284
incc:   db      0ffh            ; flag mask
285
        tstr    00ch,0d789h,00935h,0055bh,09f85h,08b27h,0d208h,095h,005h,00660h
286
        tstr    001h,0,0,0,0,0,0ffh,0,0,0               ; (512 cycles)
287
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
288
        db        0e5h,0f6h,072h,01bh                                   ; expected crc
289
        tmsg    ' c'
290
 
291
;  d (3072 cycles)
292
incd:   db      0ffh            ; flag mask
293
        tstr    014h,0a0eah,05fbah,065fbh,0981ch,038cch,0debch,043h,05ch,003bdh
294
        tstr    001h,0,0,0,0,0ff00h,0,0,0,0             ; (512 cycles)
295
        tstr    0,0,0,0,0,0,0,0d7h,0,0                  ; (6 cycles)
296
        db        015h,0b5h,057h,09ah                                   ; expected crc
297
        tmsg    ' d'
298
 
299
;  de (1536 cycles)
300
incde:  db      0ffh            ; flag mask
301
        tstr    013h,0342eh,0131dh,028c9h,00acah,09967h,03a2eh,092h,0f6h,09d54h
302
        tstr    008h,0,0,0,0,0f821h,0,0,0,0             ; (256 cycles)
303
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
304
        db        07fh,04eh,025h,001h                                   ; expected crc
305
        tmsg    ' d'
306
 
307
;  e (3072 cycles)
308
ince:   db      0ffh            ; flag mask
309
        tstr    01ch,0602fh,04c0dh,02402h,0e2f5h,0a0f4h,0a10ah,013h,032h,05925h
310
        tstr    001h,0,0,0,0,0ffh,0,0,0,0               ; (512 cycles)
311
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
312
        db        0cfh,02ah,0b3h,096h                                   ; expected crc
313
        tmsg    ' e'
314
 
315
;  h (3072 cycles)
316
inch:   db      0ffh            ; flag mask
317
        tstr    024h,01506h,0f2ebh,0e8ddh,0262bh,011a6h,0bc1ah,017h,006h,02818h
318
        tstr    001h,0,0,0,0ff00h,0,0,0,0,0             ; (512 cycles)
319
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
320
        db        012h,0b2h,095h,02ch                                   ; expected crc
321
        tmsg    ' h'
322
 
323
;  hl (1536 cycles)
324
inchl:  db      0ffh            ; flag mask
325
        tstr    023h,0c3f4h,007a5h,01b6dh,04f04h,0e2c2h,0822ah,057h,0e0h,0c3e1h
326
        tstr    008h,0,0,0,0f821h,0,0,0,0,0             ; (256 cycles)
327
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
328
        db        09fh,02bh,023h,0c0h                                   ; expected crc
329
        tmsg    ' h'
330
 
331
;  l (3072 cycles)
332
incl:   db      0ffh            ; flag mask
333
        tstr    02ch,08031h,0a520h,04356h,0b409h,0f4c1h,0dfa2h,0d1h,03ch,03ea2h
334
        tstr    001h,0,0,0,0ffh,0,0,0,0,0                 ; (512 cycles)
335
        tstr    0,0,0,0,0,0,0,0d7h,0,0                    ; (6 cycles)
336
        db        0ffh,057h,0d3h,056h                               ; expected crc
337
        tmsg    ' l'
338
 
339
;  (hl) (3072 cycles)
340
incm:   db      0ffh            ; flag mask
341
        tstr    034h,0b856h,00c7ch,0e53eh,msbt,0877eh,0da58h,015h,05ch,01f37h
342
        tstr    001h,0ffh,0,0,0,0,0,0,0,0                 ; (512 cycles)
343
        tstr    0,0,0,0,0,0,0,0d7h,0,0                    ; (6 cycles)
344
        db        092h,0e9h,063h,0bdh                                   ; expected crc
345
        tmsg    ' m'
346
 
347
;  sp (1536 cycles)
348
incsp:  db      0ffh            ; flag mask
349
        tstr    033h,0346fh,0d482h,0d169h,0deb6h,0a494h,0f476h,053h,002h,0855bh
350
        tstr    008h,0,0,0,0,0,0,0,0,0f821h             ; (256 cycles)
351
        tstr    0,0,0,0,0,0,0,0d7h,0,0                          ; (6 cycles)
352
        db        0d5h,070h,02fh,0abh                                   ; expected crc
353
        tmsg    ' sp'
354
 
355
; ld hl,(nnnn) (16 cycles)
356
ld162:  db      0ffh            ; flag mask
357
        tstr    <02ah,low msbt,high msbt>,09863h,07830h,02077h,0b1feh,0b9fah,0abb8h,004h,006h,06015h
358
        tstr    0,0,0,0,0,0,0,0,0,0                             ; (1 cycle)
359
        tstr    0,-1,0,0,0,0,0,0,0,0                    ; (16 cycles)
360
        db        0a9h,0c3h,0d5h,0cbh                                     ; expected crc
361
        tmsg    'lhld nnnn'
362
 
363
; ld (nnnn),hl (16 cycles)
364
ld166:  db      0ffh            ; flag mask
365
        tstr    <022h,low msbt,high msbt>,0d003h,07772h,07f53h,03f72h,064eah,0e180h,010h,02dh,035e9h
366
        tstr    0,0,0,0,0,0,0,0,0,0                             ; (1 cycle)
367
        tstr    0,0,0,0,-1,0,0,0,0,0                    ; (16 cycles)
368
        db        0e8h,086h,04fh,026h                                     ; expected crc
369
        tmsg    'shld nnnn'
370
 
371
; ld ,nnnn (64 cycles)
372
ld16im: db      0ffh            ; flag mask
373
        tstr    1,05c1ch,02d46h,08eb9h,06078h,074b1h,0b30eh,046h,0d1h,030cch
374
        tstr    030h,0,0,0,0,0,0,0,0,0                  ; (4 cycles)
375
        tstr    <0,0ffh,0ffh>,0,0,0,0,0,0,0,0,0              ; (16 cycles)
376
        db        0fch,0f4h,06eh,012h                                   ; expected crc
377
        tmsg    'lxi ,nnnn'
378
 
379
; ld a,<(bc),(de)> (44 cycles)
380
ld8bd:  db      0ffh            ; flag mask
381
        tstr    00ah,0b3a8h,01d2ah,07f8eh,042ach,msbt,msbt,0c6h,0b1h,0ef8eh
382
        tstr    010h,0,0,0,0,0,0,0,0,0                    ; (2 cycles)
383
        tstr    0,0ffh,0,0,0,0,0,0d7h,-1,0              ; (22 cycles)
384
        db        02bh,082h,01dh,05fh                                     ; expected crc
385
        tmsg    'ldax '
386
 
387
; ld ,nn (64 cycles)
388
ld8im:  db      0ffh            ; flag mask
389
        tstr    6,0c407h,0f49dh,0d13dh,00339h,0de89h,07455h,053h,0c0h,05509h
390
        tstr    038h,0,0,0,0,0,0,0,0,0                  ; (8 cycles)
391
        tstr    0,0,0,0,0,0,0,0,-1,0                    ; (8 cycles)
392
        db        0eah,0a7h,020h,044h                                   ; expected crc
393
        tmsg    'mvi ,nn'
394
 
395
; ld , (3456 cycles)
396
ld8rr:  db      0ffh            ; flag mask
397
        tstr    040h,072a4h,0a024h,061ach,msbt,082c7h,0718fh,097h,08fh,0ef8eh
398
        tstr    03fh,0,0,0,0,0,0,0,0,0          ; (64 cycles)
399
        tstr    0,0ffh,0,0,0,-1,-1,0d7h,-1,0    ; (54 cycles)
400
        db        010h,0b5h,08ch,0eeh                                   ; expected crc
401
        tmsg    'mov ,'
402
 
403
; ld a,(nnnn) / ld (nnnn),a (44 cycles)
404
lda:    db      0ffh            ; flag mask
405
        tstr    <032h,low msbt,high msbt>,0fd68h,0f4ech,044a0h,0b543h,00653h,0cdbah,0d2h,04fh,01fd8h
406
        tstr    008h,0,0,0,0,0,0,0,0,0                  ; (2 cycle)
407
        tstr    0,0ffh,0,0,0,0,0,0d7h,-1,0              ; (22 cycles)
408
        db        0edh,057h,0afh,072h                                   ; expected crc
409
        tmsg    'sta nnnn / lda nnnn'
410
 
411
;  (6144 cycles)
412
rot8080: db     0ffh            ; flag mask
413
        tstr    7,0cb92h,06d43h,00a90h,0c284h,00c53h,0f50eh,091h,0ebh,040fch
414
        tstr    018h,0,0,0,0,0,0,0,-1,0                   ; (1024 cycles)
415
        tstr    0,0,0,0,0,0,0,0d7h,0,0                    ; (6 cycles)
416
        db        0e0h,0d8h,092h,035h                                     ; expected crc
417
        tmsg    ''
418
 
419
; ld (),a (96 cycles)
420
stabd:  db      0ffh            ; flag mask
421
        tstr    2,00c3bh,0b592h,06cffh,0959eh,msbt,msbt+1,0c1h,021h,0bde7h
422
        tstr    018h,0,0,0,0,0,0,0,0,0                    ; (4 cycles)
423
        tstr    0,-1,0,0,0,0,0,0,-1,0                       ; (24 cycles)
424
        db        02bh,004h,071h,0e9h                                   ; expected crc
425
        tmsg    'stax '
426
 
427
; start test pointed to by (hl)
428
stt:    push    h
429
        mov     a,m             ; get pointer to test
430
        inx     h
431
        mov     h,m
432
        mov     l,a
433
        mov     a,m             ; flag mask
434
        sta     flgmsk+1
435
        inx     h
436
        push    h
437
        lxi     d,20
438
        dad     d               ; point to incmask
439
        lxi     d,counter
440
        call    initmask
441
        pop     h
442
        push    h
443
        lxi     d,20+20
444
        dad     d               ; point to scanmask
445
        lxi     d,shifter
446
        call    initmask
447
        lxi     h,shifter
448
        mvi     m,1             ; first bit
449
        pop     h
450
        push    h
451
        lxi     d,iut           ; copy initial instruction under test
452
        lxi     b,4
453
 
454
;#idb ldir replaced with following code
455
ldir1:  mov     a,m
456
        stax    d
457
        inx     h
458
        inx     d
459
        dcx     b
460
        mov     a,b
461
        ora     c
462
        jnz     ldir1
463
;#idb
464
 
465
        lxi     d,msbt          ; copy initial machine state
466
        lxi     b,16
467
 
468
;#idb ldir replaced with following code
469
ldir2:  mov     a,m
470
        stax    d
471
        inx     h
472
        inx     d
473
        dcx     b
474
        mov     a,b
475
        ora     c
476
        jnz     ldir2
477
;#idb
478
 
479
        lxi     d,20+20+4       ; skip incmask, scanmask and expcrc
480
        dad     d
481
        xchg
482
        mvi     c,9
483
        call    bdos            ; show test name
484
        call    initcrc         ; initialise crc
485
; test loop
486
tlp:    lda     iut
487
        cpi     076h            ; pragmatically avoid halt intructions
488
        jz      tlp2
489
        ani     0dfh
490
        cpi     0ddh
491
        jnz     tlp1
492
        lda     iut+1
493
        cpi     076h
494
tlp1:   cnz     test            ; execute the test instruction
495
tlp2:   call    count           ; increment the counter
496
        cnz     shift           ; shift the scan bit
497
        pop     h               ; pointer to test case
498
        jz      tlp3            ; done if shift returned NZ
499
        lxi     d,20+20+20
500
        dad     d               ; point to expected crc
501
        call    cmpcrc
502
        lxi     d,okmsg
503
        jz      tlpok
504
        lxi     d,ermsg1
505
        mvi     c,9
506
        call    bdos
507
        call    phex8
508
        lxi     d,ermsg2
509
        mvi     c,9
510
        call    bdos
511
        lxi     h,crcval
512
        call    phex8
513
        lxi     d,crlf
514
tlpok:  mvi     c,9
515
        call    bdos
516
        pop     h
517
        inx     h
518
        inx     h
519
        ret
520
 
521
tlp3:   push    h
522
        mvi     a,1             ; initialise count and shift scanners
523
        sta     cntbit
524
        sta     shfbit
525
        lxi     h,counter
526
        shld    cntbyt
527
        lxi     h,shifter
528
        shld    shfbyt
529
 
530
        mvi     b,4             ; bytes in iut field
531
        pop     h               ; pointer to test case
532
        push    h
533
        lxi     d,iut
534
        call    setup           ; setup iut
535
        mvi     b,16            ; bytes in machine state
536
        lxi     d,msbt
537
        call    setup           ; setup machine state
538
        jmp     tlp
539
 
540
; setup a field of the test case
541
; b  = number of bytes
542
; hl = pointer to base case
543
; de = destination
544
setup:  call    subyte
545
        inx     h
546
        dcr     b
547
        jnz     setup
548
        ret
549
 
550
subyte: push    b
551
        push    d
552
        push    h
553
        mov     c,m             ; get base byte
554
        lxi     d,20
555
        dad     d               ; point to incmask
556
        mov     a,m
557
        cpi     0
558
        jz      subshf
559
        mvi     b,8             ; 8 bits
560
subclp: rrc
561
        push    psw
562
        mvi     a,0
563
        cc      nxtcbit ; get next counter bit if mask bit was set
564
        xra     c               ; flip bit if counter bit was set
565
        rrc
566
        mov     c,a
567
        pop     psw
568
        dcr     b
569
        jnz     subclp
570
        mvi     b,8
571
subshf: lxi     d,20
572
        dad     d               ; point to shift mask
573
        mov     a,m
574
        cpi     0
575
        jz      substr
576
        mvi     b,8             ; 8 bits
577
sbshf1: rrc
578
        push    psw
579
        mvi     a,0
580
        cc      nxtsbit ; get next shifter bit if mask bit was set
581
        xra     c               ; flip bit if shifter bit was set
582
        rrc
583
        mov     c,a
584
        pop     psw
585
        dcr     b
586
        jnz     sbshf1
587
substr: pop     h
588
        pop     d
589
        mov     a,c
590
        stax    d               ; mangled byte to destination
591
        inx     d
592
        pop     b
593
        ret
594
 
595
; get next counter bit in low bit of a
596
cntbit: ds      1
597
cntbyt: ds      2
598
 
599
nxtcbit: push   b
600
        push    h
601
        lhld    cntbyt
602
        mov     b,m
603
        lxi     h,cntbit
604
        mov     a,m
605
        mov     c,a
606
        rlc
607
        mov     m,a
608
        cpi     1
609
        jnz     ncb1
610
        lhld    cntbyt
611
        inx     h
612
        shld    cntbyt
613
ncb1:   mov     a,b
614
        ana     c
615
        pop     h
616
        pop     b
617
        rz
618
        mvi     a,1
619
        ret
620
 
621
; get next shifter bit in low bit of a
622
shfbit: ds      1
623
shfbyt: ds      2
624
 
625
nxtsbit: push   b
626
        push    h
627
        lhld    shfbyt
628
        mov     b,m
629
        lxi     h,shfbit
630
        mov     a,m
631
        mov     c,a
632
        rlc
633
        mov     m,a
634
        cpi     1
635
        jnz     nsb1
636
        lhld    shfbyt
637
        inx     h
638
        shld    shfbyt
639
nsb1:   mov     a,b
640
        ana     c
641
        pop     h
642
        pop     b
643
        rz
644
        mvi     a,1
645
        ret
646
 
647
 
648
; clear memory at hl, bc bytes
649
clrmem: push    psw
650
        push    b
651
        push    d
652
        push    h
653
        mvi     m,0
654
        mov     d,h
655
        mov     e,l
656
        inx     d
657
        dcx     b
658
 
659
;#idb ldir replaced with following code
660
ldir3:  mov     a,m
661
        stax    d
662
        inx     h
663
        inx     d
664
        dcx     b
665
        mov     a,b
666
        ora     c
667
        jnz     ldir3
668
;#idb
669
 
670
        pop     h
671
        pop     d
672
        pop     b
673
        pop     psw
674
        ret
675
 
676
; initialise counter or shifter
677
; de = pointer to work area for counter or shifter
678
; hl = pointer to mask
679
initmask:
680
        push    d
681
        xchg
682
        lxi     b,20+20
683
        call    clrmem          ; clear work area
684
        xchg
685
        mvi     b,20            ; byte counter
686
        mvi     c,1             ; first bit
687
        mvi     d,0             ; bit counter
688
imlp:   mov     e,m
689
imlp1:  mov     a,e
690
        ana     c
691
        jz      imlp2
692
        inr     d
693
imlp2:  mov     a,c
694
        rlc
695
        mov     c,a
696
        cpi     1
697
        jnz     imlp1
698
        inx     h
699
        dcr     b
700
        jnz     imlp
701
; got number of 1-bits in mask in reg d
702
        mov     a,d
703
        ani     0f8h
704
        rrc
705
        rrc
706
        rrc                     ; divide by 8 (get byte offset)
707
        mov     l,a
708
        mvi     h,0
709
        mov     a,d
710
        ani     7               ; bit offset
711
        inr     a
712
        mov     b,a
713
        mvi     a,080h
714
imlp3:  rlc
715
        dcr     b
716
        jnz     imlp3
717
        pop     d
718
        dad     d
719
        lxi     d,20
720
        dad     d
721
        mov     m,a
722
        ret
723
 
724
; multi-byte counter
725
count:  push    b
726
        push    d
727
        push    h
728
        lxi     h,counter       ; 20 byte counter starts here
729
        lxi     d,20            ; somewhere in here is the stop bit
730
        xchg
731
        dad     d
732
        xchg
733
cntlp:  inr     m
734
        mov     a,m
735
        cpi     0
736
        jz      cntlp1  ; overflow to next byte
737
        mov     b,a
738
        ldax    d
739
        ana     b               ; test for terminal value
740
        jz      cntend
741
        mvi     m,0             ; reset to zero
742
cntend: pop     b
743
        pop     d
744
        pop     h
745
        ret
746
 
747
cntlp1: inx     h
748
        inx     d
749
        jmp     cntlp
750
 
751
 
752
; multi-byte shifter
753
shift:  push    b
754
        push    d
755
        push    h
756
        lxi     h,shifter       ; 20 byte shift register starts here
757
        lxi     d,20            ; somewhere in here is the stop bit
758
        xchg
759
        dad     d
760
        xchg
761
shflp:  mov     a,m
762
        ora     a
763
        jz      shflp1
764
        mov     b,a
765
        ldax    d
766
        ana     b
767
        jnz     shlpe
768
        mov     a,b
769
        rlc
770
        cpi     1
771
        jnz     shflp2
772
        mvi     m,0
773
        inx     h
774
        inx     d
775
shflp2: mov     m,a
776
        xra     a               ; set Z
777
shlpe:  pop     h
778
        pop     d
779
        pop     b
780
        ret
781
shflp1: inx     h
782
        inx     d
783
        jmp     shflp
784
 
785
counter: ds     2*20
786
shifter: ds     2*20
787
 
788
; test harness
789
test:   push    psw
790
        push    b
791
        push    d
792
        push    h
793
      if        0
794
        lxi     d,crlf
795
        mvi     c,9
796
        call    bdos
797
        lxi     h,iut
798
        mvi     b,4
799
        call    hexstr
800
        mvi     e,' '
801
        mvi     c,2
802
        call    bdos
803
        mvi     b,16
804
        lxi     h,msbt
805
        call    hexstr
806
      endif
807
        di                      ; disable interrupts
808
 
809
;#idb ld (spsav),sp replaced by following code
810
;#idb All registers and flages are immediately overwritten so
811
;#idb no need to preserve any state.
812
        lxi     h,0             ; save stack pointer
813
        dad     sp
814
        shld    spsav
815
;#idb
816
 
817
        lxi     sp,msbt+2       ; point to test-case machine state
818
 
819
;#idb pop iy
820
;#idb pop ix both replaced by following code
821
;#idb Just dummy out ix/iy with copies of hl
822
        pop     h               ; and load all regs
823
        pop     h
824
;#idb
825
 
826
        pop     h
827
        pop     d
828
        pop     b
829
        pop     psw
830
 
831
;#idb ld sp,(spbt) replaced with the following code
832
;#idb HL is copied/restored before/after load so no state changed
833
        shld    temp
834
        lhld    spbt
835
        sphl
836
        lhld    temp
837
;#idb
838
 
839
iut:    ds      4               ; max 4 byte instruction under test
840
 
841
;#idb ld (spat),sp replaced with the following code
842
;#idb Must be very careful to preserve registers and flag
843
;#idb state resulting from the test.  The temptation is to use the
844
;#idb stack - but that doesn't work because of the way the app
845
;#idb uses SP as a quick way of pointing to memory.
846
;#idb Bit of a code smell, but I can't think of an easier way.
847
        shld    temp
848
        lxi     h,0
849
        jc      temp1           ;jump on the state of the C flag set in the test
850
 
851
        dad     sp              ;this code will clear the C flag (0 + nnnn = nc)
852
        jmp     temp2           ;C flag is same state as before
853
 
854
temp1:  dad     sp              ;this code will clear the C flag (0 + nnnn = nc)
855
        stc                     ;C flage needs re-setting to preserve state
856
 
857
temp2:  shld    spat
858
        lhld    temp
859
;#idb
860
 
861
        lxi     sp,spat
862
        push    psw             ; save other registers
863
        push    b
864
        push    d
865
        push    h
866
 
867
;#idb push ix
868
;#idb push iy both replaced by following code
869
;#idb Must match change made to pops made before test
870
        push    h
871
        push    h
872
;#idb
873
 
874
;#idb ld sp,(spsav) replaced with following code
875
;#idb No need to preserve state
876
        lhld    spsav           ; restore stack pointer
877
        sphl
878
;#idb
879
 
880
        ei                      ; enable interrupts
881
        lhld    msbt            ; copy memory operand
882
        shld    msat
883
        lxi     h,flgsat        ; flags after test
884
        mov     a,m
885
flgmsk: ani     0ffh            ; mask-out irrelevant bits (self-modified code!)
886
        mov     m,a
887
        mvi     b,16            ; total of 16 bytes of state
888
        lxi     d,msat
889
        lxi     h,crcval
890
tcrc:   ldax    d
891
        inx     d
892
        call    updcrc          ; accumulate crc of this test case
893
        dcr     b
894
        jnz     tcrc
895
      if        0
896
        mvi     e,' '
897
        mvi     c,2
898
        call    bdos
899
        lxi     h,crcval
900
        call    phex8
901
        lxi     d,crlf
902
        mvi     c,9
903
        call    bdos
904
        lxi     h,msat
905
        mvi     b,16
906
        call    hexstr
907
        lxi     d,crlf
908
        mvi     c,9
909
        call    bdos
910
      endif
911
        pop     h
912
        pop     d
913
        pop     b
914
        pop     psw
915
        ret
916
 
917
;#idb Added to store HL state
918
temp:   ds      2
919
;#idb
920
 
921
; machine state after test
922
msat:   ds      14      ; memop,iy,ix,hl,de,bc,af
923
spat:   ds      2       ; stack pointer after test
924
flgsat  equ     spat-2  ; flags
925
 
926
spsav:  ds      2       ; saved stack pointer
927
 
928
; display hex string (pointer in hl, byte count in b)
929
hexstr: mov     a,m
930
        call    phex2
931
        inx     h
932
        dcr     b
933
        jnz     hexstr
934
        ret
935
 
936
; display hex
937
; display the big-endian 32-bit value pointed to by hl
938
phex8:  push    psw
939
        push    b
940
        push    h
941
        mvi     b,4
942
ph8lp:  mov     a,m
943
        call    phex2
944
        inx     h
945
        dcr     b
946
        jnz     ph8lp
947
        pop     h
948
        pop     b
949
        pop     psw
950
        ret
951
 
952
; display byte in a
953
phex2:  push    psw
954
        rrc
955
        rrc
956
        rrc
957
        rrc
958
        call    phex1
959
        pop     psw
960
; fall through
961
 
962
; display low nibble in a
963
phex1:  push    psw
964
        push    b
965
        push    d
966
        push    h
967
        ani     0fh
968
        cpi     10
969
        jc      ph11
970
        adi     'a'-'9'-1
971
ph11:   adi     '0'
972
        mov     e,a
973
        mvi     c,2
974
        call    bdos
975
        pop     h
976
        pop     d
977
        pop     b
978
        pop     psw
979
        ret
980
 
981
bdos:   push    psw
982
        push    b
983
        push    d
984
        push    h
985
        call    5
986
        pop     h
987
        pop     d
988
        pop     b
989
        pop     psw
990
        ret
991
 
992
msg1:   db      '8080 instruction exerciser',10,13,'$'
993
msg2:   db      'Tests complete',10,13,'$'
994
okmsg:  db      '  OK',10,13,'$'
995
ermsg1: db      '  ERROR **** crc expected:$'
996
ermsg2: db      ' found:$'
997
crlf:   db      10,13,'$'
998
 
999
; compare crc
1000
; hl points to value to compare to crcval
1001
cmpcrc: push    b
1002
        push    d
1003
        push    h
1004
        lxi     d,crcval
1005
        mvi     b,4
1006
cclp:   ldax    d
1007
        cmp     m
1008
        jnz     cce
1009
        inx     h
1010
        inx     d
1011
        dcr     b
1012
        jnz     cclp
1013
cce:    pop     h
1014
        pop     d
1015
        pop     b
1016
        ret
1017
 
1018
; 32-bit crc routine
1019
; entry: a contains next byte, hl points to crc
1020
; exit:  crc updated
1021
updcrc: push    psw
1022
        push    b
1023
        push    d
1024
        push    h
1025
        push    h
1026
        lxi     d,3
1027
        dad     d       ; point to low byte of old crc
1028
        xra     m       ; xor with new byte
1029
        mov     l,a
1030
        mvi     h,0
1031
        dad     h       ; use result as index into table of 4 byte entries
1032
        dad     h
1033
        xchg
1034
        lxi     h,crctab
1035
        dad     d       ; point to selected entry in crctab
1036
        xchg
1037
        pop     h
1038
        lxi     b,4     ; c = byte count, b = accumulator
1039
crclp:  ldax    d
1040
        xra     b
1041
        mov     b,m
1042
        mov     m,a
1043
        inx     d
1044
        inx     h
1045
        dcr     c
1046
        jnz     crclp
1047
      if        0
1048
        lxi     h,crcval
1049
        call    phex8
1050
        lxi     d,crlf
1051
        mvi     c,9
1052
        call    bdos
1053
      endif
1054
        pop     h
1055
        pop     d
1056
        pop     b
1057
        pop     psw
1058
        ret
1059
 
1060
initcrc:push    psw
1061
        push    b
1062
        push    h
1063
        lxi     h,crcval
1064
        mvi     a,0ffh
1065
        mvi     b,4
1066
icrclp: mov     m,a
1067
        inx     h
1068
        dcr     b
1069
        jnz     icrclp
1070
        pop     h
1071
        pop     b
1072
        pop     psw
1073
        ret
1074
 
1075
bdos$entry:
1076
          mov   b,a
1077
          mov   a,c
1078
          cpi   9
1079
          jz    print$string
1080
          cpi   2
1081
          jz    print$char
1082
          lxi   d,bdos$error
1083
          call  print$string
1084
          di
1085
          hlt
1086
bdos$error: db  "Invalid BDOS function", 13, 10, '$'
1087
 
1088
;print$char: print character in A to console.
1089
;
1090
print$char:
1091
          mov   c,b
1092
          jmp   print$char$c
1093
 
1094
 
1095
;print$string: print $-terminated string at DE.
1096
;
1097
print$string:
1098
          ldax  d
1099
          inx   d
1100
          cpi   '$'
1101
          rz
1102
          mov   c,a
1103
          call  print$char$c
1104
          jmp   print$string
1105
 
1106
print$char$c:
1107
          in    UART_STATUS
1108
          ani   MASK_TX_RDY
1109
          jz    print$char$c
1110
          mov   a,c
1111
          out   UART_DATA
1112
          ret
1113
 
1114
 
1115
 
1116
crcval: ds      4
1117
 
1118
crctab: db      000h,000h,000h,000h
1119
        db      077h,007h,030h,096h
1120
        db      0eeh,00eh,061h,02ch
1121
        db      099h,009h,051h,0bah
1122
        db      007h,06dh,0c4h,019h
1123
        db      070h,06ah,0f4h,08fh
1124
        db      0e9h,063h,0a5h,035h
1125
        db      09eh,064h,095h,0a3h
1126
        db      00eh,0dbh,088h,032h
1127
        db      079h,0dch,0b8h,0a4h
1128
        db      0e0h,0d5h,0e9h,01eh
1129
        db      097h,0d2h,0d9h,088h
1130
        db      009h,0b6h,04ch,02bh
1131
        db      07eh,0b1h,07ch,0bdh
1132
        db      0e7h,0b8h,02dh,007h
1133
        db      090h,0bfh,01dh,091h
1134
        db      01dh,0b7h,010h,064h
1135
        db      06ah,0b0h,020h,0f2h
1136
        db      0f3h,0b9h,071h,048h
1137
        db      084h,0beh,041h,0deh
1138
        db      01ah,0dah,0d4h,07dh
1139
        db      06dh,0ddh,0e4h,0ebh
1140
        db      0f4h,0d4h,0b5h,051h
1141
        db      083h,0d3h,085h,0c7h
1142
        db      013h,06ch,098h,056h
1143
        db      064h,06bh,0a8h,0c0h
1144
        db      0fdh,062h,0f9h,07ah
1145
        db      08ah,065h,0c9h,0ech
1146
        db      014h,001h,05ch,04fh
1147
        db      063h,006h,06ch,0d9h
1148
        db      0fah,00fh,03dh,063h
1149
        db      08dh,008h,00dh,0f5h
1150
        db      03bh,06eh,020h,0c8h
1151
        db      04ch,069h,010h,05eh
1152
        db      0d5h,060h,041h,0e4h
1153
        db      0a2h,067h,071h,072h
1154
        db      03ch,003h,0e4h,0d1h
1155
        db      04bh,004h,0d4h,047h
1156
        db      0d2h,00dh,085h,0fdh
1157
        db      0a5h,00ah,0b5h,06bh
1158
        db      035h,0b5h,0a8h,0fah
1159
        db      042h,0b2h,098h,06ch
1160
        db      0dbh,0bbh,0c9h,0d6h
1161
        db      0ach,0bch,0f9h,040h
1162
        db      032h,0d8h,06ch,0e3h
1163
        db      045h,0dfh,05ch,075h
1164
        db      0dch,0d6h,00dh,0cfh
1165
        db      0abh,0d1h,03dh,059h
1166
        db      026h,0d9h,030h,0ach
1167
        db      051h,0deh,000h,03ah
1168
        db      0c8h,0d7h,051h,080h
1169
        db      0bfh,0d0h,061h,016h
1170
        db      021h,0b4h,0f4h,0b5h
1171
        db      056h,0b3h,0c4h,023h
1172
        db      0cfh,0bah,095h,099h
1173
        db      0b8h,0bdh,0a5h,00fh
1174
        db      028h,002h,0b8h,09eh
1175
        db      05fh,005h,088h,008h
1176
        db      0c6h,00ch,0d9h,0b2h
1177
        db      0b1h,00bh,0e9h,024h
1178
        db      02fh,06fh,07ch,087h
1179
        db      058h,068h,04ch,011h
1180
        db      0c1h,061h,01dh,0abh
1181
        db      0b6h,066h,02dh,03dh
1182
        db      076h,0dch,041h,090h
1183
        db      001h,0dbh,071h,006h
1184
        db      098h,0d2h,020h,0bch
1185
        db      0efh,0d5h,010h,02ah
1186
        db      071h,0b1h,085h,089h
1187
        db      006h,0b6h,0b5h,01fh
1188
        db      09fh,0bfh,0e4h,0a5h
1189
        db      0e8h,0b8h,0d4h,033h
1190
        db      078h,007h,0c9h,0a2h
1191
        db      00fh,000h,0f9h,034h
1192
        db      096h,009h,0a8h,08eh
1193
        db      0e1h,00eh,098h,018h
1194
        db      07fh,06ah,00dh,0bbh
1195
        db      008h,06dh,03dh,02dh
1196
        db      091h,064h,06ch,097h
1197
        db      0e6h,063h,05ch,001h
1198
        db      06bh,06bh,051h,0f4h
1199
        db      01ch,06ch,061h,062h
1200
        db      085h,065h,030h,0d8h
1201
        db      0f2h,062h,000h,04eh
1202
        db      06ch,006h,095h,0edh
1203
        db      01bh,001h,0a5h,07bh
1204
        db      082h,008h,0f4h,0c1h
1205
        db      0f5h,00fh,0c4h,057h
1206
        db      065h,0b0h,0d9h,0c6h
1207
        db      012h,0b7h,0e9h,050h
1208
        db      08bh,0beh,0b8h,0eah
1209
        db      0fch,0b9h,088h,07ch
1210
        db      062h,0ddh,01dh,0dfh
1211
        db      015h,0dah,02dh,049h
1212
        db      08ch,0d3h,07ch,0f3h
1213
        db      0fbh,0d4h,04ch,065h
1214
        db      04dh,0b2h,061h,058h
1215
        db      03ah,0b5h,051h,0ceh
1216
        db      0a3h,0bch,000h,074h
1217
        db      0d4h,0bbh,030h,0e2h
1218
        db      04ah,0dfh,0a5h,041h
1219
        db      03dh,0d8h,095h,0d7h
1220
        db      0a4h,0d1h,0c4h,06dh
1221
        db      0d3h,0d6h,0f4h,0fbh
1222
        db      043h,069h,0e9h,06ah
1223
        db      034h,06eh,0d9h,0fch
1224
        db      0adh,067h,088h,046h
1225
        db      0dah,060h,0b8h,0d0h
1226
        db      044h,004h,02dh,073h
1227
        db      033h,003h,01dh,0e5h
1228
        db      0aah,00ah,04ch,05fh
1229
        db      0ddh,00dh,07ch,0c9h
1230
        db      050h,005h,071h,03ch
1231
        db      027h,002h,041h,0aah
1232
        db      0beh,00bh,010h,010h
1233
        db      0c9h,00ch,020h,086h
1234
        db      057h,068h,0b5h,025h
1235
        db      020h,06fh,085h,0b3h
1236
        db      0b9h,066h,0d4h,009h
1237
        db      0ceh,061h,0e4h,09fh
1238
        db      05eh,0deh,0f9h,00eh
1239
        db      029h,0d9h,0c9h,098h
1240
        db      0b0h,0d0h,098h,022h
1241
        db      0c7h,0d7h,0a8h,0b4h
1242
        db      059h,0b3h,03dh,017h
1243
        db      02eh,0b4h,00dh,081h
1244
        db      0b7h,0bdh,05ch,03bh
1245
        db      0c0h,0bah,06ch,0adh
1246
        db      0edh,0b8h,083h,020h
1247
        db      09ah,0bfh,0b3h,0b6h
1248
        db      003h,0b6h,0e2h,00ch
1249
        db      074h,0b1h,0d2h,09ah
1250
        db      0eah,0d5h,047h,039h
1251
        db      09dh,0d2h,077h,0afh
1252
        db      004h,0dbh,026h,015h
1253
        db      073h,0dch,016h,083h
1254
        db      0e3h,063h,00bh,012h
1255
        db      094h,064h,03bh,084h
1256
        db      00dh,06dh,06ah,03eh
1257
        db      07ah,06ah,05ah,0a8h
1258
        db      0e4h,00eh,0cfh,00bh
1259
        db      093h,009h,0ffh,09dh
1260
        db      00ah,000h,0aeh,027h
1261
        db      07dh,007h,09eh,0b1h
1262
        db      0f0h,00fh,093h,044h
1263
        db      087h,008h,0a3h,0d2h
1264
        db      01eh,001h,0f2h,068h
1265
        db      069h,006h,0c2h,0feh
1266
        db      0f7h,062h,057h,05dh
1267
        db      080h,065h,067h,0cbh
1268
        db      019h,06ch,036h,071h
1269
        db      06eh,06bh,006h,0e7h
1270
        db      0feh,0d4h,01bh,076h
1271
        db      089h,0d3h,02bh,0e0h
1272
        db      010h,0dah,07ah,05ah
1273
        db      067h,0ddh,04ah,0cch
1274
        db      0f9h,0b9h,0dfh,06fh
1275
        db      08eh,0beh,0efh,0f9h
1276
        db      017h,0b7h,0beh,043h
1277
        db      060h,0b0h,08eh,0d5h
1278
        db      0d6h,0d6h,0a3h,0e8h
1279
        db      0a1h,0d1h,093h,07eh
1280
        db      038h,0d8h,0c2h,0c4h
1281
        db      04fh,0dfh,0f2h,052h
1282
        db      0d1h,0bbh,067h,0f1h
1283
        db      0a6h,0bch,057h,067h
1284
        db      03fh,0b5h,006h,0ddh
1285
        db      048h,0b2h,036h,04bh
1286
        db      0d8h,00dh,02bh,0dah
1287
        db      0afh,00ah,01bh,04ch
1288
        db      036h,003h,04ah,0f6h
1289
        db      041h,004h,07ah,060h
1290
        db      0dfh,060h,0efh,0c3h
1291
        db      0a8h,067h,0dfh,055h
1292
        db      031h,06eh,08eh,0efh
1293
        db      046h,069h,0beh,079h
1294
        db      0cbh,061h,0b3h,08ch
1295
        db      0bch,066h,083h,01ah
1296
        db      025h,06fh,0d2h,0a0h
1297
        db      052h,068h,0e2h,036h
1298
        db      0cch,00ch,077h,095h
1299
        db      0bbh,00bh,047h,003h
1300
        db      022h,002h,016h,0b9h
1301
        db      055h,005h,026h,02fh
1302
        db      0c5h,0bah,03bh,0beh
1303
        db      0b2h,0bdh,00bh,028h
1304
        db      02bh,0b4h,05ah,092h
1305
        db      05ch,0b3h,06ah,004h
1306
        db      0c2h,0d7h,0ffh,0a7h
1307
        db      0b5h,0d0h,0cfh,031h
1308
        db      02ch,0d9h,09eh,08bh
1309
        db      05bh,0deh,0aeh,01dh
1310
        db      09bh,064h,0c2h,0b0h
1311
        db      0ech,063h,0f2h,026h
1312
        db      075h,06ah,0a3h,09ch
1313
        db      002h,06dh,093h,00ah
1314
        db      09ch,009h,006h,0a9h
1315
        db      0ebh,00eh,036h,03fh
1316
        db      072h,007h,067h,085h
1317
        db      005h,000h,057h,013h
1318
        db      095h,0bfh,04ah,082h
1319
        db      0e2h,0b8h,07ah,014h
1320
        db      07bh,0b1h,02bh,0aeh
1321
        db      00ch,0b6h,01bh,038h
1322
        db      092h,0d2h,08eh,09bh
1323
        db      0e5h,0d5h,0beh,00dh
1324
        db      07ch,0dch,0efh,0b7h
1325
        db      00bh,0dbh,0dfh,021h
1326
        db      086h,0d3h,0d2h,0d4h
1327
        db      0f1h,0d4h,0e2h,042h
1328
        db      068h,0ddh,0b3h,0f8h
1329
        db      01fh,0dah,083h,06eh
1330
        db      081h,0beh,016h,0cdh
1331
        db      0f6h,0b9h,026h,05bh
1332
        db      06fh,0b0h,077h,0e1h
1333
        db      018h,0b7h,047h,077h
1334
        db      088h,008h,05ah,0e6h
1335
        db      0ffh,00fh,06ah,070h
1336
        db      066h,006h,03bh,0cah
1337
        db      011h,001h,00bh,05ch
1338
        db      08fh,065h,09eh,0ffh
1339
        db      0f8h,062h,0aeh,069h
1340
        db      061h,06bh,0ffh,0d3h
1341
        db      016h,06ch,0cfh,045h
1342
        db      0a0h,00ah,0e2h,078h
1343
        db      0d7h,00dh,0d2h,0eeh
1344
        db      04eh,004h,083h,054h
1345
        db      039h,003h,0b3h,0c2h
1346
        db      0a7h,067h,026h,061h
1347
        db      0d0h,060h,016h,0f7h
1348
        db      049h,069h,047h,04dh
1349
        db      03eh,06eh,077h,0dbh
1350
        db      0aeh,0d1h,06ah,04ah
1351
        db      0d9h,0d6h,05ah,0dch
1352
        db      040h,0dfh,00bh,066h
1353
        db      037h,0d8h,03bh,0f0h
1354
        db      0a9h,0bch,0aeh,053h
1355
        db      0deh,0bbh,09eh,0c5h
1356
        db      047h,0b2h,0cfh,07fh
1357
        db      030h,0b5h,0ffh,0e9h
1358
        db      0bdh,0bdh,0f2h,01ch
1359
        db      0cah,0bah,0c2h,08ah
1360
        db      053h,0b3h,093h,030h
1361
        db      024h,0b4h,0a3h,0a6h
1362
        db      0bah,0d0h,036h,005h
1363
        db      0cdh,0d7h,006h,093h
1364
        db      054h,0deh,057h,029h
1365
        db      023h,0d9h,067h,0bfh
1366
        db      0b3h,066h,07ah,02eh
1367
        db      0c4h,061h,04ah,0b8h
1368
        db      05dh,068h,01bh,002h
1369
        db      02ah,06fh,02bh,094h
1370
        db      0b4h,00bh,0beh,037h
1371
        db      0c3h,00ch,08eh,0a1h
1372
        db      05ah,005h,0dfh,01bh
1373
        db      02dh,002h,0efh,08dh
1374
 
1375
        end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.