2 * $Id: objdef.h,v 1.5 2007/07/22 13:35:20 khansen Exp $
4 * Revision 1.5 2007/07/22 13:35:20 khansen
5 * convert tabs to whitespaces
7 * Revision 1.4 2004/12/19 20:46:59 kenth
10 * Revision 1.3 2004/12/18 17:02:58 kenth
11 * added some LINE commands
13 * Revision 1.2 2004/12/14 01:51:29 kenth
14 * CMD_LINE and CMD_FILE defines
16 * Revision 1.1 2004/06/30 07:56:32 kenth
22 * (C) 2004 Kent Hansen
24 * The XORcyst is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License as published by
26 * the Free Software Foundation; either version 2 of the License, or
27 * (at your option) any later version.
29 * The XORcyst is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
34 * You should have received a copy of the GNU General Public License
35 * along with The XORcyst; if not, write to the Free Software
36 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
42 /* "It's a kind of magic" */
43 #define A_MAGIC 0xFACE
45 /* Version number; major in high nibble, minor in low nibble */
46 #define A_VERSION 0x14
48 /* Possible kinds of datatypes/symbols/etc */
59 /* Expression operators */
80 #define OP_UMINUS 0x24
83 /* Bytecode commands */
84 #define CMD_FILE 0xEE /* Operands: 8-bit count, string (filename) */
85 #define CMD_LINE8 0xEF /* Operands: 8-bit line number */
86 #define CMD_LINE16 0xF0 /* Operands: 16-bit line number */
87 #define CMD_LINE24 0xF1 /* Operands: 24-bit line number */
88 #define CMD_LINE_INC 0xF2 /* Operands: None */
89 #define CMD_END 0xF3 /* Operands: None */
90 #define CMD_BIN8 0xF4 /* Operands: 8-bit count, string of bytes */
91 #define CMD_BIN16 0xF5 /* Operands: 16-bit count, string of bytes */
92 #define CMD_LABEL 0xF6 /* Operands: export flag byte, name (if export flag set) */
93 #define CMD_INSTR 0xF7 /* Operands: 6502 opcode, 16-bit expression ID */
94 #define CMD_DB 0xF8 /* Operands: 16-bit expression ID */
95 #define CMD_DW 0xF9 /* Operands: 16-bit expression ID */
96 #define CMD_DD 0xFA /* Operands: 16-bit expression ID */
97 #define CMD_DSI8 0xFB /* Operands: 8-bit count */
98 #define CMD_DSI16 0xFC /* Operands: 16-bit count */
99 #define CMD_DSB 0xFD /* Operands: 16-bit expression ID */
100 #define CMD_RSV1 0xFE /* Reserved 1 */
101 #define CMD_RSV2 0xFF /* Reserved 2 */
103 /* Bitmasks for CMD_LABEL flag byte */
104 #define LABEL_FLAG_EXPORT 1
105 #define LABEL_FLAG_ZEROPAGE 2
106 #define LABEL_FLAG_ALIGN 4
107 #define LABEL_FLAG_ADDR 8
109 #endif /* !OBJDEF_H */