home *** CD-ROM | disk | FTP | other *** search
- ;
- ;============================
- ;TEST
- ;============================
- ;written 15.04.87
- ;comments in english 19.11.87
-
- ;purpose: show usage of new HD64180 commands
- ;
- .Z80
- ;
- ;==================
- ; SLEEP
- ;==================
- ;
- ;enter SLEEP (low power) operation mode
- ;format: SLP
- ;
- ;correct:
- ;
- SLP
- ;
- ;wrong:
- ;
- SLP A
- SLP (HL)
- SLP DE
- SLP 1
- EGON EQU 1200
- SLP EGON
- ;
- ;==================
- ; MULTIPLY
- ;==================
- ;
- ;8-bit multiply with 16-bit result
- ;format: MLT ww (ww = BC/DE/HL/SP)
- ;
- ;correct:
- ;
- MLT BC
- MLT DE
- MLT HL
- MLT SP
- ;
- ;wrong:
- ;
- MLT
- MLT C
- MLT (HL)
- MLT 12
- MLT EGON
- ;
- ;b u t:
- ;
- MLT AF
- ;
- ;is correct for M80, because AF and SP a l w a y s are
- ;the same for M80 !!!
- ;further examples:
- ;
- INC AF
- DEC AF
- PUSH SP
- POP SP
- ;
- ;imagine the effects of these commands, if they would be real!
- ;
- ;==================
- ; OUTPUT
- ;==================
- ;
- ;output register to immediate I/O address
- ;format: OUT0 (m),r (m = byte value, r = B/C/D/E/H/L/A)
- ;
- ;correct:
- ;
- OUT0 (2),C
- PIO EQU 40H
- OUT0 (PIO),L
- OUT0 (0FFH),E
- ;
- ;wrong:
- ;
- OUT0 2,C
- OUT0
- OUT0 C
- OUT0 3
- OUT0 (E),C
- OUT0 (3),(HL) ;even the HD64180 is not a two-address machine
- OUT0 (EGON),D
- ;
- ;==================
- ; INPUT
- ;==================
- ;
- ;input from immediate I/O address to register
- ;format: IN0 r,(m) (m = byte value, r = B/C/D/E/H/L/A)
- ;
- ;correct:
- ;
- IN0 A,(2)
- IN0 C,(PIO)
- ;
- ;wrong:
- ;
- IN0 A,(C)
- IN0 (HL),(3)
- IN0 A,3
- IN0
- ;
- ;==================
- ; BLOCK OUTPUT
- ;==================
- ;
- ;the contents of memory pointed to by HL is output to the I/O address
- ;in (C). The memory address (HL) and I/O address (C) are incremented
- ;in OTIM and OTIMR and decremented in OTDR and OTDMR respectively.
- ;B register is decremented. The OTIMR and OTDMR variants repeat the
- ;above sequence until register B is decremented to 0.
- ;
- ;correct:
- ;
- OTIM
- OTIMR
- OTDM
- OTDMR
- ;
- ;wrong:
- ;
- OTIM EGON
- OTIM 3
- OTIM C
- OTIM (HL)
- ;
- ;==================
- ; LOGICAL
- ;==================
- ;
- ;Non-destructive AND, I/O port and accumulator
- ;format: TSTIO m (m = byte value)
- ;
- ;correct:
- ;
- TSTIO 2
- TSTIO PIO
- ;
- ;wrong:
- ;
- TSTIO
- TSTIO C
- TSTIO (IX+12)
- TSTIO EGON
- ;
- ;==================
- ; LOGICAL TEST
- ;==================
- ;
- ;Non-destructive AND, register/immediate/memory and accumulator
- ;format: TST g (g = B/C/D/E/H/L/A)
- ; TST m (m = byte value)
- ; TST (HL)
- ;
- ;correct:
- ;
- TST A
- TST (HL)
- TST PIO
- TST 14
- ;
- ;wrong:
- ;
- TST
- TST (IX+2)
- TST EGON
- ;
- ;==================
- ;
- .8080
- ;
- ;these new instructions only work in Z80 mode, of course:
- ;
- SLP
- IN0 A,(56)
- OUT0 (23),L
- MLT HL
- OTIM
- OTIMR
- OTDM
- OTDMR
- TSTIO 23
- TST C
- TST (HL)
- TST 15
- ;
- ;==================
- ;
- END