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/>. */
25 * Process a machine op.
31 register int op, t1, t2, type;
32 struct expr e1, e2, e3;
49 if (e1.e_flag == 0 && e1.e_base.e_ap == NULL) {
54 if ((c = getnb()) == ',') {
67 outdp(dot.s_area, &e1);
80 v1 = e1.e_addr - dot.s_addr - 1;
81 if ((v1 < -128) || (v1 > 127))
87 if (e1.e_mode != S_USER)
101 if (t1 == S_DIR || t1 == S_EXT) {
110 if (t1 == S_IX1 || t1 == S_IX2) {
117 if (t1 == S_SP1 || t1 == S_SP2) {
131 if ((op == 0xA7) || (op == 0xAC) ||
132 (op == 0xAD) || (op == 0xAF))
163 if (op == 0xAC || op == 0xAD)
171 if (op == 0xAC || op == 0xAD)
184 if (t1 != S_IMMED || espv & ~0x07)
190 outab(op + 2*(espv&0x07));
197 if (t1 != S_IMMED || espv & ~0x07)
205 outab(op + 2*(espv&0x07));
208 v1 = e3.e_addr - dot.s_addr - 1;
209 if ((v1 < -128) || (v1 > 127))
215 if (e3.e_mode != S_USER)
223 if (e1.e_flag == 0 && e1.e_base.e_ap == NULL) {
225 if ((v1 < -128) || (v1 > 127))
245 if (t1 == S_DIR || t1 == S_EXT) {
261 if (t1 == S_DIR || t1 == S_EXT) {
268 if (t1 == S_IX1P || t1 == S_IX2P) {
274 if (t1 == S_SP1 || t1 == S_SP2) {
285 v1 = e2.e_addr - dot.s_addr - 1;
286 if ((v1 < -128) || (v1 > 127))
292 if (e2.e_mode != S_USER)
305 v1 = e2.e_addr - dot.s_addr - 1;
306 if ((v1 < -128) || (v1 > 127))
312 if (e2.e_mode != S_USER)
320 if (t1 == S_DIR || t1 == S_EXT) {
327 if (t1 == S_IX1 || t1 == S_IX2) {
333 if (t1 == S_SP1 || t1 == S_SP2) {
344 v1 = e2.e_addr - dot.s_addr - 1;
345 if ((v1 < -128) || (v1 > 127))
351 if (e2.e_mode != S_USER)
359 v1 = e1.e_addr - dot.s_addr - 1;
360 if ((v1 < -128) || (v1 > 127))
366 if (e1.e_mode != S_USER)
372 if (t1 == S_IX1P || t1 == S_IX2P) {
382 if (t2 == S_DIR || t2 == S_EXT) {
389 if (t1 == S_DIR || t1 == S_EXT) {
390 if (t2 == S_DIR || t2 == S_EXT) {
398 if (t2 == S_DIR || t2 == S_EXT) {
419 if (exp->e_flag == 0 && exp->e_base.e_ap == NULL) {
420 if (exp->e_addr & ~0xFF) {
428 * Branch/Jump PCR Mode Check
432 register struct expr *esp;
434 if (esp->e_base.e_ap == dot.s_area) {
437 if (esp->e_flag==0 && esp->e_base.e_ap==NULL) {
439 * Absolute Destination
441 * Use the global symbol '.__.ABS.'
442 * of value zero and force the assembler
443 * to use this absolute constant as the
444 * base value for the relocation.
447 esp->e_base.e_sp = &sym[1];
453 * The next character must be a
465 * Machine specific initialization.