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

Subversion Repositories y80e

[/] [y80e/] [trunk/] [asm/] [ez8_ops.s] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 bsa
;**********************************************************************************
2
;*                                                                                *
3
;* checks ez80 specific instructions                                              *
4
;*                                                                                *
5
;**********************************************************************************
6
        aseg
7
 
8
        org     00h
9
        jp      01000h
10
 
11
        org     038h
12
        jp      (hl)
13
 
14
        org     066h
15
        jp      (ix)
16
 
17
        org     80h
18
        db      00h, 01h, 2dh, 03h, 04h, 05h, 06h, 07h
19
        db      0fh, 1eh, 02h, 3ch, 4bh, 5ah, 69h, 78h
20
 
21
        org     0c0h            ;pattern finish location
22
        nop
23
        jr      0c0h
24
 
25
        org     0d0h
26
        db      071h, 018h, 006h, 005h, 002h, 003h, 004h, 0aah
27
 
28
        org     0e0h
29
        dw      0abcdh, 0fe10h, 03254h, 07698h
30
 
31
        org     00140h
32
        db      061h
33
 
34
        org     00241h
35
        db      002h
36
 
37
        org     00342h
38
        db      033h
39
 
40
        org     00443h
41
        db      0f4h
42
 
43
        org     00544h
44
        db      0e5h
45
 
46
        org     00645h
47
        db      0a6h
48
 
49
        org     00165h
50
        db      061h
51
 
52
        org     00264h
53
        db      002h
54
 
55
        org     00363h
56
        db      033h
57
 
58
        org     00462h
59
        db      0f4h
60
 
61
        org     00561h
62
        db      0e5h
63
 
64
        org     00660h
65
        db      0a6h
66
 
67
        org     01000h
68
        di
69
        xor     a
70
        ld      sp, 00000h
71
        ld      bc, 00123h
72
        ld      de, 04567h
73
        ld      hl, 0d000h
74
        ld      ix, 089abh
75
        ld      iy, 0cdefh
76
 
77
        ld      (hl),bc         ;0123h @ d000h
78
        inc     hl
79
        inc     hl
80
        ld      (hl),de         ;4567h @ d002h
81
        inc     hl
82
        inc     hl
83
        ld      (hl),hl         ;d004h @ d004h
84
        inc     hl
85
        inc     hl
86
        ld      (hl),ix         ;89abh @ d006h
87
        inc     hl
88
        inc     hl
89
        ld      (hl),iy         ;cdefh @ d008h
90
 
91
        pea     ix+055h         ;8a00h @ fffeh
92
        pea     iy-055h         ;cd9ah @ fffch
93
        push    ix              ;89abh @ fffah
94
        push    iy              ;cdefh @ fff8h
95
 
96
        ld      ix, 0e080h
97
        ld      iy, 0dff0h
98
        ld      (ix-040h),bc    ;0123h @ e040h
99
        ld      (ix-03eh),de    ;4567h @ e042h
100
        ld      (ix-03ch),hl    ;d008h @ e044h
101
        ld      (ix-03ah),ix    ;e080h @ e046h
102
        ld      (ix-038h),iy    ;dff0h @ e048h
103
        ld      (iy+050h),bc    ;0123h @ e040h
104
        ld      (iy+052h),de    ;4567h @ e042h
105
        ld      (iy+054h),hl    ;d008h @ e044h
106
        ld      (iy+056h),ix    ;e080h @ e046h
107
        ld      (iy+058h),iy    ;dff0h @ e048h
108
 
109
        ld      ix,02004h
110
        ld      bc,(ix-04h)
111
        ld      de,(ix-02h)
112
        ld      hl,(ix+00h)
113
        ld      iy,(ix+02h)
114
        ld      ix,(ix+04h)
115
        push    bc              ;dbach @ fff6h
116
        push    de              ;5183h @ fff4h
117
        push    hl              ;e800h @ fff2h
118
        push    iy              ;7e4dh @ fff0h
119
        push    ix              ;9a1fh @ ffeeh
120
 
121
        ld      bc,(hl)
122
        inc     hl
123
        inc     hl
124
        ld      de,(hl)
125
        inc     hl
126
        inc     hl
127
        ld      ix,(hl)
128
        inc     hl
129
        inc     hl
130
        ld      iy,(hl)
131
        inc     hl
132
        inc     hl
133
        ld      hl,(hl)
134
        push    bc              ;0123h @ ffech
135
        push    de              ;4567h @ ffeah
136
        push    hl              ;cdefh @ ffe8h
137
        push    ix              ;89abh @ ffe6h
138
        push    iy              ;2006h @ ffe4h
139
 
140
        ld      bc,(iy-06h)
141
        ld      de,(iy-04h)
142
        ld      hl,(iy-02h)
143
        ld      ix,(iy+00h)
144
        ld      iy,(iy+02h)
145
        push    bc              ;dbach @ ffe2h
146
        push    de              ;5183h @ ffe0h
147
        push    hl              ;e800h @ ffdeh
148
        push    ix              ;7e4dh @ ffdch
149
        push    iy              ;9a1fh @ ffdah
150
 
151
        lea     bc,ix-2
152
        lea     de,ix-1
153
        lea     hl,ix+0
154
        lea     iy,ix+1
155
        lea     ix,ix+2
156
        push    bc              ;7e4bh @ ffd8h
157
        push    de              ;7e4ch @ ffd6h
158
        push    hl              ;7e4dh @ ffd4h
159
        push    ix              ;7e4fh @ ffd2h
160
        push    iy              ;7e4eh @ ffd0h
161
 
162
        ld      iy, 0aa00h
163
 
164
        lea     bc,iy-2
165
        lea     de,iy-1
166
        lea     hl,iy+0
167
        lea     ix,iy+1
168
        lea     iy,iy+2
169
        push    bc              ;a9feh @ ffceh
170
        push    de              ;a9ffh @ ffcah
171
        push    hl              ;aa00h @ ffcch
172
        push    ix              ;aa01h @ ffc8h
173
        push    iy              ;aa02h @ ffc6h
174
        push    af              ;0044h @ ffc4h
175
 
176
;---------
177
 
178
        ld      sp,0ff00h
179
        xor     a
180
        ld      hl, 0d700h
181
        ld      de, 00304h
182
        ld      bc, 006d0h
183
        jp      011feh
184
        org     011feh
185
        inim                    ;read  71h @ 00d0h
186
                                ;write 71h @ d700h 
187
        push    af              ;0006h @ fefeh
188
        push    bc              ;05d1h @ fefch
189
        push    hl              ;d701h @ fefah
190
        jp      012feh
191
        org     012feh
192
        inimr                   ;read  18h @ 00d1h
193
                                ;write 18h @ d701h
194
                                ;read  06h @ 00d2h
195
                                ;write 06h @ d702h
196
                                ;read  05h @ 00d3h
197
                                ;write 05h @ d703h
198
                                ;read  02h @ 00d4h
199
                                ;write 02h @ d704h
200
                                ;read  03h @ 00d5h
201
                                ;write 03h @ d705h
202
        push    af              ;0046h @ fef8h
203
        push    bc              ;00d6h @ fef6h
204
        push    hl              ;d706h @ fef4h
205
        ld      b,1
206
        jp      013ffh
207
        org     013ffh
208
        inimr                   ;read  04h @ 00d6h
209
                                ;write 04h @ d706h
210
        push    af              ;0046h @ fef2h
211
        push    bc              ;00d7h @ fef0h
212
        push    hl              ;d707h @ feeeh
213
        inc     b
214
        jp      014ffh
215
        org     014ffh
216
        inim                    ;read  aah @ 00d7h
217
                                ;write aah @ d707h
218
        push    af              ;0042h @ feech
219
        push    bc              ;00d8h @ feeah
220
        push    hl              ;d708h @ fee8h
221
        ld      hl, 0d707h
222
        ld      bc, 006d7h
223
        jp      015feh
224
        org     015feh
225
        indm                    ;read  aah @ 0037h
226
                                ;write aah @ d707h
227
        push    af              ;0002h @ fee6h
228
        push    bc              ;05d6h @ fee4h
229
        push    hl              ;d706h @ fee2h
230
        jp      016feh
231
        org     016feh
232
        indmr                   ;read  04h @ 00d6h
233
                                ;write 04h @ d706h
234
                                ;read  03h @ 00d5h
235
                                ;write 03h @ d705h
236
                                ;read  02h @ 00d4h
237
                                ;write 02h @ d704h
238
                                ;read  05h @ 00d3h
239
                                ;write 05h @ d703h
240
                                ;read  06h @ 00d2h
241
                                ;write 06h @ d702h
242
        push    af              ;0042h @ fee0h
243
        push    bc              ;00d1h @ fedeh
244
        push    hl              ;d701h @ fedch
245
        inc     b
246
        xor     0aah
247
        jp      017ffh
248
        org     017ffh
249
        indmr                   ;read  18h @ 00d1h
250
                                ;write 18h @ d701h
251
        push    af              ;aac6h @ fedah
252
        push    bc              ;00d0h @ fed8h
253
        push    hl              ;d700h @ fed6h
254
        inc     b
255
        jp      018ffh
256
        org     018ffh
257
        indm                    ;read  71h @ 00d0h
258
                                ;write 71h @ d700h
259
        push    af              ;aa42h @ fed4h
260
        push    bc              ;00cfh @ fed2h
261
        push    de              ;0304h @ fed0h
262
        push    hl              ;d6ffh @ feceh
263
 
264
;---------
265
        ld      sp, 0fe00h
266
        xor     a
267
        ld      hl, 0d901h
268
        ld      bc, 00241h
269
        jp      019feh
270
        org     019feh
271
        ind2                    ;read  60h @ 0041h
272
                                ;write 60h @ d901h
273
        push    af              ;0006h @ fdfeh
274
        push    bc              ;01d0h @ fdfch
275
        push    hl              ;d900h @ fdfah
276
        ld      a, 055h
277
        jp      01affh
278
        org     01affh
279
        ind2                    ;read  02h @ 0040h
280
                                ;write 02h @ d900h
281
        push    af              ;5546h @ fdf8h
282
        push    bc              ;00cfh @ fdf6h
283
        push    hl              ;d8ffh @ fdf4h
284
 
285
        xor     a
286
        ld      hl,0d804h
287
        ld      bc,00264h
288
        jp      01bfeh
289
        org     01bfeh
290
        ini2                    ;read  02h @ 0064h
291
                                ;write 02h @ d804h
292
        push    af              ;0006h @ fdf2h
293
        push    bc              ;0165h @ fdf0h
294
        push    hl              ;d805h @ fdeeh
295
        xor     0aah
296
        jp      01cffh
297
        org     01cffh
298
        ini2                    ;read  61h @ 0065h
299
                                ;write 61h @ d805h
300
        push    af              ;aac6h @ fdech
301
        push    bc              ;0066h @ fdeah
302
        push    hl              ;d806h @ fde8h
303
        push    de              ;0304h @ fde6h
304
 
305
        ld      bc, 0003h
306
        ld      hl, 0a001h
307
        ld      de, 05002h
308
        jp      01dfeh
309
        org     01dfeh
310
        ini2r                   ;read  01h @ 5002h
311
                                ;write 01h @ a001h
312
                                ;read  02h @ 5003h
313
                                ;write 02h @ a002h
314
                                ;read  03h @ 5004h
315
                                ;write 03h @ a003h
316
        push    af              ;aac6h @ fde4h
317
        push    bc              ;0000h @ fde2h
318
        push    hl              ;a004h @ fde0h
319
        push    de              ;5005h @ fddeh
320
        ld      bc, 0004h
321
        ld      hl, 09ffeh
322
        ld      de, 04ffdh
323
        jp      01efeh
324
        org     01efeh
325
        ind2r                   ;read  04h @ 4ffdh
326
                                ;write 04h @ 9ffeh
327
                                ;read  05h @ 4ffch
328
                                ;write 05h @ 9ffdh
329
                                ;read  06h @ 4ffbh
330
                                ;write 06h @ 9ffch
331
                                ;read  07h @ 4ffah
332
                                ;write 07h @ 9ffbh
333
        push    af              ;aac6h @ fddch
334
        push    bc              ;0000h @ fddah
335
        push    hl              ;9ffah @ fdd8h
336
        push    de              ;4ff9h @ fdd6h
337
 
338
 
339
;---------
340
        ld      sp, 0fd00h
341
        xor     a
342
        ld      hl, 04901h
343
        ld      bc, 00231h
344
        outd2                   ;read  02h @ 4901h
345
                                ;write 02h @ 0231h
346
        push    af              ;0006h @ fcfeh
347
        push    bc              ;0130h @ fcfch
348
        push    hl              ;4900h @ fcfah
349
        ld      a, 055h
350
        outd2                   ;read  61h @ 4900h
351
                                ;write 61h @ 0130h
352
        push    af              ;5546h @ fcf8h
353
        push    bc              ;002fh @ fcf6h
354
        push    hl              ;48ffh @ fcf4h
355
 
356
        xor     a
357
        ld      hl,04804h
358
        ld      bc,00274h
359
        outi2                   ;read  02h @ 4804h
360
                                ;write 02h @ 0274h
361
        push    af              ;0006h @ fcf2h
362
        push    bc              ;0175h @ fcf0h
363
        push    hl              ;4805h @ fceeh
364
        xor     0aah
365
        outi2                   ;read  61h @ 4805h
366
                                ;write 61h @ 0175h
367
        push    af              ;aac6h @ fcech
368
        push    bc              ;0076h @ fceah
369
        push    hl              ;4806h @ fce8h
370
        push    de              ;4ff9h @ fce6h
371
 
372
        ld      bc, 0003h
373
        ld      de, 0a001h
374
        ld      hl, 05002h
375
        oti2r                   ;read  01h @ 5002h
376
                                ;write 01h @ a001h
377
                                ;read  02h @ 5003h
378
                                ;write 02h @ a002h
379
                                ;read  03h @ 5004h
380
                                ;write 03h @ a003h
381
        push    af              ;aac6h @ fce4h
382
        push    bc              ;0000h @ fce2h
383
        push    de              ;a004h @ fce0h
384
        push    hl              ;5005h @ fcdeh
385
        ld      bc, 0004h
386
        ld      de, 09ffeh
387
        ld      hl, 04ffdh
388
        otd2r                   ;read  04h @ 4ffdh
389
                                ;write 04h @ 9ffeh
390
                                ;read  05h @ 4ffch
391
                                ;write 05h @ 9ffdh
392
                                ;read  06h @ 4ffbh
393
                                ;write 06h @ 9ffch
394
                                ;read  07h @ 4ffah
395
                                ;write 07h @ 9ffbh
396
        push    af              ;aac6h @ fcdch
397
        push    bc              ;0000h @ fcdah
398
        push    de              ;9ffah @ fcd8h
399
        push    hl              ;4ff9h @ fcd6h
400
 
401
;---------
402
 
403
        ld      sp, 0fc00h
404
        and     a               ;AF = aa94h
405
        ld      de, 0da15h
406
        ld      hl, 049feh + 3
407
        ld      bc, 4
408
        otdrx                   ;read  eeh @ 4a01h
409
                                ;write eeh @ da15h
410
                                ;read  eeh @ 4a00h
411
                                ;write eeh @ da15h
412
                                ;read  eeh @ 49ffh
413
                                ;write eeh @ da15h
414
                                ;read  eeh @ 49feh
415
                                ;write eeh @ da15h
416
        push    af              ;aad6h @ fbfeh
417
        push    bc              ;0000h @ fbfch
418
        push    de              ;da15h @ fbfah
419
        push    hl              ;49fdh @ fbf8h
420
 
421
        inc     de
422
        inc     a               ;a = abh
423
        ld      hl, 04afeh
424
        ld      bc, 4
425
        otirx                   ;read  11h @ 4afeh
426
                                ;write 11h @ da16h
427
                                ;read  11h @ 4affh
428
                                ;write 11h @ da16h
429
                                ;read  11h @ 4b00h
430
                                ;write 11h @ da16h
431
                                ;read  11h @ 4b01h
432
                                ;write 11h @ da16h
433
        push    af              ;abc2h @ fbf6h
434
        push    bc              ;0000h @ fbf4h
435
        push    de              ;da16h @ fbf2h
436
        push    hl              ;4b02h @ fbf0h
437
 
438
        and     a
439
        ld      hl, 09dfeh + 3
440
        ld      de, 0e732h
441
        ld      bc, 4
442
        indrx                   ;read  77h @ e732h
443
                                ;write 77h @ 9e01h
444
                                ;read  77h @ e732h
445
                                ;write 77h @ 9e00h
446
                                ;read  77h @ e732h
447
                                ;write 77h @ 9dffh
448
                                ;read  77h @ e732h
449
                                ;write 77h @ 9dfeh
450
        push    af              ;abd2h @ fbeeh
451
        push    bc              ;0000h @ fbech
452
        push    de              ;e732h @ fbeah
453
        push    hl              ;9dfdh @ fbe8h
454
 
455
        inc     de
456
        dec     a               ;A = aah
457
        ld      hl, 09efeh
458
        ld      bc, 4
459
        inirx                   ;read  cch @ e733h
460
                                ;write cch @ 9efeh
461
                                ;read  cch @ e733h
462
                                ;write cch @ 9effh
463
                                ;read  cch @ e733h
464
                                ;write cch @ 9f00h
465
                                ;read  cch @ e733h
466
                                ;write cch @ 9f01h
467
        push    af              ;aac2h @ fbe6h
468
        push    bc              ;0000h @ fbe4h
469
        push    de              ;e733h @ fbe2h
470
        push    hl              ;9f02h @ fbe0h
471
 
472
        ld      hl,0100h
473
        jp      0c0h
474
 
475
        org     02000h
476
        dw      0dbach, 05183h, 0e800h, 07e4dh, 09a1fh
477
 
478
        org     04800h
479
        db      0a6h, 0a5h, 0f4h, 022h, 002h, 061h      ;for ini2
480
 
481
        org     04900h
482
        db      061h, 002h, 022h, 0f4h, 0a5h, 0a6h      ;for ind2
483
 
484
        org     049feh
485
        db      0eeh, 0eeh, 0eeh, 0eeh
486
 
487
        org     04afeh
488
        db      011h, 011h, 011h, 011h
489
 
490
        org     04fe8h
491
        db      0ffh, 0ffh, 0a8h, 027h, 026h, 01ch, 01bh, 01ah
492
        db      019h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 043h, 00ah
493
        db      009h, 008h, 007h, 006h, 005h, 004h, 0ffh, 0aah
494
        db      055h, 0ffh, 001h, 002h, 003h, 00bh, 00ch, 00dh
495
        db      00eh, 00fh, 0ffh, 0ffh, 0ffh, 0ffh, 01dh, 01eh
496
        db      01fh, 020h, 0a1h, 022h, 023h, 022h, 025h, 0ffh
497
 
498
        org     0e732h
499
        db      077h, 0cch
500
 
501
        org     0e800h
502
        dw      00123h, 04567h, 089abh, 02006h, 0cdefh
503
 
504
        end

powered by: WebSVN 2.1.0

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