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