1 /*****************************************************************************/
5 /* Opcode and addressing mode definitions */
9 /* (C) 2001 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
41 /*****************************************************************************/
43 /*****************************************************************************/
47 /* Definitions for the possible opcodes */
114 OPC_COUNT /* Number of opcodes available */
117 /* Addressing modes (bitmapped). */
119 AM_IMP = 0x0001, /* implicit */
120 AM_ACC = 0x0002, /* accumulator */
121 AM_IMM = 0x0004, /* immidiate */
122 AM_ZP = 0x0008, /* zeropage */
123 AM_ZPX = 0x0010, /* zeropage,X */
124 AM_ABS = 0x0020, /* absolute */
125 AM_ABSX = 0x0040, /* absolute,X */
126 AM_ABSY = 0x0080, /* absolute,Y */
127 AM_ZPX_IND = 0x0100, /* (zeropage,x) */
128 AM_ZP_INDY = 0x0200, /* (zeropage),y */
129 AM_ZP_IND = 0x0400, /* (zeropage) */
130 AM_BRA = 0x0800 /* branch */
133 /* Opcode description */
135 char Mnemo[4]; /* Mnemonic */
136 opc_t OPC; /* Opcode */
137 unsigned Info; /* Usage flags */
142 /*****************************************************************************/
144 /*****************************************************************************/
148 const OPCDesc* FindOpcode (const char* OPC);
149 /* Find the given opcode and return the opcode description. If the opcode was
150 * not found, NULL is returned.
153 unsigned GetInsnSize (opc_t OPC, am_t AM);
154 /* Return the size of the given instruction */
156 const OPCDesc* GetOPCDesc (opc_t OPC);
157 /* Get an opcode description */
161 /* End of opcodes.h */