3 Copyright (C) 1989-1995 Alan R. Baldwin
4 721 Berkeley St., Kent, Ohio 44240
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 3, or (at your option) any
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 * Ported from 8085 to 8051 by John Hartman 30-Apr-1995
49 #define S_INH 50 /* One byte inherent */
50 #define S_JMP11 51 /* Jump and call 11 bit. */
51 #define S_JMP16 52 /* Jump and call 16 bit */
52 #define S_ACC 53 /* Accumulator */
53 #define S_TYP1 54 /* Type 1 (inc and dec) */
54 #define S_TYP2 55 /* Type 2 (arith ops) */
55 #define S_TYP3 56 /* Type 3 (logic ops) */
56 #define S_TYP4 57 /* Type 4 (XCH) */
57 #define S_MOV 58 /* MOV */
58 #define S_BITBR 59 /* bit branch */
59 #define S_BR 60 /* branch */
60 #define S_ACBIT 61 /* CLR, CPL */
61 #define S_CJNE 62 /* CJNE */
62 #define S_DJNZ 63 /* DJNZ */
63 #define S_JMP 64 /* JMP */
64 #define S_MOVC 65 /* MOVC */
65 #define S_MOVX 66 /* MOVX */
66 #define S_AB 67 /* AB (div and mul) */
67 #define S_CPL 68 /* CPL */
68 #define S_SETB 69 /* SETB */
69 #define S_DIRECT 70 /* DIRECT (pusha and pop) */
70 #define S_XCHD 71 /* XCHD */
72 /* Addressing modes */
73 #define S_A 30 /* A */
74 /* #define S_B 31 */ /* B */
75 #define S_C 32 /* C (carry) */
76 #define S_RAB 33 /* AB */
77 #define S_DPTR 34 /* DPTR */
78 #define S_REG 35 /* Register R0-R7 */
79 #define S_IMMED 36 /* immediate */
80 #define S_DIR 37 /* direct */
81 #define S_EXT 38 /* extended */
82 #define S_PC 39 /* PC (for addressing mode) */
84 #define S_AT_R 40 /* @R0 or @R1 */
85 #define S_AT_DP 41 /* @DPTR */
86 #define S_AT_APC 42 /* @A+PC */
87 #define S_AT_ADP 43 /* @A+DPTR */
88 #define S_NOT_BIT 44 /* /BIT (/DIR) */
91 * Registers. Value == address in RAM, except for PC
103 #define PC 0xFF /* dummy number for register ID only */
104 #define AB 0xFE /* dummy number for register ID only */
105 #define C 0xFD /* dummy number for register ID only */
109 char a_str[5]; /* addressing string (length for DPTR+null)*/
110 int a_val; /* addressing mode value */
113 /* pre-defined symbol structure: name and value */
119 extern struct PreDef preDef[];
121 /* machine dependent functions */