4 * Copyright (C) 1989-2021 Alan R. Baldwin
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
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/>.
36 /* fix order of '<', '>', and '#' */
38 if (((c
= getnb()) == '<') || (c
== '>')) {
47 if ((c
= getnb()) == '#') {
49 esp
->e_mode
= S_IMMED
;
50 } else if (c
== ',') {
53 xerr('a', "Register S, X, or X+ Required, Not A.");
68 } else if (c
== '*') {
94 if ((esp
->e_mode
= admode(axs
)) != 0) {
99 && (esp
->e_base
.e_ap
== NULL
)
100 && !(esp
->e_addr
& ~0xFF)) {
105 && (esp
->e_base
.e_ap
== zpg
)) {
108 if ((esp
->e_mode
== S_DIR
) && more()) {
111 switch(admode(axs
)) {
121 esp
->e_mode
= S_IX1P
;
129 if ((esp
->e_mode
!= S_DIR
) && more()) {
131 switch(admode(axs
)) {
133 xerr('a', "Register S, X, or X+ Required, Not A.");
144 esp
->e_mode
= S_IX2P
;
148 if (esp
->e_mode
!= S_DIR
) {
153 return (esp
->e_mode
);
157 * When building a table that has variations of a common
158 * symbol always start with the most complex symbol first.
159 * for example if x, x+, and x++ are in the same table
160 * the order should be x++, x+, and then x. The search
161 * order is then most to least complex.
165 * When searching symbol tables that contain characters
166 * not of type LTR16, eg with '-' or '+', always search
167 * the more complex symbol tables first. For example:
168 * searching for x+ will match the first part of x++,
169 * a false match if the table with x+ is searched
170 * before the table with x++.
174 * Enter admode() to search a specific addressing mode table
175 * for a match. Return the addressing value on a match or
190 while ( *(ptr
= &sp
[i
].a_str
[0]) ) {
201 * srch --- does string match ?
210 while (*ptr
&& *str
) {
211 if(ccase
[*ptr
& 0x007F] != ccase
[*str
& 0x007F])
216 if (ccase
[*ptr
& 0x007F] == ccase
[*str
& 0x007F]) {
222 if (!(ctype
[*ptr
& 0x007F] & LTR16
)) {
229 struct adsym axs
[] = { /* a, x, or s registers */