home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / cpm80 / cpxtyp.asm < prev    next >
Assembly Source File  |  2020-01-01  |  27KB  |  723 lines

  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    FALSE        ; For assembly via Microsoft's M80.
  252. lasm    EQU    TRUE        ; 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.  
  367. ;.. and for Micros, like the MDI, which have "terminals of choice", you must
  368. ;select one of these in addition to selecting the micro itself.
  369. ;Also select a terminal for "gener" and "cpm3": use "crt" for the TRUE generic.
  370. crt    EQU    FALSE        ;Basic CRT, no cursor positioning
  371. adm3a    EQU    FALSE        ;Adm3a Display (or CPT built-in display)
  372. adm22    EQU    FALSE        ;ADM 22 terminal
  373. h1500    EQU    FALSE        ;Hazeltine 1500
  374. smrtvd    EQU    FALSE        ;Netronics Smartvid terminal.
  375. soroq    EQU    FALSE        ;Soroq IQ-120.. this a guess [OBS]
  376. am230    EQU    FALSE        ;Ampro 230 [13]
  377. tvi912    EQU    FALSE        ;[10] TVI912/920
  378. tvi925    EQU    FALSE        ;TVI925 Display
  379.                 ; (works for Freedom 100 also)  [Toad Hall]
  380. vt52    EQU    FALSE        ;VT52 or equivalent (or H19)
  381. vt100    EQU    FALSE        ;VT100 or equivalent
  382. wyse    EQU    FALSE        ;Wyse 100 terminal
  383. ;
  384. ; Several systems are basically the same, with very slight variations,
  385. ;    so use common code.  List these sysems below
  386. ;
  387. cifer    EQU    cifer2 OR cifer3    ; DO NOT TOUCH THIS LINE
  388. brain    EQU    brainm OR braina    ;For Intertec SuperBrain. **[obs]
  389. ;
  390. ; flag 380Z system if either selected
  391. ;
  392. rm380z    EQU rm380zm OR rm380zf ;[14]
  393. ;
  394. trs80    EQU    trs80lb    OR trs80pt ; if either, flag TRS-80 system.
  395. bbI    EQU    kpII OR    xer820    ;[pcc001] flag for bigboard I
  396. sb180    EQU    sb6 OR sb9    ; Micromint SB180 (BYTE Oct 85)
  397. ;
  398. ; flag apple system if either selected
  399. ;
  400. apple    EQU    apmmdm OR ap6551 OR ap6850 OR apcps
  401. ;
  402. ; also set termin(al) TRUE if any terminal selected (crt included)
  403. termin    SET    crt OR adm3a OR adm22 OR h1500 OR smrtvd OR am230
  404. termin    SET    termin OR tvi912 OR tvi925 OR vt52 OR vt100
  405. termin    SET    termin OR wyse OR soroq
  406.  
  407. ; Now set iobyt or inout TRUE for those systems doing so
  408. ; IOBYTE systems...
  409. IF robin OR dmII OR gener OR mikko OR cifer2 OR bbc;[**obs]
  410. iobyt    SET    TRUE        ;Short conditional for above
  411. ENDIF;robin OR dmII OR gener OR cifer2 OR bbc
  412.  
  413. ; INOUT systems...
  414. IF brain OR vector OR sanyo or compro
  415. inout    SET    TRUE        ;Short conditional for above
  416. ENDIF;brain OR vector OR sanyo OR compro
  417.  
  418. IF heath OR h8quad OR z100 OR trs80 OR telcon OR bbI
  419. inout    SET    TRUE        ;Short conditional for above
  420. ENDIF;heath OR h8quad OR z100 OR trs80 OR telcon OR bbI
  421.  
  422. IF bbII    OR mmdI    OR mdI OR delphi OR cpt85xx OR norths    ;running out of room
  423. inout    SET    TRUE        ;Short conditional for above
  424. ENDIF;bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths
  425.  
  426. IF advant OR rm380z OR comart OR horizon OR cmemco    ;[9] [10] more room here
  427. inout    SET    TRUE        ;Short conditional for above
  428. ENDIF;advant OR rm380z OR comart OR horizon OR cmemco
  429.  
  430. IF pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek;[11] and even more room
  431. inout    SET    TRUE        ;Short conditional for above
  432. ENDIF    ;pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek [11]
  433.  
  434. IF access OR basicns OR    s1008 OR mmate OR disc ; [12]
  435. inout    SET    TRUE        ;Short conditional for above
  436. ENDIF ; access OR basicns OR s1008 OR mmate OR disc [12]
  437.  
  438. IF genie OR trsm4 OR ampro
  439. inout    SET    TRUE        ;Short conditional for above
  440. ENDIF ; genie OR trsm4 OR ampro
  441.  
  442.  
  443. ; Toad Hall TAC Trap:  If you're going through a TAC, it will
  444. ; cough on its Intercept Character (usually a @ (* - 40H)).  Sending it
  445. ; twice forces the TAC to recognize it as a valid ASCII character,
  446. ; and it'll send only one on to the host.  If you've SET the TACTrap
  447. ; to OFF, it will be a null character, and nothing will happen.  If you
  448. ; set it on, it will be your selected TAC intercept character (or will
  449. ; default to the common intercept char, '@'.
  450. ; If you never expect to have to work through such a beastie, just set
  451. ; TAC to false and forget all this mess.  [Toad Hall]
  452.  
  453. tac    EQU    FALSE        ; gonna work through a TAC?
  454. tacval    EQU    '@'             ;Typical TAC intercept character
  455.  
  456. ; Processor speed in units of 100KHz
  457. ; for bbII, kpII, cpt85xx, advance, apple,bbc,px8 & rm380z timing loop [12]
  458. ; We have to set these before CPXCOM to make sure we update the CPU speed.
  459.  
  460. ; The following systems I have no idea of cpu speed. Can anyone oblige??
  461. ;    robin, dmII, mikko, vector, heath, h8quad, z100, scntpr
  462. ;    trs80 (both), telcon, mmdI, mdI, delphi, ncrdmv,
  463. ;    cromemco, teletek, osi, lobo
  464.  
  465. IF z80mu
  466. cpuspd    SET    2        ; a PC is about 200khz Z80 equivalent
  467. ENDIF; z80mu
  468.  
  469. IF apple OR cpt85xx OR px8 OR heath OR h8quad ;[9] [12] What rate is heath?
  470. cpuspd    SET    20        ; Apple Softcard, CPT-85xx: 2.0 MHz
  471.                 ; ('cause of integral video?)
  472. ENDIF; apple OR cpt85xx OR px8 OR heath OR h8quad [12]
  473.  
  474. IF kpII    OR xer820 OR scntpr OR osbrn1 ;[9] What speed is scntpr??
  475. cpuspd    SET    25        ; original Kaypro II,Xerox 820: 2.5 MHz
  476. ENDIF;kpII OR xer820 OR scntpr OR osbrn1
  477.  
  478. IF PCW or CPC
  479. cpuspd    SET    33         ; all 4MHz but insterted wait states
  480.                 ; reduce to an effective 3.3 MHz.
  481. ENDIF    ;pcw OR cpc
  482.  
  483. IF brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4
  484. cpuspd    SET    40        ; 4.0 MHz CPU
  485. ENDIF; brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4
  486.  
  487. IF cifer OR rm380z OR comart OR horizon OR norths
  488. cpuspd    SET    40        ; 4.0 MHz CPU
  489. ENDIF; cifer OR rm380z OR comart OR horizon OR norths
  490.  
  491. IF disc    OR mmate OR s1008 OR access OR basicns ;[29] This is a guess.. Most are 4Mhz
  492. cpuspd    SET    40        ; 4.0 MHz CPU
  493. ENDIF    ;disc OR mmate OR s1008 OR access OR basicns [29]
  494.  
  495. IF m2215
  496. cpuspd    SET    50        ; BT Merlin Rair Black Box is 8085 at 5 Mhz
  497. ENDIF    ;m2215
  498.  
  499. IF bbc or sb6
  500. cpuspd    SET    60        ; BBC or SB-180 with 6Mhz Z80/61480
  501. ENDIF;bbc OR sb6
  502.  
  503. IF sb9
  504. cpuspd    SET    90        ; SB-180 with 9 Mhz clock
  505. ENDIF;sb9
  506.  
  507. IF hp125 OR telcon
  508. cpuspd    SET    40        ;[MF]HP125 or TELCON
  509. ENDIF;hp125 OR telcon 
  510.  
  511. IF mbee
  512. cpuspd    SET    33        ; Microbee has 3.375MHz Z80
  513. ENDIF; mbee
  514.  
  515. ; Set Z80 flag FALSE for non Z80 or unknown CPU systems
  516. IF    FALSE            ; assume all systems are not z80 based
  517. ;z80    SET    FALSE
  518. ENDIF    ;FALSE
  519.  
  520. ; Now, lets see what family we are assembling for.  Reset all 
  521. ;    family file to FALSE
  522.  
  523. torfam  SET     FALSE        ; not Torch family file
  524. ciffam    SET    FALSE        ; not Cifer kit
  525. appfam    SET     FALSE        ; not Apples
  526. norfam    SET    FALSE        ; not North Star kit
  527. pcwfam    SET    FALSE        ; not Amstrad PCW kit
  528. bbifam    SET    FALSE        ; not the BBI family
  529. heafam    SET    FALSE        ; not Heath, Z100, telcon,or screentyper
  530. sbfam    SET    FALSE        ; not an SB180 system
  531. merfam    SET     FALSE        ; not a BT Merlin system
  532. sanfam    SET    FALSE        ; not a Sanyo
  533. comfam    SET    FALSE        ; not a compupro
  534. genfam    SET    FALSE        ; not a genie
  535. trsfam    SET    FALSE        ; not a trs-80 Model 4
  536. z80fam    SET    FALSE        ; not z80mu system
  537. beefam    SET    FALSE        ; not a Microbee system
  538. sysfam    SET    TRUE        ; ... but assume the worst, and its in
  539.                 ; the CPXSYS.ASM file
  540.  
  541.  
  542. IF      (torch OR pci2651 OR ncrdmv OR brain)   ;[15]
  543. torfam  SET     TRUE            ; we are to use the Torch family file
  544. .printx * torfam set TRUE *
  545. ;(Yeah, I know, there are more than Torch systems in it)
  546. ENDIF    ;(torch OR pci2651 OR ncrdmv OR brain) [15]
  547.  
  548. IF      (cifer)
  549. ciffam    SET    TRUE        ; we are to use the cifer family file
  550. .printx * ciffam set TRUE *
  551. ENDIF    ;cifer
  552.  
  553. IF      apple   ;[15]
  554. appfam    SET     TRUE        ; apples
  555. .printx * appfam set TRUE *
  556. ENDIF   ;apple [15]
  557.  
  558. IF      (horizon OR basicns OR norths OR advant OR comart) ;[15]
  559. norfam    SET    TRUE        ; north star kit
  560. .printx * norfam set TRUE *
  561. ENDIF   ;(horizon OR basicns OR norths OR advant OR comart) [15]
  562.  
  563. IF      (pcw OR cpc)    ;[15]
  564. pcwfam    SET    TRUE        ; Amstrad PCW kit
  565. .printx * pcwfam set TRUE *
  566. ENDIF   ;pcw OR cpc [15]
  567.  
  568. IF      (kpII OR xer820 OR bbII OR ampro)
  569. bbifam    SET    TRUE        ; The Bigboard, Kaypro, Xerox and Ampro family
  570. .printx * bbifam set TRUE *
  571. ENDIF    ;(kpII or xer820 OR bbII OR ampro)
  572.  
  573. IF (heath OR h8quad OR telcon OR z100 OR scntpr)
  574. heafam    SET    TRUE        ; Doing Heath, z100, telcon, or screentyper
  575. .printx * heafam set TRUE *
  576. ENDIF   ;(heath OR h8quad OR telcon OR z100 OR scntpr)
  577.  
  578. IF sb180
  579. sbfam    SET    TRUE        ; doing an SB180 system
  580. .printx * sbfam set TRUE *
  581. ENDIF    ; sb180
  582.  
  583. IF m2215
  584. merfam    SET     TRUE        ; doing a BT Merlin system
  585. .printx * merfam set TRUE *
  586. ENDIF    ; m2215
  587.  
  588. IF sanyo
  589. sanfam    SET     TRUE        ; doing a Sanyo MBC-1100 system
  590. .printx * sanfam set TRUE *
  591. ENDIF    ; sanyo
  592.  
  593. IF compro
  594. comfam    SET     TRUE        ; doing a Compupro system
  595. .printx * comfam set TRUE *
  596. ENDIF    ; compro
  597.  
  598. IF genie
  599. genfam    SET     TRUE        ; doing a Genie system
  600. .printx * genfam set TRUE *
  601. ENDIF    ; genie
  602.  
  603. IF trsm4
  604. trsfam    SET     TRUE        ; doing a TRS-80 M4 system
  605. .printx * trsfam set TRUE *
  606. ENDIF    ; trs4m
  607.  
  608. IF z80mu
  609. z80fam    SET     TRUE        ; doing a z80mu emulation
  610. .printx * z80fam set TRUE *
  611. ENDIF    ; z80mu
  612.  
  613. IF mbee
  614. beefam    SET    TRUE        ; doing a Microbee system
  615. .printx * beefam set TRUE *
  616. ENDIF    ; mbee
  617.  
  618. ; Now, if none of the above, then its the older CPXSYS.ASM file we want
  619.  
  620. IF (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam
  621. sysfam    SET    FALSE        ; Were not doing the CPXSYS.ASM file
  622. .printx * sysfam set FALSE *
  623. ENDIF    ; (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam
  624.  
  625. IF (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam
  626. sysfam    SET    FALSE        ; Were not doing the CPXSYS.ASM file
  627. .printx * sysfam set FALSE *
  628. ENDIF    ; (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam
  629.  
  630. IF (genfam OR trsfam OR z80fam OR beefam) AND sysfam
  631. sysfam    SET    FALSE        ; Were not doing the CPXSYS.ASM file
  632. .printx * sysfam set FALSE *
  633. ENDIF    ; (genfam OR trsfam OR z80fam OR mbeefam) AND sysfam
  634.  
  635. IF sysfam
  636. .printx * sysfam set TRUE *
  637. ENDIF
  638.  
  639. IF lasm
  640.     LINK    CPSDEF        ; Use the system independent declares
  641. ENDIF;lasm  [Toad Hall]
  642.  
  643. ; If we're still here, must be M80 or MAC80.  Collect the rest of
  644. ; the sources.
  645. .sfcond
  646.  
  647.  
  648.         INCLUDE CPSDEF.ASM      ; common definitions
  649.         INCLUDE CPXLNK.ASM      ; linkage area description
  650.     INCLUDE    CPXCOM.ASM    ; include common code
  651.         INCLUDE CPXSWT.ASM      ; this wont do much, but will announce machine
  652.  
  653. IF      torfam                  ;[15]
  654.         INCLUDE CPXTOR.ASM      ; we are assembling for Torch, Cifer etc
  655. ENDIF   ;torfam                 [15]
  656.  
  657. IF    ciffam
  658.     INCLUDE    CPXCIF.ASM    ; we are assembling for a Cifer
  659. ENDIF    ;ciffam
  660.  
  661. IF      appfam                  ;[15]
  662.         INCLUDE CPXAPP.ASM      ; we are assembling for an apple
  663. ENDIF   ;appfam                 [15]
  664.  
  665. IF      norfam                  ;[15]
  666.         INCLUDE CPXNOR.ASM      ; we are assembling a NortStar machine
  667. ENDIF   ;norfam                 [15]
  668.  
  669. IF      pcwfam                  ;[15]
  670.         INCLUDE CPXPCW.ASM      ; we are assembling for the Amstrad PCW machine
  671. ENDIF   ;pcwfam                 [15]
  672.  
  673. IF      bbifam
  674.         INCLUDE CPXBBI.ASM    ; assembling for BigBoard, Kaypro, Xerox
  675.                 ; & Ampro Little Board
  676. ENDIF   ;bbifam
  677.  
  678. IF      sysfam                  ;[15]
  679.         INCLUDE CPXSYS.ASM      ; system-dependent code and tables (Part 1)
  680.         INCLUDE CPXSY2.ASM      ; system-dependent code and tables (Part 2)
  681. ENDIF   ;sysfam                 [15]
  682.  
  683. IF    heafam
  684.     INCLUDE CPXHEA.ASM
  685. ENDIF    ;heafam
  686.  
  687. IF    m2215
  688.     INCLUDE    CPXMRL.ASM
  689. ENDIF    ;m2215
  690.  
  691. IF    sbfam
  692.     INCLUDE    CPXSB.ASM
  693. ENDIF    ;sbfam
  694.  
  695. IF    sanfam
  696.     INCLUDE    CPXSYO.ASM
  697. ENDIF    ;sanfam
  698.  
  699. IF    comfam
  700.     INCLUDE    CPXPRO.ASM
  701. ENDIF    ;comfam
  702.  
  703. IF    genfam
  704.     INCLUDE    CPXGNI.ASM
  705. ENDIF    ;genfam
  706.  
  707. IF    trsfam
  708.     INCLUDE    CPXTM4.ASM
  709. ENDIF    ;trsfam
  710.  
  711. IF    z80fam
  712.     INCLUDE    CPXZ80.ASM
  713. ENDIF    ;z80fam
  714.  
  715. IF    beefam
  716.     INCLUDE CPXBEE.ASM
  717. ENDIF    ;beefam
  718.  
  719. IF termin            ; any terminal selected?
  720.         INCLUDE CPXVDU.ASM      ;[15] Just in case we need a VDU...
  721. ENDIF    ;termin
  722.         END
  723.