-
Notifications
You must be signed in to change notification settings - Fork 2
/
README_C166.TXT
203 lines (111 loc) · 3.87 KB
/
README_C166.TXT
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
This is a minimal implementation of the C166 instruction set used by
a number of processors from STMicroelectronics, Siemens and Infineon.
Some (older) processors have issues with pipeline delays putting
restrictions on the code. Most assemblers can handle this by inserting
'nop's or at least give a warning. Not so this assembler!
It is common that the assembler keeps track of protected instruction
ranges to warn you about possible mistakes. Not so this assembler!
It also seems that assemblers try to help you by fixing or warning when
a known hardware bug may result in unexpected things. Not so this assembler!
tpasm does not have the 'standard' names of all registers hardcoded in it.
Instead they are meant to be "included" from a header file together with
some other usable stuff normally known to the assembler by default. This
is partly because not all processors have the same memory layout. Two
files REG_XE167xM.INC and REG_167.INC are currently available in the
'include' subdirectory. Others may come.
tpasm has a SEG pseudo-op that is similar to the SECTION directive used
with C166. The tpasm *operator* SEG is used for getting the 64k segment
number of an operand address. Confusing!
There are no datatypes like NEAR, FAR, SHORT and so on. This may limit
the freedom of creating finetuned code but since tpasm does not support
linking of libraries other than using 'include' you will probably use
some other assembler for big projects anyway.
The instruction set used by the MAC coprocessor is not (yet) implemented.
Many processors can handle more than 64k of memory. This memory is divided
in chunks of 64k for code and 16k for data. This is called SEGMENTED mode.
If in SEGMENTED mode you have to use the ASSUME directive to tell tpasm
how to assemble memory addresses.
There is just one processor type as of now called C166. Some old processors
don't execute all of these instructions.
In general you are expected to know what you are doing. The assembler
is just there to produce the binary for you :-)
Have fun
Here follows a list of things that are not supported or need recoding.
The tpasm syntax very often differs from what is normal with these
processors so don't expect to port things without recoding. Most of the
stuff used when building programs by linking modules is of no meaning here
and has been left out. Note that tpasm can include files from many
directories. See also the file CONVERSION_166.TXT for more info.
Directives not supported:
ENDS Marks the end of a 'SECTION'. Not needed by tpasm and conflicts
with ENDS used by tpasm to signal the end of a SWITCH directive
GROUP Ignored
DGROUP Ignored
REGBANK Ignored
REGDEF Ignored
PECDEF Ignored
SSKDEF Ignored
PROC Ignored
ENDP Ignored
BIT Use EQU and/or LIT to give a bit a name
LABEL
DEFA Handled as EQU
DEFB Handled as LIT
DEFR Handled as EQU
TYPEDEC
EXTRN Ignored
EXTERN Ignored
PUBLIC Ignored
GLOBAL Ignored
DBIT
DBPTR
DPPTR
DSPTR
NAME Ignored
Directives replaced:
SECTION Use SEG to get a similar functionality.
Operators not supported:
PTR
DATA3
DATA4
DATA8
DATA16
SHORT
BOF
Assembler controls not supported:
ABSOLUTE
CASE/NOCASE
COND/NOCOND
DATE
DEBUG/NODEBUG
EJECT
ERRORPRINT/NOERRORPRINT
EXPDECNUM
NOGEN Use EXPAND to expand macros *and* repeats
GENONLY
GEN
INCDIR See the command line options of tpasm
MACRO/NOMACRO
MOD166/NOMOD166
MOD167
OBJECT/NOOBJECT
PAGELENGTH
PAGEWIDTH
PAGING/NOPAGING
PRINT/NOPRINT See LIST, NOLIST and command line option -l
REGUSE
SAVE/RESTORE
SEGMENTED/NONSEGMENTED
SYMBOLS/NOSYMBOLS
TABS
TITLE
TYPE/NOTYPE
USEDEXTONLY
XREF/NOXREF
Directives for conditional assemby:
SET/RESET Corresponds to SET and UNSET in tpasm
ELSEIF Not present in tpasm
IF/ELSE/ENDIF Have simuilar meaning in tpasm
Macros:
tpasm has macro capability but functionality and syntax differs. See
the tpasm MANUAL.TXT for a short description of macros.