urasm: implemented "@@" (or "$$") label support
[urasm.git] / test / ufe_dis_test.zas
blobc55379df797aa8cf40f783286d22772a60901f54
1   deffmt none
3         org #0042
5   defb #b5
6   defb #20,#03
7   defb #fd,#34
8   defb #40,#c5,#d5,#cd,#6e,#38
11         org #8000
13 code_start equ $
15 NNN0:   equ #10
16 NNN1:   equ #1000
17 ADDR:
18   adc   a,(hl)
19   adc   a,(ix+5)
20   adc   a,(iy-#44)
21   adc   a,a
22   adc   a,b
23   adc   a,c
24   adc   a,d
25   adc   a,e
26   adc   a,h
27   adc   a,l
28   adc   a,NNN0
29   adc   hl,bc
30   adc   hl,de
31   adc   hl,hl
32   adc   hl,sp
34   add   a,(hl)
35   add   a,(ix-3)
36   add   a,(iy+127)
37   add   a,a
38   add   a,b
39   add   a,c
40   add   a,d
41   add   a,e
42   add   a,h
43   add   a,l
44   add   a,%1010
45   add   hl,bc
46   add   hl,de
47   add   hl,bc
48   add   hl,sp
49   add   ix,bc
50   add   ix,de
51   add   ix,ix
52   add   ix,sp
53   add   iy,bc
54   add   iy,de
55   add   iy,iy
56   add   iy,sp
58   and   (hl)
59   and   (ix-128)
60   and   (iy+0)
61   and   a
62   and   b
63   and   c
64   and   d
65   and   e
66   and   h
67   and   l
68   ;AND 1995?1990
70   bit   0,(hl)
71   bit   0,(ix)
72   bit   0,(iy+#33)
73   bit   0,a
74   bit   0,b
75   bit   0,c
76   bit   0,d
77   bit   0,e
78   bit   0,h
79   bit   0,l
80   bit   1,(hl)
81   bit   1,(ix)
82   bit   1,(iy+#33)
83   bit   1,a
84   bit   1,b
85   bit   1,c
86   bit   1,d
87   bit   1,e
88   bit   1,h
89   bit   1,l
90   bit   2,(hl)
91   bit   2,(ix-2)
92   bit   2,(iy+#22)
93   bit   2,a
94   bit   2,b
95   bit   2,c
96   bit   2,d
97   bit   2,e
98   bit   2,h
99   bit   2,l
100   bit   3,(hl)
101   bit   3,(ix-3)
102   bit   3,(iy+#33)
103   bit   3,a
104   bit   3,b
105   bit   3,c
106   bit   3,d
107   bit   3,e
108   bit   3,h
109   bit   3,l
110   bit   4,(hl)
111   bit   4,(ix-3)
112   bit   4,(iy+#34)
113   bit   4,a
114   bit   4,b
115   bit   4,c
116   bit   4,d
117   bit   4,e
118   bit   4,h
119   bit   4,l
120   bit   5,(hl)
121   bit   5,(ix-3)
122   bit   5,(iy+#35)
123   bit   5,a
124   bit   5,b
125   bit   5,c
126   bit   5,d
127   bit   5,e
128   bit   5,h
129   bit   5,l
130   bit   5,(hl)
131   bit   6,(ix-3)
132   bit   6,(iy+#66)
133   bit   6,a
134   bit   6,b
135   bit   6,c
136   bit   6,d
137   bit   6,e
138   bit   6,h
139   bit   6,l
140   bit   7,(hl)
141   bit   7,(ix-3)
142   bit   7,(iy+#67)
143   bit   7,a
144   bit   7,b
145   bit   7,c
146   bit   7,d
147   bit   7,e
148   bit   7,h
149   bit   7,l
151   call  ADDR
152   call  c,ADDR
153   call  m,$
154   call  nc,ADDR+40
155   call  nz,#5F00
156   call  p,0
157   call  pe,%1111000011110000
158   call  po,$-40
159   call  z,NNN1
161   ccf
162   cp    (hl)
163   cp    (ix-128)
164   cp    (iy+127)
165   cp    a
166   cp    b
167   cp    c
168   cp    d
169   cp    e
170   cp    h
171   cp    l
172   cp    19
174   cpd
175   cpdr
176   cpi
177   cpir
178   cpl
179   daa
181   dec   (hl)
182   dec   (ix)
183   dec   (iy+1)
184   dec   a
185   dec   b
186   dec   bc
187   dec   c
188   dec   d
189   dec   de
190   dec   e
191   dec   h
192   dec   hl
193   dec   ix
194   dec   iy
195   dec   l
196   dec   sp
198   di
199 LABEL:
200   djnz  LABEL
201   ei
202   ex    (sp),hl
203   ex    (sp),ix
204   ex    (sp),iy
205   ex    af,af'
206   ex    de,hl
207   exx
208   halt
209   im    0
210   im    1
211   im    2
213   ;IN   (HL),(C)
214   in    a,(c)
215   in    a,(#FE)
216   in    b,(c)
217   in    c,(c)
218   in    d,(c)
219   in    e,(c)
220   in    h,(c)
221   in    l,(c)
223   inc   (hl)
224   inc   (ix-8)
225   inc   (iy+8)
226   inc   a
227   inc   b
228   inc   bc
229   inc   c
230   inc   d
231   inc   de
232   inc   e
233   inc   h
234   inc   hl
235   inc   ix
236   inc   iy
237   inc   l
238   inc   sp
240   ind
241   indr
242   ini
243   inir
245   jp    (hl)
246   jp    (ix)
247   jp    (iy)
248   jp    LABEL
249   jp    c,ADDR
250   jp    m,$
251   jp    nc,ADDR+40
252   jp    nz,#5F00
253   jp    p,9/3+5*66-#13&#FFFF  ; 0x13a
254   jp    pe,%100
255   jp    po,$-40
256   jp    z,NNN1
258 near:
259   jr    near+#1
260   jr    c,near
261   jr    nc,near
262   jr    nz,$+129
263   jr    z,$-126
265 Zyte: equ #FE
266   ld    (ADDR),a
267   ld    (ADDR+1),bc
268   ld    (23296),de
269   ld    (#5B00),hl
270   ld    (256+768),ix
271   ld    (0-2),iy
272   ld    (%0),sp
273   ld    (bc),a
274   ld    (de),a
275   ld    (hl),a
276   ld    (hl),b
277   ld    (hl),c
278   ld    (hl),d
279   ld    (hl),e
280   ld    (hl),h
281   ld    (hl),l
282   ld    (hl),Zyte
283   ld    (ix+127),a
284   ld    (ix+127),b
285   ld    (ix+127),c
286   ld    (ix+127),d
287   ld    (ix+127),e
288   ld    (ix+127),h
289   ld    (ix+127),l
290   ld    (ix+127),Zyte
291   ld    (iy-127),a
292   ld    (iy-127),b
293   ld    (iy-127),c
294   ld    (iy-127),d
295   ld    (iy-127),e
296   ld    (iy-127),h
297   ld    (iy-127),l
298   ld    (iy-127),Zyte-Zyte
299   ld    a,(hl)
300   ld    a,(ix)
301   ld    a,(iy+#7F)
302   ld    a,a
303   ld    a,b
304   ld    a,c
305   ld    a,d
306   ld    a,e
307   ld    a,h
308   ld    a,i
309   ld    a,l
310   ld    a,r
311   ld    a,Zyte
312   ld    b,(hl)
313   ld    b,(ix)
314   ld    b,(iy+#7F)
315   ld    b,a
316   ld    b,b
317   ld    b,c
318   ld    b,d
319   ld    b,e
320   ld    b,h
321   ld    b,l
322   ld    b,Zyte
323   ld    bc,(ADDR)
324   ld    bc,NNN1
325   ld    c,(hl)
326   ld    c,(ix-#80)
327   ld    c,(iy+#7F)
328   ld    c,a
329   ld    c,b
330   ld    c,c
331   ld    c,d
332   ld    c,e
333   ld    c,h
334   ld    c,l
335   ld    c,Zyte
336   ld    d,(hl)
337   ld    d,(ix-#80)
338   ld    d,(iy+#7F)
339   ld    d,a
340   ld    d,b
341   ld    d,c
342   ld    d,d
343   ld    d,e
344   ld    d,h
345   ld    d,l
346   ld    d,Zyte
347   ld    de,(#3322)
348   ld    de,#3322
349   ld    e,(hl)
350   ld    e,(ix-#80)
351   ld    e,(iy+#7F)
352   ld    e,a
353   ld    e,b
354   ld    e,c
355   ld    e,d
356   ld    e,e
357   ld    e,h
358   ld    e,l
359   ld    e,Zyte
360   ld    h,(hl)
361   ld    h,(ix-#80)
362   ld    h,(iy+#7F)
363   ld    h,a
364   ld    h,b
365   ld    h,c
366   ld    h,d
367   ld    h,e
368   ld    h,h
369   ld    h,l
370   ld    h,#AA
371   ld    hl,(#F000+#E00+#21)
372   ld    hl,ADDR/ADDR
373   ld    i,a
374   ld    ix,(#0000)
375   ld    ix,5
376   ld    iy,(#1234)
377   ld    iy,$/2
378   ld    l,(hl)
379   ld    l,(ix-#80)
380   ld    l,(iy+#7F)
381   ld    l,a
382   ld    l,b
383   ld    l,c
384   ld    l,d
385   ld    l,e
386   ld    l,h
387   ld    l,l
388   ld    l,#DD
389   ld    r,a
390   ld    sp,(ADDR)
391   ld    sp,ix
392   ld    sp,iy
393   ld    sp,hl
394   ld    sp,NNN1
396   ldd
397   lddr
398   ldi
399   ldir
400   neg
401   nop
403   or    (hl)
404   or    (ix-128)
405   or    (iy+127)
406   or    a
407   or    b
408   or    c
409   or    d
410   or    e
411   or    h
412   or    l
413   or    %11000111
415   otdr
416   otir
418   out   (c),a
419   out   (c),b
420   out   (c),c
421   out   (c),d
422   out   (c),e
423   out   (c),h
424   out   (c),l
425 PORT: equ #1F
426   out   (PORT),a
428   outd
429   outi
431   pop   af
432   pop   bc
433   pop   de
434   pop   hl
435   pop   ix
436   pop   iy
438   push  af
439   push  bc
440   push  de
441   push  hl
442   push  ix
443   push  iy
445   res   0,(hl)
446   res   0,(ix)
447   res   0,(iy+#33)
448   res   0,a
449   res   0,b
450   res   0,c
451   res   0,d
452   res   0,e
453   res   0,h
454   res   0,l
455   res   1,(hl)
456   res   1,(ix)
457   res   1,(iy+#33)
458   res   1,a
459   res   1,b
460   res   1,c
461   res   1,d
462   res   1,e
463   res   1,h
464   res   1,l
465   res   2,(hl)
466   res   2,(ix-2)
467   res   2,(iy+#22)
468   res   2,a
469   res   2,b
470   res   2,c
471   res   2,d
472   res   2,e
473   res   2,h
474   res   2,l
475   res   3,(hl)
476   res   3,(ix-3)
477   res   3,(iy+#33)
478   res   3,a
479   res   3,b
480   res   3,c
481   res   3,d
482   res   3,e
483   res   3,h
484   res   3,l
485   res   4,(hl)
486   res   4,(ix-3)
487   res   4,(iy+#34)
488   res   4,a
489   res   4,b
490   res   4,c
491   res   4,d
492   res   4,e
493   res   4,h
494   res   4,l
495   res   5,(hl)
496   res   5,(ix-3)
497   res   5,(iy+#35)
498   res   5,a
499   res   5,b
500   res   5,c
501   res   5,d
502   res   5,e
503   res   5,h
504   res   5,l
505   res   5,(hl)
506   res   6,(ix-3)
507   res   6,(iy+#66)
508   res   6,a
509   res   6,b
510   res   6,c
511   res   6,d
512   res   6,e
513   res   6,h
514   res   6,l
515   res   7,(hl)
516   res   7,(ix-3)
517   res   7,(iy+#67)
518   res   7,a
519   res   7,b
520   res   7,c
521   res   7,d
522   res   7,e
523   res   7,h
524   res   7,l
526   ret
527   ret   c
528   ret   m
529   ret   nc
530   ret   nz
531   ret   p
532   ret   pe
533   ret   po
534   ret   z
535   reti
536   retn
538   rl    (hl)
539   rl    (ix-128)
540   rl    (iy+127)
541   rl    a
542   rl    b
543   rl    c
544   rl    d
545   rl    e
546   rl    h
547   rl    l
548   rla
549   rlc   (hl)
550   rlc   (ix-128)
551   rlc   (iy+127)
552   rlc   a
553   rlc   b
554   rlc   c
555   rlc   d
556   rlc   e
557   rlc   h
558   rlc   l
559   rlca
560   rld
561   rr    (hl)
562   rr    (ix-128)
563   rr    (iy+127)
564   rr    a
565   rr    b
566   rr    c
567   rr    d
568   rr    e
569   rr    h
570   rr    l
571   rra
572   rrc   (hl)
573   rrc   (ix-128)
574   rrc   (iy+127)
575   rrc   a
576   rrc   b
577   rrc   c
578   rrc   d
579   rrc   e
580   rrc   h
581   rrc   l
582   rrca
583   rrd
584   rst   0
585   rst   %1000
586   rst   16
587   rst   #18
588   rst   #20
589   rst   #28
590   rst   #30
591   rst   #38
593   sbc   a,(hl)
594   sbc   a,(ix+5)
595   sbc   a,(iy)
596   sbc   a,a
597   sbc   a,b
598   sbc   a,c
599   sbc   a,d
600   sbc   a,e
601   sbc   a,h
602   sbc   a,l
603   sbc   a,NNN0
604   sbc   hl,bc
605   sbc   hl,de
606   sbc   hl,hl
607   sbc   hl,sp
609   scf
610   set   0,(hl)
611   set   0,(ix)
612   set   0,(iy+#33)
613   set   0,a
614   set   0,b
615   set   0,c
616   set   0,d
617   set   0,e
618   set   0,h
619   set   0,l
620   set   1,(hl)
621   set   1,(ix)
622   set   1,(iy+#33)
623   set   1,a
624   set   1,b
625   set   1,c
626   set   1,d
627   set   1,e
628   set   1,h
629   set   1,l
630   set   2,(hl)
631   set   2,(ix-2)
632   set   2,(iy+#22)
633   set   2,a
634   set   2,b
635   set   2,c
636   set   2,d
637   set   2,e
638   set   2,h
639   set   2,l
640   set   3,(hl)
641   set   3,(ix-3)
642   set   3,(iy+#33)
643   set   3,a
644   set   3,b
645   set   3,c
646   set   3,d
647   set   3,e
648   set   3,h
649   set   3,l
650   set   4,(hl)
651   set   4,(ix-3)
652   set   4,(iy+#34)
653   set   4,a
654   set   4,b
655   set   4,c
656   set   4,d
657   set   4,e
658   set   4,h
659   set   4,l
660   set   5,(hl)
661   set   5,(ix-3)
662   set   5,(iy+#35)
663   set   5,a
664   set   5,b
665   set   5,c
666   set   5,d
667   set   5,e
668   set   5,h
669   set   5,l
670   set   5,(hl)
671   set   6,(ix-3)
672   set   6,(iy+#66)
673   set   6,a
674   set   6,b
675   set   6,c
676   set   6,d
677   set   6,e
678   set   6,h
679   set   6,l
680   set   7,(hl)
681   set   7,(ix-3)
682   set   7,(iy+%1100)
683   set   7,a
684   set   7,b
685   set   7,c
686   set   7,d
687   set   7,e
688   set   7,h
689   set   7,l
691   sla   (hl)
692   sla   (ix-128)
693   sla   (iy+127)
694   sla   a
695   sla   b
696   sla   c
697   sla   d
698   sla   e
699   sla   h
700   sla   l
702   sra   (hl)
703   sra   (ix-128)
704   sra   (iy+127)
705   sra   a
706   sra   b
707   sra   c
708   sra   d
709   sra   e
710   sra   h
711   sra   l
713   srl   (hl)
714   srl   (ix-128)
715   srl   (iy+127)
716   srl   a
717   srl   b
718   srl   c
719   srl   d
720   srl   e
721   srl   h
722   srl   l
724   sub   (hl)
725   sub   (ix+15)
726   sub   (iy-15)
727   sub   a
728   sub   b
729   sub   c
730   sub   d
731   sub   e
732   sub   h
733   sub   l
734   sub   #FF
736   xor   (hl)
737   xor   (ix-128)
738   xor   (iy+0)
739   xor   (iy)
740   xor   a
741   xor   b
742   xor   c
743   xor   d
744   xor   e
745   xor   h
746   xor   l
747   xor   #55
749 code_undoc:
750   sll   (hl)
751   sll   (ix-128)
752   sll   (iy+127)
753   sll   a
754   sll   b
755   sll   c
756   sll   d
757   sll   e
758   sll   h
759   sll   l
760   out   (c),0
761   in    (c)
764 code_end equ $
766   INFORTH "distest.f"