]> cloudbase.mooo.com Git - kermit-80.git/blob - cpxtyp.asm
Inquire AVR-CP/M firmware version
[kermit-80.git] / cpxtyp.asm
1 ; CPXTYP.ASM
2 ; KERMIT - (Celtic for "FREE")
3 ;
4 ; This is the CP/M-80 implementation of the Columbia University
5 ; KERMIT file transfer protocol.
6 ;
7 ; Version 4.0
8 ;
9 ; Copyright June 1981,1982,1983,1984,1985
10 ; Columbia University
11 ;
12 ; Originally written by Bill Catchings of the Columbia University Center for
13 ; Computing Activities, 612 W. 115th St., New York, NY 10025.
14 ;
15 ; Contributions by Frank da Cruz, Daphne Tzoar, Bernie Eiben,
16 ; Bruce Tanner, Nick Bush, Greg Small, Kimmo Laaksonen, Jeff Damens, and many
17 ; others.
18 ;
19 ; This is the header file for building the system-dependent overlay
20 ; for KERMIT. It contains the definitions used to select the target
21 ; system, and collects (via INCLUDE or LINK directives) the remaining
22 ; code. If the target system is one of the supported systems
23 ; described below, then this is the only file that needs to be
24 ; edited.
25 ;
26 ; revision history:
27 ;
28 ;edit 34, 10-Jan-1991 by MF. Put in "terminal required" notation for
29 ; more machines that need terminals.
30 ;edit 33, 9-Jan-1991 by MF. Put in "terminal required" notation for Access
31 ; Matrix and eliminated an extra "sysfam set FALSE" when torfam set TRUE
32 ;edit 32, 7-Jan-1991 by MF. Added code by Jay. S. Rouman to support the
33 ; Ampro Little Board (see CPXBBI.ASM).
34 ; Also put in a couple of missing .printx's
35 ;edit 31, 2-Nov-1990 by MF. Moved overlay address to 7000H.
36 ;edit 30, 14-Sep-1990 by MF. Added INCOMPLETE-FILE flag for SET
37 ; INCOMPLETE-FILE
38 ;edit 29, 11-Sep-1990 by MF. Moved overlay address for version 4.10.
39 ; to 6C00H.
40 ; edit 28, 1st September 1990 by Russell Lang, rjl@monu1.cc.monash.edu.au
41 ; Added support for MicroBee (CPXBEE.ASM).
42 ;
43 ; edit 27, 28-Aug-89 by Mike Freeman, Bonneville Power Administration,
44 ; P.O. Box 491, Vancouver WA 98666 USA: add support for Hewlett-
45 ; Packard HP-125 "Business Assistant" computer using a HP-modified
46 ;CP/M Version 2.2.
47 ;
48 ; edit 26, 2 December, by OBSchou. Added code for CP/M-80 Kermit to
49 ; run on an IBM-PC under Z80MU. Perverse?? No, its to allow testing
50 ; of independent code on a PC running CP/M kermit.
51 ;
52 ; edit 25, 27 October, 1987 by OBSchou. Merged in Sanyo, CompuPro, Genie
53 ; and TRS Model 4 code, and added four new families.
54 ; CPXSYO.ASM for the Sanyo, CPXPRO.ASM for the Compupro,
55 ; CPXTRS.ASM for the TRS-80 Model 4, CPXGNI.ASM for the Genie.
56 ; Many thanks to G. Smith for these latter two systems. Also
57 ; added the WYSE 100 Terminal type to the VDU table.
58 ;
59 ; edit 24, 17 July, 1987 by OBSchou. Added (hopefully) code from
60 ; CP/M Kermit 3.5 (WOW) for the Heath 8. (h8quad) The actual code
61 ; has been put into the CPXHEA.ASM family file, but I do not actually
62 ; *KNOW* if this new version works. Anyone willing to test it out??
63 ;
64 ; edit 23 16 July, 1987 for for Will Rose:
65 ; edit of 15 Jan 1987 by C W Rose
66 ; Added code for Micromint SB180 and Ampro 230 terminal.
67 ;
68 ; edit of 10 Apr 87 by C W Rose
69 ; Amended code for pci2651 to handle Telecom Merlin M2215.
70 ; (8085 at 5 MHz, 2651 USART, port TTY1:, Ampro 230 terminal equivalent).
71 ;
72 ; edit of 13 Jul 1987 by C W Rose
73 ; Added Micromint SB180 with 6/9 MHz. option.
74 ;
75 ; edit 22, 15th July, 1987 by OBSchou for David Moore.
76 ; David submitted a paper copy of Kermit 4.05 overlay for a Teletek
77 ; system: I have (hopefully) correctly appended his code. He also
78 ; send in the code for ADM 22 terminals.
79 ;
80 ; edit 21, 14 July, 1986 by OBSchou for John Shearwood of Birmingham
81 ; University. His edits:
82 ; edit of Apr 7th, 1987 by JA Shearwood. Added entry for Cifer Aux port
83 ; edit of Mar 24 1987 by JA Shearwood, Birmingham. Added code for Cifer
84 ; 1886 with CP/M Plus
85 ;
86 ; Also added in code from Chris Miles:
87 ; edit of 19 May 26, 1987 by C.J.MILES@UMRCC.
88 ; Kaypro II, Xerox 820 and Big Board II code seperated
89 ; from CPXSYS.ASM and put in a new family file called
90 ; CPXBBI.ASM.
91 ;
92 ; Finally added code from MJ Carter of Nottingham University:
93 ; edit 16a of 5th Mar 1987 by M J Carter, Nottingham Uni [majoc], to add
94 ; entry for OEM ScreenTyper (scntpr). See also CPXFRK.ASM ("fork"),
95 ; the tail end of CPXLNK.ASM, and the Heath-Zenith family file
96 ; CPXHEA.ASM (heath, z100, telcon, and scntpr).
97 ;
98 ; [Note: Martins CPXFRK is another version of CPXSWT.ASM]
99 ;
100 ;
101 ; edit 20, 21 May 1987 by OBSchou for Colin Burns of the Institute
102 ; of Neurological Sciences, Glasgow. Added flag for Hazeltine 1500
103 ; VDU (h1500)
104 ;
105 ; edit 19, 6th April, 1987 by OBSchou.
106 ; Added in EQUs for Amstrad 664 and 6128 machines (CPC) and NCR
107 ; Decsision mate V, bot sets of code submitted by Chris Miles of
108 ; Manchester University. NCR code is similar to the PCI2651 code, so
109 ; NCRDMV chains to CPXTOR.ASM. CPC cahins to the modified CPXPCW file
110 ; as submitted by Chris. *** NOTE *** All Amstrad versions require
111 ; CP/M 3, so the 664 version must both have the system upgraded to
112 ; CP/M 3 and have an aditional RAM pack. All Amstrad systems require
113 ; a serial interface.
114 ;
115 ; edit 18, 30 March, 1986. OBSchou.
116 ; * * * Here Begineth kermit-80 Version 4.09 * * *
117 ;
118 ; Biggest change is the overlay address has been moved (again) to 6000h
119 ; and the files have all been diced into families. M80 (almost) back
120 ; in, though I have found some bugs. Will worry about those later.
121 ; CPXSYS.ASM (CP4SYS.ASM in V4.05) now is a family file as well.
122 ;
123 ; Comments and all that would be much appreciated.
124 ;
125 ; Bertil Schou,
126 ; The Computer Centre,
127 ; Loughborough University of Technology,
128 ; Loughborough
129 ; Leicestershire, LE11 3TU
130 ; Great Britain
131 ;
132 ; tel (0509) 222313
133 ; E-Mail (Janet) OBSchou at LOUGHBOROUGH.MULTICS
134 ;
135 ;
136 ; edit 17, March 15, by OBSchou to add in support for M80 Macro Assembler.
137 ; Now its a little messy using the M80 Assembler,asn we have family files
138 ; and how are we gonna tell M80 what files to use?
139 ; Sort of Simple: we generate a set of EQUs that only INCLUDE the family
140 ; file being assembled. I hope.
141 ;
142 ; edit 16 Dec 1st, 1986 by OBSchou. Added entry for Amstrad PCW range (PCW)
143 ; Code in Family file CPXPCW.ASM, submitted by Ian Young of Lattice
144 ; Logic Systems.
145 ;
146 ; Edit 15 June 20 1986. Had to chand org address to 5000h to give room for
147 ; multi-fcb space for DIR command and other additions in the system
148 ; indepentent part. This starts Kermit-80 version 4.08...
149 ;
150 ; Edit 14: March 20, 1986 by OBSchou Loughborough University for
151 ; B Robertson, Aberdeen Univ. Computing Centre.
152 ; Add support for APPLE II with serial cards based on the 6850 ACIA.
153 ; Mod 380Z support to allow both MDS (5 1/4" discs) and FDS (8" discs)
154 ; configurations. Any mistakes on this merge all my fault (OBSchou)
155 ;
156 ; edit 13 22 April, 1986 by OBSchou Loughborough University
157 ; Changed org address to 4000h to allow for mods to the system
158 ; independent part for kermit version 4.06
159 ;
160 ; edit 12 5 Febuary, 1986 by OBSchou
161 ; merged in conditionals for Epson PX8 (px8). Code from Tony Addyman
162 ; Salford University, England.
163 ; Added code from other contibutors for Basic Northstar (basicns),
164 ; Access-Matrix (access), US Micro Sales s1008 (s1008),
165 ; Micro Mate (mmate), A.C.E. Discovery (disc).
166 ; These I cannot test: please send comments back if these are buggy.
167 ;
168 ; edit 11 29 January 1985 by OBSchou @ multics.lut.ac.uk
169 ; added in code for 2651 USART for use with CP/M and a VDU
170 ;
171 ; edit 10: 21 November, 1985 by ajcole @ leeds.ai
172 ; Merged in support for the following:
173 ; North Star Horizon without SIO-4 (horizon)
174 ; Comart Communicator (comart)
175 ; Cromemco TU-ART interface (cmemco)
176 ; TVI912/920 VDUs (tvi912)
177 ;
178 ; edit 9 24 October by OBSchou. Merged code from B Robertson from
179 ; Aberdeen University. He writes:
180 ; September 20, 1985 by B Robertson, Aberdeen Univ. Computing Centre.
181 ; Add support for Research Machines 380Z, North Star Advantage, Acorn
182 ; BBC with Z80 co-processor and APPLE II with Mountain Computers CPS
183 ; Multifunction card.
184 ;
185 ; edit 8: 11 October, 1985 by OBSchou
186 ; tidied up code around Superbrain main/aux port business
187 ;
188 ; edit 7: 11 June, 1985 by O B Schou, Loughborough University of Tech.
189 ; Loughborough, Leics, England.
190 ; Added code for Torch (Second processor to BBC-B) and Cifer 1886
191 ; Hopefully this code will work with Torchpacks, and Cifer 26xx
192 ; and 28xx series computers. Edits marked by OBS
193 ;
194 ; edit 6: 9-Feb-85 by CJC
195 ; Merge Northstar Horizon, Lobo MAX, and Xerox 820 changes:
196 ; 13-Dec-84 Add Northstar Horizon with SIO-4 board, port 5 at 1200 [CSM]
197 ; 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809
198 ;
199 ;pcc001 27-Dec-84 vjc modules: cp4sys,cp4typ
200 ; Add conditional for Xerox 820. I thought at first I could
201 ; live with the kaypro conditional, but it's enough of a pain
202 ; that I added it back in. The clear-to-end-of-screen char
203 ; is different, breaking many programs in VT52 mode, and the
204 ; default escape char control-\, is not at all obvious how
205 ; to type on the 820 keyboard. If you muddle through the
206 ; key translation table, it turns out to be control-comma.
207 ; Rather than OR xer820 all the occurances of kpII conditionals
208 ; I added a bbI conditional for all common code for the big
209 ; board I based machines that is automatically turned on by
210 ; either kpII or xer820. This will also make it easier in
211 ; the future if another flavor of bigboard is added.
212 ;
213 ;pcc010 2-Jan-85 vjc modules:cp4pkt,cp4typ
214 ; Control-C during send or recieve clobbers some of the screen
215 ; and doesn't look nice. Position the cursor to end of screen
216 ; before returning to main loop.
217 ;
218 ;pcc013 8-Jan-85 vjc modules:cp4mit,cp4utl,cp4typ
219 ; Replace CLOSE command to cancel session logging to SET
220 ; LOGGING ON/OFF. This seems to fit in with the command
221 ; structure better. Default the log file to KERMIT.LOG
222 ; incase no previous LOG command. Logging is also enabled
223 ; by LOG command, as before.
224 ;
225 ; edit 5: October 13, 1984 by L M Jones, JCC, for New York Botanical Garden
226 ; Add support for CPT-85xx series of word processors when running CP/M.
227 ;
228 ; edit 4: August 29, 1984 by Bdale Garbee @ CMU
229 ; Add support for Digicomp Delphi 100 and Netronics Smartvid terminal.
230 ;
231 ; edit 3: July 27, 1984 (CJC)
232 ; Shuffle files around for easier assembly by both M80 and LASM.
233 ;
234 ; edit 2: June 4, 1984 [Toad Hall]
235 ; Added Morrow Decision I (the big S100 bus sucker, not the
236 ; little single motherboard one); added Toad Hall TACTrap to deal
237 ; with those working through a TAC and its intercept character.
238 ;
239 ; edit 1: May, 1984 (CJC)
240 ; extracted from CPMBASE.M80 version 3.9; modifications are described
241 ; in the accompanying .UPD file.
242 ;
243
244 FALSE EQU 0
245 TRUE EQU NOT FALSE
246
247 ;
248 ; Assembler type. Define the appropriate one TRUE, the rest FALSE. (We can't
249 ; use ASM, because it cannot handle multiple input files)
250 mac80 EQU FALSE ; For assembly via MAC80 cross-assembler.
251 m80 EQU TRUE ; For assembly via Microsoft's M80.
252 lasm EQU FALSE ; For assembly via LASM, a public-domain
253 ; assembler.
254 ;
255 ; Address at which the overlay should be loaded. This will not
256 ; change often (no more than once per version of KERMIT); it should
257 ; be updated when a new version of KERMIT is released.
258 ;
259
260 ovladr EQU 7000H ; [18] address = 6c00h for Kermit v4.10
261 ;[MF]...
262
263 cpsker EQU FALSE ; building the system-dependent part...
264
265 ; SET some options to FALSE, then SET them TRUE if needed
266 iobyt SET FALSE ;assume we dont want IOBYTE..
267 inout SET FALSE ;... or IN/OUT code
268 termin SET FALSE ; we are not using a terminal
269 ; Also set the CPU speed to a default 2.0 Mhz
270 cpuspd SET 20 ; default to 2 Mhz, in case we dont know
271 ; Assume kit is Z80 based, and set z80 false for non z80 systems.
272 z80 SET TRUE
273
274 ;Which CP/M system hardware are we building KERMIT-80 for?
275 ;One of the following should be TRUE, the rest FALSE:
276 ;
277 ;We have basically three "classes" of systems:
278
279 ;Systems supporting the IO-redirection via I/O-Byte
280
281 bbc EQU FALSE ;[9] Acorn BBC model B
282 ;added code by JAS
283 cifer2 EQU FALSE ; Cifer 1886 using io byte flipping [OBS]
284 cifer3 EQU FALSE ; Cifer 1886 with CP/M Plus [JAS]
285 ; (Not IOBYTE but easier to keep together)
286 cifaux EQU FALSE ; One of above Cifers using AUX port else VL port
287 dmII EQU FALSE ;"Generic" KERMIT-80 for DECMATE II.
288 gener EQU FALSE ;"Generic" Kermit-80, CP/M calls only.
289 ; (terminal required)
290 mikko EQU FALSE ;"Generic" KERMIT-80 for MikroMikko
291 robin EQU FALSE ;DEC VT180 = Generic + VT100 screen control
292
293 ;.. \and Systems supporting direct IN / OUT handling of ports
294 advant EQU FALSE ;[10] North Star Advantage
295 access EQU FALSE ; Access Matrix .. uses port J5 [12]
296 ; (terminal required) [MF]
297 ampro EQU FALSE ; Ampro Little Board (terminal required)
298 basicns EQU FALSE ; Basic Northstar using printer port (CRT req.)
299 bbII EQU FALSE ;BigBoard II (terminal required)
300 brainm EQU FALSE ;Select Superbrain Main port **[obs]
301 braina EQU FALSE ;Select Superbrain AUX port **[obs]
302 comart EQU FALSE ;[10] Comart Communicator
303 ; (terminal required)
304 compro EQU FALSE ;Compupro Interfacer 4 (or 3) [gv]
305 ; (terminal required) [MF]
306 cpt85xx EQU FALSE ;CPT-85xx word processor w/CPM (set ADM3A TRUE)
307 cmemco EQU FALSE ;[10] Cromemco (TU-ART) (terminal required)
308 delphi EQU FALSE ;Digicomp Delphi 100 (terminal required)
309 disc EQU FALSE ; Action Computer Enterprises "Discovery"
310 ; Port B on an 83U user board (CRT required)
311 genie EQU FALSE ;Eaca Genie III
312 h8quad EQU FALSE ;[24] Entry for heath-8. NOT same as H-89
313 heath EQU FALSE ;For Heath/Zenith H89.
314 kpII EQU FALSE ;Kaypro-II
315 horizon EQU FALSE ;[10] North Star Horizon (mother-board)
316 ; (terminal required)
317 m2215 EQU FALSE ; BT Merlin [23] - uses 2651, Terminal rqd
318 mmate EQU FALSE ; PMC - 101 MicroMate (Crt required)
319 mmdI EQU FALSE ;Morrow Micro Decision I (terminal required)
320 mdI EQU FALSE ;Morrow Decision I (the big sucker)
321 ; (terminal required) [Toad Hall]
322 ncrdmv EQU FALSE ; NCR Desision Mate V. (2651 USART) (Term rqd.)
323 norths EQU FALSE ;[CSM] NorthStar Horizon with HSIO-4 board
324 ; (terminal required)
325 pci2651 EQU FALSE ; CP/M with 2651 USART. Needs VDU. [11]
326 rm380zm EQU FALSE ;[14] Research Machines 380Z MDS (5.25" discs)
327 rm380zf EQU FALSE ;[14] Research Machines 380Z FDS (8" discs)
328 s1008 EQU FALSE ; US Micro Sales s1008 (Terminal required)
329 sb6 EQU FALSE ; SB180 6/9 MHz cpu speed conditionals -
330 sb9 EQU FALSE ; set one of these to TRUE, - it will
331 ; automatically set sb180 TRUE
332 ; (terminal reqd for Sb-180 systems)
333 scntpr EQU FALSE ; [majoc 870305] For OEM ScreenTyper
334 sanyo EQU FALSE ;For sanyo mbc-1100 series
335 telcon EQU FALSE ;For TELCON Zorba portable
336 teletek EQU FALSE ; Teletek SYSTEMASTER (terminal rqd)
337 trs80lb EQU FALSE ;For Lifeboat 2.25C CP/M Display
338 trs80pt EQU FALSE ;For Pickles + Trout CP/M Display
339 trsm4 EQU FALSE ;TRS80 Model 4 under Montezuma Micro CPM 2.2
340 vector EQU FALSE ;For Vector Graphics.
341 xer820 EQU FALSE ;[pcc001] Xerox 820
342 z100 EQU FALSE ;For Z-100 under CP/M-85.
343
344 ;.. and Systems doing neither...
345 apmmdm EQU FALSE ;jb Micromodem II in slot 2
346 ap6551 EQU FALSE ;jb apple with 6551 ACIA in serial interface
347 ap6850 EQU FALSE ;[14] Apple with 6850 ACIA in serial interface
348 ;[14] e.g PACT, SSM AIO, Aristocard
349 apcps EQU FALSE ;[9] Apple with CP multifunction card
350 cpc EQU FALSE ; Amstrad CPC CP/M Plus computers
351 cpm3 EQU FALSE ;"Generic" Kermit-80 for CP/M 3.0 (CP/M Plus)
352 ; (terminal required)
353 lobo EQU FALSE ;Lobo Max-80
354 osi EQU FALSE ;For Ohio Scientific.
355 osbrn1 EQU FALSE ;For Osborne 1
356 pcw EQU FALSE ; Amstrad PCW 8256/8512 computers
357 px8 EQU FALSE ;[12] For Epson PX-8
358 torch EQU FALSE ;[obs] Torch does comms via Beeb as IO processor
359 z80mu EQU FALSE ; CP/M-80 Kermit under z80mu emulator on PC
360 hp125 EQU FALSE ;[MF]HP-125 Business Assistant, 8-bit data
361 ; path thru Data Comm 1, 7-bit data path
362 ; thru Data Comm 2 (requires 8th-bit quoting
363 ; for binary transfers on Data Comm 2)
364 ; set VT52 TRUE
365 mbee EQU FALSE ; Microbee Systems - Microbee
366 avrcpm EQU TRUE ;AVR-CP/M (terminal required)
367
368
369 ;.. and for Micros, like the MDI, which have "terminals of choice", you must
370 ;select one of these in addition to selecting the micro itself.
371 ;Also select a terminal for "gener" and "cpm3": use "crt" for the TRUE generic.
372 crt EQU FALSE ;Basic CRT, no cursor positioning
373 adm3a EQU FALSE ;Adm3a Display (or CPT built-in display)
374 adm22 EQU FALSE ;ADM 22 terminal
375 h1500 EQU FALSE ;Hazeltine 1500
376 smrtvd EQU FALSE ;Netronics Smartvid terminal.
377 soroq EQU FALSE ;Soroq IQ-120.. this a guess [OBS]
378 am230 EQU FALSE ;Ampro 230 [13]
379 tvi912 EQU FALSE ;[10] TVI912/920
380 tvi925 EQU FALSE ;TVI925 Display
381 ; (works for Freedom 100 also) [Toad Hall]
382 vt52 EQU FALSE ;VT52 or equivalent (or H19)
383 vt100 EQU TRUE ;VT100 or equivalent
384 wyse EQU FALSE ;Wyse 100 terminal
385 ;
386 ; Several systems are basically the same, with very slight variations,
387 ; so use common code. List these sysems below
388 ;
389 cifer EQU cifer2 OR cifer3 ; DO NOT TOUCH THIS LINE
390 brain EQU brainm OR braina ;For Intertec SuperBrain. **[obs]
391 ;
392 ; flag 380Z system if either selected
393 ;
394 rm380z EQU rm380zm OR rm380zf ;[14]
395 ;
396 trs80 EQU trs80lb OR trs80pt ; if either, flag TRS-80 system.
397 bbI EQU kpII OR xer820 ;[pcc001] flag for bigboard I
398 sb180 EQU sb6 OR sb9 ; Micromint SB180 (BYTE Oct 85)
399 ;
400 ; flag apple system if either selected
401 ;
402 apple EQU apmmdm OR ap6551 OR ap6850 OR apcps
403 ;
404 ; also set termin(al) TRUE if any terminal selected (crt included)
405 termin SET crt OR adm3a OR adm22 OR h1500 OR smrtvd OR am230
406 termin SET termin OR tvi912 OR tvi925 OR vt52 OR vt100
407 termin SET termin OR wyse OR soroq
408
409 ; Now set iobyt or inout TRUE for those systems doing so
410 ; IOBYTE systems...
411 IF robin OR dmII OR gener OR mikko OR cifer2 OR bbc;[**obs]
412 iobyt SET TRUE ;Short conditional for above
413 ENDIF;robin OR dmII OR gener OR cifer2 OR bbc
414
415 ; INOUT systems...
416 IF brain OR vector OR sanyo or compro
417 inout SET TRUE ;Short conditional for above
418 ENDIF;brain OR vector OR sanyo OR compro
419
420 IF heath OR h8quad OR z100 OR trs80 OR telcon OR bbI
421 inout SET TRUE ;Short conditional for above
422 ENDIF;heath OR h8quad OR z100 OR trs80 OR telcon OR bbI
423
424 IF bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths ;running out of room
425 inout SET TRUE ;Short conditional for above
426 ENDIF;bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths
427
428 IF advant OR rm380z OR comart OR horizon OR cmemco ;[9] [10] more room here
429 inout SET TRUE ;Short conditional for above
430 ENDIF;advant OR rm380z OR comart OR horizon OR cmemco
431
432 IF pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek;[11] and even more room
433 inout SET TRUE ;Short conditional for above
434 ENDIF ;pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek [11]
435
436 IF access OR basicns OR s1008 OR mmate OR disc ; [12]
437 inout SET TRUE ;Short conditional for above
438 ENDIF ; access OR basicns OR s1008 OR mmate OR disc [12]
439
440 IF genie OR trsm4 OR ampro
441 inout SET TRUE ;Short conditional for above
442 ENDIF ; genie OR trsm4 OR ampro
443
444
445 ; Toad Hall TAC Trap: If you're going through a TAC, it will
446 ; cough on its Intercept Character (usually a @ (* - 40H)). Sending it
447 ; twice forces the TAC to recognize it as a valid ASCII character,
448 ; and it'll send only one on to the host. If you've SET the TACTrap
449 ; to OFF, it will be a null character, and nothing will happen. If you
450 ; set it on, it will be your selected TAC intercept character (or will
451 ; default to the common intercept char, '@'.
452 ; If you never expect to have to work through such a beastie, just set
453 ; TAC to false and forget all this mess. [Toad Hall]
454
455 tac EQU FALSE ; gonna work through a TAC?
456 tacval EQU '@' ;Typical TAC intercept character
457
458 ; Processor speed in units of 100KHz
459 ; for bbII, kpII, cpt85xx, advance, apple,bbc,px8 & rm380z timing loop [12]
460 ; We have to set these before CPXCOM to make sure we update the CPU speed.
461
462 ; The following systems I have no idea of cpu speed. Can anyone oblige??
463 ; robin, dmII, mikko, vector, heath, h8quad, z100, scntpr
464 ; trs80 (both), telcon, mmdI, mdI, delphi, ncrdmv,
465 ; cromemco, teletek, osi, lobo
466
467 IF avrcpm ; For the kermit delay loop, a 20Mhz AVR-CP/M
468 cpuspd SET 22 ; behaves like a 2.2MHz Z80.
469 ENDIF; avrcpm
470
471 IF z80mu
472 cpuspd SET 2 ; a PC is about 200khz Z80 equivalent
473 ENDIF; z80mu
474
475 IF apple OR cpt85xx OR px8 OR heath OR h8quad ;[9] [12] What rate is heath?
476 cpuspd SET 20 ; Apple Softcard, CPT-85xx: 2.0 MHz
477 ; ('cause of integral video?)
478 ENDIF; apple OR cpt85xx OR px8 OR heath OR h8quad [12]
479
480 IF kpII OR xer820 OR scntpr OR osbrn1 ;[9] What speed is scntpr??
481 cpuspd SET 25 ; original Kaypro II,Xerox 820: 2.5 MHz
482 ENDIF;kpII OR xer820 OR scntpr OR osbrn1
483
484 IF PCW or CPC
485 cpuspd SET 33 ; all 4MHz but insterted wait states
486 ; reduce to an effective 3.3 MHz.
487 ENDIF ;pcw OR cpc
488
489 IF brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4
490 cpuspd SET 40 ; 4.0 MHz CPU
491 ENDIF; brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4
492
493 IF cifer OR rm380z OR comart OR horizon OR norths
494 cpuspd SET 40 ; 4.0 MHz CPU
495 ENDIF; cifer OR rm380z OR comart OR horizon OR norths
496
497 IF disc OR mmate OR s1008 OR access OR basicns ;[29] This is a guess.. Most are 4Mhz
498 cpuspd SET 40 ; 4.0 MHz CPU
499 ENDIF ;disc OR mmate OR s1008 OR access OR basicns [29]
500
501 IF m2215
502 cpuspd SET 50 ; BT Merlin Rair Black Box is 8085 at 5 Mhz
503 ENDIF ;m2215
504
505 IF bbc or sb6
506 cpuspd SET 60 ; BBC or SB-180 with 6Mhz Z80/61480
507 ENDIF;bbc OR sb6
508
509 IF sb9
510 cpuspd SET 90 ; SB-180 with 9 Mhz clock
511 ENDIF;sb9
512
513 IF hp125 OR telcon
514 cpuspd SET 40 ;[MF]HP125 or TELCON
515 ENDIF;hp125 OR telcon
516
517 IF mbee
518 cpuspd SET 33 ; Microbee has 3.375MHz Z80
519 ENDIF; mbee
520
521 ; Set Z80 flag FALSE for non Z80 or unknown CPU systems
522 IF FALSE ; assume all systems are not z80 based
523 ;z80 SET FALSE
524 ENDIF ;FALSE
525
526 ; Now, lets see what family we are assembling for. Reset all
527 ; family file to FALSE
528
529 torfam SET FALSE ; not Torch family file
530 ciffam SET FALSE ; not Cifer kit
531 appfam SET FALSE ; not Apples
532 norfam SET FALSE ; not North Star kit
533 pcwfam SET FALSE ; not Amstrad PCW kit
534 bbifam SET FALSE ; not the BBI family
535 heafam SET FALSE ; not Heath, Z100, telcon,or screentyper
536 sbfam SET FALSE ; not an SB180 system
537 merfam SET FALSE ; not a BT Merlin system
538 sanfam SET FALSE ; not a Sanyo
539 comfam SET FALSE ; not a compupro
540 genfam SET FALSE ; not a genie
541 trsfam SET FALSE ; not a trs-80 Model 4
542 z80fam SET FALSE ; not z80mu system
543 beefam SET FALSE ; not a Microbee system
544 acfam SET FALSE ; not avrcpm system
545 sysfam SET TRUE ; ... but assume the worst, and its in
546 ; the CPXSYS.ASM file
547
548
549 IF (torch OR pci2651 OR ncrdmv OR brain) ;[15]
550 torfam SET TRUE ; we are to use the Torch family file
551 .printx * torfam set TRUE *
552 ;(Yeah, I know, there are more than Torch systems in it)
553 ENDIF ;(torch OR pci2651 OR ncrdmv OR brain) [15]
554
555 IF (cifer)
556 ciffam SET TRUE ; we are to use the cifer family file
557 .printx * ciffam set TRUE *
558 ENDIF ;cifer
559
560 IF apple ;[15]
561 appfam SET TRUE ; apples
562 .printx * appfam set TRUE *
563 ENDIF ;apple [15]
564
565 IF (horizon OR basicns OR norths OR advant OR comart) ;[15]
566 norfam SET TRUE ; north star kit
567 .printx * norfam set TRUE *
568 ENDIF ;(horizon OR basicns OR norths OR advant OR comart) [15]
569
570 IF (pcw OR cpc) ;[15]
571 pcwfam SET TRUE ; Amstrad PCW kit
572 .printx * pcwfam set TRUE *
573 ENDIF ;pcw OR cpc [15]
574
575 IF (kpII OR xer820 OR bbII OR ampro)
576 bbifam SET TRUE ; The Bigboard, Kaypro, Xerox and Ampro family
577 .printx * bbifam set TRUE *
578 ENDIF ;(kpII or xer820 OR bbII OR ampro)
579
580 IF (heath OR h8quad OR telcon OR z100 OR scntpr)
581 heafam SET TRUE ; Doing Heath, z100, telcon, or screentyper
582 .printx * heafam set TRUE *
583 ENDIF ;(heath OR h8quad OR telcon OR z100 OR scntpr)
584
585 IF sb180
586 sbfam SET TRUE ; doing an SB180 system
587 .printx * sbfam set TRUE *
588 ENDIF ; sb180
589
590 IF m2215
591 merfam SET TRUE ; doing a BT Merlin system
592 .printx * merfam set TRUE *
593 ENDIF ; m2215
594
595 IF sanyo
596 sanfam SET TRUE ; doing a Sanyo MBC-1100 system
597 .printx * sanfam set TRUE *
598 ENDIF ; sanyo
599
600 IF compro
601 comfam SET TRUE ; doing a Compupro system
602 .printx * comfam set TRUE *
603 ENDIF ; compro
604
605 IF genie
606 genfam SET TRUE ; doing a Genie system
607 .printx * genfam set TRUE *
608 ENDIF ; genie
609
610 IF trsm4
611 trsfam SET TRUE ; doing a TRS-80 M4 system
612 .printx * trsfam set TRUE *
613 ENDIF ; trs4m
614
615 IF z80mu
616 z80fam SET TRUE ; doing a z80mu emulation
617 .printx * z80fam set TRUE *
618 ENDIF ; z80mu
619
620 IF mbee
621 beefam SET TRUE ; doing a Microbee system
622 .printx * beefam set TRUE *
623 ENDIF ; mbee
624
625 IF avrcpm
626 acfam SET TRUE ; doing a AVR-CP/M System
627 .printx * acfam set TRUE *
628 ENDIF ; avrcpm
629
630 ; Now, if none of the above, then its the older CPXSYS.ASM file we want
631
632 IF (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam
633 sysfam SET FALSE ; Were not doing the CPXSYS.ASM file
634 .printx * sysfam set FALSE *
635 ENDIF ; (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam
636
637 IF (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam
638 sysfam SET FALSE ; Were not doing the CPXSYS.ASM file
639 .printx * sysfam set FALSE *
640 ENDIF ; (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam
641
642 IF (genfam OR trsfam OR z80fam OR beefam OR acfam) AND sysfam
643 sysfam SET FALSE ; Were not doing the CPXSYS.ASM file
644 .printx * sysfam set FALSE *
645 ENDIF ; (genfam OR trsfam OR z80fam OR mbeefam OR acfam) AND sysfam
646
647 IF sysfam
648 .printx * sysfam set TRUE *
649 ENDIF
650
651 IF lasm
652 LINK CPSDEF ; Use the system independent declares
653 ENDIF;lasm [Toad Hall]
654
655 ; If we're still here, must be M80 or MAC80. Collect the rest of
656 ; the sources.
657 .sfcond
658
659
660 INCLUDE CPSDEF.ASM ; common definitions
661 INCLUDE CPXLNK.ASM ; linkage area description
662 INCLUDE CPXCOM.ASM ; include common code
663 INCLUDE CPXSWT.ASM ; this wont do much, but will announce machine
664
665 IF torfam ;[15]
666 INCLUDE CPXTOR.ASM ; we are assembling for Torch, Cifer etc
667 ENDIF ;torfam [15]
668
669 IF ciffam
670 INCLUDE CPXCIF.ASM ; we are assembling for a Cifer
671 ENDIF ;ciffam
672
673 IF appfam ;[15]
674 INCLUDE CPXAPP.ASM ; we are assembling for an apple
675 ENDIF ;appfam [15]
676
677 IF norfam ;[15]
678 INCLUDE CPXNOR.ASM ; we are assembling a NortStar machine
679 ENDIF ;norfam [15]
680
681 IF pcwfam ;[15]
682 INCLUDE CPXPCW.ASM ; we are assembling for the Amstrad PCW machine
683 ENDIF ;pcwfam [15]
684
685 IF bbifam
686 INCLUDE CPXBBI.ASM ; assembling for BigBoard, Kaypro, Xerox
687 ; & Ampro Little Board
688 ENDIF ;bbifam
689
690 IF sysfam ;[15]
691 INCLUDE CPXSYS.ASM ; system-dependent code and tables (Part 1)
692 INCLUDE CPXSY2.ASM ; system-dependent code and tables (Part 2)
693 ENDIF ;sysfam [15]
694
695 IF heafam
696 INCLUDE CPXHEA.ASM
697 ENDIF ;heafam
698
699 IF m2215
700 INCLUDE CPXMRL.ASM
701 ENDIF ;m2215
702
703 IF sbfam
704 INCLUDE CPXSB.ASM
705 ENDIF ;sbfam
706
707 IF sanfam
708 INCLUDE CPXSYO.ASM
709 ENDIF ;sanfam
710
711 IF comfam
712 INCLUDE CPXPRO.ASM
713 ENDIF ;comfam
714
715 IF genfam
716 INCLUDE CPXGNI.ASM
717 ENDIF ;genfam
718
719 IF trsfam
720 INCLUDE CPXTM4.ASM
721 ENDIF ;trsfam
722
723 IF z80fam
724 INCLUDE CPXZ80.ASM
725 ENDIF ;z80fam
726
727 IF beefam
728 INCLUDE CPXBEE.ASM
729 ENDIF ;beefam
730
731 IF acfam
732 INCLUDE CPXAC.ASM
733 ENDIF ;acfam
734
735 IF termin ; any terminal selected?
736 INCLUDE CPXVDU.ASM ;[15] Just in case we need a VDU...
737 ENDIF ;termin
738 END