home *** CD-ROM | disk | FTP | other *** search
- ; CP4TYP.ASM
- ; KERMIT - (Celtic for "FREE")
- ;
- ; This is the CP/M-80 implementation of the Columbia University
- ; KERMIT file transfer protocol.
- ;
- ; Version 4.0
- ;
- ; Copyright June 1981,1982,1983,1984,1985
- ; Columbia University
- ;
- ; Originally written by Bill Catchings of the Columbia University Center for
- ; Computing Activities, 612 W. 115th St., New York, NY 10025.
- ;
- ; Contributions by Frank da Cruz, Daphne Tzoar, Bernie Eiben,
- ; Bruce Tanner, Nick Bush, Greg Small, Kimmo Laaksonen, Jeff Damens, and many
- ; others.
- ;
- ; This is the header file for building the system-dependent overlay
- ; for KERMIT. It contains the definitions used to select the target
- ; system, and collects (via INCLUDE or LINK directives) the remaining
- ; code. If the target system is one of the supported systems
- ; described below, then this is the only file that needs to be
- ; edited.
- ;
- ; revision history:
- ;
- ; edit 12 5 Febuary, 1986 by OBSchou
- ; merged in conditionals for Epson PX8 (px8). Code from Tony Addyman
- ; Salford University, England.
- ; Added code from other contibutors for Basic Northstar (basicns),
- ; Access-Matrix (access), US Micro Sales s1008 (s1008),
- ; Micro Mate (mmate), A.C.E. Discovery (disc).
- ; These I cannot test: please send comments back if these are buggy.
- ;
- ; edit 11 29 January 1985 by OBSchou @ multics.lut.ac.uk
- ; added in code for 2651 USART for use with CP/M and a VDU
- ;
- ; edit 10: 21 November, 1985 by ajcole @ leeds.ai
- ; Merged in support for the following:
- ; North Star Horizon without SIO-4 (horizon)
- ; Comart Communicator (comart)
- ; Cromemco TU-ART interface (cmemco)
- ; TVI912/920 VDUs (tvi912)
- ;
- ; edit 9 24 October by OBSchou. Merged code from B Robertson from
- ; Aberdeen University. He writes:
- ; September 20, 1985 by B Robertson, Aberdeen Univ. Computing Centre.
- ; Add support for Research Machines 380Z, North Star Advantage, Acorn
- ; BBC with Z80 co-processor and APPLE II with Mountain Computers CPS
- ; Multifunction card.
- ;
- ; edit 8: 11 October, 1985 by OBSchou
- ; tidied up code around Superbrain main/aux port business
- ;
- ; edit 7: 11 June, 1985 by O B Schou, Loughborough University of Tech.
- ; Loughborough, Leics, England.
- ; Added code for Torch (Second processor to BBC-B) and Cifer 1886
- ; Hopefully this code will work with Torchpacks, and Cifer 26xx
- ; and 28xx series computers. Edits marked by OBS
- ;
- ; edit 6: 9-Feb-85 by CJC
- ; Merge Northstar Horizon, Lobo MAX, and Xerox 820 changes:
- ; 13-Dec-84 Add Northstar Horizon with SIO-4 board, port 5 at 1200 [CSM]
- ; 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809
- ;
- ;pcc001 27-Dec-84 vjc modules: cp4sys,cp4typ
- ; Add conditional for Xerox 820. I thought at first I could
- ; live with the kaypro conditional, but it's enough of a pain
- ; that I added it back in. The clear-to-end-of-screen char
- ; is different, breaking many programs in VT52 mode, and the
- ; default escape char control-\, is not at all obvious how
- ; to type on the 820 keyboard. If you muddle through the
- ; key translation table, it turns out to be control-comma.
- ; Rather than OR xer820 all the occurances of kpII conditionals
- ; I added a bbI conditional for all common code for the big
- ; board I based machines that is automatically turned on by
- ; either kpII or xer820. This will also make it easier in
- ; the future if another flavor of bigboard is added.
- ;
- ;pcc010 2-Jan-85 vjc modules:cp4pkt,cp4typ
- ; Control-C during send or recieve clobbers some of the screen
- ; and doesn't look nice. Position the cursor to end of screen
- ; before returning to main loop.
- ;
- ;pcc013 8-Jan-85 vjc modules:cp4mit,cp4utl,cp4typ
- ; Replace CLOSE command to cancel session logging to SET
- ; LOGGING ON/OFF. This seems to fit in with the command
- ; structure better. Default the log file to KERMIT.LOG
- ; incase no previous LOG command. Logging is also enabled
- ; by LOG command, as before.
- ;
- ; edit 5: October 13, 1984 by L M Jones, JCC, for New York Botanical Garden
- ; Add support for CPT-85xx series of word processors when running CP/M.
- ;
- ; edit 4: August 29, 1984 by Bdale Garbee @ CMU
- ; Add support for Digicomp Delphi 100 and Netronics Smartvid terminal.
- ;
- ; edit 3: July 27, 1984 (CJC)
- ; Shuffle files around for easier assembly by both M80 and LASM.
- ;
- ; edit 2: June 4, 1984 [Toad Hall]
- ; Added Morrow Decision I (the big S100 bus sucker, not the
- ; little single motherboard one); added Toad Hall TACTrap to deal
- ; with those working through a TAC and its intercept character.
- ;
- ; edit 1: May, 1984 (CJC)
- ; extracted from CPMBASE.M80 version 3.9; modifications are described
- ; in the accompanying .UPD file.
- ;
-
- FALSE EQU 0
- TRUE EQU NOT FALSE
-
- ;
- ; Assembler type. Define the appropriate one TRUE, the rest FALSE. (We can't
- ; use ASM, because it cannot handle multiple input files)
- mac80 EQU FALSE ; For assembly via MAC80 cross-assembler.
- m80 EQU FALSE ; For assembly via Microsoft's M80.
- lasm EQU true ; For assembly via LASM, a public-domain
- ; assembler.
-
- ;
- ; Address at which the overlay should be loaded. This will not
- ; change often (no more than once per version of KERMIT); it should
- ; be updated when a new version of KERMIT is released.
- ovladr EQU 3700H ; [pcc013] value for KERMIT v4.04
-
- ;Which CP/M system hardware are we building KERMIT-80 for?
- ;One of the following should be TRUE, the rest FALSE:
- ;
- ;We have basically three "classes" of systems:
-
- ;Systems supporting the IO-redirection via I/O-Byte
-
- robin EQU FALSE ;DEC VT180 = Generic + VT100 screen control
- gener EQU FALSE ;"Generic" Kermit-80, CP/M calls only.
- ; (terminal required)
- dmII EQU FALSE ;"Generic" KERMIT-80 for DECMATE II.
- mikko EQU FALSE ;"Generic" KERMIT-80 for MikroMikko
- cifer EQU FALSE ; Cifer 1886 using io byte flipping [OBS]
- bbc EQU FALSE ;[9] Acorn BBC model B
-
- IF robin OR dmII OR gener OR mikko OR cifer OR bbc;[**obs]
- iobyt EQU TRUE ;Short conditional for above
- inout EQU FALSE
- ENDIF;robin OR dmII OR gener OR cifer OR bbc
-
- ;.. and Systems supporting direct IN / OUT handling of ports
- brainm EQU FALSE ;Select Superbrain Main port **[obs]
- braina EQU FALSE ;Select Superbrain AUX port **[obs]
- brain EQU brainm OR braina ;For Intertec SuperBrain. **[obs]
- vector EQU FALSE ;For Vector Graphics.
- heath EQU FALSE ;For Heath/Zenith H89.
- z100 EQU FALSE ;For Z-100 under CP/M-85.
- trs80lb EQU FALSE ;For Lifeboat 2.25C CP/M Display
- trs80pt EQU FALSE ;For Pickles + Trout CP/M Display
- telcon EQU FALSE ;For TELCON Zorba portable
- kpII EQU FALSE ;Kaypro-II
- xer820 EQU FALSE ;[pcc001] Xerox 820
- bbII EQU FALSE ;BigBoard II (terminal required)
- mmdI EQU FALSE ;Morrow Micro Decision I (terminal required)
- mdI EQU FALSE ;Morrow Decision I (the big sucker)
- ; (terminal required) [Toad Hall]
- delphi EQU FALSE ;Digicomp Delphi 100 (terminal required)
- cpt85xx EQU FALSE ;CPT-85xx word processor w/CPM (set ADM3A TRUE)
- pci2651 EQU FALSE ; CP/M with 2651 USART. Needs VDU. [11]
- norths EQU FALSE ;[CSM] NorthStar Horizon with HSIO-4 board
- ; (terminal required)
- comart EQU FALSE ;[10] Comart Communicator
- ; (terminal required)
- horizon EQU FALSE ;[10] North Star Horizon (mother-board)
- ; (terminal required)
- cmemco EQU FALSE ;[10] Cromemco (TU-ART)
- ; (terminal required)
- advant EQU FALSE ;[9] North Star Advantage
- rm380z EQU FALSE ;[9] Research Machines 380Z
-
- trs80 EQU trs80lb OR trs80pt ; if either, flag TRS-80 system.
- bbI EQU kpII OR xer820 ;[pcc001] flag for bigboard I
-
- access EQU FALSE ; Access Matrix .. uses port J5 [12]
- basicns EQU FALSE ; Basic Northstar using printer port (CRT req.)
- s1008 EQU FALSE ; US Micro Sales s1008
- mmate EQU FALSE ; PMC - 101 MicroMate (Crt required)
- disc EQU FALSE ; Action Computer Enterprises "Discovery"
- ; Port B on an 83U user board (CRT required)
-
- IF brain OR vector OR heath OR z100 OR trs80 OR telcon OR bbI
- inout EQU TRUE ;Short conditional for above
- iobyt EQU FALSE
- ENDIF;brain OR vector OR heath OR z100 OR trs80 OR telcon OR kpII
-
- IF bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths ;running out of room
- inout EQU TRUE ;Short conditional for above
- iobyt EQU FALSE
- ENDIF;bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths
-
- IF advant OR rm380z OR comart OR horizon OR cmemco ;[9] [10] more room here
- inout EQU TRUE ;Short conditional for above
- iobyt EQU FALSE
- ENDIF;advant OR rm380z OR comart OR horizon OR cmemco
-
- IF pci2651 ;[11] and even more room
- inout EQU TRUE ;Short conditional for above
- iobyt EQU FALSE
- ENDIF ;pci2651 [11]
-
- IF access OR basicns OR s1008 OR mmate OR disc ; [12]
- inout EQU TRUE ;Short conditional for above
- iobyt EQU FALSE
- ENDIF ; access OR basicns OR s1008 OR mmate OR disc [12]
-
- ;.. and Systems doing neither...
- px8 EQU FALSE ;[12] For Epson PX-8
- osi EQU FALSE ;For Ohio Scientific.
- osbrn1 EQU FALSE ;For Osborne 1
- cpm3 EQU FALSE ;"Generic" Kermit-80 for CP/M 3.0 (CP/M Plus)
- ; (terminal required)
- lobo EQU FALSE ;Lobo Max-80
- torch EQU true ;[obs] Torch does comms via Beeb as IO processor
- apmmdm EQU FALSE ;jb Micromodem II in slot 2
- ap6551 EQU FALSE ;jb apple with 6551 ACIA in serial interface
- apcps EQU FALSE ;[9] Apple with CP multifunction card
-
- IF ap6551 OR apcps;[9]
- ;jb eg. Apple SSC, Videx PSIO, Basis 108
- apslot EQU 2 ;jb set equal to slot containing serial card
- ;jb set to 1 for Basis built-in port
- ENDIF;jb ap6551 [9] apcps
-
- ; flag apple system if either selected
- apple EQU apmmdm OR ap6551 OR apcps
-
- IF osi OR apple OR osbrn1 OR cpm3 OR lobo OR torch OR px8 ; [12]
- iobyt EQU FALSE
- inout EQU FALSE
- ENDIF;osi OR apple OR osbrn1 OR cpm3 OR lobo OR torch OR px8 [12]
-
- ;.. and for Micros, like the MDI, which have "terminals of choice", you must
- ;select one of these in addition to selecting the micro itself.
- ;Also select a terminal for "gener" and "cpm3": use "crt" for the true generic.
- crt EQU FALSE ;Basic CRT, no cursor positioning
- adm3a EQU FALSE ;Adm3a Display (or CPT built-in display)
- smrtvd EQU FALSE ;Netronics Smartvid terminal.
- tvi912 EQU FALSE ;[10] TVI912/920
- tvi925 EQU FALSE ;TVI925 Display
- ; (works for Freedom 100 also) [Toad Hall]
- vt52 EQU FALSE ;VT52 or equivalent (or H19)
- vt100 EQU FALSE ;VT100 or equivalent
-
- ; Toad Hall TAC Trap: If you're going through a TAC, it will
- ; cough on its Intercept Character (usually a @ (* - 40H)). Sending it
- ; twice forces the TAC to recognize it as a valid ASCII character,
- ; and it'll send only one on to the host. If you've SET the TACTrap
- ; to OFF, it will be a null character, and nothing will happen. If you
- ; set it on, it will be your selected TAC intercept character (or will
- ; default to the common intercept char, '@'.
- ; If you never expect to have to work through such a beastie, just set
- ; TAC to false and forget all this mess. [Toad Hall]
-
- tac EQU FALSE ; gonna work through a TAC?
- tacval EQU '@' ;Typical TAC intercept character
-
- ; Processor speed in units of 100KHz
- ; for bbII, kpII, cpt85xx, advance, apple,bbc,px8 & rm380z timing loop [12]
-
- IF apple OR cpt85xx OR px8;[9] [12]
- cpuspd EQU 20 ; Apple Softcard, CPT-85xx: 2.0 MHz
- ; ('cause of integral video?)
- ENDIF; apple OR cpt85xx OR px8 [12]
-
- IF kpII ;[9]
- cpuspd EQU 25 ; original Kaypro II,Xerox 820: 2.5 MHz
- ENDIF;kpII
-
- IF brain OR advant OR bbII OR torch OR cifer OR rm380z OR comart OR horizon ;[9] [22] [10]
- cpuspd EQU 40 ; bbII: 4.0 MHz [also Kaypro 10]
- ENDIF; brain OR advant OR bbII OR torch OR cifer OR rm380z OR comart OR horizon
-
- IF disc OR mmate OR s1008 OR access OR basicns ;[29] This is a guess.. Most are 4Mhz
- cpuspd EQU 40 ; bbII: 4.0 MHz [also Kaypro 10]
- ENDIF ;disc OR mmate OR s1008 OR access OR basicns [29]
-
- IF bbc ;[9]
- cpuspd EQU 60 ; BBC with 6Mhz Z80
- ENDIF;bbc
- cp4ker EQU FALSE ; building the system-dependent part...
-
- IF lasm
- LINK CP4DEF
- ENDIF;lasm [Toad Hall]
-
- ; If we're still here, must be M80 or MAC80. Collect the rest of
- ; the sources.
- .sfcond
- INCLUDE CP4DEF.ASM ; common definitions
- INCLUDE CP4LNK.ASM ; linkage area description
- INCLUDE CP4SYS.ASM ; system-dependent code and tables
- INCLUDE CP4SY2.ASM ; New bit.. is half of CP4SYS.ASM
- END
-