home *** CD-ROM | disk | FTP | other *** search
- Path: xanth!nic.MR.NET!hal!ncoast!allbery
- From: bownesrm@beowulf.UUCP (Keptin Comrade Dr. Bob)
- Newsgroups: comp.sources.misc
- Subject: v05i086: Z80 Assembler/Disassembler part 1 of 3
- Message-ID: <1124@beowulf.UUCP>
- Date: 19 Dec 88 01:06:26 GMT
- Sender: allbery@ncoast.UUCP
- Reply-To: bownesrm@beowulf.UUCP (Keptin Comrade Dr. Bob)
- Organization: Reality Central
- Lines: 1931
- Approved: allbery@ncoast.UUCP
-
- Posting-number: Volume 5, Issue 86
- Submitted-by: "Keptin Comrade Dr. Bob" <bownesrm@beowulf.UUCP>
- Archive-name: z80ad/part01
-
- [Cross-assembler runs on UNIX, outputs Intel hex records. I suspect from the
- memory-as-file code that you need a demand-paged system to use this. ++bsa]
-
- This is a Z80 assembler and disassembler written by someone else to run
- under UNIX. It should be straightforward, though the doc's are a little
- sparse. Best of luck,
- Bob
-
-
- -------------------------- CUT HERE -------------------------------->8 Snip!!
- #!/bin/sh
- # shar: Shell Archiver (v1.12)
- #
- # if this archive has been broken into several parts,
- # DO NOT combine them, unpack them in order
- #
- # Run the following text with /bin/sh to create:
- # zmac/Makefile
- # zmac/memcpy.c
- # zmac/mio.c
- # zmac/serial.hex
- # zmac/serial.z
- # zmac/zdis.1
- # zmac/zdis.c
- # zmac/zmac.1
- # zmac/zmac.y
- #
- if test -r ._seq_
- then echo "Must unpack archives in sequence!"
- next=`cat ._seq_`; echo "Please unpack part $next next"
- exit 1; fi
- sed 's/^X//' << 'SHAR_EOF' > zmac/Makefile
- X# Makefile to make z80 macro assembler.
- XCFLAGS =
- X
- Xall: zmac zdis
- X
- Xzmac: y.tab.o mio.o
- X cc $(CFLAGS) -o zmac y.tab.o mio.o -lsx
- X
- Xy.tab.c: zmac.y
- X yacc zmac.y
- X
- Xzdis: zdis.o
- X cc $(CFLAGS) -o zdis zdis.o
- X
- Xinstall:
- X install -s zmac /usr/local/bin
- X install -s zdis /usr/local/bin
- X
- Xinstall_man:
- X cp zmac.1 /usr/man/manl/zmac.l
- X cp zdis.1 /usr/man/manl/zdis.l
- X
- Xclean:
- X rm -f zdis.o zmac.o mio.o y.tab.c y.tab.o a.out core
- X
- Xshar: zmac.shar.1 zmac.shar.2
- X
- Xzmac.shar.1: Makefile zmac.y mio.c zmac.1 zdis.1
- X shar -vc Makefile zmac.y mio.c zmac.1 zdis.1 > zmac.shar.1
- X
- Xzmac.shar.2: zdis.c serial.z serial.hex
- X shar -vc zdis.c serial.z serial.hex > zmac.shar.2
- SHAR_EOF
- chmod 0755 zmac/Makefile
- sed 's/^X//' << 'SHAR_EOF' > zmac/memcpy.c
- X/*
- X * memcpy - copy bytes
- X */
- X
- Xint *
- Xmemcpy(dst, src, size)
- Xint * dst;
- Xint * src;
- Xint size;
- X{
- X register char *d;
- X register char *s;
- X register int n;
- X
- X if (size <= 0)
- X return(dst);
- X
- X s = src;
- X d = dst;
- X if (s <= d && s + (size-1) >= d) {
- X /* Overlap, must copy right-to-left. */
- X s += size-1;
- X d += size-1;
- X for (n = size; n > 0; n--)
- X *d-- = *s--;
- X } else
- X for (n = size; n > 0; n--)
- X *d++ = *s++;
- X
- X return(dst);
- X}
- SHAR_EOF
- chmod 0644 zmac/memcpy.c
- sed 's/^X//' << 'SHAR_EOF' > zmac/mio.c
- X/*
- X * mio.c - Colin Kelley 1-18-87
- X * routines to emulate temporary file handling with memory instead
- X *
- X */
- X
- X#include <stdio.h>
- X#define MALLOC_SIZE 10000
- X
- Xunsigned char *malloc(), *realloc();
- X
- Xstatic unsigned char *mhead; /* pointer to start of malloc()d area */
- Xstatic unsigned char *mend; /* pointer to current (just beyond) EOF*/
- Xstatic unsigned char *mptr; /* pointer to current position */
- Xstatic unsigned int msize; /* size of chunk mhead points to */
- X
- XFILE *
- Xmfopen(filename,mode)
- Xchar *filename,*mode;
- X{
- X if ((mhead = malloc(MALLOC_SIZE)) == 0) {
- X msize = 0;
- X return (0);
- X }
- X msize = MALLOC_SIZE;
- X mend = mptr = mhead;
- X return ((FILE *)1); /* not used */
- X}
- X
- Xmfclose(f)
- XFILE *f;
- X{
- X if (mhead) {
- X free(mhead);
- X return (0);
- X }
- X else
- X return (-1);
- X}
- X
- Xunsigned int
- Xmfputc(c,f)
- Xunsigned int c;
- XFILE *f;
- X{
- Xregister unsigned char *p;
- X while (mptr >= mhead + msize) {
- X if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1) {
- X fputs("mio: out of memory\n",stderr);
- X return (-1);
- X }
- X else {
- X msize += MALLOC_SIZE;
- X mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
- X mhead = p;
- X }
- X }
- X *mptr = c & 255;
- X mend = ++mptr;
- X return c;
- X}
- X
- Xunsigned int
- Xmfgetc(f)
- XFILE *f;
- X{
- X if (mptr >= mend) /* no characters left */
- X return (-1);
- X else
- X return (*mptr++);
- X}
- X
- Xmfseek(f,loc,origin)
- XFILE *f;
- Xlong loc;
- Xint origin;
- X{
- X if (origin != 0) {
- X fputs("mseek() only implemented with 0 origin",stderr);
- X return (-1);
- X }
- X mptr = mhead + loc;
- X return (0);
- X}
- X
- Xmfread(ptr, size, nitems,f)
- Xchar *ptr;
- Xunsigned int size, nitems;
- XFILE *f;
- X{
- Xregister unsigned int i = 0;
- X while (i < nitems) {
- X if ((mptr + size) > mend)
- X break;
- X bcopy(mptr,ptr,size);
- X ptr += size;
- X mptr += size;
- X i++;
- X }
- X return (i);
- X}
- X
- Xmfwrite(ptr, size, nitems, f)
- Xchar *ptr;
- Xint size, nitems;
- XFILE *f;
- X{
- Xregister unsigned int i = 0;
- Xregister unsigned char *p;
- X while (i < nitems) {
- X while (mptr + size >= mhead + msize) {
- X if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1){
- X fputs("mio: out of memory\n",stderr);
- X return (-1);
- X }
- X else {
- X msize += MALLOC_SIZE;
- X mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
- X mhead = p;
- X }
- X }
- X if ((mptr + size) > mhead + msize)
- X break;
- X bcopy(ptr,mend,size);
- X ptr += size;
- X mend += size;
- X mptr = mend;
- X }
- X return (i);
- X}
- SHAR_EOF
- chmod 0755 zmac/mio.c
- sed 's/^X//' << 'SHAR_EOF' > zmac/serial.hex
- X:10000000C30F0073657269616C2E7A20312E38310E
- X:10001000FFFFCD1001CD7F01CD9801DD210BFF3A0F
- X:1000200000FFE6803E11C4F901DB054FDB0647CB3C
- X:10003000612808CD7102CD980118EECD4900CDB0F0
- X:1000400000CDDB00CDEB0018E0CB41C8DD2105FF82
- X:100050003A00FF67E640DB002806CDF901C3E20263
- X:10006000E67FFE20301DFE0D20063E013201FFC955
- X:10007000CB7CC8210FFFFE132003CBC6C9FE11C0E5
- X:10008000CB86C9CBEFFE6C200ACD40023202FF3294
- X:1000900003FFC9FE6D2007CD40023204FFC9FE7385
- X:1000A0002008CD40022F3200FFC9CD0A02C3E20270
- X:1000B000CB70C0DD210BFFDD7E02C603D83A00FF06
- X:1000C000E620DB80C2F901CD20023A02FFA7C82159
- X:1000D00003FF35C0773A04FFC3F901CB78C8DD21AF
- X:1000E00005FFCDDD01D8D380C3B402CB69C8DD21C3
- X:1000F0000BFF3A00FFE6802005CB60C8180B3A10D2
- X:10010000FFA72005DDCB0446C0CDDD01D8D300C953
- X:10011000DB4047DB40B820FED12100FC06FF4870E1
- X:1001200005237CB520F92100FC7EA9280C47E60FA9
- X:1001300028FE78E6F028FE18FE0D237CB520EAD5CF
- X:10014000DB03A720FE3E80D303DB03FE8020FE3EC0
- X:1001500003D300DB00D60320FED301DB01A720FE82
- X:10016000DB03D68020FED303DB03A720FE3E07D3AC
- X:1001700003DB03D60720FED301DB01A720FEC9CD98
- X:1001800071023E07D303AFD3013E03D304DB06CB9A
- X:100190007720FADB80D380C9AFDD2105FFDD770052
- X:1001A000DD7701DD77022100FCDD7403DD7704DDFE
- X:1001B0007705DD210BFFDD7700DD7701DD7702219B
- X:1001C00000FDDD7403DD7704DD77053E013201FFBC
- X:1001D0003E0D3204FFAF3202FF3203FFC9DD7E0560
- X:1001E000DD360500A7C0DDBE0237C8DD3502DD6E95
- X:1001F00001DD6603DD3401B6C9DD340228FEDD66AB
- X:1002000003DD6E0077DD3400A7C9CD5D022101FF5B
- X:10021000CB4628068787878777C9B63601C3F90199
- X:100220005F1F1F1F1FE60FFE0A3802C607C630CD2C
- X:10023000F9017BE60FFE0A3802C607C630C3F90192
- X:10024000DB05CB4728FADB00CD5D02878787876710
- X:10025000DB05CB4728FADB00CD5D02B4C9CBEFD676
- X:1002600030380CFE0AD8D627FE0A3803FE10D8AF65
- X:10027000C9DB03F680D303DB403200FFE60F8721A2
- X:1002800094025F1600197ED300237ED301DB03E6C0
- X:100290007FD303C905000A0014001B0028003500A5
- X:1002A00050006B00A0004001800200059405D106BB
- X:1002B000000A000FDD2105FFDDCB0446C83E28DD26
- X:1002C000BE02D83A00FFCB7F280DCB6FC02110FFB4
- X:1002D0007EA7C036111806DB04CBC7D304DDCB04E0
- X:1002E00086C9DD2105FFDDCB0446C03ED8DDBE0258
- X:1002F000D03A00FFCB7F280DCB6FC02110FF7EA727
- X:10030000C036131806DB04CB87D304DDCB04C6C983
- X:0000000000
- SHAR_EOF
- chmod 0755 zmac/serial.hex
- sed 's/^X//' << 'SHAR_EOF' > zmac/serial.z
- X
- X; SCCS flags: serial.z 1.8 9/21/82
- X
- X
- X;
- X; This program is a quick and dirty controller program
- X; for the simple Z80 serial interface card for the Red
- X; display controller.
- X;
- X; It uses two 256 byte buffers to buffer data to and from the
- X; host. This helps make up for the obnoxiously slow rs232.
- X;
- X; History:
- X; jrp 3-18-82 v1.0 Initial version by John Providenza.
- X;
- X; jrp 3-22-82 v1.1 Added code to send a Xon (Cntrlq) at reset
- X; if the dip switch is set to Xon/Xoff mode.
- X;
- X; jrp 4-20-82 v1.2 Added SCCS flags as comment in header and
- X; as a "ascii" block after a reset jmp.
- X;
- X; jrp 4-20-82 v1.3 Changed crt modem flags to RLSD = Out Buf Full,
- X; RI = In Buf Full.
- X;
- X; jrp 4-21-82 v1.4 Added diagnostic code to test ram, switches, and
- X; uart.
- X;
- X; jrp 4-30-82 v1.5 Cleaned up some code, added some more comments.
- X;
- X; jrp 5-27-82 v1.6 Fixed bug that caused output buffer to overflow
- X; in Hex mode.
- X;
- X; jrp 6-22-82 v1.7 Added 'end of message' command in hex mode.
- X; This is active only in hex mode and only if a
- X; non 0 byte count is specified (0 is default)
- X; 'l' is used to specify byte count, 'm' specifies
- X; the eom char. Both expect 2 hex digits following
- X; to specify the apropriate parameter.
- X;
- X; jrp 8-23-82 v1.8 Added code to allow send/recv in different modes.
- X; Thus the host can send in raw mode and receive in hex
- X; mode, allowing CntrlS/Q flow control.
- X; Also added 's' command in 'hex' mode to reset the SWTCH
- X; settings.
- X; Also added break detect to reset the mode/baud to the
- X; switch settings.
- X; switch dIN dOUT Flow Control.
- X; 7 6 5
- X; 0 0 0 raw raw No flow control.
- X; 0 0 1 raw hex Xon/Xoff sent to host.
- X; 0 1 0 hex raw Xon/Xoff received from host.
- X; 0 1 1 hex hex Full Xon/Xoff.
- X; 1 0 0 raw raw Full modem flow control.
- X; 1 0 1 raw hex Full modem flow control.
- X; 1 1 0 hex raw Full modem flow control.
- X; 1 1 1 hex hex Full modem flow control.
- X;
- X; SCCS flags: serial.z 1.8 9/21/82
- X eject 1
- X; Serial port equates.
- XSerial equ 00H ; base address of 8250 controller.
- XIer equ 01H ; Interrupt Enable Reg
- XIir equ 02H ; Interrupt Ident Reg
- XLcr equ 03H ; Line Control Reg
- XMcr equ 04H ; Modem Control Reg
- XLsr equ 05H ; Line Status Reg
- XMsr equ 06H ; Modem Status Reg
- X
- X; These equates define bits in the Msr.
- XDsrIn equ 05 ; Data Set Ready input
- XCtsIn equ 04 ; Clear to Send input
- XInMt equ 06 ; No data from display controller = 1 (Ring In)
- XOutMt equ 07 ; Crt ready for next byte = 1 (Rcvd Line Signal Detct)
- X
- X; These equates define bits in the Lsr
- XDataRdy equ 00 ; Input data ready.
- XBreak equ 04 ; Break condition.
- XXmitMt equ 05 ; Xmitter buffer empty.
- X
- X; These equates define bits in the Mcr
- XDtrOut equ 00 ; Data terminal ready output.
- XRtsOut equ 01 ; Request to send output.
- X
- X; Misc definitions.
- XCrt equ 80H ; Parallel port to display controller.
- XBaud equ 40H ; Switches port.
- XStack equ 0FFFFH
- X
- X; Mailbox equates.
- XHead equ 0
- XTail equ 1
- XCount equ 2
- XBase equ 3
- XStatus equ 4
- XUnChar equ 5 ; Should be used only for CntrlS and CntrlQ
- X
- X; Equates for the Queue status byte
- XXmitOff equ 00 ; xmitter is disabled.
- X
- X; Baud/Switch equates.
- XBmask equ 0FH
- XRawout equ 020H
- XRObit equ 5
- XRawin equ 040H
- XRIbit equ 6
- XXon equ 080H
- XXonbit equ 7
- X
- X; Some ASCII character equates.
- XCntrlS equ 19 ; Xoff
- XCntrlQ equ 17 ; Xon
- XCr equ 13 ; Carriage return.
- X eject 1
- X ORG 0FC00H
- XRAM_START:
- X; Variable declarations
- X; Ram is in the top 1K of memory.
- X
- X; Queues.
- X; These are the actual data buffers. The only routine that should use
- X; these labels re INIT_V to set the mailbox data pointers up.
- X; All I/O is via GETQ and PUTQ routines.
- XINBUF: block 256 ; input buffer q.
- XOUTBUF: block 256 ; output buffer q.
- X
- XUNUSED: block 256 ; unused ram
- X
- X; Now the ram for variables and stack.
- X
- XSWTCH: block 1 ; Current baud/switches
- X
- X; Variable for the H_to_Q routine
- X; It holds the upper nibble of hex until the lower one arrives.
- X; Bit 0 = 1 for empty, 0 for upper nibble full.
- XH_to_QV: block 1
- X
- X; End of message variables.
- XMESS_LEN: block 1 ; How long messages are.
- XMESS_CNT: block 1 ; Number of chars in current message.
- XEOM_CHAR: block 1 ; The end of message char.
- X
- X
- X; In and Out queues variables.
- XINBOX: block 6
- XOUTBOX: block 6
- X eject 1
- X; Mainline loop.
- X ORG 0
- X JP RESET ; Jmp to the code
- X ; Put in ID string
- X ascii 'serial.z 1.8'
- XRESET:
- X LD SP, Stack
- X CALL CHECK ; Check the hardware out.
- X CALL INIT_HW ; Init the hardware devices.
- X CALL INIT_V ; Init the variables.
- X
- X LD IX,OUTBOX ; Point to the outbox.
- X LD A,(SWTCH) ; Check if we're in Xon/Xoff mode.
- X AND Xon
- X LD A,Cntrlq ; Send a Xon to host if we're in that mode
- X CALL NZ,PUTQ
- X
- X; Now loop checking for data available from host or display controller.
- X; Also check if we can send data to them.
- XLOOP:
- X IN A,(Lsr) ; Get the line status.
- X LD C,A
- X IN A,(Msr) ; Get the modem status.
- X LD B,A ; and save it
- X ; B = Msr, C = Lsr.
- X; Check for break condition.
- X BIT Break,C ; test the bit in the Lsr
- X JR Z,LOOP1
- X CALL SETBAUD ; reset the SWTCH variable.
- X CALL INIT_V ; reset all the variables
- X JR LOOP
- XLOOP1:
- X CALL HOST_IN
- X CALL DISP_IN
- X CALL DISP_OUT
- X CALL HOST_OUT
- X JR LOOP
- X eject 1
- X; Check if data is ready from host.
- XHOST_IN:
- X BIT DataRdy,C ; Data ready?
- X RET Z ; Ret if no.
- X ; Handle a byte from the Host.
- X LD IX,INBOX ; data will go into the Input Q.
- X LD A,(SWTCH) ; check for Raw or encoded mode.
- X LD H,A
- X AND Rawin ; NZ for Raw mode
- X IN A,(Serial) ; get the data byte.
- X JR Z,HEX_IN ; Jmp if hex data in.
- XRAW_IN: ; Process Raw data
- X CALL PUTQ
- X JP STOP_IN ; stop the input if needed.
- XHEX_IN:
- X AND 7FH ; Kill any parity bit.
- X CP ' ' ; Printable ASCII?
- X JR NC,PRINT ; Jmp if yes
- X; Control character.
- X CP Cr ; Carriage Ret?
- X JR NZ,IN_FLOW ; Jp if no.
- X LD A,1 ; Set the H_to_Q variable to empty.
- X LD (H_to_QV),A ; This flushes any partially assembled byte.
- X RET ; Done
- X; Test for Xon/Xoff commands.
- XIN_FLOW:
- X BIT Xonbit,H ; Are we sensitive to them?
- X RET Z ; Ret if no.
- X LD HL,OUTBOX+Status ; Get a pointer to our outbox status.
- X CP CntrlS ; Xoff our transmitter?
- X JR NZ,NOT_XOFF ; Jmp if no.
- XOFF:
- X SET XmitOff,(HL)
- X RET
- XNOT_XOFF:
- X CP CntrlQ ; Xon our xmitter?
- X RET NZ ; ret if no.
- XON:
- X RES XmitOff,(HL)
- X RET
- X; Printable char received from host.
- XPRINT: ; Printable character received in hex mode.
- X SET 5,A ; Convert to lower case.
- X CP 'l' ; Message length command?
- X JR NZ,PRINT1 ; Jmp if no.
- X CALL GET_HEX ; Get byte from UART
- X LD (MESS_LEN),A ; Set the message length.
- X LD (MESS_CNT),A ; Reset the number of chars sent so far.
- X RET
- XPRINT1:
- X CP 'm' ; EOM char set command?
- X JR NZ,PRINT2
- X CALL GET_HEX ; Get byte from UART
- X LD (EOM_CHAR),A
- X RET
- XPRINT2:
- X CP 's' ; change SWTCH command?
- X JR NZ,PRINT3
- X CALL GET_HEX ; Get byte from UART
- X CPL ; Toggle them.
- X LD (SWTCH),A
- X RET
- XPRINT3:
- X CALL H_to_Q ; Pack the encoded data into bytes.
- X JP STOP_IN ; stop the input if needed.
- X eject 1
- X; Data ready from controller?
- XDISP_IN:
- X BIT InMt,B ; data from controller?
- X RET NZ ; ret if no.
- X LD IX,OUTBOX
- X LD A,(IX+Count) ; Get the Q count.
- X ADD A,3 ; Check if Q has room for 3 more bytes.
- X RET C ; ret if no
- X LD A,(SWTCH) ; check if we need to encode the data.
- X AND Rawout
- X IN A,(Crt) ; get the data from the crt.
- X JP NZ,PUTQ ; send the raw data and return.
- X; hex data out to host.
- X CALL B_to_H ; convert byte to hex format and stick in Q.
- X ; Check if we need to stick an EOM char in.
- X LD A,(MESS_LEN) ; Get the length.
- X AND A
- X RET Z ; Zero means no EOM character to be sent.
- X LD HL,MESS_CNT ; Point to the counter.
- X DEC (HL) ; Time to send a EOM char?
- X RET NZ ; Ret if no.
- X LD (HL),A ; reset the length.
- X LD A,(EOM_CHAR) ; Get the char and stick it in the Q.
- X JP PUTQ ; and return when done
- X eject 1
- X; Controller ready for data?
- XDISP_OUT:
- X BIT OutMt,B ; controller ready for data?
- X RET Z ; Jmp if no
- X LD IX,INBOX
- X CALL GETQ ; get a byte for controller.
- X RET C ; ret if no byte available.
- X OUT (Crt),A ; send char to display.
- X JP STRT_IN ; re-enable host xmitter if needed.
- X eject 1
- X; Host ready for data?
- XHOST_OUT:
- X BIT XmitMt,C ; Uart xmitter empty?
- X RET Z ; ret if no.
- X LD IX,OUTBOX ; Get OutBox pointer.
- X LD A,(SWTCH) ; Check for Xon mode
- X AND Xon
- X JR NZ,H_O_Xon ; Jp if Xon mode.
- X BIT CtsIn,B ; Clear to send?
- X RET Z ; ret if no.
- X JR H_O_Send ; We are clear to send.
- XH_O_Xon:
- X LD A,(OUTBOX+UnChar)
- X AND A
- X JR NZ,H_O_Send ; Always send an 'UnChar'
- X BIT XmitOff,(IX+Status)
- X RET NZ ; ret if xmitter is disabled.
- XH_O_Send:
- X CALL GETQ
- X RET C ; Ret if no character available.
- X OUT (Serial),A
- X RET
- X eject 1
- X; Check the hardware out.
- X; Call this routine only after a external reset!!!!
- X
- XCHECK:
- X; Check the baud switch (really crude).
- X IN A,(BAUD) ; Get the baud switch.
- X LD B,A ; Save it.
- X IN A,(BAUD)
- X CP B ; Same as last time?
- XBAD_B: ; Switch ERROR - Can't read switches twice in a row.
- X JR NZ,BAD_B ; Loop if no.
- X; Check the ram.
- X; Write the complement of the low byte of address out to all ram,
- X; then check if it stayed the same.
- X; Note that this destroys all ram contents.
- X POP DE ; Save the return address in a register.
- X LD HL,RAM_START ; Get the first address of ram.
- X LD B, NOT [RAM_START & 0FFH]
- X LD C,B ; Get complement of low address byte.
- X ; Load the ram with the pattern.
- XRAM1:
- X LD (HL),B
- X DEC B
- X INC HL
- X LD A,H ; Test for done.
- X OR L
- X JR NZ,RAM1 ; Loop till all locations written.
- X LD HL,RAM_START ; Get the first address of ram.
- X; Check if ram agrees with what should be there.
- XRAM2:
- X LD A,(HL) ; Get the byte.
- X XOR C ; Same as its low address byte?
- X JR Z,RAM6 ; Jmp if yes.
- X; Ram error. We have three loops: low bad, high bad, both bad.
- X LD B,A ; Save the symptom.
- X AND 0FH ; Low nibble bad?
- XRAM3: ; Ram ERROR - bad high nibble.
- X JR Z,RAM3 ; Jmp if no.
- X LD A,B ; get the symptom back.
- X AND 0F0H ; High nibble bad too?
- XRAM4: ; Ram ERROR - bad low nibble.
- X JR Z,RAM4 ; Loop if error.
- XRAM5: ; Ram ERROR - both nibbles bad.
- X JR RAM5
- XRAM6:
- X DEC C
- X INC HL
- X LD A,H ; Done?
- X OR L
- X JR NZ,RAM2 ; Jmp if no.
- X PUSH DE ; Fix the stack back up.
- X; Check out the National Semi INS8250 Uart.
- X; Since we were reset, Lcr should be zero.
- X IN A,(Lcr) ; Get the Line Control reg
- X AND A
- XU0: ; Uart ERROR - Lcr not reset properly.
- X JR NZ,U0 ; Loop if error.
- X LD A,80H
- X OUT (Lcr),A ; And set the Divisor access bit.
- X IN A,(Lcr) ; Check that it got set.
- X CP 80H ; Still set?
- XU1: ; Uart ERROR - Lcr won't hold divisor access bit.
- X JR NZ,U1 ; Loop if error.
- X LD A,3 ; Try to set 38.4K baud
- X OUT (Serial),A ; Ld the divisor.
- X IN A,(Serial) ; Test that it loaded OK.
- X SUB 3 ; Check if same (also set A to zero)
- XU2: ; Uart ERROR - unexpected low divisor.
- X JR NZ,U2 ; Loop if error.
- X OUT (Ier),A ; Set high byte to zero
- X IN A,(Ier)
- X AND A ; Still zero?
- XU3: ; Uart ERROR - unexpected high divisor.
- X JR NZ,U3 ; Loop if no (ie, error).
- X IN A,(Lcr) ; Get the Line reg back.
- X SUB 80H ; Is it the same as before?
- XU4: ; Uart ERROR - unexpected Lcr value after setting divisor.
- X JR NZ,U4 ; loop if error.
- X OUT (Lcr),A ; Turn off divisor access bit.
- X IN A,(Lcr) ; Check it.
- X AND A
- XU5: ; Uart ERROR - Lcr won't reset after setting divisor.
- X JR NZ,U5
- X LD A,7
- X OUT (Lcr),A ; 8 bits, no parity, 2 stop bits
- X IN A,(Lcr)
- X SUB 7 ; Test if the same (also set A to zero)
- XU6: ; Uart ERROR - Can't set proper operating Lcr.
- X JR NZ,U6 ; If we succeed, assume Lcr is Ok.
- X OUT (Ier),A ; Disable all 8250 interrupt conditions (set to 0).
- X IN A,(Ier)
- X AND A
- XU7: ; Uart ERROR - Can't reset Ier.
- X JR NZ,U7
- X RET
- X eject 1
- X; Init the hardware.
- XINIT_HW:
- X CALL SETBAUD ; Set the Uart baud
- X LD A,7
- X OUT (Lcr),A ; 8 bits, no parity, 2 stop bits
- X XOR A ; Disable all 8250 interrupt conditions.
- X OUT (Ier),A
- X LD A,3 ; Dtr, Rts on.
- X OUT (Mcr),A
- X
- X; Perform the I/O diagnostic with the controller.
- X; Wait for data from controller, then echo it back.
- XINITH1:
- X IN A,(Msr) ; Check if controller data ready.
- X BIT InMt,A ; Ready?
- X JR NZ,INITH1 ; Jmp if no.
- X IN A,(Crt) ; Get the data.
- X OUT (Crt),A ; And send it back to controller.
- X RET
- X
- X
- X; Init the variables.
- XINIT_V:
- X XOR A ; zero A
- X
- X; Init the Q's
- X LD IX,INBOX ; Init the inbox.
- X LD (IX + Head),A
- X LD (IX + Tail),A
- X LD (IX + Count),A
- X LD HL,INBUF
- X LD (IX + Base),H
- X LD (IX + Status),A
- X LD (IX + UnChar),A
- X
- X LD IX,OUTBOX ; Init the outbox.
- X LD (IX + Head),A
- X LD (IX + Tail),A
- X LD (IX + Count),A
- X LD HL,OUTBUF
- X LD (IX + Base),H
- X LD (IX + Status),A
- X LD (IX + UnChar),A
- X
- X; Init the H_to_Q variable.
- X LD A,1
- X LD (H_to_QV),A
- X
- X; init the 'end of message' stuff
- X LD A,Cr ; default r is a carriage return.
- X LD (EOM_CHAR),A
- X XOR A
- X LD (MESS_LEN),A
- X LD (MESS_CNT),A
- X RET
- X eject 1
- X; These routines handle the input and output queues.
- X; The Q pointer is passed in IX, result/source in A.
- X; Queues must be 256 bytes long. We use only 8 bit
- X; arithmetic for Q manipulation.
- X; A Q is defined as 6 bytes of status:
- X; Tail Offset for getting next char
- X; Head Offset for putting next char
- X; Count Number of chars in q
- X; Base High byte of the q origin
- X; Status Status of Q
- X; UnChar The 'un_get' char if non-zero
- X; and 256 bytes of storage.
- X;
- X
- XGETQ:
- X; Get an element from the Q.
- X; entry ix = Q pointer
- X; exit a = result
- X; ca = set for empty Q, cleared for full Q.
- X; bc & de are unchanged.
- X; hl = garbage
- X;
- X LD A,(IX + UnChar) ; Get the unget char
- X LD (IX + UnChar),0 ; Set the byte to 0 (empty).
- X AND A
- X RET NZ ; Ret if we got an unget char.
- X ; A == 0 here.
- X CP (IX + Count) ; Get the q count
- X SCF
- X RET Z ; empty Q return (Count == 0).
- X DEC (IX + Count) ; one less item in the Q.
- X LD L,(IX + Tail) ; get a pointer to the element in the Q.
- X LD H,(IX + Base)
- X INC (IX + Tail) ; bump the pointer to the next char.
- X OR (HL) ; Get the element, and clear the carry.
- X RET
- X
- X
- XPUTQ:
- X; Routine to put a char in a Q.
- X;entry ix = pointer to Q structure.
- X; a = char to put.
- X;exit hl = garbage
- X; a, bc & de unchanged.
- X; Ca = 1 for Q full, character discarded.
- X;
- X INC (IX + Count) ; Bump the Q count.
- XQPUT_ERR:
- X JR Z,QPUT_ERR
- XQPUT1:
- X LD H,(IX + Base)
- X LD L,(IX + Head)
- X LD (HL),A ; Put the char in the Q
- X INC (IX + Head)
- X AND A ; Clear the carry bit
- X RET
- X eject 1
- X; These routines pack and unpack bytes into Hex
- X; suitable for sending as ASCII over a serial line.
- X; H_to_Q takes Hex characters
- X; and packs them into 8 bit bytes to send to the display.
- X; B_to_H takes bytes from the display and converts them into
- X; the Hex character stream.
- X;
- X; Both routines use Q calls. IX must be set up with the proper
- X; Q address.
- X;
- X;
- X
- X
- X
- XH_to_Q:
- X;
- X; entry A = Ascii Hex char (0-9, a-f)
- X; IX = Q pointer
- X; exit A, Hl = Garbage
- X; bc, de = unchanged.
- X; Ca = 1 if Q too full.
- X;
- X CALL H_to_B ; convert the character to binary.
- X LD HL,H_to_QV ; Point hl to our variable
- X BIT 0,(HL) ; check if the upper nibble is full.
- X JR Z,H_SEND ; Jmp if yes.
- X ADD A,A ; Move the nibble to the high 4 bits.
- X ADD A,A
- X ADD A,A
- X ADD A,A
- X LD (HL),A ; Save away the high nibble with low nibble = 0.
- X RET
- XH_SEND:
- X OR (HL) ; Merge in the upper nibble from ram.
- X LD (HL),1 ; Set the variable to empty.
- X JP PUTQ ; Send the byte and return.
- X eject 1
- X
- X
- X
- XB_to_H:
- X; B_to_H takes the byte in A and splits it into two hex characters
- X; to be sent to the Q specified in IX.
- X;
- X; Entry A = byte of data to convert to Hex.
- X; IX = Q address.
- X; Exit A E Hl = garbage
- X; D Bc Ix = unchanged.
- X;
- X
- X LD E,A ; Save the byte
- X RRA ; Move the upper nibble to low nibble.
- X RRA
- X RRA
- X RRA
- X AND 0Fh ; Get only the upper nibble.
- X CP 10 ; 0 thru 9?
- X JR C,B_to_H1 ; Jmp if yes.
- X ADD A,'A'-'0'-10
- XB_to_H1:
- X ADD A,'0'
- X CALL PUTQ
- X LD A,E ; Get the byte back
- X AND 0Fh ; Mask for only low nibble.
- X CP 10 ; 0 thru 9?
- X JR C,B_to_H2 ; Jmp if yes.
- X ADD A,'A'-'0'-10
- XB_to_H2:
- X ADD A,'0'
- X JP PUTQ ; Send and return.
- X eject 1
- XGET_HEX:
- X; This routine gets two hex characters from the UART and
- X; munches them into a byte in A.
- X; Entry: No Params.
- X; Exit: A=byte H = trash
- X; all others unchanged (except for flags)
- X IN A,(Lsr) ; Get the line status
- X BIT DataRdy,A ; Data ready from host?
- X JR Z,GET_HEX ; Jmp if no.
- X IN A,(Serial) ; get the data.
- X CALL H_to_B ; convert to binary.
- X ADD A,A ; Shift up 4 bits
- X ADD A,A
- X ADD A,A
- X ADD A,A
- X LD H,A ; Save in B
- XGET_HX1:
- X IN A,(Lsr) ; Get the line status
- X BIT DataRdy,A ; Data ready from host?
- X JR Z,GET_HX1 ; Jmp if no.
- X IN A,(Serial) ; get the data.
- X CALL H_to_B ; convert to binary.
- X OR H
- X RET ; A = 2 input chars munched together.
- X
- X; Convert hex char to binary.
- XH_to_B:
- X SET 5,A ; convert to lower case.
- X SUB '0' ; less than 0?
- X JR C,HB_ERR ; Jmp if out of bounds.
- X CP 10 ; bigger than 9?
- X RET C ; Ret if no (0..9)
- X SUB 'a'-'0'-10 ; try to make it range 10-15
- X CP 10
- X JR C,HB_ERR ; Jmp if out of bounds.
- X CP 16
- X RET C ; Ret if hex.
- XHB_ERR:
- X XOR A ; Set to zero.
- X RET
- X
- X eject 1
- XSETBAUD:
- X; This routine reads the BAUD switches and looks the code
- X; up in the BTABLE to set the baudrate of the 8250 serial chip.
- X;
- X; Entry No parameters
- X; exit A Hl De = garbage.
- X IN A,(Lcr) ; Set the divisor access bit on
- X OR 80H
- X OUT (Lcr),A
- X IN A,(Baud) ; Get the baud rate code
- X LD (SWTCH),A
- X AND Bmask ; Get only the baud specifier bits.
- X ADD A,A ; Double it to index into table.
- X LD HL,BTABLE ; Index into table to get the divisor
- X LD E,A
- X LD D,0
- X ADD HL,DE
- X LD A,(HL) ; Get the low order divisor byte
- X OUT (Serial),A
- X INC HL
- X LD A,(HL) ; Get the high divisor byte
- X OUT (Serial+1),A
- X IN A,(Lcr) ; Set the divisor access bit off
- X AND 7FH
- X OUT (Lcr),A
- X RET
- X
- X; Baud rate look up table
- X; Only allow 16 entries.
- XBTABLE:
- X WORD 5 ; 38.4 Kbaud
- X WORD 10 ; 19.2
- X WORD 20 ; 9600
- X WORD 27 ; 7200
- X WORD 40 ; 4800
- X WORD 53 ; 3600
- X WORD 80 ; 2400
- X WORD 107 ; 1800
- X WORD 160 ; 1200
- X WORD 320 ; 600
- X WORD 640 ; 300
- X WORD 1280 ; 150
- X WORD 1428 ; 134.5
- X WORD 1745 ; 110
- X WORD 2560 ; 75
- X WORD 3840 ; 50
- X eject 1
- X; STRT_IN and STOP_IN are called when the Input Q is may be too full/empty.
- X; They check and enable/disable the host xmitter apropriately.
- X;
- X
- XSTRT_IN:
- X; Entry No registers set.
- X; Exit A Ix Hl = garbage.
- X; Bc De = unchanged.
- X;
- X LD IX,INBOX ; Point to the Q.
- X BIT XmitOff,(IX + Status) ; Is it off?
- X RET Z ; ret if no.
- X LD A,40 ; Check if we've gone below low water mark.
- X CP (IX + Count)
- X RET C ; Ret if no, Q still too full.
- X LD A,(SWTCH) ; get the switch settings.
- X BIT Xonbit,A
- X JR Z,STRT_DTR ; Jmp if rs232 modem mode flow control.
- X; Try to use Xon/Xoff control flow methods.
- X BIT RObit,A ; Raw Output mode?
- X RET NZ ; No way to start/stop host xmitter.
- X LD HL,OUTBOX+UnChar
- X LD A,(HL) ; Anything in unget spot?
- X AND A
- X RET NZ ; Ret if yes.
- X LD (HL),CntrlQ ; 'unget' a control Q.
- X JR STRT_END
- X; Set DTR bit on.
- XSTRT_DTR:
- X IN A,(Mcr) ; get the modem controls.
- X SET DtrOut,A
- X OUT (Mcr),A
- XSTRT_END:
- X RES XmitOff,(IX + Status) ; Mark as enabled.
- X RET
- X
- X
- XSTOP_IN:
- X; Entry No registers set.
- X; Exit A Ix Hl = garbage.
- X; Bc De = unchanged.
- X;
- X LD IX,INBOX ; Point to the Q.
- X BIT XmitOff,(IX + Status) ; Already disabled?
- X RET NZ ; ret if yes.
- X LD A,256-40 ; Check if we've gone above high water mark.
- X CP (IX + Count)
- X RET NC ; Ret if no, Q still too empty.
- X LD A,(SWTCH)
- X BIT Xonbit,A ; test for Xon/Xoff vs. modem flow cntrl.
- X JR Z,STP_DTR ; jmp if rs232 modem mode
- X; try to send an Xoff to the host.
- X BIT RObit,A ; Are we in raw out?
- X RET NZ ; Can't control the host xmitter.
- X LD HL,OUTBOX+UnChar
- X LD A,(HL) ; Anything in unget spot?
- X AND A
- X RET NZ ; Ret if yes.
- X LD (HL),CntrlS ; 'unget' a control S.
- X JR STP_END
- X; Modem mode flow control, set DTR bit off.
- XSTP_DTR:
- X IN A,(Mcr) ; get the modem controls.
- X RES DtrOut,A
- X OUT (Mcr),A
- XSTP_END:
- X SET XmitOff,(IX + Status) ; Mark as disabled.
- X RET
- X
- X END
- SHAR_EOF
- chmod 0755 zmac/serial.z
- sed 's/^X//' << 'SHAR_EOF' > zmac/zdis.1
- X.TH ZDIS l
- X.SH NAME
- Xzdis \- disassembler for Z80 cross-assembler
- X.SH SYNOPSIS
- Xzdis < infile.hex
- X.SH DESCRIPTION
- X.I Zdis
- Xreads a hex file created by
- X.I zmac
- Xand produces a disassembly on stdout.
- X.SH SEE ALSO
- Xzmac(l)
- X.SH FILES
- XSource is in /usr/local/src/zmac directory.
- X.SH BUGS
- XZdis ignores the program counter field in the hex file. Instead it assumes
- Xthat the hex file has an ORG of 0.
- X.sp
- XThe man page is incomplete. If anyone discovers more information about
- Xusing zdis, please consider helping to update the man page.
- SHAR_EOF
- chmod 0755 zmac/zdis.1
- sed 's/^X//' << 'SHAR_EOF' > zmac/zdis.c
- Xchar undefined[] = "undefined";
- X
- Xstruct opcode {
- X char *name;
- X int args;
- X};
- X
- Xstruct opcode major[256] = {
- X "nop", 0, /* 00 */
- X "ld bc,%02x%02xh", 2, /* 01 */
- X "ld bc,a", 0, /* 02 */
- X "inc bc", 0, /* 03 */
- X "inc b", 0, /* 04 */
- X "dec b", 0, /* 05 */
- X "ld b,%02xh", 1, /* 06 */
- X "rlc a", 0, /* 07 */
- X
- X "ex af,af'", 0, /* 08 */
- X "add hl,bc", 0, /* 09 */
- X "ld a,(bc)", 0, /* 0a */
- X "dec bc", 0, /* 0b */
- X "inc c", 0, /* 0c */
- X "dec c", 0, /* 0d */
- X "ld c,%02xh", 1, /* 0e */
- X "rrc a", 0, /* 0f */
- X
- X "djnz %02xh", 1, /* 10 */
- X "ld de,%02x%02xh", 2, /* 11 */
- X "ld (de),a", 0, /* 12 */
- X "inc de", 0, /* 13 */
- X "inc d", 0, /* 14 */
- X "dec d", 0, /* 15 */
- X "ld d,%02xh", 1, /* 16 */
- X "rla", 0, /* 17 */
- X
- X "jr %02xh", 1, /* 18 */
- X "add hl,de", 0, /* 19 */
- X "ld a,(de)", 0, /* 1a */
- X "dec de", 0, /* 1b */
- X "inc e", 0, /* 1c */
- X "dec e", 0, /* 1d */
- X "ld e,%02xh", 1, /* 1e */
- X "rra", 0, /* 1f */
- X
- X "jr nz,%02xh", 1, /* 20 */
- X "ld hl,%02x%02xh", 2, /* 21 */
- X "ld (%02x%02xh),hl",2, /* 22 */
- X "inc hl", 0, /* 23 */
- X "inc h", 0, /* 24 */
- X "dec h", 0, /* 25 */
- X "ld h,%02xh", 1, /* 26 */
- X "daa", 0, /* 27 */
- X
- X "jr z,%02xh", 1, /* 28 */
- X "add hl,hl", 0, /* 29 */
- X "ld hl,(%02x%02xh)",2, /* 2a */
- X "dec hl", 0, /* 2b */
- X "inc l", 0, /* 2c */
- X "dec l", 0, /* 2d */
- X "ld l,%02xh", 1, /* 2e */
- X "cpl", 0, /* 2f */
- X
- X "jr nc,%02xh", 1, /* 30 */
- X "ld sp,%02x%02xh", 2, /* 31 */
- X "ld (%02x%02xh),a", 2, /* 32 */
- X "inc sp", 0, /* 33 */
- X "inc (hl)", 0, /* 34 */
- X "dec (hl)", 0, /* 35 */
- X "ld (hl),%02xh", 1, /* 36 */
- X "scf", 0, /* 37 */
- X
- X "jr c,%02xh", 1, /* 38 */
- X "add hl,sp", 0, /* 39 */
- X "ld a,(%02x%02xh)", 2, /* 3a */
- X "dec sp", 0, /* 3b */
- X "inc a", 0, /* 3c */
- X "dec a", 0, /* 3d */
- X "ld a,%02xh", 1, /* 3e */
- X "ccf", 0, /* 3f */
- X
- X "ld b,b", 0, /* 40 */
- X "ld b,c", 0, /* 41 */
- X "ld b,d", 0, /* 42 */
- X "ld b,e", 0, /* 43 */
- X "ld b,h", 0, /* 44 */
- X "ld b,l", 0, /* 45 */
- X "ld b,(hl)", 0, /* 46 */
- X "ld b,a", 0, /* 47 */
- X
- X "ld c,b", 0, /* 48 */
- X "ld c,c", 0, /* 49 */
- X "ld c,d", 0, /* 4a */
- X "ld c,e", 0, /* 4b */
- X "ld c,h", 0, /* 4c */
- X "ld c,l", 0, /* 4d */
- X "ld c,(hl)", 0, /* 4e */
- X "ld c,a", 0, /* 4f */
- X
- X "ld d,b", 0, /* 50 */
- X "ld d,c", 0, /* 51 */
- X "ld d,d", 0, /* 52 */
- X "ld d,e", 0, /* 53 */
- X "ld d,h", 0, /* 54 */
- X "ld d,l", 0, /* 55 */
- X "ld d,(hl)", 0, /* 56 */
- X "ld d,a", 0, /* 57 */
- X
- X "ld e,b", 0, /* 58 */
- X "ld e,c", 0, /* 59 */
- X "ld e,d", 0, /* 5a */
- X "ld e,e", 0, /* 5b */
- X "ld e,h", 0, /* 5c */
- X "ld e,l", 0, /* 5d */
- X "ld e,(hl)", 0, /* 5e */
- X "ld e,a", 0, /* 5f */
- X
- X "ld h,b", 0, /* 60 */
- X "ld h,c", 0, /* 61 */
- X "ld h,d", 0, /* 62 */
- X "ld h,e", 0, /* 63 */
- X "ld h,h", 0, /* 64 */
- X "ld h,l", 0, /* 65 */
- X "ld h,(hl)", 0, /* 66 */
- X "ld h,a", 0, /* 67 */
- X
- X "ld l,b", 0, /* 68 */
- X "ld l,c", 0, /* 69 */
- X "ld l,d", 0, /* 6a */
- X "ld l,e", 0, /* 6b */
- X "ld l,h", 0, /* 6c */
- X "ld l,l", 0, /* 6d */
- X "ld l,(hl)", 0, /* 6e */
- X "ld l,a", 0, /* 6f */
- X
- X "ld (hl),b", 0, /* 70 */
- X "ld (hl),c", 0, /* 71 */
- X "ld (hl),d", 0, /* 72 */
- X "ld (hl),e", 0, /* 73 */
- X "ld (hl),h", 0, /* 74 */
- X "ld (hl),l", 0, /* 75 */
- X "halt", 0, /* 76 */
- X "ld (hl),a", 0, /* 77 */
- X
- X "ld a,b", 0, /* 78 */
- X "ld a,c", 0, /* 79 */
- X "ld a,d", 0, /* 7a */
- X "ld a,e", 0, /* 7b */
- X "ld a,h", 0, /* 7c */
- X "ld a,l", 0, /* 7d */
- X "ld a,(hl)", 0, /* 7e */
- X "ld a,a", 0, /* 7f */
- X
- X "add a,b", 0, /* 80 */
- X "add a,c", 0, /* 81 */
- X "add a,d", 0, /* 82 */
- X "add a,e", 0, /* 83 */
- X "add a,h", 0, /* 84 */
- X "add a,l", 0, /* 85 */
- X "add a,(hl)", 0, /* 86 */
- X "add a,a", 0, /* 87 */
- X
- X "adc a,b", 0, /* 88 */
- X "adc a,c", 0, /* 89 */
- X "adc a,d", 0, /* 8a */
- X "adc a,e", 0, /* 8b */
- X "adc a,h", 0, /* 8c */
- X "adc a,l", 0, /* 8d */
- X "adc a,(hl)", 0, /* 8e */
- X "adc a,a", 0, /* 8f */
- X
- X "sub b", 0, /* 90 */
- X "sub c", 0, /* 91 */
- X "sub d", 0, /* 92 */
- X "sub e", 0, /* 93 */
- X "sub h", 0, /* 94 */
- X "sub l", 0, /* 95 */
- X "sub (hl)", 0, /* 96 */
- X "sub a", 0, /* 97 */
- X
- X "sbc a,b", 0, /* 98 */
- X "sbc a,c", 0, /* 99 */
- X "sbc a,d", 0, /* 9a */
- X "sbc a,e", 0, /* 9b */
- X "sbc a,h", 0, /* 9c */
- X "sbc a,l", 0, /* 9d */
- X "sbc a,(hl)", 0, /* 9e */
- X "sbc a,a", 0, /* 9f */
- X
- X "and b", 0, /* a0 */
- X "and c", 0, /* a1 */
- X "and d", 0, /* a2 */
- X "and e", 0, /* a3 */
- X "and h", 0, /* a4 */
- X "and l", 0, /* a5 */
- X "and (hl)", 0, /* a6 */
- X "and a", 0, /* a7 */
- X
- X "xor b", 0, /* a8 */
- X "xor c", 0, /* a9 */
- X "xor d", 0, /* aa */
- X "xor e", 0, /* ab */
- X "xor h", 0, /* ac */
- X "xor l", 0, /* ad */
- X "xor (hl)", 0, /* ae */
- X "xor a", 0, /* af */
- X
- X "or b", 0, /* b0 */
- X "or c", 0, /* b1 */
- X "or d", 0, /* b2 */
- X "or e", 0, /* b3 */
- X "or h", 0, /* b4 */
- X "or l", 0, /* b5 */
- X "or (hl)", 0, /* b6 */
- X "or a", 0, /* b7 */
- X
- X "cp b", 0, /* b8 */
- X "cp c", 0, /* b9 */
- X "cp d", 0, /* ba */
- X "cp e", 0, /* bb */
- X "cp h", 0, /* bc */
- X "cp l", 0, /* bd */
- X "cp (hl)", 0, /* be */
- X "cp a", 0, /* bf */
- X
- X "ret nz", 0, /* c0 */
- X "pop bc", 0, /* c1 */
- X "jp nz,%02x%02xh", 2, /* c2 */
- X "jp %02x%02xh", 2, /* c3 */
- X "call nz,%02x%02xh", 2, /* c4 */
- X "push bc", 0, /* c5 */
- X "add a,%02xh", 1, /* c6 */
- X "rst 0", 0, /* c7 */
- X
- X "ret z", 0, /* c8 */
- X "ret", 0, /* c9 */
- X "jp z,%02x%02xh", 2, /* ca */
- X 0, 0, /* cb */
- X "call z,%02x%02xh", 2, /* cc */
- X "call %02x%02xh", 2, /* cd */
- X "adc a,%02xh", 1, /* ce */
- X "rst 8", 0, /* cf */
- X
- X "ret nc", 0, /* d0 */
- X "pop de", 0, /* d1 */
- X "jp nc,%02x%02xh", 2, /* d2 */
- X "out (%02xh),a", 1, /* d3 */
- X "call nc,%02x%02xh", 2, /* d4 */
- X "push de", 0, /* d5 */
- X "sub %02xh", 1, /* d6 */
- X "rst 10h", 0, /* d7 */
- X
- X "ret c", 0, /* d8 */
- X "exx", 0, /* d9 */
- X "jp c,%02x%02xh", 2, /* da */
- X "in a,(%02xh)", 1, /* db */
- X "call c,%02x%02xh", 2, /* dc */
- X 0, 1, /* dd */
- X "sbc a,%02xh", 1, /* de */
- X "rst 18h", 0, /* df */
- X
- X "ret po", 0, /* e0 */
- X "pop hl", 0, /* e1 */
- X "jp po,%02x%02xh", 2, /* e2 */
- X "ex (sp),hl", 0, /* e3 */
- X "call po,%02x%02xh", 2, /* e4 */
- X "push hl", 0, /* e5 */
- X "and %02xh", 1, /* e6 */
- X "rst 20h", 0, /* e7 */
- X "ret pe", 0, /* e8 */
- X
- X "jp (hl)", 0, /* e9 */
- X "jp pe,%02x%02xh", 2, /* ea */
- X "ex de,hl", 0, /* eb */
- X "call pe,%02x%02xh", 2, /* ec */
- X 0, 2, /* ed */
- X "xor %02xh", 1, /* ee */
- X "rst 28h", 0, /* ef */
- X
- X "ret p", 0, /* f0 */
- X "pop af", 0, /* f1 */
- X "jp p,%02x%02xh", 2, /* f2 */
- X "di", 0, /* f3 */
- X "call p,%02x%02xh", 2, /* f4 */
- X "push af", 0, /* f5 */
- X "or %02xh", 1, /* f6 */
- X "rst 30h", 0, /* f7 */
- X
- X "ret m", 0, /* f8 */
- X "ld sp,hl", 0, /* f9 */
- X "jp m,%02x%02xh", 2, /* fa */
- X "ei", 0, /* fb */
- X "call m,%02x%02xh", 2, /* fc */
- X 0, 3, /* fd */
- X "cp %02xh", 1, /* fe */
- X "rst 38h", 0, /* ff */
- X};
- X
- Xstruct opcode minor[4][256] = {
- X /* cb */
- X "rlc b", 0, /* cb00 */
- X "rlc c", 0, /* cb01 */
- X "rlc d", 0, /* cb02 */
- X "rlc e", 0, /* cb03 */
- X "rlc h", 0, /* cb04 */
- X "rlc l", 0, /* cb05 */
- X "rlc (hl)", 0, /* cb06 */
- X "rlc a", 0, /* cb07 */
- X
- X "rrc b", 0, /* cb08 */
- X "rrc c", 0, /* cb09 */
- X "rrc d", 0, /* cb0a */
- X "rrc e", 0, /* cb0b */
- X "rrc h", 0, /* cb0c */
- X "rrc l", 0, /* cb0d */
- X "rrc (hl)", 0, /* cb0e */
- X "rrc a", 0, /* cb0f */
- X
- X "rl b", 0, /* cb10 */
- X "rl c", 0, /* cb11 */
- X "rl d", 0, /* cb12 */
- X "rl e", 0, /* cb13 */
- X "rl h", 0, /* cb14 */
- X "rl l", 0, /* cb15 */
- X "rl (hl)", 0, /* cb16 */
- X "rl a", 0, /* cb17 */
- X
- X "rr b", 0, /* cb18 */
- X "rr c", 0, /* cb19 */
- X "rr d", 0, /* cb1a */
- X "rr e", 0, /* cb1b */
- X "rr h", 0, /* cb1c */
- X "rr l", 0, /* cb1d */
- X "rr (hl)", 0, /* cb1e */
- X "rr a", 0, /* cb1f */
- X
- X "sla b", 0, /* cb20 */
- X "sla c", 0, /* cb21 */
- X "sla d", 0, /* cb22 */
- X "sla e", 0, /* cb23 */
- X "sla h", 0, /* cb24 */
- X "sla l", 0, /* cb25 */
- X "sla (hl)", 0, /* cb26 */
- X "sla a", 0, /* cb27 */
- X
- X "sra b", 0, /* cb28 */
- X "sra c", 0, /* cb29 */
- X "sra d", 0, /* cb2a */
- X "sra e", 0, /* cb2b */
- X "sra h", 0, /* cb2c */
- X "sra l", 0, /* cb2d */
- X "sra (hl)", 0, /* cb2e */
- X "sra a", 0, /* cb2f */
- X
- X undefined, 0, /* cb30 */
- X undefined, 0, /* cb31 */
- X undefined, 0, /* cb32 */
- X undefined, 0, /* cb33 */
- X undefined, 0, /* cb34 */
- X undefined, 0, /* cb35 */
- X undefined, 0, /* cb36 */
- X undefined, 0, /* cb37 */
- X
- X "srl b", 0, /* cb38 */
- X "srl c", 0, /* cb39 */
- X "srl d", 0, /* cb3a */
- X "srl e", 0, /* cb3b */
- X "srl h", 0, /* cb3c */
- X "srl l", 0, /* cb3d */
- X "srl (hl)", 0, /* cb3e */
- X "srl a", 0, /* cb3f */
- X
- X "bit 0,b", 0, /* cb40 */
- X "bit 0,c", 0, /* cb41 */
- X "bit 0,d", 0, /* cb42 */
- X "bit 0,e", 0, /* cb43 */
- X "bit 0,h", 0, /* cb44 */
- X "bit 0,l", 0, /* cb45 */
- X "bit 0,(hl)", 0, /* cb46 */
- X "bit 0,a", 0, /* cb47 */
- X
- X "bit 1,b", 0, /* cb48 */
- X "bit 1,c", 0, /* cb49 */
- X "bit 1,d", 0, /* cb4a */
- X "bit 1,e", 0, /* cb4b */
- X "bit 1,h", 0, /* cb4c */
- X "bit 1,l", 0, /* cb4d */
- X "bit 1,(hl)", 0, /* cb4e */
- X "bit 1,a", 0, /* cb4f */
- X
- X "bit 2,b", 0, /* cb50 */
- X "bit 2,c", 0, /* cb51 */
- X "bit 2,d", 0, /* cb52 */
- X "bit 2,e", 0, /* cb53 */
- X "bit 2,h", 0, /* cb54 */
- X "bit 2,l", 0, /* cb55 */
- X "bit 2,(hl)", 0, /* cb56 */
- X "bit 2,a", 0, /* cb57 */
- X
- X "bit 3,b", 0, /* cb58 */
- X "bit 3,c", 0, /* cb59 */
- X "bit 3,d", 0, /* cb5a */
- X "bit 3,e", 0, /* cb5b */
- X "bit 3,h", 0, /* cb5c */
- X "bit 3,l", 0, /* cb5d */
- X "bit 3,(hl)", 0, /* cb5e */
- X "bit 3,a", 0, /* cb5f */
- X
- X "bit 4,b", 0, /* cb60 */
- X "bit 4,c", 0, /* cb61 */
- X "bit 4,d", 0, /* cb62 */
- X "bit 4,e", 0, /* cb63 */
- X "bit 4,h", 0, /* cb64 */
- X "bit 4,l", 0, /* cb65 */
- X "bit 4,(hl)", 0, /* cb66 */
- X "bit 4,a", 0, /* cb67 */
- X
- X "bit 5,b", 0, /* cb68 */
- X "bit 5,c", 0, /* cb69 */
- X "bit 5,d", 0, /* cb6a */
- X "bit 5,e", 0, /* cb6b */
- X "bit 5,h", 0, /* cb6c */
- X "bit 5,l", 0, /* cb6d */
- X "bit 5,(hl)", 0, /* cb6e */
- X "bit 5,a", 0, /* cb6f */
- X
- X "bit 6,b", 0, /* cb70 */
- X "bit 6,c", 0, /* cb71 */
- X "bit 6,d", 0, /* cb72 */
- X "bit 6,e", 0, /* cb73 */
- X "bit 6,h", 0, /* cb74 */
- X "bit 6,l", 0, /* cb75 */
- X "bit 6,(hl)", 0, /* cb76 */
- X "bit 6,a", 0, /* cb77 */
- X
- X "bit 7,b", 0, /* cb78 */
- X "bit 7,c", 0, /* cb79 */
- X "bit 7,d", 0, /* cb7a */
- X "bit 7,e", 0, /* cb7b */
- X "bit 7,h", 0, /* cb7c */
- X "bit 7,l", 0, /* cb7d */
- X "bit 7,(hl)", 0, /* cb7e */
- X "bit 7,a", 0, /* cb7f */
- X
- X "res 0,b", 0, /* cb80 */
- X "res 0,c", 0, /* cb81 */
- X "res 0,d", 0, /* cb82 */
- X "res 0,e", 0, /* cb83 */
- X "res 0,h", 0, /* cb84 */
- X "res 0,l", 0, /* cb85 */
- X "res 0,(hl)", 0, /* cb86 */
- X "res 0,a", 0, /* cb87 */
- X
- X "res 1,b", 0, /* cb88 */
- X "res 1,c", 0, /* cb89 */
- X "res 1,d", 0, /* cb8a */
- X "res 1,e", 0, /* cb8b */
- X "res 1,h", 0, /* cb8c */
- X "res 1,l", 0, /* cb8d */
- X "res 1,(hl)", 0, /* cb8e */
- X "res 1,a", 0, /* cb8f */
- X
- X "res 2,b", 0, /* cb90 */
- X "res 2,c", 0, /* cb91 */
- X "res 2,d", 0, /* cb92 */
- X "res 2,e", 0, /* cb93 */
- X "res 2,h", 0, /* cb94 */
- X "res 2,l", 0, /* cb95 */
- X "res 2,(hl)", 0, /* cb96 */
- X "res 2,a", 0, /* cb97 */
- X
- X "res 3,b", 0, /* cb98 */
- X "res 3,c", 0, /* cb99 */
- X "res 3,d", 0, /* cb9a */
- X "res 3,e", 0, /* cb9b */
- X "res 3,h", 0, /* cb9c */
- X "res 3,l", 0, /* cb9d */
- X "res 3,(hl)", 0, /* cb9e */
- X "res 3,a", 0, /* cb9f */
- X
- X "res 4,b", 0, /* cba0 */
- X "res 4,c", 0, /* cba1 */
- X "res 4,d", 0, /* cba2 */
- X "res 4,e", 0, /* cba3 */
- X "res 4,h", 0, /* cba4 */
- X "res 4,l", 0, /* cba5 */
- X "res 4,(hl)", 0, /* cba6 */
- X "res 4,a", 0, /* cba7 */
- X
- X "res 5,b", 0, /* cba8 */
- X "res 5,c", 0, /* cba9 */
- X "res 5,d", 0, /* cbaa */
- X "res 5,e", 0, /* cbab */
- X "res 5,h", 0, /* cbac */
- X "res 5,l", 0, /* cbad */
- X "res 5,(hl)", 0, /* cbae */
- X "res 5,a", 0, /* cbaf */
- X
- X "res 6,b", 0, /* cbb0 */
- X "res 6,c", 0, /* cbb1 */
- X "res 6,d", 0, /* cbb2 */
- X "res 6,e", 0, /* cbb3 */
- X "res 6,h", 0, /* cbb4 */
- X "res 6,l", 0, /* cbb5 */
- X "res 6,(hl)", 0, /* cbb6 */
- X "res 6,a", 0, /* cbb7 */
- X
- X "res 7,b", 0, /* cbb8 */
- X "res 7,c", 0, /* cbb9 */
- X "res 7,d", 0, /* cbba */
- X "res 7,e", 0, /* cbbb */
- X "res 7,h", 0, /* cbbc */
- X "res 7,l", 0, /* cbbd */
- X "res 7,(hl)", 0, /* cbbe */
- X "res 7,a", 0, /* cbbf */
- X
- X "set 0,b", 0, /* cbc0 */
- X "set 0,c", 0, /* cbc1 */
- X "set 0,d", 0, /* cbc2 */
- X "set 0,e", 0, /* cbc3 */
- X "set 0,h", 0, /* cbc4 */
- X "set 0,l", 0, /* cbc5 */
- X "set 0,(hl)", 0, /* cbc6 */
- X "set 0,a", 0, /* cbc7 */
- X
- X "set 1,b", 0, /* cbc8 */
- X "set 1,c", 0, /* cbc9 */
- X "set 1,d", 0, /* cbca */
- X "set 1,e", 0, /* cbcb */
- X "set 1,h", 0, /* cbcc */
- X "set 1,l", 0, /* cbcd */
- X "set 1,(hl)", 0, /* cbce */
- X "set 1,a", 0, /* cbcf */
- X
- X "set 2,b", 0, /* cbd0 */
- X "set 2,c", 0, /* cbd1 */
- X "set 2,d", 0, /* cbd2 */
- X "set 2,e", 0, /* cbd3 */
- X "set 2,h", 0, /* cbd4 */
- X "set 2,l", 0, /* cbd5 */
- X "set 2,(hl)", 0, /* cbd6 */
- X "set 2,a", 0, /* cbd7 */
- X
- X "set 3,b", 0, /* cbd8 */
- X "set 3,c", 0, /* cbd9 */
- X "set 3,d", 0, /* cbda */
- X "set 3,e", 0, /* cbdb */
- X "set 3,h", 0, /* cbdc */
- X "set 3,l", 0, /* cbdd */
- X "set 3,(hl)", 0, /* cbde */
- X "set 3,a", 0, /* cbdf */
- X
- X "set 4,b", 0, /* cbe0 */
- X "set 4,c", 0, /* cbe1 */
- X "set 4,d", 0, /* cbe2 */
- X "set 4,e", 0, /* cbe3 */
- X "set 4,h", 0, /* cbe4 */
- X "set 4,l", 0, /* cbe5 */
- X "set 4,(hl)", 0, /* cbe6 */
- X "set 4,a", 0, /* cbe7 */
- X
- X "set 5,b", 0, /* cbe8 */
- X "set 5,c", 0, /* cbe9 */
- X "set 5,d", 0, /* cbea */
- X "set 5,e", 0, /* cbeb */
- X "set 5,h", 0, /* cbec */
- X "set 5,l", 0, /* cbed */
- X "set 5,(hl)", 0, /* cbee */
- X "set 5,a", 0, /* cbef */
- X
- X "set 6,b", 0, /* cbf0 */
- X "set 6,c", 0, /* cbf1 */
- X "set 6,d", 0, /* cbf2 */
- X "set 6,e", 0, /* cbf3 */
- X "set 6,h", 0, /* cbf4 */
- X "set 6,l", 0, /* cbf5 */
- X "set 6,(hl)", 0, /* cbf6 */
- X "set 6,a", 0, /* cbf7 */
- X
- X "set 7,b", 0, /* cbf8 */
- X "set 7,c", 0, /* cbf9 */
- X "set 7,d", 0, /* cbfa */
- X "set 7,e", 0, /* cbfb */
- X "set 7,h", 0, /* cbfc */
- X "set 7,l", 0, /* cbfd */
- X "set 7,(hl)", 0, /* cbfe */
- X "set 7,a", 0, /* cbff */
- X /* dd */
- X undefined, 0, /* dd00 */
- X undefined, 0, /* dd01 */
- X undefined, 0, /* dd02 */
- X undefined, 0, /* dd03 */
- X undefined, 0, /* dd04 */
- X undefined, 0, /* dd05 */
- X undefined, 0, /* dd06 */
- X undefined, 0, /* dd07 */
- X
- X undefined, 0, /* dd08 */
- X "add ix,bc", 0, /* dd09 */
- X undefined, 0, /* dd0a */
- X undefined, 0, /* dd0b */
- X undefined, 0, /* dd0c */
- X undefined, 0, /* dd0d */
- X undefined, 0, /* dd0e */
- X undefined, 0, /* dd0f */
- X
- X undefined, 0, /* dd10 */
- X undefined, 0, /* dd11 */
- X undefined, 0, /* dd12 */
- X undefined, 0, /* dd13 */
- X undefined, 0, /* dd14 */
- X undefined, 0, /* dd15 */
- X undefined, 0, /* dd16 */
- X undefined, 0, /* dd17 */
- X
- X undefined, 0, /* dd18 */
- X "add ix,de", 0, /* dd19 */
- X undefined, 0, /* dd1a */
- X undefined, 0, /* dd1b */
- X undefined, 0, /* dd1c */
- X undefined, 0, /* dd1d */
- X undefined, 0, /* dd1e */
- X undefined, 0, /* dd1f */
- X
- X undefined, 0, /* dd20 */
- X "ld ix,%02x%02xh", 2, /* dd21 */
- X "ld (%02x%02xh),ix",2, /* dd22 */
- X "inc ix", 0, /* dd23 */
- X undefined, 0, /* dd24 */
- X undefined, 0, /* dd25 */
- X undefined, 0, /* dd26 */
- X undefined, 0, /* dd27 */
- X
- X undefined, 0, /* dd28 */
- X "add ix,ix", 0, /* dd29 */
- X "ld ix,(%02x%02xh)",2, /* dd2a */
- X "dec ix", 0, /* dd2b */
- X undefined, 0, /* dd2c */
- X undefined, 0, /* dd2d */
- X undefined, 0, /* dd2e */
- X undefined, 0, /* dd2f */
- X
- X undefined, 0, /* dd30 */
- X undefined, 0, /* dd31 */
- X undefined, 0, /* dd32 */
- X undefined, 0, /* dd33 */
- X "inc (ix+%02xh)", 1, /* dd34 */
- X "dec (ix+%02xh)", 1, /* dd35 */
- X "ld (ix+%02xh),%02xh",2, /* dd36 */
- X undefined, 0, /* dd37 */
- X
- X undefined, 0, /* dd38 */
- X "add ix,sp", 0, /* dd39 */
- X undefined, 0, /* dd3a */
- X undefined, 0, /* dd3b */
- X undefined, 0, /* dd3c */
- X undefined, 0, /* dd3d */
- X undefined, 0, /* dd3e */
- X undefined, 0, /* dd3f */
- X
- X undefined, 0, /* dd40 */
- X undefined, 0, /* dd41 */
- X undefined, 0, /* dd42 */
- X undefined, 0, /* dd43 */
- X undefined, 0, /* dd44 */
- X undefined, 0, /* dd45 */
- X "ld b,(ix+%02xh)", 1, /* dd46 */
- X undefined, 0, /* dd47 */
- X
- X undefined, 0, /* dd48 */
- X undefined, 0, /* dd49 */
- X undefined, 0, /* dd4a */
- X undefined, 0, /* dd4b */
- X undefined, 0, /* dd4c */
- X undefined, 0, /* dd4d */
- X "ld c,(ix+%02xh)", 1, /* dd4e */
- X undefined, 0, /* dd4f */
- X
- X undefined, 0, /* dd50 */
- X undefined, 0, /* dd51 */
- X undefined, 0, /* dd52 */
- X undefined, 0, /* dd53 */
- X undefined, 0, /* dd54 */
- X undefined, 0, /* dd55 */
- X "ld d,(ix+%02xh)", 1, /* dd56 */
- X undefined, 0, /* dd57 */
- X
- X undefined, 0, /* dd58 */
- X undefined, 0, /* dd59 */
- X undefined, 0, /* dd5a */
- X undefined, 0, /* dd5b */
- X undefined, 0, /* dd5c */
- X undefined, 0, /* dd5d */
- X "ld e,(ix+%02xh)", 1, /* dd5e */
- X undefined, 0, /* dd5f */
- X
- X undefined, 0, /* dd60 */
- X undefined, 0, /* dd61 */
- X undefined, 0, /* dd62 */
- X undefined, 0, /* dd63 */
- X undefined, 0, /* dd64 */
- X undefined, 0, /* dd65 */
- X "ld h,(ix+%02xh)", 1, /* dd66 */
- X undefined, 0, /* dd67 */
- X
- X undefined, 0, /* dd68 */
- X undefined, 0, /* dd69 */
- X undefined, 0, /* dd6a */
- X undefined, 0, /* dd6b */
- X undefined, 0, /* dd6c */
- X undefined, 0, /* dd6d */
- X "ld l,(ix+%02xh)", 1, /* dd6e */
- X undefined, 0, /* dd6f */
- X
- X "ld (ix+%02xh),b", 1, /* dd70 */
- X "ld (ix+%02xh),c", 1, /* dd71 */
- X "ld (ix+%02xh),d", 1, /* dd72 */
- X "ld (ix+%02xh),e", 1, /* dd73 */
- X "ld (ix+%02xh),h", 1, /* dd74 */
- X "ld (ix+%02xh),l", 1, /* dd75 */
- X undefined, 0, /* dd76 */
- X "ld (ix+%02xh),a", 1, /* dd77 */
- X
- X undefined, 0, /* dd78 */
- X undefined, 0, /* dd79 */
- X undefined, 0, /* dd7a */
- X undefined, 0, /* dd7b */
- X undefined, 0, /* dd7c */
- X undefined, 0, /* dd7d */
- X "ld a,(ix+%02xh)", 1, /* dd7e */
- X undefined, 0, /* dd7f */
- X
- X undefined, 0, /* dd80 */
- X undefined, 0, /* dd81 */
- X undefined, 0, /* dd82 */
- X undefined, 0, /* dd83 */
- X undefined, 0, /* dd84 */
- X undefined, 0, /* dd85 */
- X "add a,(ix+%02xh)", 1, /* dd86 */
- X undefined, 0, /* dd87 */
- X
- X undefined, 0, /* dd88 */
- X undefined, 0, /* dd89 */
- X undefined, 0, /* dd8a */
- X undefined, 0, /* dd8b */
- X undefined, 0, /* dd8c */
- X undefined, 0, /* dd8d */
- X "adc a,(ix+%02xh)", 1, /* dd8e */
- X undefined, 0, /* dd8f */
- X
- X undefined, 0, /* dd90 */
- X undefined, 0, /* dd91 */
- X undefined, 0, /* dd92 */
- X undefined, 0, /* dd93 */
- X undefined, 0, /* dd94 */
- X undefined, 0, /* dd95 */
- X "sub (ix+%02xh)", 1, /* dd96 */
- X undefined, 0, /* dd97 */
- X
- X undefined, 0, /* dd98 */
- X undefined, 0, /* dd99 */
- X undefined, 0, /* dd9a */
- X undefined, 0, /* dd9b */
- X undefined, 0, /* dd9c */
- X undefined, 0, /* dd9d */
- X "sbc a,(ix+%02xh)", 1, /* dd9e */
- X undefined, 0, /* dd9f */
- X
- X undefined, 0, /* dda0 */
- X undefined, 0, /* dda1 */
- X undefined, 0, /* dda2 */
- X undefined, 0, /* dda3 */
- X undefined, 0, /* dda4 */
- X undefined, 0, /* dda5 */
- X "and (ix+%02xh)", 1, /* dda6 */
- X undefined, 0, /* dda7 */
- X
- X undefined, 0, /* dda8 */
- X undefined, 0, /* dda9 */
- X undefined, 0, /* ddaa */
- X undefined, 0, /* ddab */
- X undefined, 0, /* ddac */
- X undefined, 0, /* ddad */
- X "xor (ix+%02xh)", 1, /* ddae */
- X undefined, 0, /* ddaf */
- X
- X undefined, 0, /* ddb0 */
- X undefined, 0, /* ddb1 */
- X undefined, 0, /* ddb2 */
- X undefined, 0, /* ddb3 */
- X undefined, 0, /* ddb4 */
- X undefined, 0, /* ddb5 */
- X "or (ix+%02xh)", 1, /* ddb6 */
- X undefined, 0, /* ddb7 */
- X
- X undefined, 0, /* ddb8 */
- X undefined, 0, /* ddb9 */
- X undefined, 0, /* ddba */
- X undefined, 0, /* ddbb */
- X undefined, 0, /* ddbc */
- X undefined, 0, /* ddbd */
- X "cp (ix+%02xh)", 1, /* ddbe */
- X undefined, 0, /* ddbf */
- X
- X undefined, 0, /* ddc0 */
- X undefined, 0, /* ddc1 */
- X undefined, 0, /* ddc2 */
- X undefined, 0, /* ddc3 */
- X undefined, 0, /* ddc4 */
- X undefined, 0, /* ddc5 */
- X undefined, 0, /* ddc6 */
- X undefined, 0, /* ddc7 */
- X
- X undefined, 0, /* ddc8 */
- X undefined, 0, /* ddc9 */
- X undefined, 0, /* ddca */
- X "dd cb %02x,%02x", 2, /* ddcb */
- X undefined, 0, /* ddcc */
- X undefined, 0, /* ddcd */
- X undefined, 0, /* ddce */
- X undefined, 0, /* ddcf */
- X
- X undefined, 0, /* ddd0 */
- X undefined, 0, /* ddd1 */
- X undefined, 0, /* ddd2 */
- X undefined, 0, /* ddd3 */
- X undefined, 0, /* ddd4 */
- X undefined, 0, /* ddd5 */
- X undefined, 0, /* ddd6 */
- X undefined, 0, /* ddd7 */
- X
- X undefined, 0, /* ddd8 */
- X undefined, 0, /* ddd9 */
- X undefined, 0, /* ddda */
- X undefined, 0, /* dddb */
- X undefined, 0, /* dddc */
- X undefined, 0, /* dddd */
- X undefined, 0, /* ddde */
- X undefined, 0, /* dddf */
- X
- X undefined, 0, /* dde0 */
- X "pop ix", 0, /* dde1 */
- X undefined, 0, /* dde2 */
- X "ex (sp),ix", 0, /* dde3 */
- X undefined, 0, /* dde4 */
- X "push ix", 0, /* dde5 */
- X undefined, 0, /* dde6 */
- X undefined, 0, /* dde7 */
- X
- X undefined, 0, /* dde8 */
- X "jp (ix)", 0, /* dde9 */
- X undefined, 0, /* ddea */
- X undefined, 0, /* ddeb */
- X undefined, 0, /* ddec */
- X undefined, 0, /* dded */
- X undefined, 0, /* ddee */
- X undefined, 0, /* ddef */
- X
- X undefined, 0, /* ddf0 */
- X undefined, 0, /* ddf1 */
- X undefined, 0, /* ddf2 */
- SHAR_EOF
- echo "2" > ._seq_
- --
- "If I'd known it was harmless, I'd have killed it myself" Phillip K. Dick
- Bob Bownes, aka iii, aka captain comrade doktor bobwrench
- 3 A Pinehurst Ave, Albany, New York, 12203, (518)-482-8798 voice
- bownesrm@beowulf.uucp {uunet!steinmetz,rutgers!brspyr1}!beowulf!bownesrm
-