blob: ac9ea2b9f8e287c56b452521a41d0b4603e408be (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
/* m6808.h */
/*
* Copyright (C) 1993-2009 Alan R. Baldwin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Alan R. Baldwin
* 721 Berkeley St.
* Kent, Ohio 44240
*/
/*)BUILD
$(PROGRAM) = AS6808
$(INCLUDE) = {
ASXXXX.H
M6808.H
}
$(FILES) = {
M08MCH.C
M08ADR.C
M08PST.C
ASMAIN.C
ASDBG.C
ASLEX.C
ASSYM.C
ASSUBR.C
ASEXPR.C
ASDATA.C
ASLIST.C
ASOUT.C
}
$(STACK) = 3000
*/
struct adsym
{
char a_str[4]; /* addressing string */
int a_val; /* addressing mode value */
};
/*
* Addressing types
*/
#define S_IMMED 30
#define S_DIR 31
#define S_EXT 32
#define S_IX 33
#define S_IXP 34
#define S_IX1 35
#define S_IX1P 36
#define S_IX2 37
#define S_IX2P 38
#define S_IS 39
#define S_SP1 40
#define S_SP2 41
#define S_A 42
#define S_X 43
#define S_S 44
#define S_XP 45
/*
* Instruction types
*/
#define S_INH 60
#define S_BRA 61
#define S_TYP1 62
#define S_TYP2 63
#define S_TYP3 64
#define S_TYP4 65
#define S_TYPAI 66
#define S_TYPHX 67
#define S_CBEQ 68
#define S_CQAX 69
#define S_DBNZ 70
#define S_DZAX 71
#define S_MOV 72
#define S_INH8 73
#define S_INH8S 74
#define S_BRA8 75
/*
* Special Types
*/
#define S_SDP 80
#define S_CPU 81
/*
* Processor Types (S_CPU)
*/
#define X_HC08 0
#define X_HCS08 1
#define X_6805 2
#define X_HC05 3
/* machine dependent functions */
#ifdef OTHERSYSTEM
/* m08adr.c */
extern struct adsym axs[];
extern int addr(struct expr *esp);
extern int admode(struct adsym *sp);
extern int any(int c, char *str);
extern int srch(char *str);
/* m08mch.c */
extern VOID machine(struct mne *mp);
extern int mchpcr(struct expr *esp);
extern VOID minit(void);
#else
/* m08adr.c */
extern struct adsym axs[];
extern int addr();
extern int admode();
extern int any();
extern int srch();
/* m08mch.c */
extern VOID machine();
extern int mchpcr();
extern VOID minit();
#endif
|