spencercw avatar spencercw committed cce7d9d

Remove libz80.

Comments (0)

Files changed (10)

 
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libz80", "libz80\libz80.vcxproj", "{770710EB-019C-4F35-966F-568C4640C57F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8} = {3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}
-	EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "z80", "z80", "{1CFF3894-ACFE-49E5-91F3-766085FA57AB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mktables", "libz80\codegen\mktables.vcxproj", "{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}"
-EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "third_party", "third_party", "{E4EA39C2-326B-473E-8DFC-EB8206863544}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprotobuf", "third_party\protobuf\libprotobuf.vcxproj", "{3E283F37-A4ED-41B7-A3E6-A2D89D131A30}"
 		Release|Win32 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{770710EB-019C-4F35-966F-568C4640C57F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{770710EB-019C-4F35-966F-568C4640C57F}.Debug|Win32.Build.0 = Debug|Win32
-		{770710EB-019C-4F35-966F-568C4640C57F}.Release|Win32.ActiveCfg = Release|Win32
-		{770710EB-019C-4F35-966F-568C4640C57F}.Release|Win32.Build.0 = Release|Win32
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}.Debug|Win32.Build.0 = Debug|Win32
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}.Release|Win32.ActiveCfg = Release|Win32
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}.Release|Win32.Build.0 = Release|Win32
 		{3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Win32.ActiveCfg = Debug|Win32
 		{3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Win32.Build.0 = Debug|Win32
 		{3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|Win32.ActiveCfg = Release|Win32
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
-		{770710EB-019C-4F35-966F-568C4640C57F} = {1CFF3894-ACFE-49E5-91F3-766085FA57AB}
-		{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8} = {1CFF3894-ACFE-49E5-91F3-766085FA57AB}
 		{C7EBDEED-384A-453D-B21E-18EFFDFD0D1E} = {E4EA39C2-326B-473E-8DFC-EB8206863544}
 		{99F2E5DC-7F2B-4A6C-9567-9616923B46B1} = {E4EA39C2-326B-473E-8DFC-EB8206863544}
 		{F261E9F6-67D3-463B-B184-30CC6567B581} = {E4EA39C2-326B-473E-8DFC-EB8206863544}

libz80/codegen/mktables.c

-/* =========================================================
- *  libz80 - Z80 emulation library
- * =========================================================
- *
- * (C) Gabriel Gambetta (ggambett@adinet.com.uy) 2000 - 2002
- *
- * Version 1.99
- *
- * ---------------------------------------------------------
- *
- * This utility generates most of the emulation code from the opcode specification
- *
- */
-#include "stdio.h"
-#include "regex.h"
-#include "stdlib.h"
-#include "string.h"
-
-
-/* =========================================================
- *  Parameters
- * ========================================================= */
-#define MAX_REGEX	1000		/**< Max patterns. */
-#define MAX_LINES	20			/**< Max code lines per pattern. */
-#define MAX_MATCH	5			/**< Max parameters per matching opcode. */
-#define MAX_LINE	100			/**< Max line length */
-#define OPCODE_OFFSET	11		/**< Offset of an opcode from the list, from the start of the line */
-
-#define OPCODES_SPEC	"mktables.spec"
-#define OPCODES_LIST	"opcodes.lst"
-#define OPCODES_HEADER	"opcodes_decl.h"
-#define OPCODES_IMPL	"opcodes_impl.c"
-#define OPCODES_TABLE	"opcodes_table.h"
-
-
-/* =========================================================
- *  Helpers
- * ========================================================= */
-typedef unsigned char byte;
-
-/** Print error and exit. */
-void fatal(char* s)
-{
-	printf("%s\n", s);
-	exit(1);	
-}
-
-
-/** Print error and exit. */
-void fatal2(char* s, char* s2)
-{
-	printf("%s%s\n", s, s2);
-	exit(1);	
-}
-
-
-/** Substitutes any of a set of characters for other character */
-void substAny (char* str, char* set, char r)
-{
-	while (*str)
-	{
-		if (strchr(set, *str))
-			*str = r;	
-	
-		str++;	
-	}	
-}
-
-
-/** Substitutes a string for another */
-void substStr(char* str, char* src, char* rep)
-{
-	char tmp[MAX_LINE];
-	char tmp1[MAX_LINE];
-	char* p;
-	int l = strlen(src);
-	
-	strcpy(tmp, str);
-	while ( (p = strstr(tmp, src)) != NULL)
-	{
-		*p = 0;
-		strcpy(tmp1, tmp);
-		strcat(tmp1, rep);
-		strcat(tmp1, p + l);
-		strcpy(tmp, tmp1);
-	}
-	
-	strcpy(str, tmp);
-}
-
-
-/** Creates a function name from an opcode */
-void fixName (char* opc, char* name)
-{
-	char* p, *q, *r;
-	int l;
-	
-	strcpy(name, opc);
-	substAny(name, " +,'", '_');
-	substStr(name, "(", "off_");
-	substStr(name, ")", "");
-}
-
-
-/** Removes trailing CR and LF. */
-void trim (char* s)
-{
-	while (*s++)
-	{
-		if ((*s == 0x0D) || (*s == 0x0A))	
-			*s = 0;
-	}
-}
-
-
-/** Opens a file or dies trying */
-FILE* openOrDie(char* name, char* mode)
-{
-	FILE* file = fopen(name, mode);
-	if (!file)
-		fatal2("Can't open ", name);	
-	
-	return file;
-}
-
-/* =========================================================
- *  Specification structures
- * ========================================================= */
-
-/** A pattern and its substitution. */
-typedef struct
-{
-	regex_t	re;
-	char*	pat;
-	char*	line[MAX_LINES];	
-} Item;
-
-
-Item*	items;		/**< The patterns. */
-int		nItems;		/**< Number of defined patterns. */
-
-
-/** Reads the specification file. */
-int readSpec (FILE* in)
-{
-	char line[MAX_LINE];
-	int nLine;
-	
-	items = calloc(MAX_REGEX, sizeof(Item));
-	if (!items)
-		fatal("Not enough memory");
-		
-	nItems = -1;
-	do
-	{
-		if (feof(in))
-			break;
-			
-		fgets(line, MAX_LINE, in);
-		trim(line);
-		if (line[0] == '#')	/* Comment */
-		{
-			
-		}
-		else if (line[0] != '\t')	/* New pattern definition */
-		{		
-			nItems++;
-			if (regcomp(&items[nItems].re, line, REG_EXTENDED))
-				fatal(line);
-			nLine = 0;
-			items[nItems].pat = strdup(line);
-		}
-		else	/* A line in the current pattern */
-		{
-			if (strlen(line) > 0)
-				items[nItems].line[nLine++] = strdup(line);
-		}
-	} while(1);
-	
-	nItems++;
-	
-	return nItems+1;
-}
-
-
-
-/** Prints an item pattern and its substitution */
-void printItem (Item* item)
-{
-	char** s = item->line;
-	
-	printf("%s\n", item->pat);
-	while (*s)
-	{
-		printf("[%s]\n", *s);
-		s++;
-	}
-}
-
-
-/* =========================================================
- *  Opcode implementation and declaration generator
- * ========================================================= */
-
-/** Handles opcode-in-code */
-int printCall (char* s, FILE* code)
-{
-	char tmp[MAX_LINE];	
-	char* p = tmp;
-	
-	strcpy(tmp, s);
-	
-	while (isspace(*p) && (*p))
-		p++;
-		
-	if (*p != '%')
-		return 0;
-	
-	*p = 0;
-	fprintf(code, "%s", tmp);
-	p++;
-	
-	fixName(&s[p-tmp], tmp);
-	fprintf(code, "%s(ctx);\n", tmp);
-	return 1;
-}
-
-
-/** Reads the opcode list and generates output code based on the spec */
-void generateCodeTable (FILE* opcodes, FILE* code, FILE* header)
-{
-	char line[MAX_LINE];
-	char last[MAX_LINE];
-	char tmp[MAX_LINE];
-	char name[MAX_LINE];
-	char parm[5], subst[20];
-	int i;
-	char* p, *q;
-	char** cmds;
-	regmatch_t matches[MAX_MATCH];
-	Item* item;
-
-	printf("Generating opcode implementations...");
-	last[0] = 0;
-	do
-	{			
-		fgets(line, MAX_LINE, opcodes);
-		trim(line);
-		
-		if (feof(opcodes))
-			break;
-				
-		for (q = line, p = q+OPCODE_OFFSET; *p; *q++ = *p++);	/* Skip the hex part */
-		*q = 0;
-		
-		/* Avoid duplicate opcodes */
-		if (strcmp(last, line) == 0)
-			continue;		
-		strcpy(last, line);
-			
-		/* Find the appropriate pattern */
-		for (i = 0; i < nItems; i++)
-		{
-			if (regexec(&items[i].re, line, MAX_MATCH, matches, REG_EXTENDED) == 0)
-			{	
-				if (matches[0].rm_so == 0)	/* Match only at beginning of line */
-				{
-					/*printf("%s : match %s\n", &line, items[i].pat);*/
-					break;
-				}
-			}
-		}
-		
-		if (i >= nItems)
-			fatal2(line, " didn't match anything");
-			
-		item = &items[i];
-		
-		/* Print function stub */
-		fixName(line, name);
-		fprintf(code, "static void %s (Z80Context* ctx)\n{\n", name);
-		fprintf(header, "static void %s (Z80Context* ctx);\n", name);
-				
-		/* Substitute submatches in each output line and print the code */
-		cmds = item->line;
-		strcpy(parm, "%0");
-		while (*cmds)
-		{
-			if (!printCall(*cmds, code))
-			{
-				strncpy(tmp, *cmds, MAX_LINE);
-				q = tmp;
-		
-				for (i = 1; i < MAX_MATCH; i++)
-				{
-					parm[1] = i + '0';
-					strncpy(subst, &line[matches[i].rm_so], matches[i].rm_eo - matches[i].rm_so);
-					subst[matches[i].rm_eo - matches[i].rm_so] = 0;
-					
-					substStr(tmp, parm, subst);
-				}
-				fprintf(code, "%s\n", tmp);
-			}
-			
-			cmds++;	
-		}
-		
-		fprintf(code, "}\n\n\n");
-	} while(1);
-	printf("done\n");
-}
-
-
-void generateCode (void)
-{
-	FILE* spec, *opcodes, *code, *header, *table;
-	
-	/* ----- Read the specification ----- */
-	printf("Reading specification...");
-
-	spec = openOrDie(OPCODES_SPEC, "rb");
-	if (!readSpec(spec))
-		fatal("Error reading the specification");	
-	fclose(spec);
-	printf("done\n");
-
-	opcodes = openOrDie(OPCODES_LIST, "rb");
-	code = openOrDie(OPCODES_IMPL, "wb");
-	header = openOrDie(OPCODES_HEADER, "wb");
-		
-	generateCodeTable(opcodes, code, header);
-	
-	fclose(opcodes);
-	fclose(code);
-	fclose(header);
-}
-
-
-/* =========================================================
- *  Parser tables generator
- * ========================================================= */
-
-void mkFormat(char* src, char* dst)
-{
-	strcpy(dst, src);
-	substStr(dst, "d", "0%02Xh");
-	substStr(dst, "e", "%d");
-	substStr(dst, "nn", "0%04Xh");
-	substStr(dst, "n", "0%02Xh");	
-}
-
-
-int isHex(char c)
-{
-	return (isxdigit(c) && isupper(c)) || isdigit(c);	
-}
-
-
-int hexVal(char c)
-{
-	if (isdigit(c))
-		return c - '0';
-	return c - 'A' + 10;	
-}
-
-
-/* ---------------------------------------------------------
- *  Parser structures. Not exactly the same as in z80.c
- * --------------------------------------------------------- */
-typedef enum
-{
-	OP_NONE,
-	OP_BYTE,
-	OP_OFFSET,
-	OP_WORD	
-} Z80OperandType;
-
-char* OpTypeName[] = { "OP_NONE", "OP_BYTE", "OP_OFFSET", "OP_WORD" };
-
-struct Z80OpcodeTable;
-
-struct Z80OpcodeEntry
-{
-	int pre_skip;
-	int post_skip;
-	char* func;		/*	Z80OpcodeFunc* func;*/
-	
-	int operand_type;
-	char* format;	
-	
-	struct Z80OpcodeTable* table;
-};
-
-
-struct Z80OpcodeTable
-{
-	char* name;
-	int opcode_offset;
-	struct Z80OpcodeEntry entries[256];
-};
-
-
-typedef enum
-{
-	TT_OPCODE,
-	TT_D,
-	TT_E,
-	TT_N,
-	TT_NN,
-	TT_END
-} TokenType;
-
-
-char* nextToken(char* cur, byte* val, TokenType* ttype)
-{
-	*ttype = TT_END;
-	while (*cur)
-	{
-		if (*cur == ' ')
-		{
-			cur++;
-			continue;
-		}
-		else if (isHex(*cur) && isHex(*(cur+1)))
-		{
-			*val = (hexVal(*cur) << 4) | hexVal(*(cur+1));
-			*ttype = TT_OPCODE;
-			cur += 2;
-			break;
-		}
-		else if (*cur == 'd')
-		{
-			*ttype = TT_D;	
-			cur++;
-			break;
-		}
-		else if (*cur == 'e')
-		{
-			*ttype = TT_E;
-			cur++;
-			break;
-		}
-		else if ((*cur == 'n') && (*(cur+1) == 'n'))
-		{
-			*ttype = TT_NN;
-			cur += 2;
-			break;
-		}
-		else if (*cur == 'n')
-		{
-			*ttype = TT_N;
-			cur++;
-			break;
-		}
-		else
-		{
-			fatal2("Unknown char	at ", cur);
-		}
-	};
-	
-	return cur;
-}
-
-
-/** Creates the table tree implied by the prefixes */
-struct Z80OpcodeTable* createTableTree(FILE* opcodes, FILE* table)
-{
-	struct Z80OpcodeTable* mainTable;
-	struct Z80OpcodeTable* current;
-	char line[MAX_LINE];
-	char tmp[MAX_LINE];
-	char* cur;
-	byte code;
-	TokenType tt;	
-	byte prefix[10];
-	int prefixLen, i;
-	int wasOperand;
-	int opcodeOffset;
-	
-	mainTable = calloc(1, sizeof(struct Z80OpcodeTable));
-	mainTable->name = strdup("");
-	
-	fprintf(table, "static struct Z80OpcodeTable opcodes_main;\n");
-	
-	rewind(opcodes);
-
-	printf("Determining opcode prefixes...");
-	do
-	{
-		fgets(line, MAX_LINE, opcodes);
-		trim(line);
-		
-		if (feof(opcodes))
-			break;
-			
-		prefixLen = 0;
-		line[OPCODE_OFFSET - 1] = 0;
-	
-		/* Get the codes */	
-		wasOperand = 0;
-		opcodeOffset = 0;
-		cur = line;
-		do
-		{
-			cur = nextToken(cur, &code, &tt);
-			if (tt == TT_END)
-			{
-				break;
-			}
-			else if (tt == TT_OPCODE)
-			{
-				prefix[prefixLen++] = code;
-				if (wasOperand)
-					opcodeOffset++;
-			}
-			else
-			{
-				wasOperand = 1;	
-			}
-		} while(1);
-	
-		/* All hex codes except the last one form the prefix of the instruction */
-		current = mainTable;
-		for (i = 0; i < prefixLen - 1; i++)
-		{
-			code = prefix[i];
-			/* Create a new node if it doesn't exist */
-			if (current->entries[code].table == NULL)
-			{
-				sprintf(tmp, "%s%02X", current->name, code);
-				current->entries[code].table = calloc(1, sizeof(struct Z80OpcodeTable));
-				current = current->entries[code].table;
-				current->name = strdup(tmp);				
-				fprintf(table, "static struct Z80OpcodeTable opcodes_%s;\n", current->name);
-				
-				printf("%s ", tmp);
-			}
-			else
-			{
-				current = current->entries[code].table;
-			}
-		}
-		
-		current->opcode_offset = opcodeOffset;
-	} while(1);
-	
-	printf("\n");
-	
-	mainTable->name = strdup("main");
-	return mainTable;
-}
-
-
-void scanOpcodes(FILE* opcodes, struct Z80OpcodeTable* mainTable)
-{
-	char line[MAX_LINE];
-	char name[MAX_LINE];
-	char fmt[MAX_LINE];
-	char* cur;
-	byte code;
-	TokenType tt;
-	struct Z80OpcodeTable* current;
-	struct Z80OpcodeEntry* ent;
-	int opType;
-	
-	rewind(opcodes);	
-	do
-	{
-		fgets(line, MAX_LINE, opcodes);
-		trim(line);
-		
-		if (feof(opcodes))
-			break;
-			
-		mkFormat(&line[OPCODE_OFFSET], fmt);
-		fixName(&line[OPCODE_OFFSET], name);
-		line[OPCODE_OFFSET] = 0;
-	
-		current = mainTable;		
-		cur = line;
-		opType = OP_NONE;
-		do
-		{
-			cur = nextToken(cur, &code, &tt);
-			if (tt == TT_END)
-			{
-				break;
-			}
-			else if (tt == TT_OPCODE)
-			{
-				if (current->entries[code].table)
-				{
-					current = current->entries[code].table;
-					continue;
-				}
-				
-				ent = &current->entries[code];
-				ent->func = strdup(name);
-				ent->format = strdup(fmt);				
-			}
-			else if (tt == TT_NN)
-			{
-				opType = OP_WORD;
-			}
-			else if ((tt == TT_N) | (tt == TT_D))
-			{
-				opType = OP_BYTE;
-			}
-			else if (tt == TT_E)
-			{
-				opType = OP_OFFSET;
-			}
-		} while(1);
-		
-		ent->operand_type = opType;
-			
-	} while (1);
-}
-
-
-void outputTable(struct Z80OpcodeTable* table, FILE* file)
-{
-	int i;
-	struct Z80OpcodeEntry* opc;
-	struct Z80OpcodeTable* tbl;
-	char fmt[MAX_LINE];
-	
-	printf("Outputting table %s...", table->name);
-	
-	fprintf(file, "static struct Z80OpcodeTable opcodes_%s = { %d, {\n", table->name, table->opcode_offset);
-	
-	for (i = 0, opc = table->entries; i < 256; i++, opc++)
-	{
-		tbl = opc->table;
-
-		strcpy(fmt, "NULL");
-		if (opc->format)
-			sprintf(fmt, "\"%s\"", opc->format);
-
-		fprintf(file, "\t{ %-20s, %-9s, %-20s, %s%s }%s\n",
-												(opc->func ? opc->func : "NULL"),
-												OpTypeName[opc->operand_type],
-												fmt,
-												(tbl ? "&opcodes_" : ""),
-												(tbl ? tbl->name : "NULL"),
-												(i == 255 ? "" : ",")
-												);
-
-	}
-	fprintf(file, "} };\n");	
-	fprintf(file, "\n\n");
-		
-	printf("done\n");
-	
-	for (i = 0, opc = table->entries; i < 256; i++, opc++)
-	{
-		tbl = opc->table;			
-		if (tbl)
-			outputTable(tbl, file);
-	}
-}
-	
-
-void generateParserTables(FILE* opcodes, FILE* table)
-{
-	struct Z80OpcodeTable* mainTable = createTableTree(opcodes, table);
-	scanOpcodes(opcodes, mainTable);
-	fprintf(table, "\n\n");
-	outputTable(mainTable, table);
-}
-
-
-void generateParser(void)
-{
-	FILE* table, *opcodes;
-	
-	opcodes = openOrDie(OPCODES_LIST, "rb");
-	table = openOrDie(OPCODES_TABLE, "wb");
-	
-	generateParserTables(opcodes, table);
-	
-	fclose(table);
-	fclose(opcodes);
-}
-
-
-int main (void)
-{
-	generateCode();
-	generateParser();
-	return 0;
-}
-

libz80/codegen/mktables.spec

-#
-# Z80 -> C specification
-
-
-#
-# Add / Sub / Adc / Sbc
-#
-(ADC|SBC|ADD|SUB) A,(A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	BR.A = doArithmetic(ctx, BR.%2, F1_%1, F2_%1);
-
-(ADC|SBC|ADD|SUB) A,\(HL\)
-	BR.A = doArithmetic(ctx, read8(ctx, WR.HL), F1_%1, F2_%1);
-
-(ADC|SBC|ADD|SUB) A,\((IX|IY)\+d\)
-	BR.A = doArithmetic(ctx, read8(ctx, WR.%2 + read8(ctx, ctx->PC++)), F1_%1, F2_%1);
-	
-(ADC|SBC|ADD|SUB) A,n
-	BR.A = doArithmetic(ctx, read8(ctx, ctx->PC++), F1_%1, F2_%1);
-
-
-# Particular cases
-ADC HL,(SP|BC|DE|HL)
-	WR.HL += WR.%1 + GETFLAG(F_C);
-
-SBC HL,(SP|BC|DE|HL)
-	WR.HL -= WR.%1 + GETFLAG(F_C);
-	
-ADD HL,(SP|BC|DE|HL)
-	WR.HL += WR.%1;
-	
-ADD (IX|IY),(SP|BC|DE|IX|IY)
-	WR.%1 += WR.%2;
-	
-	
-
-#
-# Logic operations
-#
-(AND|XOR|OR) \(HL\)
-	do%1(ctx, read8(ctx, WR.HL));
-
-(AND|XOR|OR) \((IX|IY)\+d\)
-	do%1(ctx, read8(ctx, WR.%2 + read8(ctx, ctx->PC++)));
-
-(AND|XOR|OR) (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	do%1(ctx, BR.%2);
-
-(AND|XOR|OR) n
-	do%1(ctx, read8(ctx, ctx->PC++));
-
-
-#
-# Bit operations
-#
-BIT ([0-7]),(A|B|C|D|E|H|L)
-	doBIT(ctx, %1, BR.%2);
-
-BIT ([0-7]),\(HL\)
-	doBIT(ctx, %1, read8(ctx, WR.HL));
-
-BIT ([0-7]),\((IX|IY)\+d\)
-	doBIT(ctx, %1, read8(ctx, WR.%2 + read8(ctx, ctx->PC++)));
-	
-(SET|RES) ([0-7]),(A|B|C|D|E|H|L)
-	BR.%3 = doSetRes(ctx, SR_%1, %2, BR.%3);
-
-(SET|RES) ([0-7]),\(HL\)
-	write8(ctx, WR.HL, doSetRes(ctx, SR_%1, %2, read8(ctx, WR.HL)));
-
-(SET|RES) ([0-7]),\((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	write8(ctx, WR.%3 + off, doSetRes(ctx, SR_%1, %2, read8(ctx, WR.%3 + off)));
-	
-	
-#
-# Jumps and calls
-#
-CALL (C|M|NZ|NC|P|PE|PO|Z)?,?\(nn\)
-	ushort addr = read16(ctx, ctx->PC);
-	ctx->PC += 2;
-	if (condition(ctx, C_%1))
-	{
-		doPush(ctx, ctx->PC);
-		ctx->PC = addr;
-	}
-	
-JP \((HL|IX|IY)\)
-	ctx->PC = WR.%1;
-	
-JP (C|M|NZ|NC|P|PE|PO|Z)?,?\(nn\)
-	ushort addr = read16(ctx, ctx->PC);
-	ctx->PC += 2;
-	if (condition(ctx, C_%1))
-		ctx->PC = addr;
-	
-JR (C|NZ|NC|Z)?,?\(PC\+e\)
-	int off = doComplement(read8(ctx, ctx->PC++));
-	if (condition(ctx, C_%1))
-		ctx->PC += off;
-
-RETI
-	ctx->IFF1 = ctx->IFF2;
-	%RET		
-		
-RETN
-	ctx->IFF1 = ctx->IFF2;
-	%RET
-
-
-RET (C|M|NZ|NC|P|PE|PO|Z)
-	if (ctx, condition(ctx, C_%1))
-		ctx->PC = doPop(ctx);
-		
-RET
-	ctx->PC = doPop(ctx);
-
-	
-DJNZ \(PC\+e\)
-	int off = doComplement(read8(ctx, ctx->PC++));
-	BR.B--;
-	if (BR.B)
-		ctx->PC += off;
-
-
-RST (0|8|10|18|20|28|30|38)H
-	doPush(ctx, ctx->PC);
-	ctx->PC = 0x0%1;
-	
-	
-#
-# Misc
-#
-CCF
-	VALFLAG(F_C, (1 - (byte)GETFLAG(F_C) != 0));
-	RESFLAG(F_N);
-	
-SCF
-	SETFLAG(F_C);
-	RESFLAG(F_N | F_H);
-
-CPL
-	BR.A = ~BR.A;
-	SETFLAG(F_H | F_N);
-	
-DAA
-	doDAA(ctx);
-	
-EX \(SP\),(HL|IX|IY)
-	ushort tmp = read16(ctx, WR.SP);
-	write16(ctx, WR.SP, WR.%1);
-	WR.%1 = tmp;
-
-EX AF,AF'
-	ushort tmp = ctx->R1.wr.AF;
-	ctx->R1.wr.AF = ctx->R2.wr.AF;
-	ctx->R2.wr.AF = tmp;
-
-EX DE,HL
-	ushort tmp = WR.DE;
-	WR.DE = WR.HL;
-	WR.HL = tmp;
-
-EXX
-	ushort tmp;	
-	tmp = ctx->R1.wr.BC;
-	ctx->R1.wr.BC = ctx->R2.wr.BC;
-	ctx->R2.wr.BC = tmp;	
-	
-	tmp = ctx->R1.wr.DE;
-	ctx->R1.wr.DE = ctx->R2.wr.DE;
-	ctx->R2.wr.DE = tmp;	
-	
-	tmp = ctx->R1.wr.HL;
-	ctx->R1.wr.HL = ctx->R2.wr.HL;
-	ctx->R2.wr.HL = tmp;
-
-HALT
-	/* What should we do here? */
-
-
-#
-# Compare
-#
-CP \(HL\)
-	byte val = read8(ctx, WR.HL);
-	doArithmetic(ctx, val, 0, 1);	
-	adjustFlags(ctx, val);
-
-CP \((IX|IY)\+d\)
-	byte val = read8(ctx, WR.%1 + read8(ctx, ctx->PC++));
-	doArithmetic(ctx, val, 0, 1);	
-	adjustFlags(ctx, val);
-
-CP (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	doArithmetic(ctx, BR.%1, 0, 1);	
-	adjustFlags(ctx, BR.%1);
-
-CP n
-	byte val = read8(ctx, ctx->PC++);
-	doArithmetic(ctx, val, 0, 1);	
-	adjustFlags(ctx, val);
-
-CPDR
-	do
-	{
-		%CPD
-	} while ((WR.BC != 0) && (BR.A != read8(ctx, WR.HL)));
-	
-CPD
-	%CP (HL)
-	WR.HL--;
-	WR.BC--;
-	VALFLAG(F_PV, WR.BC != 0);
-
-CPIR
-	do
-	{
-		%CPI
-	} while ((WR.BC != 0) && (BR.A != read8(ctx, WR.HL)));
-	
-CPI
-	%CP (HL)
-	WR.HL++;
-	WR.BC--;
-	VALFLAG(F_PV, WR.BC != 0);
-
-
-#
-# INC and DEC
-#
-(INC|DEC) \(HL\)
-	write8(ctx, WR.HL, doIncDec(ctx, read8(ctx, WR.HL), ID_%1));
-
-(INC|DEC) \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	write8(ctx, WR.%2 + off, doIncDec(ctx, read8(ctx, WR.%2 + off), ID_%1));
-	
-(INC|DEC) (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	BR.%2 = doIncDec(ctx, BR.%2, ID_%1);
-
-(INC|DEC) (BC|DE|HL|SP|IX|IY)
-	WR.%2 = doIncDec(ctx, WR.%2, ID_%1);
-	
-#
-# Interrupts
-#
-(EI|DI)
-	ctx->IFF1 = ctx->IFF2 = IE_%1;
-
-IM ([012])
-	ctx->IM = %1;
-
-
-#
-# IO ports
-#
-IN (A|B|C|D|E|F|H|L),\(C\)
-	BR.%1 = ioRead(ctx, BR.C);
-
-IN A,\(n\)
-	byte port = read8(ctx, ctx->PC++);	
-	BR.A = ioRead(ctx, port);
-
-INDR
-	do
-	{
-		%IND
-	} while(BR.B != 0);
-	SETFLAG(F_Z);
-	RESFLAG(F_5 | F_3 | F_S);
-
-IND
-	byte val = ioRead(ctx, BR.C);
-	write8(ctx, WR.HL, val);
-	WR.HL--;
-	BR.B = doIncDec(ctx, BR.B, ID_DEC);
-	VALFLAG(F_N, (val & 0x80) != 0);
-	
-INIR
-	do
-	{
-		%INI
-	} while(BR.B != 0);
-	SETFLAG(F_Z);
-	RESFLAG(F_5 | F_3 | F_S);
-
-INI
-	byte val = ioRead(ctx, BR.C);
-	write8(ctx, WR.HL, val);
-	WR.HL++;
-	BR.B = doIncDec(ctx, BR.B, ID_DEC);
-	VALFLAG(F_N, (val & 0x80) != 0);
-
-#
-# Loads
-#
-LD \((BC|DE|HL)\),A
-	write8(ctx, WR.%1, BR.A);
-
-LD \(HL\),(B|C|D|E|H|L)
-	write8(ctx, WR.HL, BR.%1);
-
-LD \(HL\),n
-	write8(ctx, WR.HL, read8(ctx, ctx->PC++));
-	
-LD \((IX|IY)\+d\),(A|B|C|D|E|H|L)
-	write8(ctx, WR.%1 + read8(ctx, ctx->PC++), BR.%2);
-	
-LD \((IX|IY)\+d\),n
-	write8(ctx, WR.%1 + read8(ctx, ctx->PC++), read8(ctx, ctx->PC++));
-	
-LD \(nn\),A
-	write8(ctx, read16(ctx, ctx->PC), BR.A);
-	ctx->PC += 2;
-	
-LD (BC|DE|HL|IX|IY|SP),(BC|DE|HL|IX|IY|SP)
-	WR.%1 = WR.%2;
-
-LD \(nn\),(BC|DE|HL|IX|IY|SP)
-	write16(ctx, read16(ctx, ctx->PC), WR.%1);
-	ctx->PC += 2;
-	
-LD A,\((BC|DE)\)
-	BR.A = read8(ctx, WR.%1);
-
-LD (A|B|C|D|E|H|L),\(HL\)
-	BR.%1 = read8(ctx, WR.HL);
-
-LD (A|B|C|D|E|H|L),\((IX|IY)\+d\)
-	BR.%1 = read8(ctx, WR.%2 + read8(ctx, ctx->PC++));
-
-LD (A|B|C|D|E|H|L),\(nn\)
-	BR.%1 = read8(ctx, read16(ctx, ctx->PC));
-	ctx->PC += 2;
-	
-LD (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl),(A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	BR.%1 = BR.%2;
-
-LD (A|B|C|D|E|H|L),(SL|SR)A \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	BR.%1 = do%2(ctx, read8(ctx, WR.%3 + off), 1);
-	write8(ctx, WR.%3 + off, BR.%1);	
-	
-LD (A|B|C|D|E|H|L),(SL|SR)L \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	BR.%1 = do%2(ctx, read8(ctx, WR.%3 + off), 0);
-	write8(ctx, WR.%3 + off, BR.%1);	
-	  
-LD (A|B|C|D|E|H|L),(RL|RLC|RR|RRC) \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	BR.%1 = do%2(ctx, 1, read8(ctx, WR.%3 + off));
-	write8(ctx, WR.%3 + off, BR.%1);
-
-LD (A|B|C|D|E|H|L),(SET|RES) ([0-7]),\((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);
-	BR.%1 = doSetRes(ctx, SR_%2, %3, read8(ctx, WR.%4 + off));
-	write8(ctx, WR.%4 + off, BR.%1);	
-
-LD A,(I|R)
-	BR.A = ctx->%1;
-		
-	adjustFlags(ctx, BR.A);
-	RESFLAG(F_H | F_N);
-	VALFLAG(F_PV, ctx->IFF2);
-	VALFLAG(F_S, (BR.A & 0x80) != 0);
-	VALFLAG(F_Z, (BR.A == 0));
-	
-LD (I|R),A
-	ctx->%1 = BR.A;
-
-LD (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl),n
-	BR.%1 = read8(ctx, ctx->PC++);
-	
-LD (BC|DE|HL|SP),\(nn\)
-	WR.%1 = read16(ctx, ctx->PC);
-	ctx->PC += 2;
-
-LD (BC|DE|HL|SP|IX|IY),\(nn\)
-	ushort addr = read16(ctx, ctx->PC);
-	ctx->PC += 2;
-	WR.%1 = read16(ctx, addr);	
-
-LD (BC|DE|HL|SP|IX|IY),nn
-	WR.%1 = read16(ctx, ctx->PC);
-	ctx->PC += 2;
-	
-
-LDIR
-	do
-	{
-		%LDI
-	} while (WR.BC);
-
-LDI
-	byte val = read8(ctx, WR.HL);
-	write8(ctx, WR.DE, val);
-	WR.DE++;
-	WR.HL++;
-	WR.BC--;
-	
-	VALFLAG(F_5, ((BR.A + val) & F_5) != 0);
-	VALFLAG(F_3, ((BR.A + val) & F_3) != 0);
-	RESFLAG(F_H | F_N);
-	VALFLAG(F_PV, WR.BC != 0);
-
-LDDR
-	do
-	{
-		%LDD
-	} while (WR.BC);
-
-LDD
-	byte val = read8(ctx, WR.HL);
-	write8(ctx, WR.DE, val);
-	WR.DE--;
-	WR.HL--;
-	WR.BC--;
-	
-	VALFLAG(F_5, ((BR.A + val) & F_5) != 0);
-	VALFLAG(F_3, ((BR.A + val) & F_3) != 0);
-	RESFLAG(F_H | F_N);
-	VALFLAG(F_PV, WR.BC != 0);
-	
-NEG
-	%CPL
-    doArithmetic(ctx, 1, 0, 0);
-	SETFLAG(F_N);
-
-NOP
-	/* NOP */
-	
-
-OUTI
-	ioWrite(ctx, BR.C, read8(ctx, WR.HL));
-	WR.HL++;
-	BR.B = doIncDec(ctx, BR.B, 1);
-
-OTIR
-	do
-	{
-		%OUTI
-	} while (BR.B);
-	SETFLAG(F_Z);
-	RESFLAG(F_S | F_5 | F_3);
-
-
-OUTD
-	ioWrite(ctx, BR.C, read8(ctx, WR.HL));
-	WR.HL--;
-	BR.B = doIncDec(ctx, BR.B, 1);
-
-OTDR
-	do
-	{
-		%OUTD
-	} while (BR.B);
-	SETFLAG(F_Z);
-	RESFLAG(F_S | F_5 | F_3);
-
-OUT \(C\),0
-	ioWrite(ctx, BR.C, 0);
-	
-OUT \(C\),(A|B|C|D|E|H|L)
-	ioWrite(ctx, BR.C, BR.%1);
-
-OUT \(n\),A
-	ioWrite(ctx, read8(ctx, ctx->PC++), BR.A);
-
-POP (AF|BC|DE|HL|IX|IY)
-	WR.%1 = doPop(ctx);
-
-PUSH (AF|BC|DE|HL|IX|IY)
-	doPush(ctx, WR.%1);
-
-
-#
-# Rotate & shift
-#
-
-(RLC|RRC|RL|RR) \(HL\)
-	write8(ctx, WR.HL, do%1(ctx, 1, read8(ctx, WR.HL)));
-	
-(RLC|RRC|RL|RR) (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	BR.%2 = do%1(ctx, 1, read8(ctx, WR.HL));
-
-(RLC|RRC|RL|RR) \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);	
-	write8(ctx, WR.%2 + off, do%1(ctx, 1, read8(ctx, WR.%2 + off)));
-
-(RL|RR|RLC|RRC)A
-	BR.A = do%1(ctx, 0, BR.A);
-	
-	
-RLD
-	byte Ah = BR.A & 0xF0;
-	byte hl = read8(ctx, WR.HL);
-	
-	BR.A = (BR.A & 0x0F) | ((hl & 0x0F) << 4);
-	hl = (hl << 4) | Ah;
-	write8(ctx, WR.HL, hl);
-	
-	
-RRD
-	byte Ah = BR.A & 0xF0;
-	byte hl = read8(ctx, WR.HL);
-	
-	BR.A = (BR.A & 0x0F) | (hl & 0xF0);
-	hl = (hl >> 4) | (Ah << 4);
-	
-	write8(ctx, WR.HL, hl);
-	
-	
-(SL|SR)(L|A) \(HL\)
-	write8(ctx, WR.HL, do%1(ctx, read8(ctx, WR.HL), IA_%2));
-
-
-(SL|SR)(L|A) \((IX|IY)\+d\)
-	byte off = read8(ctx, ctx->PC++);	
-	write8(ctx, WR.%3 + off, do%1(ctx, read8(ctx, WR.%3 + off), IA_%2));
-
-(SL|SR)(L|A) (A|B|C|D|E|H|L|IXh|IXl|IYh|IYl)
-	BR.%3 = do%1(ctx, BR.%3, IA_%2);
-	

libz80/codegen/mktables.vcxproj

-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{3F6D39DD-0EF7-40DD-AD8D-006D4EAA1DA8}</ProjectGuid>
-    <RootNamespace>mktables</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup />
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(GNU_ROOT)\include</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Console</SubSystem>
-      <LargeAddressAware>true</LargeAddressAware>
-      <AdditionalLibraryDirectories>$(GNU_ROOT)\lib</AdditionalLibraryDirectories>
-      <AdditionalDependencies>regex.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(GNU_ROOT)\bin\regex2.dll" "$(OutDir)"</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>$(GNU_ROOT)\include</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <SubSystem>Console</SubSystem>
-      <LargeAddressAware>true</LargeAddressAware>
-      <AdditionalLibraryDirectories>$(GNU_ROOT)\lib</AdditionalLibraryDirectories>
-      <AdditionalDependencies>regex.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(GNU_ROOT)\bin\regex2.dll" "$(OutDir)"</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="mktables.c" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

libz80/codegen/mktables.vcxproj.filters

-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="mktables.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-</Project>

libz80/codegen/opcodes.lst

-8E         ADC A,(HL)
-DD8E d     ADC A,(IX+d)
-FD8E d     ADC A,(IY+d)
-8F         ADC A,A
-88         ADC A,B
-89         ADC A,C
-8A         ADC A,D
-8B         ADC A,E
-8C         ADC A,H
-DD8C       ADC A,IXh
-DD8D       ADC A,IXl
-FD8C       ADC A,IYh
-FD8D       ADC A,IYl
-8D         ADC A,L
-CE n       ADC A,n
-ED4A       ADC HL,BC
-ED5A       ADC HL,DE
-ED6A       ADC HL,HL
-ED7A       ADC HL,SP
-86         ADD A,(HL)
-DD86 d     ADD A,(IX+d)
-FD86 d     ADD A,(IY+d)
-87         ADD A,A
-80         ADD A,B
-81         ADD A,C
-82         ADD A,D
-83         ADD A,E
-84         ADD A,H
-DD84       ADD A,IXh
-DD85       ADD A,IXl
-FD84       ADD A,IYh
-FD85       ADD A,IYl
-85         ADD A,L
-C6 n       ADD A,n
-09         ADD HL,BC
-19         ADD HL,DE
-29         ADD HL,HL
-39         ADD HL,SP
-DD09       ADD IX,BC
-DD19       ADD IX,DE
-DD29       ADD IX,IX
-DD39       ADD IX,SP
-FD09       ADD IY,BC
-FD19       ADD IY,DE
-FD29       ADD IY,IY
-FD39       ADD IY,SP
-A6         AND (HL)
-DDA6 d     AND (IX+d)
-FDA6 d     AND (IY+d)
-A7         AND A
-A0         AND B
-A1         AND C
-A2         AND D
-A3         AND E
-A4         AND H
-DDA4       AND IXh
-DDA5       AND IXl
-FDA4       AND IYh
-FDA5       AND IYl
-A5         AND L
-E6 n       AND n
-CB46       BIT 0,(HL)
-DDCB d 46  BIT 0,(IX+d)
-DDCB d 41  BIT 0,(IX+d)
-DDCB d 47  BIT 0,(IX+d)
-DDCB d 42  BIT 0,(IX+d)
-DDCB d 43  BIT 0,(IX+d)
-DDCB d 44  BIT 0,(IX+d)
-DDCB d 40  BIT 0,(IX+d)
-DDCB d 45  BIT 0,(IX+d)
-FDCB d 46  BIT 0,(IY+d)
-FDCB d 40  BIT 0,(IY+d)
-FDCB d 47  BIT 0,(IY+d)
-FDCB d 43  BIT 0,(IY+d)
-FDCB d 41  BIT 0,(IY+d)
-FDCB d 45  BIT 0,(IY+d)
-FDCB d 42  BIT 0,(IY+d)
-FDCB d 44  BIT 0,(IY+d)
-CB47       BIT 0,A
-CB40       BIT 0,B
-CB41       BIT 0,C
-CB42       BIT 0,D
-CB43       BIT 0,E
-CB44       BIT 0,H
-CB45       BIT 0,L
-CB4E       BIT 1,(HL)
-DDCB d 4E  BIT 1,(IX+d)
-DDCB d 4B  BIT 1,(IX+d)
-DDCB d 4F  BIT 1,(IX+d)
-DDCB d 4A  BIT 1,(IX+d)
-DDCB d 4C  BIT 1,(IX+d)
-DDCB d 49  BIT 1,(IX+d)
-DDCB d 48  BIT 1,(IX+d)
-DDCB d 4D  BIT 1,(IX+d)
-FDCB d 4E  BIT 1,(IY+d)
-FDCB d 48  BIT 1,(IY+d)
-FDCB d 4F  BIT 1,(IY+d)
-FDCB d 4D  BIT 1,(IY+d)
-FDCB d 4C  BIT 1,(IY+d)
-FDCB d 4B  BIT 1,(IY+d)
-FDCB d 4A  BIT 1,(IY+d)
-FDCB d 49  BIT 1,(IY+d)
-CB4F       BIT 1,A
-CB48       BIT 1,B
-CB49       BIT 1,C
-CB4A       BIT 1,D
-CB4B       BIT 1,E
-CB4C       BIT 1,H
-CB4D       BIT 1,L
-CB56       BIT 2,(HL)
-DDCB d 56  BIT 2,(IX+d)
-DDCB d 53  BIT 2,(IX+d)
-DDCB d 52  BIT 2,(IX+d)
-DDCB d 51  BIT 2,(IX+d)
-DDCB d 54  BIT 2,(IX+d)
-DDCB d 55  BIT 2,(IX+d)
-DDCB d 57  BIT 2,(IX+d)
-DDCB d 50  BIT 2,(IX+d)
-FDCB d 56  BIT 2,(IY+d)
-FDCB d 53  BIT 2,(IY+d)
-FDCB d 57  BIT 2,(IY+d)
-FDCB d 55  BIT 2,(IY+d)
-FDCB d 50  BIT 2,(IY+d)
-FDCB d 51  BIT 2,(IY+d)
-FDCB d 52  BIT 2,(IY+d)
-FDCB d 54  BIT 2,(IY+d)
-CB57       BIT 2,A
-CB50       BIT 2,B
-CB51       BIT 2,C
-CB52       BIT 2,D
-CB53       BIT 2,E
-CB54       BIT 2,H
-CB55       BIT 2,L
-CB5E       BIT 3,(HL)
-DDCB d 5E  BIT 3,(IX+d)
-DDCB d 58  BIT 3,(IX+d)
-DDCB d 5A  BIT 3,(IX+d)
-DDCB d 59  BIT 3,(IX+d)
-DDCB d 5B  BIT 3,(IX+d)
-DDCB d 5F  BIT 3,(IX+d)
-DDCB d 5D  BIT 3,(IX+d)
-DDCB d 5C  BIT 3,(IX+d)
-FDCB d 5E  BIT 3,(IY+d)
-FDCB d 5B  BIT 3,(IY+d)
-FDCB d 5A  BIT 3,(IY+d)
-FDCB d 5F  BIT 3,(IY+d)
-FDCB d 58  BIT 3,(IY+d)
-FDCB d 5C  BIT 3,(IY+d)
-FDCB d 59  BIT 3,(IY+d)
-FDCB d 5D  BIT 3,(IY+d)
-CB5F       BIT 3,A
-CB58       BIT 3,B
-CB59       BIT 3,C
-CB5A       BIT 3,D
-CB5B       BIT 3,E
-CB5C       BIT 3,H
-CB5D       BIT 3,L
-CB66       BIT 4,(HL)
-DDCB d 66  BIT 4,(IX+d)
-DDCB d 60  BIT 4,(IX+d)
-DDCB d 62  BIT 4,(IX+d)
-DDCB d 61  BIT 4,(IX+d)
-DDCB d 65  BIT 4,(IX+d)
-DDCB d 63  BIT 4,(IX+d)
-DDCB d 64  BIT 4,(IX+d)
-DDCB d 67  BIT 4,(IX+d)
-FDCB d 66  BIT 4,(IY+d)
-FDCB d 60  BIT 4,(IY+d)
-FDCB d 64  BIT 4,(IY+d)
-FDCB d 62  BIT 4,(IY+d)
-FDCB d 65  BIT 4,(IY+d)
-FDCB d 61  BIT 4,(IY+d)
-FDCB d 63  BIT 4,(IY+d)
-FDCB d 67  BIT 4,(IY+d)
-CB67       BIT 4,A
-CB60       BIT 4,B
-CB61       BIT 4,C
-CB62       BIT 4,D
-CB63       BIT 4,E
-CB64       BIT 4,H
-CB65       BIT 4,L
-CB6E       BIT 5,(HL)
-DDCB d 6E  BIT 5,(IX+d)
-DDCB d 69  BIT 5,(IX+d)
-DDCB d 6D  BIT 5,(IX+d)
-DDCB d 6F  BIT 5,(IX+d)
-DDCB d 68  BIT 5,(IX+d)
-DDCB d 6C  BIT 5,(IX+d)
-DDCB d 6B  BIT 5,(IX+d)
-DDCB d 6A  BIT 5,(IX+d)
-FDCB d 6E  BIT 5,(IY+d)
-FDCB d 69  BIT 5,(IY+d)
-FDCB d 68  BIT 5,(IY+d)
-FDCB d 6D  BIT 5,(IY+d)
-FDCB d 6A  BIT 5,(IY+d)
-FDCB d 6F  BIT 5,(IY+d)
-FDCB d 6B  BIT 5,(IY+d)
-FDCB d 6C  BIT 5,(IY+d)
-CB6F       BIT 5,A
-CB68       BIT 5,B
-CB69       BIT 5,C
-CB6A       BIT 5,D
-CB6B       BIT 5,E
-CB6C       BIT 5,H
-CB6D       BIT 5,L
-CB76       BIT 6,(HL)
-DDCB d 76  BIT 6,(IX+d)
-DDCB d 77  BIT 6,(IX+d)
-DDCB d 75  BIT 6,(IX+d)
-DDCB d 74  BIT 6,(IX+d)
-DDCB d 73  BIT 6,(IX+d)
-DDCB d 71  BIT 6,(IX+d)
-DDCB d 70  BIT 6,(IX+d)
-DDCB d 72  BIT 6,(IX+d)
-FDCB d 76  BIT 6,(IY+d)
-FDCB d 73  BIT 6,(IY+d)
-FDCB d 70  BIT 6,(IY+d)
-FDCB d 75  BIT 6,(IY+d)
-FDCB d 74  BIT 6,(IY+d)
-FDCB d 72  BIT 6,(IY+d)
-FDCB d 77  BIT 6,(IY+d)
-FDCB d 71  BIT 6,(IY+d)
-CB77       BIT 6,A
-CB70       BIT 6,B
-CB71       BIT 6,C
-CB72       BIT 6,D
-CB73       BIT 6,E
-CB74       BIT 6,H
-CB75       BIT 6,L
-CB7E       BIT 7,(HL)
-DDCB d 7E  BIT 7,(IX+d)
-DDCB d 7B  BIT 7,(IX+d)
-DDCB d 79  BIT 7,(IX+d)
-DDCB d 7F  BIT 7,(IX+d)
-DDCB d 7C  BIT 7,(IX+d)
-DDCB d 7A  BIT 7,(IX+d)
-DDCB d 7D  BIT 7,(IX+d)
-DDCB d 78  BIT 7,(IX+d)
-FDCB d 7E  BIT 7,(IY+d)
-FDCB d 78  BIT 7,(IY+d)
-FDCB d 7A  BIT 7,(IY+d)
-FDCB d 7F  BIT 7,(IY+d)
-FDCB d 7C  BIT 7,(IY+d)
-FDCB d 7B  BIT 7,(IY+d)
-FDCB d 79  BIT 7,(IY+d)
-FDCB d 7D  BIT 7,(IY+d)
-CB7F       BIT 7,A
-CB78       BIT 7,B
-CB79       BIT 7,C
-CB7A       BIT 7,D
-CB7B       BIT 7,E
-CB7C       BIT 7,H
-CB7D       BIT 7,L
-CD nn      CALL (nn)
-DC nn      CALL C,(nn)
-FC nn      CALL M,(nn)
-D4 nn      CALL NC,(nn)
-C4 nn      CALL NZ,(nn)
-F4 nn      CALL P,(nn)
-EC nn      CALL PE,(nn)
-E4 nn      CALL PO,(nn)
-CC nn      CALL Z,(nn)
-3F         CCF
-BE         CP (HL)
-DDBE d     CP (IX+d)
-FDBE d     CP (IY+d)
-BF         CP A
-B8         CP B
-B9         CP C
-BA         CP D
-BB         CP E
-BC         CP H
-DDBC       CP IXh
-DDBD       CP IXl
-FDBC       CP IYh
-FDBD       CP IYl
-BD         CP L
-FE n       CP n
-EDA9       CPD
-EDB9       CPDR
-EDA1       CPI
-EDB1       CPIR
-2F         CPL
-27         DAA
-35         DEC (HL)
-DD35 d     DEC (IX+d)
-FD35 d     DEC (IY+d)
-3D         DEC A
-05         DEC B
-0B         DEC BC
-0D         DEC C
-15         DEC D
-1B         DEC DE
-1D         DEC E
-25         DEC H
-2B         DEC HL
-DD2B       DEC IX
-DD25       DEC IXh
-DD2D       DEC IXl
-FD2B       DEC IY
-FD25       DEC IYh
-FD2D       DEC IYl
-2D         DEC L
-3B         DEC SP
-F3         DI
-10 e       DJNZ (PC+e) 
-FB         EI
-E3         EX (SP),HL
-DDE3       EX (SP),IX
-FDE3       EX (SP),IY
-08         EX AF,AF'
-EB         EX DE,HL
-D9         EXX
-76         HALT
-ED46       IM 0
-ED6E       IM 0
-ED4E       IM 0
-ED66       IM 0
-ED56       IM 1
-ED76       IM 1
-ED5E       IM 2
-ED7E       IM 2
-ED78       IN A,(C)
-DB n       IN A,(n)
-ED40       IN B,(C)
-ED48       IN C,(C)
-ED50       IN D,(C)
-ED58       IN E,(C)
-ED70       IN F,(C)
-ED60       IN H,(C)
-ED68       IN L,(C)
-34         INC (HL)
-DD34 d     INC (IX+d)
-FD34 d     INC (IY+d)
-3C         INC A
-04         INC B
-03         INC BC
-0C         INC C
-14         INC D
-13         INC DE
-1C         INC E
-24         INC H
-23         INC HL
-DD23       INC IX
-DD24       INC IXh
-DD2C       INC IXl
-FD23       INC IY
-FD24       INC IYh
-FD2C       INC IYl
-2C         INC L
-33         INC SP
-EDAA       IND
-EDBA       INDR
-EDA2       INI
-EDB2       INIR
-E9         JP (HL)
-DDE9       JP (IX)
-FDE9       JP (IY)
-C3 nn      JP (nn)
-DA nn      JP C,(nn)
-FA nn      JP M,(nn)
-D2 nn      JP NC,(nn)
-C2 nn      JP NZ,(nn)
-F2 nn      JP P,(nn)
-EA nn      JP PE,(nn)
-E2 nn      JP PO,(nn)
-CA nn      JP Z,(nn)
-18 e       JR (PC+e)
-38 e       JR C,(PC+e)
-30 e       JR NC,(PC+e)
-20 e       JR NZ,(PC+e)
-28 e       JR Z,(PC+e)
-02         LD (BC),A
-12         LD (DE),A
-77         LD (HL),A
-70         LD (HL),B
-71         LD (HL),C
-72         LD (HL),D
-73         LD (HL),E
-74         LD (HL),H
-75         LD (HL),L
-36 n       LD (HL),n
-DD77 d     LD (IX+d),A
-DD70 d     LD (IX+d),B
-DD71 d     LD (IX+d),C
-DD72 d     LD (IX+d),D
-DD73 d     LD (IX+d),E
-DD74 d     LD (IX+d),H
-DD75 d     LD (IX+d),L
-DD36 d n   LD (IX+d),n
-FD77 d     LD (IY+d),A
-FD70 d     LD (IY+d),B
-FD71 d     LD (IY+d),C
-FD72 d     LD (IY+d),D
-FD73 d     LD (IY+d),E
-FD74 d     LD (IY+d),H
-FD75 d     LD (IY+d),L
-FD36 d n   LD (IY+d),n
-32 nn      LD (nn),A
-ED43 nn    LD (nn),BC
-ED53 nn    LD (nn),DE
-ED63 nn    LD (nn),HL
-22 nn      LD (nn),HL
-DD22 nn    LD (nn),IX
-FD22 nn    LD (nn),IY
-ED73 nn    LD (nn),SP
-0A         LD A,(BC)
-1A         LD A,(DE)
-7E         LD A,(HL)
-DD7E d     LD A,(IX+d)
-FD7E d     LD A,(IY+d)
-3A nn      LD A,(nn)
-7F         LD A,A
-78         LD A,B
-79         LD A,C
-7A         LD A,D
-7B         LD A,E
-7C         LD A,H
-ED57       LD A,I
-DD7C       LD A,IXh
-DD7D       LD A,IXl
-FD7C       LD A,IYh
-FD7D       LD A,IYl
-7D         LD A,L
-3E n       LD A,n
-ED5F       LD A,R
-DDCB d 87  LD A,RES 0,(IX+d)
-FDCB d 87  LD A,RES 0,(IY+d)
-DDCB d 8F  LD A,RES 1,(IX+d)
-FDCB d 8F  LD A,RES 1,(IY+d)
-DDCB d 97  LD A,RES 2,(IX+d)
-FDCB d 97  LD A,RES 2,(IY+d)
-DDCB d 9F  LD A,RES 3,(IX+d)
-FDCB d 9F  LD A,RES 3,(IY+d)
-DDCB d A7  LD A,RES 4,(IX+d)
-FDCB d A7  LD A,RES 4,(IY+d)
-DDCB d AF  LD A,RES 5,(IX+d)
-FDCB d AF  LD A,RES 5,(IY+d)
-DDCB d B7  LD A,RES 6,(IX+d)
-FDCB d B7  LD A,RES 6,(IY+d)
-DDCB d BF  LD A,RES 7,(IX+d)
-FDCB d BF  LD A,RES 7,(IY+d)
-DDCB d 17  LD A,RL (IX+d)
-FDCB d 17  LD A,RL (IY+d)
-DDCB d 07  LD A,RLC (IX+d)
-FDCB d 07  LD A,RLC (IY+d)
-DDCB d 1F  LD A,RR (IX+d)
-FDCB d 1F  LD A,RR (IY+d)
-DDCB d 0F  LD A,RRC (IX+d)
-FDCB d 0F  LD A,RRC (IY+d)
-DDCB d C7  LD A,SET 0,(IX+d)
-FDCB d C7  LD A,SET 0,(IY+d)
-DDCB d CF  LD A,SET 1,(IX+d)
-FDCB d CF  LD A,SET 1,(IY+d)
-DDCB d D7  LD A,SET 2,(IX+d)
-FDCB d D7  LD A,SET 2,(IY+d)
-DDCB d DF  LD A,SET 3,(IX+d)
-FDCB d DF  LD A,SET 3,(IY+d)
-DDCB d E7  LD A,SET 4,(IX+d)
-FDCB d E7  LD A,SET 4,(IY+d)
-DDCB d EF  LD A,SET 5,(IX+d)
-FDCB d EF  LD A,SET 5,(IY+d)
-DDCB d F7  LD A,SET 6,(IX+d)
-FDCB d F7  LD A,SET 6,(IY+d)
-DDCB d FF  LD A,SET 7,(IX+d)
-FDCB d FF  LD A,SET 7,(IY+d)
-DDCB d 27  LD A,SLA (IX+d)
-FDCB d 27  LD A,SLA (IY+d)
-DDCB d 37  LD A,SLL (IX+d)
-FDCB d 37  LD A,SLL (IY+d)
-DDCB d 2F  LD A,SRA (IX+d)
-FDCB d 2F  LD A,SRA (IY+d)
-DDCB d 3F  LD A,SRL (IX+d)
-FDCB d 3F  LD A,SRL (IY+d)
-46         LD B,(HL)
-DD46 d     LD B,(IX+d)
-FD46 d     LD B,(IY+d)
-47         LD B,A
-40         LD B,B
-41         LD B,C
-42         LD B,D
-43         LD B,E
-44         LD B,H
-DD44       LD B,IXh
-DD45       LD B,IXl
-FD44       LD B,IYh
-FD45       LD B,IYl
-45         LD B,L
-06 n       LD B,n
-DDCB d 80  LD B,RES 0,(IX+d)
-FDCB d 80  LD B,RES 0,(IY+d)
-DDCB d 88  LD B,RES 1,(IX+d)
-FDCB d 88  LD B,RES 1,(IY+d)
-DDCB d 90  LD B,RES 2,(IX+d)
-FDCB d 90  LD B,RES 2,(IY+d)
-DDCB d 98  LD B,RES 3,(IX+d)
-FDCB d 98  LD B,RES 3,(IY+d)
-DDCB d A0  LD B,RES 4,(IX+d)
-FDCB d A0  LD B,RES 4,(IY+d)
-DDCB d A8  LD B,RES 5,(IX+d)
-FDCB d A8  LD B,RES 5,(IY+d)
-DDCB d B0  LD B,RES 6,(IX+d)
-FDCB d B0  LD B,RES 6,(IY+d)
-DDCB d B8  LD B,RES 7,(IX+d)
-FDCB d B8  LD B,RES 7,(IY+d)
-DDCB d 10  LD B,RL (IX+d)
-FDCB d 10  LD B,RL (IY+d)
-DDCB d 00  LD B,RLC (IX+d)
-FDCB d 00  LD B,RLC (IY+d)
-DDCB d 18  LD B,RR (IX+d)
-FDCB d 18  LD B,RR (IY+d)
-DDCB d 08  LD B,RRC (IX+d)
-FDCB d 08  LD B,RRC (IY+d)
-DDCB d C0  LD B,SET 0,(IX+d)
-FDCB d C0  LD B,SET 0,(IY+d)
-DDCB d C8  LD B,SET 1,(IX+d)
-FDCB d C8  LD B,SET 1,(IY+d)
-DDCB d D0  LD B,SET 2,(IX+d)
-FDCB d D0  LD B,SET 2,(IY+d)
-DDCB d D8  LD B,SET 3,(IX+d)
-FDCB d D8  LD B,SET 3,(IY+d)
-DDCB d E0  LD B,SET 4,(IX+d)
-FDCB d E0  LD B,SET 4,(IY+d)
-DDCB d E8  LD B,SET 5,(IX+d)
-FDCB d E8  LD B,SET 5,(IY+d)
-DDCB d F0  LD B,SET 6,(IX+d)
-FDCB d F0  LD B,SET 6,(IY+d)
-DDCB d F8  LD B,SET 7,(IX+d)
-FDCB d F8  LD B,SET 7,(IY+d)
-DDCB d 20  LD B,SLA (IX+d)
-FDCB d 20  LD B,SLA (IY+d)
-DDCB d 30  LD B,SLL (IX+d)
-FDCB d 30  LD B,SLL (IY+d)
-DDCB d 28  LD B,SRA (IX+d)
-FDCB d 28  LD B,SRA (IY+d)
-DDCB d 38  LD B,SRL (IX+d)
-FDCB d 38  LD B,SRL (IY+d)
-ED4B nn    LD BC,(nn)
-01 nn      LD BC,nn
-4E         LD C,(HL)
-DD4E d     LD C,(IX+d)
-FD4E d     LD C,(IY+d)
-4F         LD C,A
-48         LD C,B
-49         LD C,C
-4A         LD C,D
-4B         LD C,E
-4C         LD C,H
-DD4C       LD C,IXh
-DD4D       LD C,IXl
-FD4C       LD C,IYh
-FD4D       LD C,IYl
-4D         LD C,L
-0E n       LD C,n
-DDCB d 81  LD C,RES 0,(IX+d)
-FDCB d 81  LD C,RES 0,(IY+d)
-DDCB d 89  LD C,RES 1,(IX+d)
-FDCB d 89  LD C,RES 1,(IY+d)
-DDCB d 91  LD C,RES 2,(IX+d)
-FDCB d 91  LD C,RES 2,(IY+d)
-DDCB d 99  LD C,RES 3,(IX+d)
-FDCB d 99  LD C,RES 3,(IY+d)
-DDCB d A1  LD C,RES 4,(IX+d)
-FDCB d A1  LD C,RES 4,(IY+d)
-DDCB d A9  LD C,RES 5,(IX+d)
-FDCB d A9  LD C,RES 5,(IY+d)
-DDCB d B1  LD C,RES 6,(IX+d)
-FDCB d B1  LD C,RES 6,(IY+d)
-DDCB d B9  LD C,RES 7,(IX+d)
-FDCB d B9  LD C,RES 7,(IY+d)
-DDCB d 11  LD C,RL (IX+d)
-FDCB d 11  LD C,RL (IY+d)
-DDCB d 01  LD C,RLC (IX+d)
-FDCB d 01  LD C,RLC (IY+d)
-DDCB d 19  LD C,RR (IX+d)
-FDCB d 19  LD C,RR (IY+d)
-DDCB d 09  LD C,RRC (IX+d)
-FDCB d 09  LD C,RRC (IY+d)
-DDCB d C1  LD C,SET 0,(IX+d)
-FDCB d C1  LD C,SET 0,(IY+d)
-DDCB d C9  LD C,SET 1,(IX+d)
-FDCB d C9  LD C,SET 1,(IY+d)
-DDCB d D1  LD C,SET 2,(IX+d)
-FDCB d D1  LD C,SET 2,(IY+d)
-DDCB d D9  LD C,SET 3,(IX+d)
-FDCB d D9  LD C,SET 3,(IY+d)
-DDCB d E1  LD C,SET 4,(IX+d)
-FDCB d E1  LD C,SET 4,(IY+d)
-DDCB d E9  LD C,SET 5,(IX+d)
-FDCB d E9  LD C,SET 5,(IY+d)
-DDCB d F1  LD C,SET 6,(IX+d)
-FDCB d F1  LD C,SET 6,(IY+d)
-DDCB d F9  LD C,SET 7,(IX+d)
-FDCB d F9  LD C,SET 7,(IY+d)
-DDCB d 21  LD C,SLA (IX+d)
-FDCB d 21  LD C,SLA (IY+d)
-DDCB d 31  LD C,SLL (IX+d)
-FDCB d 31  LD C,SLL (IY+d)
-DDCB d 29  LD C,SRA (IX+d)
-FDCB d 29  LD C,SRA (IY+d)
-DDCB d 39  LD C,SRL (IX+d)
-FDCB d 39  LD C,SRL (IY+d)
-56         LD D,(HL)
-DD56 d     LD D,(IX+d)
-FD56 d     LD D,(IY+d)
-57         LD D,A
-50         LD D,B
-51         LD D,C
-52         LD D,D
-53         LD D,E
-54         LD D,H
-DD54       LD D,IXh
-DD55       LD D,IXl
-FD54       LD D,IYh
-FD55       LD D,IYl
-55         LD D,L
-16 n       LD D,n
-DDCB d 82  LD D,RES 0,(IX+d)
-FDCB d 82  LD D,RES 0,(IY+d)
-DDCB d 8A  LD D,RES 1,(IX+d)
-FDCB d 8A  LD D,RES 1,(IY+d)
-DDCB d 92  LD D,RES 2,(IX+d)
-FDCB d 92  LD D,RES 2,(IY+d)
-DDCB d 9A  LD D,RES 3,(IX+d)
-FDCB d 9A  LD D,RES 3,(IY+d)
-DDCB d A2  LD D,RES 4,(IX+d)
-FDCB d A2  LD D,RES 4,(IY+d)
-DDCB d AA  LD D,RES 5,(IX+d)
-FDCB d AA  LD D,RES 5,(IY+d)
-DDCB d B2  LD D,RES 6,(IX+d)
-FDCB d B2  LD D,RES 6,(IY+d)
-DDCB d BA  LD D,RES 7,(IX+d)
-FDCB d BA  LD D,RES 7,(IY+d)
-DDCB d 12  LD D,RL (IX+d)
-FDCB d 12  LD D,RL (IY+d)
-DDCB d 02  LD D,RLC (IX+d)
-FDCB d 02  LD D,RLC (IY+d)
-DDCB d 1A  LD D,RR (IX+d)
-FDCB d 1A  LD D,RR (IY+d)
-DDCB d 0A  LD D,RRC (IX+d)
-FDCB d 0A  LD D,RRC (IY+d)
-DDCB d C2  LD D,SET 0,(IX+d)
-FDCB d C2  LD D,SET 0,(IY+d)
-DDCB d CA  LD D,SET 1,(IX+d)
-FDCB d CA  LD D,SET 1,(IY+d)
-DDCB d D2  LD D,SET 2,(IX+d)
-FDCB d D2  LD D,SET 2,(IY+d)
-DDCB d DA  LD D,SET 3,(IX+d)
-FDCB d DA  LD D,SET 3,(IY+d)
-DDCB d E2  LD D,SET 4,(IX+d)
-FDCB d E2  LD D,SET 4,(IY+d)
-DDCB d EA  LD D,SET 5,(IX+d)
-FDCB d EA  LD D,SET 5,(IY+d)
-DDCB d F2  LD D,SET 6,(IX+d)
-FDCB d F2  LD D,SET 6,(IY+d)
-DDCB d FA  LD D,SET 7,(IX+d)
-FDCB d FA  LD D,SET 7,(IY+d)
-DDCB d 22  LD D,SLA (IX+d)
-FDCB d 22  LD D,SLA (IY+d)
-DDCB d 32  LD D,SLL (IX+d)
-FDCB d 32  LD D,SLL (IY+d)
-DDCB d 2A  LD D,SRA (IX+d)
-FDCB d 2A  LD D,SRA (IY+d)
-DDCB d 3A  LD D,SRL (IX+d)
-FDCB d 3A  LD D,SRL (IY+d)
-ED5B nn    LD DE,(nn)
-11 nn      LD DE,nn
-5E         LD E,(HL)
-DD5E d     LD E,(IX+d)
-FD5E d     LD E,(IY+d)
-5F         LD E,A
-58         LD E,B
-59         LD E,C
-5A         LD E,D
-5B         LD E,E
-5C         LD E,H
-DD5C       LD E,IXh
-DD5D       LD E,IXl
-FD5C       LD E,IYh
-FD5D       LD E,IYl
-5D         LD E,L
-1E n       LD E,n
-DDCB d 83  LD E,RES 0,(IX+d)
-FDCB d 83  LD E,RES 0,(IY+d)
-DDCB d 8B  LD E,RES 1,(IX+d)
-FDCB d 8B  LD E,RES 1,(IY+d)
-DDCB d 93  LD E,RES 2,(IX+d)
-FDCB d 93  LD E,RES 2,(IY+d)
-DDCB d 9B  LD E,RES 3,(IX+d)
-FDCB d 9B  LD E,RES 3,(IY+d)
-DDCB d A3  LD E,RES 4,(IX+d)
-FDCB d A3  LD E,RES 4,(IY+d)
-DDCB d AB  LD E,RES 5,(IX+d)
-FDCB d AB  LD E,RES 5,(IY+d)
-DDCB d B3  LD E,RES 6,(IX+d)
-FDCB d B3  LD E,RES 6,(IY+d)
-DDCB d BB  LD E,RES 7,(IX+d)
-FDCB d BB  LD E,RES 7,(IY+d)
-DDCB d 13  LD E,RL (IX+d)
-FDCB d 13  LD E,RL (IY+d)
-DDCB d 03  LD E,RLC (IX+d)
-FDCB d 03  LD E,RLC (IY+d)
-DDCB d 1B  LD E,RR (IX+d)
-FDCB d 1B  LD E,RR (IY+d)
-DDCB d 0B  LD E,RRC (IX+d)
-FDCB d 0B  LD E,RRC (IY+d)
-DDCB d C3  LD E,SET 0,(IX+d)
-FDCB d C3  LD E,SET 0,(IY+d)
-DDCB d CB  LD E,SET 1,(IX+d)
-FDCB d CB  LD E,SET 1,(IY+d)
-DDCB d D3  LD E,SET 2,(IX+d)
-FDCB d D3  LD E,SET 2,(IY+d)
-DDCB d DB  LD E,SET 3,(IX+d)
-FDCB d DB  LD E,SET 3,(IY+d)
-DDCB d E3  LD E,SET 4,(IX+d)
-FDCB d E3  LD E,SET 4,(IY+d)
-DDCB d EB  LD E,SET 5,(IX+d)
-FDCB d EB  LD E,SET 5,(IY+d)
-DDCB d F3  LD E,SET 6,(IX+d)
-FDCB d F3  LD E,SET 6,(IY+d)
-DDCB d FB  LD E,SET 7,(IX+d)
-FDCB d FB  LD E,SET 7,(IY+d)
-DDCB d 23  LD E,SLA (IX+d)
-FDCB d 23  LD E,SLA (IY+d)
-DDCB d 33  LD E,SLL (IX+d)
-FDCB d 33  LD E,SLL (IY+d)
-DDCB d 2B  LD E,SRA (IX+d)
-FDCB d 2B  LD E,SRA (IY+d)
-DDCB d 3B  LD E,SRL (IX+d)
-FDCB d 3B  LD E,SRL (IY+d)
-66         LD H,(HL)
-DD66 d     LD H,(IX+d)
-FD66 d     LD H,(IY+d)
-67         LD H,A
-60         LD H,B
-61         LD H,C
-62         LD H,D
-63         LD H,E
-64         LD H,H
-65         LD H,L
-26 n       LD H,n
-DDCB d 84  LD H,RES 0,(IX+d)
-FDCB d 84  LD H,RES 0,(IY+d)
-DDCB d 8C  LD H,RES 1,(IX+d)
-FDCB d 8C  LD H,RES 1,(IY+d)
-DDCB d 94  LD H,RES 2,(IX+d)
-FDCB d 94  LD H,RES 2,(IY+d)
-DDCB d 9C  LD H,RES 3,(IX+d)
-FDCB d 9C  LD H,RES 3,(IY+d)
-DDCB d A4  LD H,RES 4,(IX+d)
-FDCB d A4  LD H,RES 4,(IY+d)
-DDCB d AC  LD H,RES 5,(IX+d)
-FDCB d AC  LD H,RES 5,(IY+d)
-DDCB d B4  LD H,RES 6,(IX+d)
-FDCB d B4  LD H,RES 6,(IY+d)
-DDCB d BC  LD H,RES 7,(IX+d)
-FDCB d BC  LD H,RES 7,(IY+d)
-DDCB d 14  LD H,RL (IX+d)
-FDCB d 14  LD H,RL (IY+d)
-DDCB d 04  LD H,RLC (IX+d)
-FDCB d 04  LD H,RLC (IY+d)
-DDCB d 1C  LD H,RR (IX+d)
-FDCB d 1C  LD H,RR (IY+d)
-DDCB d 0C  LD H,RRC (IX+d)
-FDCB d 0C  LD H,RRC (IY+d)
-DDCB d C4  LD H,SET 0,(IX+d)
-FDCB d C4  LD H,SET 0,(IY+d)
-DDCB d CC  LD H,SET 1,(IX+d)
-FDCB d CC  LD H,SET 1,(IY+d)
-DDCB d D4  LD H,SET 2,(IX+d)
-FDCB d D4  LD H,SET 2,(IY+d)
-DDCB d DC  LD H,SET 3,(IX+d)
-FDCB d DC  LD H,SET 3,(IY+d)
-DDCB d E4  LD H,SET 4,(IX+d)
-FDCB d E4  LD H,SET 4,(IY+d)
-DDCB d EC  LD H,SET 5,(IX+d)
-FDCB d EC  LD H,SET 5,(IY+d)
-DDCB d F4  LD H,SET 6,(IX+d)
-FDCB d F4  LD H,SET 6,(IY+d)
-DDCB d FC  LD H,SET 7,(IX+d)
-FDCB d FC  LD H,SET 7,(IY+d)
-DDCB d 24  LD H,SLA (IX+d)
-FDCB d 24  LD H,SLA (IY+d)
-DDCB d 34  LD H,SLL (IX+d)
-FDCB d 34  LD H,SLL (IY+d)
-DDCB d 2C  LD H,SRA (IX+d)
-FDCB d 2C  LD H,SRA (IY+d)
-DDCB d 3C  LD H,SRL (IX+d)
-FDCB d 3C  LD H,SRL (IY+d)
-ED6B nn    LD HL,(nn)
-2A nn      LD HL,(nn)
-21 nn      LD HL,nn
-ED47       LD I,A
-DD2A nn    LD IX,(nn)
-DD21 nn    LD IX,nn
-DD67       LD IXh,A
-DD60       LD IXh,B
-DD61       LD IXh,C
-DD62       LD IXh,D
-DD63       LD IXh,E
-DD64       LD IXh,IXh
-DD65       LD IXh,IXl
-DD26 n     LD IXh,n
-DD6F       LD IXl,A
-DD68       LD IXl,B
-DD69       LD IXl,C
-DD6A       LD IXl,D
-DD6B       LD IXl,E
-DD6C       LD IXl,IXh
-DD6D       LD IXl,IXl
-DD2E n     LD IXl,n
-FD2A nn    LD IY,(nn)
-FD21 nn    LD IY,nn
-FD67       LD IYh,A
-FD60       LD IYh,B
-FD61       LD IYh,C
-FD62       LD IYh,D
-FD63       LD IYh,E
-FD64       LD IYh,IYh
-FD65       LD IYh,IYl
-FD26 n     LD IYh,n
-FD6F       LD IYl,A
-FD68       LD IYl,B
-FD69       LD IYl,C
-FD6A       LD IYl,D
-FD6B       LD IYl,E
-FD6C       LD IYl,IYh
-FD6D       LD IYl,IYl
-FD2E n     LD IYl,n
-6E         LD L,(HL)
-DD6E d     LD L,(IX+d)
-FD6E d     LD L,(IY+d)
-6F         LD L,A
-68         LD L,B
-69         LD L,C
-6A         LD L,D
-6B         LD L,E
-6C         LD L,H
-6D         LD L,L
-2E n       LD L,n
-DDCB d 85  LD L,RES 0,(IX+d)
-FDCB d 85  LD L,RES 0,(IY+d)
-DDCB d 8D  LD L,RES 1,(IX+d)
-FDCB d 8D  LD L,RES 1,(IY+d)
-DDCB d 95  LD L,RES 2,(IX+d)
-FDCB d 95  LD L,RES 2,(IY+d)
-DDCB d 9D  LD L,RES 3,(IX+d)
-FDCB d 9D  LD L,RES 3,(IY+d)
-DDCB d A5  LD L,RES 4,(IX+d)
-FDCB d A5  LD L,RES 4,(IY+d)
-DDCB d AD  LD L,RES 5,(IX+d)
-FDCB d AD  LD L,RES 5,(IY+d)
-DDCB d B5  LD L,RES 6,(IX+d)
-FDCB d B5  LD L,RES 6,(IY+d)
-DDCB d BD  LD L,RES 7,(IX+d)
-FDCB d BD  LD L,RES 7,(IY+d)
-DDCB d 15  LD L,RL (IX+d)
-FDCB d 15  LD L,RL (IY+d)
-DDCB d 05  LD L,RLC (IX+d)
-FDCB d 05  LD L,RLC (IY+d)
-DDCB d 1D  LD L,RR (IX+d)
-FDCB d 1D  LD L,RR (IY+d)
-DDCB d 0D  LD L,RRC (IX+d)
-FDCB d 0D  LD L,RRC (IY+d)
-DDCB d C5  LD L,SET 0,(IX+d)
-FDCB d C5  LD L,SET 0,(IY+d)
-DDCB d CD  LD L,SET 1,(IX+d)
-FDCB d CD  LD L,SET 1,(IY+d)
-DDCB d D5  LD L,SET 2,(IX+d)
-FDCB d D5  LD L,SET 2,(IY+d)
-DDCB d DD  LD L,SET 3,(IX+d)
-FDCB d DD  LD L,SET 3,(IY+d)
-DDCB d E5  LD L,SET 4,(IX+d)
-FDCB d E5  LD L,SET 4,(IY+d)
-DDCB d ED  LD L,SET 5,(IX+d)
-FDCB d ED  LD L,SET 5,(IY+d)
-DDCB d F5  LD L,SET 6,(IX+d)
-FDCB d F5  LD L,SET 6,(IY+d)
-DDCB d FD  LD L,SET 7,(IX+d)
-FDCB d FD  LD L,SET 7,(IY+d)
-DDCB d 25  LD L,SLA (IX+d)
-FDCB d 25  LD L,SLA (IY+d)
-DDCB d 35  LD L,SLL (IX+d)
-FDCB d 35  LD L,SLL (IY+d)
-DDCB d 2D  LD L,SRA (IX+d)
-FDCB d 2D  LD L,SRA (IY+d)
-DDCB d 3D  LD L,SRL (IX+d)
-FDCB d 3D  LD L,SRL (IY+d)
-ED4F       LD R,A
-ED7B nn    LD SP,(nn)
-F9         LD SP,HL
-DDF9       LD SP,IX
-FDF9       LD SP,IY
-31 nn      LD SP,nn
-EDA8       LDD
-EDB8       LDDR
-EDA0       LDI
-EDB0       LDIR
-ED44       NEG
-ED64       NEG
-ED6C       NEG
-ED74       NEG
-ED5C       NEG
-ED7C       NEG
-ED54       NEG
-ED4C       NEG
-00         NOP
-B6         OR (HL)
-DDB6 d     OR (IX+d)
-FDB6 d     OR (IY+d)
-B7         OR A
-B0         OR B
-B1         OR C
-B2         OR D
-B3         OR E
-B4         OR H
-DDB4       OR IXh
-DDB5       OR IXl