; MXO-AC01 - MEX overlay for the Apple-Cat ][ - jms 84/06/14
;
; This overlay is for use with MEX. It was adapted from the M7AC+3.ASM
; overlay for modem7xx.
;
; This version DOES NOT support dialing. It works with either the
; MicroSoft Softcard implementation (V2.2) or the ALS CP/M Card
; (V3.01). See the Customization section equates for details.
;
;
; Please report any bugs, etc. to:
; James M. Scardelis
; Director
; CP/M Plus Users' Group
; P.O. Box 295
; Little Falls, NJ 07424-0295
;
; Please upload a copy of any updates to:
;
; CNY-Tech RBBS (315)437-4890
; CP/M Net East (201)249-0691
;
; Both of those systems are 300/1200 baud...
;
; I plan to implement dialing capabilities in the next version of this
; file, but only for the ALS CP/M CARD!
;
;======================================================================
;
; Misc. Equates
;
;----------------------------------------------------------------------
ORG 100H
;
BELL: EQU 07H ;Bell
CR: EQU 0DH ;Carriage return
ESC: EQU 1BH ;Escape
LF: EQU 0AH ;Line feed
;
YES EQU 0FFH
NO EQU 0H
;
;-----------------------------------------------------------------------
; A misc. macro to generate i/o subs for the ALSCARD
;-----------------------------------------------------------------------
PUT MACRO DUMMY
PUSH H
LXI H,DUMMY
JMP APWRT
ENDM
;
;=======================================================================
;
; Customization Area
;
;-----------------------------------------------------------------------
;
ALSCARD: EQU YES ;Yes if ALS CP/M Card
CPM2CARD: EQU NO ;Yes if SoftCard or clone
;
MODCTL1: EQU 0 ;Dummy modem control port
MODCTL2: EQU 0 ;Dummy modem control port
;
CATSLOT: EQU 2 ;Slot of Apple-Cat
;
;======================================================================
;
IF ALSCARD
;
MAPOFF: EQU 0 ;ALS memory map offset is 0
MODDCD3 EQU 0
MODDCD12 EQU 0 ;for 212 board
MODRCVB: EQU 2 ;bit to test for receive
MODRCVR: EQU 2 ;value when ready
MODSNDB: EQU 1 ;bit to test for send
MODSNDR: EQU 1 ;value when ready
;
CONOUT EQU 2 ;simulated bdos fcn 2
PRINT EQU 9 ;simulated bdos fcn 9
MEX EQU 0D00H ;mex's command processor
;
;
; ALS CP/M Card clock is 6mHz; MicroSoft is 2mHz...adjust clock: to
; match your system.
DS 3 ;Mex has a JMP START here.
PMODEM: DB NO
SMODEM: DB NO
TPULSE: DB 'T'
CLOCK: DB 60 ;clock speed x .1, up to 25.5mHz
MSPEED: DB 1 ;0=110 1=300 2=450 3=600 4=710
;5=1200 6=2400 7=4800 8=9600
;9=19200
BYTDLY: DB 5
CRDLY: DB 5
COLUMS: DB 5
SETFL: DB YES ;must be yes for this overlay
SCRTST: DB YES
DB 0
BAKFLG: DB YES ;yes to make .bak file
CRCDFL: DB YES ;default to CRC
TOGCRC: DB YES
CVTBS: DB NO
TOGLBK: DB YES
ADDLF: DB NO
TOGLF: DB YES
TRNLOG: DB NO
SAVCCP: DB NO
LOCNXT: DB YES
TOGLOC: DB YES
LSTTST: DB YES
XOFTST: DB NO
XONWT: DB NO
TOGXOF: DB YES
IGNCTL: DB YES
EXTRA1: DB 0
EXTRA2: DB 0
BRKCHR: DB '@'-40H
NOCONN: DB 'N'-40H
LOGCHR: DB 'L'-40H
LSTCHR: DB 'P'-40H
UNSVCH: DB 'R'-40H
TRNCHR: DB 'T'-40H
SAVCHR: DB 'Y'-40H
EXTCHR: DB '^'-40H
DS 2
; Low-level modem i/o routines - will be jump table in mex2.0
DELAY5A: DCX B
MOV A,B
ORA C
JNZ DELAY5A
POP B
POP PSW
RET
;
; APPLE IO SUBROUTINES
;
IF CPM2CARD
STAXMTR: STA XMTRAM ! RET
STACOM: STA COM ! RET
STAXMTB: STA XMTBYT ! RET
STACON: STA CON ! RET
STABSRB: STA BSRBYT ! RET
STASHBT: STA SHBYT ! RET
STASQBT: STA SQUBYT ! RET
STARECB: STA RECBYT ! RET
LDAIND: LDA INDAT ! RET
STAOUTD: STA OUTDAT ! RET
STATSPDB: STA SPDBYT ! RET
LDASTAT: LDA STATUS ! RET
STADEVB: STA DEVBYT ! RET
LDADATP: LDA XMTRAM
STA XMTBYT
LDA INDAT
RET
ENDIF
IF ALSCARD
STAXMTR: PUT XMTRAM
STACOM: PUT COM
STAXMTB: PUT XMTBYT
STACON: PUT CON
STABSRB: PUT BSRBYT
STASHBT: PUT SHBYT
STASQBT: PUT SQUBYT
STARECB: PUT RECBYT
STAOUTD: PUT OUTDAT
STASPDB: PUT SPDBYT
STADEVB: PUT DEVBYT
APWRT: PUSH D
PUSH B
CALL APWRITE
POP B
POP D
POP H
RET
LDADATP: PUSH H
PUSH D
PUSH B
LXI H,XMTRAM
CALL APREAD
LXI H,XMTBYT
CALL APWRITE
LXI H,INDAT
JMP APRD2
LDASTAT: PUSH H
LXI H,STATUS
PUSH D
PUSH B
APRD2: CALL APREAD
POP B
POP D
POP H
RET
ENDIF
;------------------------------------------------------------------
; Table of messages that are printed out in the overlay....
;------------------------------------------------------------------
EOSMSG: DB 'K'-40H,'$'
CLSMSG: DB 'L'-40H,'$'
VERSMSG: DB 'Version for Apple Cat ][ modem',CR,LF,'$'
VERS2MSG: DB 'and ALS CP/M Card',CR,LF,'$'
MENUMSG: DB '(O)riginate, (A)nswer, or (D)isconnect $'
ERRMSG: DB 'Error - must be one of above.',CR,LF,'$'
BAUDMSG: DB '(3)00 or 1(2)00 bps: $'