home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / asm / PS_A80Z.ZIP / MNEMTEST.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-02-09  |  10.4 KB  |  494 lines

  1.          .org 0               ;z80 mnemonics test
  2.          adc a,h'00
  3.          adc a,h'ff
  4.          adc a,a
  5.          adc a,b
  6.          adc a,c
  7.          adc a,d
  8.          adc a,e
  9.          adc a,h
  10.          adc a,l
  11.          adc a,(hl)
  12.          adc a,(ix+-128)
  13.          adc a,(ix-128)
  14.          adc a,(iy-128)
  15.          adc a,(iy+127)
  16.          adc hl,bc
  17.          adc hl,de
  18.          adc hl,hl
  19.          adc hl,sp
  20.          add a,h'00
  21.          add a,h'ff
  22.          add a,a
  23.          add a,l
  24.          add a,(hl)
  25.          add a,(ix+-128)
  26.          add a,(iy+127)
  27.          add hl,bc
  28.          add hl,de
  29.          add hl,hl
  30.          add hl,sp
  31.          add ix,bc
  32.          add ix,de
  33.          add ix,sp
  34.          add iy,bc
  35.          add iy,de
  36.          add iy,sp
  37.          add ix,ix
  38.          add iy,iy
  39.          and h'00
  40.          and h'ff
  41.          and a
  42.          and l
  43.          and (hl)
  44.          and (ix+-128)
  45.          and (iy+127)
  46.          bit 0,a
  47.          bit 0,l
  48.          bit 0,(hl)
  49.          bit 0,(ix+-128)
  50.          bit 0,(iy+127)
  51.          bit 7,a
  52.          bit 7,l
  53.          bit 7,(hl)
  54.          bit 7,(ix+-128)
  55.          bit 7,(iy+127)
  56.          call h'00
  57.          call h'ff
  58.          call longtest
  59.          call nz,h'00
  60.          call z,h'ff
  61.          call nc,longtest
  62.          call c,longtest
  63.          call po,h'00
  64.          call pe,1000
  65.          call p,128
  66.          call m,0
  67.          ccf
  68.          cp h'00
  69.          cp h'ff
  70.          cp a
  71.          cp l
  72.          cp (hl)
  73.          cp (ix+-128)
  74.          cp (iy+127)
  75.          cp +(1024) >> 8
  76.          cpd
  77.          cpdr
  78.          cpi
  79.          cpir
  80.          cpl
  81.          daa
  82.          dec a
  83.          dec l
  84.          dec (hl)
  85.          dec (ix+-128)
  86.          dec (iy+127)
  87.          dec bc
  88.          dec de
  89.          dec hl
  90.          dec sp
  91.          dec ix
  92.          dec iy
  93.          di
  94.          djnz rtest
  95.          ei
  96.          ex af,af'
  97.          ex de,hl
  98.          ex (sp),hl
  99.          ex (sp),ix
  100.          ex (sp),iy
  101.          exx
  102.          halt
  103.          im 0
  104.          im 1
  105.          im 2
  106.          in a,(h'00)
  107.          in a,(h'ff)
  108.          inc a
  109.          inc l
  110.          inc (hl)
  111.          inc (ix+-128)
  112.          inc (iy+127)
  113.          inc bc
  114.          inc de
  115.          inc hl
  116.          inc sp
  117.          inc ix
  118.          inc iy
  119.          ind
  120.          indr
  121.          ini
  122.          inir
  123.          in a,(c)
  124.          in c,(c)
  125.          in l,(c)
  126.          jp h'00
  127.          jp h'ff
  128.          jp longtest
  129.          jp nz,h'00
  130.          jp z,h'ff
  131.          jp nc,longtest
  132.          jp c,longtest
  133.          jp po,h'00
  134.          jp pe,1000
  135.          jp p,128
  136.          jp m,0
  137.          jp (hl)
  138.          jp (ix)
  139.          jp (iy)
  140.          jr c,rtest
  141. rtest:   jr rtest
  142.          djnz rtest
  143.          jr nc,rtest
  144.          jr nz,rtest
  145.          jr z,rtest
  146.          ld a,i
  147.          ld a,r
  148.          ld a,(longtest)
  149.          ld a,(h'00)
  150.          ld a,(h'ff)
  151.          ld a,(hl)
  152.          ld a,(bc)
  153.          ld a,(de)
  154.          ld a,l
  155.          ld l,a
  156.          ld l,h
  157.          ld hl,(h'00)
  158.          ld hl,(longtest)
  159.          ld bc,(h'00)
  160.          ld de,(longtest)
  161.          ld sp,(h'ff)
  162.          ld ix,(h'00)
  163.          ld iy,(h'ff)
  164.          ld ix,(longtest)
  165.          ld i,a
  166.          ld r,a
  167.          ld a,h'00
  168.          ld l,h'ff
  169.          ld bc,h'00
  170.          ld de,h'ff
  171.          ld sp,h'ff
  172.          ld hl,longtest
  173.          ld hl,1000
  174.          ld ix,1000
  175.          ld iy,longtest
  176.          ld a,(hl)
  177.          ld l,(hl)
  178.          ld a,(ix+127)
  179.          ld a,(iy+127)
  180.          ld a,(iy-128)
  181.          ld l,(iy+-128)
  182.          ld l,(iy-128)
  183.          ld sp,hl
  184.          ld sp,ix
  185.          ld sp,iy
  186.          ld (1000),a
  187.          ld (longtest),a
  188.          ld (1000),hl
  189.          ld (longtest),hl
  190.          ld (1000),bc
  191.          ld (longtest),bc
  192.          ld (1000),de
  193.          ld (longtest),de
  194.          ld (1000),sp
  195.          ld (longtest),sp
  196.          ld (1000),ix
  197.          ld (longtest),iy
  198.          ld (hl),h'00
  199.          ld (hl),h'ff
  200.          ld (ix+127),h'00
  201.          ld (ix+-128),h'ff
  202.          ld (iy-128),h'ff
  203.          ld (iy-128),-128
  204.          ld (iy-128),127
  205.          ld (iy+127),0
  206.          ld (hl),a
  207.          ld (hl),l
  208.          ld (ix+127),a
  209.          ld (iy+-128),l
  210.          ld (iy-128),l
  211.          ld (bc),a
  212.          ld (de),a
  213.          ld (hl),a
  214.          ldd
  215.          lddr
  216.          ldi
  217.          ldir
  218.          neg
  219.          nop
  220.          or h'00
  221.          or h'ff
  222.          or a
  223.          or l
  224.          or (hl)
  225.          or (ix+-128)
  226.          or (iy+127)
  227.          out (c),a
  228.          out (c),l
  229.          outd
  230.          otdr
  231.          outi
  232.          otir
  233.          out (h'00),a
  234.          out (h'ff),a
  235.          pop bc
  236.          pop de
  237.          pop hl
  238.          pop af
  239.          pop ix
  240.          pop iy
  241.          push bc
  242.          push de
  243.          push hl
  244.          push af
  245.          push ix
  246.          push iy
  247.          res 0,a
  248.          res 0,l
  249.          res 0,(hl)
  250.          res 0,(ix+-128)
  251.          res 0,(iy+127)
  252.          res 7,a
  253.          res 7,l
  254.          res 7,(hl)
  255.          res 7,(ix+-128)
  256.          res 7,(iy+127)
  257.          ret
  258.          ret nz
  259.          ret z
  260.          ret nc
  261.          ret c
  262.          ret po
  263.          ret pe
  264.          ret p
  265.          ret m
  266.          reti
  267.          retn
  268.          rl a
  269.          rl l
  270.          rl (hl)
  271.          rl (ix+-128)
  272.          rl (iy+127)
  273.          rla
  274.          rlc a
  275.          rlc l
  276.          rlc (hl)
  277.          rlc (ix+-128)
  278.          rlc (iy+127)
  279.          rlca
  280.          rld
  281.          rr a
  282.          rr l
  283.          rr (hl)
  284.          rr (ix+-128)
  285.          rr (iy+127)
  286.          rra
  287.          rrc a
  288.          rrc l
  289.          rrc (hl)
  290.          rrc (ix+-128)
  291.          rrc (iy+127)
  292.          rrca
  293.          rrd
  294.          rst h'00
  295.          rst h'20
  296.          rst h'38
  297.          sbc a,h'00
  298.          sbc a,h'ff
  299.          sbc a,a
  300.          sbc a,l
  301.          sbc a,(hl)
  302.          sbc a,(ix+-128)
  303.          sbc a,(iy+127)
  304.          sbc hl,bc
  305.          sbc hl,de
  306.          sbc hl,hl
  307.          sbc hl,sp
  308.          scf
  309.          set 0,a
  310.          set 0,l
  311.          set 0,(hl)
  312.          set 0,(ix+-128)
  313.          set 0,(iy+127)
  314.          set 7,a
  315.          set 7,l
  316.          set 7,(hl)
  317.          set 7,(ix+-128)
  318.          set 7,(iy+127)
  319.          sla a
  320.          sla l
  321.          sla (hl)
  322.          sla (ix+-128)
  323.          sla (iy+127)
  324.          sra a
  325.          sra l
  326.          sra (hl)
  327.          sra (ix+-128)
  328.          sra (iy+127)
  329.          srl a
  330.          srl l
  331.          srl (hl)
  332.          srl (ix+-128)
  333.          srl (iy+127)
  334.          sub h'00
  335.          sub h'ff
  336.          sub a
  337.          sub l
  338.          sub (hl)
  339.          sub (ix+-128)
  340.          sub (iy+127)
  341.          xor h'00
  342.          xor h'ff
  343.          xor a
  344.          xor l
  345.          xor (hl)
  346.          xor (ix+-128)
  347.          xor (iy+127)
  348.  
  349. synctst1:
  350.          adc a,forward2
  351.          adc a,forward1
  352.          adc a,(ix+forward3)
  353.          adc a,(iy+forward4)
  354.          add a,forward2
  355.          add a,forward1
  356.          add a,(ix+forward3)
  357.          add a,(iy+forward4)
  358.          and forward2
  359.          and forward1
  360.          and (ix+forward3)
  361.          and (iy+forward4)
  362.          bit bit0,a
  363.          bit bit0,l
  364.          bit bit0,(hl)
  365.          bit bit0,(ix+forward3)
  366.          bit bit0,(iy+forward4)
  367.          bit bit7,a
  368.          bit bit7,l
  369.          bit bit7,(hl)
  370.          bit bit7,(ix+forward3)
  371.          bit bit7,(iy+forward4)
  372.          call forward2
  373.          call forward1
  374.          call longtest
  375.          call nz,forward2
  376.          call z,forward1
  377.          call nc,longtest
  378.          call c,longtest
  379.          call po,forward2
  380.          call pe,1000
  381.          call p,128
  382.          call m,0
  383.          cp forward2
  384.          cp forward1
  385.          cp (ix+forward3)
  386.          cp (iy+forward4)
  387.          dec (ix+forward3)
  388.          dec (iy+forward4)
  389.          in a,(forward2)
  390.          in a,(forward1)
  391.          inc (ix+forward3)
  392.          inc (iy+forward4)
  393.          jp forward2
  394.          jp forward1
  395.          jp longtest
  396.          jp nz,forward2
  397.          jp z,forward1
  398.          jp nc,longtest
  399.          jp c,longtest
  400.          jp po,forward2
  401.          jp pe,1000
  402.          jp p,128
  403.          jp m,0
  404.          ld a,(longtest)
  405.          ld a,(forward2)
  406.          ld a,(forward1)
  407.          ld ix,(forward2)
  408.          ld iy,(forward1)
  409.          ld ix,(longtest)
  410.          ld a,forward2
  411.          ld bc,forward2
  412.          ld sp,forward1
  413.          ld hl,longtest
  414.          ld hl,1000
  415.          ld ix,1000
  416.          ld iy,longtest
  417.          ld a,(ix+forward4)
  418.          ld l,(iy+forward3)
  419.          ld (1000),a
  420.          ld (longtest),a
  421.          ld (1000),hl
  422.          ld (longtest),hl
  423.          ld (1000),bc
  424.          ld (longtest),bc
  425.          ld (1000),ix
  426.          ld (longtest),iy
  427.          ld (hl),forward2
  428.          ld (hl),forward1
  429.          ld (ix+forward4),forward2
  430.          ld (ix+forward3),forward1
  431.          ld (ix+forward4),a
  432.          ld (iy+forward3),l
  433.          or forward2
  434.          or forward1
  435.          or (ix+forward3)
  436.          or (iy+forward4)
  437.          out (forward2),a
  438.          out (forward1),a
  439.          res bit0,a
  440.          res bit0,l
  441.          res bit0,(hl)
  442.          res bit0,(ix+forward3)
  443.          res bit0,(iy+forward4)
  444.          res bit7,a
  445.          res bit7,l
  446.          res bit7,(hl)
  447.          res bit7,(ix+forward3)
  448.          res bit7,(iy+forward4)
  449.          rl (ix+forward3)
  450.          rl (iy+forward4)
  451.          rlc (ix+forward3)
  452.          rlc (iy+forward4)
  453.          rr (ix+forward3)
  454.          rr (iy+forward4)
  455.          rrc (ix+forward3)
  456.          rrc (iy+forward4)
  457.          sbc a,forward2
  458.          sbc a,forward1
  459.          sbc a,(ix+forward3)
  460.          sbc a,(iy+forward4)
  461.          set bit0,a
  462.          set bit0,l
  463.          set bit0,(hl)
  464.          set bit0,(ix+forward3)
  465.          set bit0,(iy+forward4)
  466.          set bit7,a
  467.          set bit7,l
  468.          set bit7,(hl)
  469.          set bit7,(ix+forward3)
  470.          set bit7,(iy+forward4)
  471.          sla (ix+forward3)
  472.          sla (iy+forward4)
  473.          sra (ix+forward3)
  474.          sra (iy+forward4)
  475.          srl (ix+forward3)
  476.          srl (iy+forward4)
  477.          sub forward2
  478.          sub forward1
  479.          sub (ix+forward3)
  480.          sub (iy+forward4)
  481.          xor forward2
  482.          xor forward1
  483.          xor (ix+forward3)
  484.          xor (iy+forward4)
  485.  
  486. synctst2:
  487. longtest:.equ forward1,h'ff
  488.          .equ forward2,h'00
  489.          .equ forward3,-128
  490.          .equ forward4,127
  491.          .equ bit0,0
  492.          .equ bit7,7
  493.          .end
  494.