forked from microsoft/GW-BASIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OEM.H
358 lines (338 loc) · 8.08 KB
/
OEM.H
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
; [ This translation created 10-Feb-83 by Version 4.3 ]
SUBTTL Common file to produce 2-segment 8086 GW-CPM BASIC
.SALL
.RADIX 10
OEMRAM=0D
;Pascal program HFILE searches for the following line - DO NOT MODIFY
;** (VERSION SPECIFIC VALUES) ************************************************
NMLINE=25 ;Max screen display text lines
NBANKS=1 ;Number of graphic planes
PALSIZ=0 ;Size of OEM color palette
DBLCHR=0 ;Editor support for KANJI chars
KANABS=0 ;Kana BASIC (Japanese JIS codes)
KANJFN=0 ;KANJI String Functions KPOS, KLEN ..
JISKTN=0 ;&K, &J constants (KANJI)
SUPRSH=1 ;1=super shift key feature
NMKEYF=10 ;number of function keys
NMKEYT=14 ;number of function key traps
FKEYON=1 ;yes=display function keys
SCROLT=1 ;Line 25 allocated for status only
PLAYSW=1 ;for PLAY statement
BEEPSW=1 ;for SOUND, BEEP statements
NMLPT=3 ;number of line printers
CONSSW=1 ;Device CONS:
NMCOMT=2 ;number of COMmunications ports
NMPENT=1 ;number of light pens
NMSTRT=4 ;number of joysticks
GWCASS=0 ;Cassette switch (CSAVE,CLOAD,MOTOR)
IBMLIK=1 ;IBM compatibility package
IBMTOK=1 ;IBM token compatibility
DYNCOM=1 ;Dynamic communication buffers
;** (END OF VERSION SPECIFIC VALUES) *****************************************
;Pascal program HFILE searches for the previous line - DO NOT MODIFY
;
NUMTRP=NMKEYT+NMCOMT+NMPENT+NMSTRT
GW=1 ;GW BASIC
ESCCTL=0 ;Escape Sequence processing in SCROUT
GWDBUG=0 ;DEBUG statement (TEST VERSIONS ONLY)
; Support is in BINTRP.MAC and GWSTS.MAC
SIXDIG=0 ;# of digits of accuracy assumed when formatting
;single precision numbers for output.
; 0 := 7 digits
; 1 := 6 digits
CASSW=0 ;CASSETTE SWITCH
LABKEY=1 ;^T (LABEL) key capability
HGHBIT=1 ;8-bit characters (ASCII & Graphics)
QUEUE=1 ;Queued painting algorithm (vs. stack)
GIO86=1 ;BASIC-86 Generalized I/O
SCRNIO=1 ;Screen editor
SCRN86=1 ;8086 Screen editor
I8086=1 ;CROSS ASSEMBLING FOR 8086
MULSEG=1 ;MULTI-SEGMENT 8086 BASIC
SHORT=0 ;"SMALL" VERSION OF 8086 BASIC IF SET
TRUROM=1
SBC86=0 ;SBC 86/02 BOARD?
SHORTJ=1 ;USE INTRA-SEGMENT SHORT JUMPS
;IN 8086 CODE
LNGVAR=1 ;LONG VARIABLE NAME SUPPORT (EXTENDED ONLY)
SHTERR=0 ;SHORT (2 CHAR) ERROR MESSAGES
SHTINS=0 ;INSTR IN NON-FAST LEN2 VERSIONS
SHTLHM=0 ;LEFT HAND SIDE MID IN NON FAST LEN2 VERSIONS
SHTCHN=0 ;ALLOW CHAIN IN NON-5.0
SHTPRO=0 ;ALLOW PROTECTED FILES IN NON-FIVDSK
SHTLIN=0 ;ALLOW LINE INPUT IN NON-EXTENDED NON-FAST
SHTREN=0 ;ALLOW RENUM IN NON-FST VERSIONS
INKEYF=1 ;ADDS INKEY$ FUNCTION
NOIOS=0 ;NO I/O STATMENTS (INP,OUT, WAIT)
NOPEKS=0 ;NO PEEK, POKE
NOUSR=0 ;NO USR
NOCTLA=0 ;NO CONTROL-A IN EXTENDED
NORUBT=0 ;NO RUBOUT
NOROMP=0 ;NO ROM PROGRAM FEATURE
NOATDL=0 ;NO AUTO DELETE IN NON-FAST EXTENDED
NODOT=0 ;NO DOT IN LEN2
NOEDIT=0 ;NO EDIT COMMAND
CRONLY=0 ;ONLY PUT OUT CR, NOT CRLF TO TERMINAL
;AND FILES
NONULL=0 ;NO NULL COMMAND, PUT OUT NULLS IN CRDO & OUTCH1
NOVARP=0 ;NO VARPTR FUNCTION
FIVEO=1 ;GENERATE VERSION WITH RELEASE 5.0 FEATURES
FIVMEM=1
ANSI=1
FIVDSK=1 ;5.0 NEW DSK CODE
FIVLPT=1 ;WIDTH LPRINT AND 255 FEATURE
HEXOCT=1 ;&H..., HEX$, &O..., OCT$
BINCSW=0 ;&B..., BIN$
BLODSW=1 ;BLOAD, BSAVE COMMANDS
MEMIMG=1 ;MEMORY IMAGE FILES
GENBIN=1
TRUANS=0 ;TRUE ANSI VERSION (STATIC SCAN, ON ERROR)
COMMNT=0 ;DONT WANT BIG COMMENT
INTEL=0 ;INTEL PROPRIETARY
INTFSW=0 ;INTEL FLOATING POINT
INTFHW=0
RMX=0 ;INTEL RMX VERSION
EDIT80=0 ;FOR EDIT80 I/O ROUTINES
RSHACK=0
INTLEC=0
LENGTH=2 ; 1 MEANS 8K, 2 MEANS 12K
BASDEB=0 ;WHETHER DBG WILL BE LOADED WITH BASIC
RSTLES=1 ;WHETHER BASIC WILL USE RST LOCATIONS
;TO MAKE ITSELF SMALLER & QUICKER
REALIO=1 ;WHETHER SIMULATE (=0) OR ON MACHINE (=1)
GENIO=1 ;USE G/P ROUTINES
CHSEAT=1 ;CHSNS eats chars
GENDSK=0 ;USE G/P DSK CODE
LONGI=0 ;WHETHER WE ASK "TERMINAL WIDTH?"
;AND WANT SIN-TAN-COS-ATN?
INSTSW=0 ;FOR INSTR INSTRUCTION
SWAPSW=1 ;FOR SWAP STATEMENT
MDS=0 ;FOR INTEL MDS SYSTEMS
SBC=0 ;FOR INTEL SINGLE BOARD COMPUTER
;1=SBC 80/10, 2=SBC 80/20
PURE=1 ;ON FOR PURE CODE
KILLER=0 ;FOR ROM VERSION THAT WONT RUN IN RAM
INTROM=0
LPTSW=1
NCRLPT=1
NCRCAS=0
ISC=0 ;FOR ISC VERSION
LPT3=0 ;THREE LPT DRIVER VERSION(QUME,OKIA,CENT)
TSLPT=0
DOS=0 ;ON TO GEN ROUTINES FOR DOS
DISK=1 ;FILE I/O FEATURES
TIMSHR=0 ;NO TIME-SHARING DISK
TSDISK=0 ;NO TIME-SHARING DISK FOR US
SPCDSK=0 ;MAY HAVE MM'S DISK CODE
SPCNDS=0
FAST=1 ;CONSTANT COMPRESSION, RENUM & FRIENDS
KEYSTA=0
ISIS=0 ;FOR VERSION TO RUN UNDER INTEL'S ISIS II DOS
MDSISS=0 ;FOR MDS VERSION THAT RUNS UNDER ISIS-II
CPM=1 ;FOR CPM compatible operating systems
CPM2=1 ;VERSION 2. CPM
CPM86=0 ;FOR CP/M-86 operating system
SCP=1 ;MS-DOS operating system
CPMCON=0
CPMSER=0 ;CHECK CPM SERIAL #'S
CPMADD=0 ;FOR VERSION TO RUN ON ADDS CPM
CPMA75=0 ;FOR VERSION TO RUN ON ADDS SYSTEM 75
;CP/M
CPMRSH=0 ;FOR RADIO SHACK CPM/M
CPM110=0 ;FOR CP/M @1100 HEX (INTERALIA)
CPMSBC=0 ;FOR VERSION TO RUN ON SBC CP/M AT 4100H
CPMPER=0 ;FOR PERTEC VERSION OF CPM
CPMLIF=0 ;LIFEBOAT CP/M AT 4200H
CPMMDS=0 ;MOHAWK DATA SYSTEMS CP/M
CPMCON=0
Z80=0
DISK=1
NCRLPT=1
RSTLES=1
DRVPOS=CPMADD
TRNCHR=CPMADD
INLADD=CPMADD
LISTEN=1 ;ON MEANS LISTEN FOR ^C
LISTEN=1
LEN2=0
LEN2=1
HEXOCT=1
LENGTH=2
RSTLES=1
FIVLPT=1
I8251=0 ;THIS SWITCH IS USED FOR ROSEMOUNT VERSION
CONTRO=1 ;ALLOW ^O
LEN3=LEN2 OR CASSW
STRING=1
NCRLPT=1
; *** OEM Switches which need to be defaulted to 0
;
CMPUTN=0
DUPONT=0
EXIDY=0
GESBC=0
HEATH=0
LOKHED=0
MOSTEK=0
TEK=0
TRSER2=0
NASCOM=0
NATROM=0
NCRBAS=0
NCRDEB=0
NCRDEB=0
NCRELS=0
ONTEL=0
PCS=0
SGSATS=0
ALTAIR=0
DMC=0
PANBAS=0
XTNSYS=0
NECBAS=0
;*******************************************************************
; Z80 related macros
;*******************************************************************
Z80=1 ;FOR VERSION THAT RUNS ON BOTH
;8080'S AND ZILOG Z-80'S
Z80MAC=1 ;USE 8080 MACROS INSTEAD OF Z80 INSTRUCTIONS
Z80=0
Z80=1
LDIR MACRO
MOV WORD PTR A,WORD PTR M
STAX D
INXF H
INXF D
DCXF B
MOV WORD PTR A,WORD PTR B
ORA C
JNZ _-8D
ENDM
LDDR MACRO
MOV WORD PTR A,WORD PTR M
STAX D
DCXF H
DCXF D
DCXF B
MOV WORD PTR A,WORD PTR B
ORA C
JNZ _-8D
ENDM
DJNZ MACRO DEST
DCR B
JNZ DEST
ENDM
;*******************************************************************
; Define reset routines.
;*******************************************************************
FSIGN MACRO
CALL SIGN
ENDM
PUSHM MACRO
MOV WORD PTR C,WORD PTR M
INX H
MOV WORD PTR B,WORD PTR M
INX H
PUSH WORD PTR B
ENDM
SYNCHK MACRO X
CALL SYNCHR
DB OFFSET X
ENDM
OUTCHR MACRO
CALL OUTDO
ENDM
CHRGET MACRO
CALL CHRGTR
ENDM
COMPAR MACRO
CALL DCOMPR
ENDM
GETYPE MACRO
CALL GETYPR
ENDM
COMPAR MACRO
DB 73O
DB 332O
ENDM
ACRLF MACRO
DB 13D
DB 10D
ENDM
PUSHR MACRO
PUSH WORD PTR D
PUSH WORD PTR B
ENDM
POPR MACRO
POP WORD PTR B
POP WORD PTR D
ENDM
MOVRI MACRO B,C,D,E
DB 1O ; "LXI B"
DB OFFSET C
DB OFFSET B
DB 21O ; "LXI D"
DB OFFSET E
DB OFFSET D
ENDM
INST MACRO X
DB OX
ENDM
CONTO=15 ;CHARACTER TO SUPRESS OUTPUT (USUALLY CONTROL-O)
DBLTRN=0 ;FOR DOUBLE PRECISION TRANSCENDENTALS
CLMWID=14D ;MAKE COMMA COLUMNS FOURTEEN CHARACTERS
DATPSC=128D ;NUMBER OF DATA BYTES IN DISK SECTOR
LINLN=80D ;TERMINAL LINE LENGTH
LPTLEN=132D
BUFLEN=255 ;LONG LINES
NAMLEN=40D ;MAXIMUM LENGTH NAME -- 3 TO 127
NUMLEV=110D ;NUMBER OF STACK LEVELS RESERVED
;BY AN EXPLICIT CALL TO GETSTK
STRSIZ=4
STRSIZ=3
NUMTMP=3 ;NUMBER OF STRING TEMPORARIES
NUMTMP=10
.RADIX 8
;
; Useful macros
;
ACRLF MACRO
DB 13D
DB 10D
ENDM
INS86 MACRO A,B,C,D
DB A&O
IFNB <B>
DB B&O
ENDIF
IFNB <D>
DB C&O
DB D&O
ENDIF
IFB <D>
IFNB <C>
DW C
ENDIF
ENDIF
ENDM
CALLOS MACRO
CALL CPMENT
ENDM
POPR MACRO
POP CX
POP DX
ENDM
ADR MACRO X
DW X
ENDM
DC MACRO ARG
IRPC ZZ,<ARG>
IFDIF <ZZ>,<">
DB "&ZZ&"
_A="&ZZ&"
ENDIF
ENDM
ENDM
;
PAGE