home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
modem7
/
m730-mpm.lbr
/
M730MPM.DQF
/
m730mpm.dif
Wrap
Text File
|
1985-02-09
|
12KB
|
553 lines
1c 0
;
.
3a 63764
; This is a public domain progam. The modifications shown are examples
; of what can be done with most any modem program if a bios structure is
; included. Mite and Move-It are samples of two commercial modem program
; that can be modified.
;
; The calls in the modification look into the XIOS and MPM.SYS files.
; The modified XIOS and RSP modules are available for almost any
; configuration CompuPro supports from L D Snyder and Associaties, P O
; Box 4876, Winter Park, Florida 32793. (305) 677-1856
.
62c 14975
; M7NM-6.ASM can be used to change the telephone overlay numbers
.
69c 28430
; M7FNK.COM can be used to quickly and easily change any of the
.
119,127c 25433
; SPECIAL EQUATES FOR COMPUPRO
;
BASE: EQU 30H
MODE: EQU BASE+2
COMM: EQU BASE+3
CUSER: EQU BASE+7 ;USER SELECT REGISTER
EXACT: EQU 6 ;EXACT USART TO USE
.
127a 25689
SETB EQU 1
CSTAT EQU 2
CINPUT EQU 3
COUT EQU 4
CONIN EQU 1
READQ EQU 137
WRITEQ EQU 139
READQCON EQU 138
OPENQ EQU 135
;
;
PORT: EQU BASE ;your base port (data or status)
;
BAUDRP: EQU PORT+2 ;baud rate
MODCTL1: EQU PORT+1 ;modem control port
MODDATP: EQU PORT ;modem data port
MODRCVB: EQU 02H ;modem receive bit (DAV)
MODRCVR: EQU 02H ;modem receive ready
MODSNDB: EQU 01H ;modem send bit
MODSNDR: EQU 01H ;modem send ready bit
;
;
.
217,218c 29136
PMMIMODEM: DB NO ;yes=PMMI modem
AUTODIAL: DB YES ;yes=Hayes-type autodial modem
.
221,223c 60023
CLOCK: DB 2 ;clock speed in MHz x 10, 25.5 MHz max.
;2 MHz=20, 3.68 MH=37, 4 MHz=40, etc.
MSPEED: DB 5 ;sets display time for sending a file
.
233,234c 43580
SETUPTST: DB YES ;yes=non-PMMI setup routine
SCRNTEST: DB YES ;yes=if home cursor and clear screen
.
262c 26180
IGNORCTL: DB NO ;yes=do not send control characters
.
286,295d 23886
288,295c 24142
IN$MODCTL1:
; --- get status ---
;
push b
push d
push h
mvi a,cstat
sta cios+2 ; set command to extended XIOS func.
lxi d,cios
mvi c,50 ; direct XIOS call
call 5 ; status returned in A reg.
pop h
pop d
pop b
RET ;in modem control port
DB 0,0,0,0,0,0,0 ;spares if needed for non-PMMI
OUT$MODDATP:
;
; --- To send a character to COMM+ for output ---
;
push b
push d
push h
sta cios+3 ; put character and
mvi a,cout
sta cios+2 ; command into direct XIOS block
lxi d,cios
mvi c,50
call 5
pop h
pop d
pop b
RET ;out modem data port
DB 0,0,0,0,0,0,0 ;spares if needed for non=PMMI
;
CIOS DB 6,0,0,0,0,0,0 ; BLOCK USED FOR DIRECT XIOS CALL
;
IN$MODDATP:
;
; --- To get character from COMM+ buffer ---
;
push b
push d
push h
mvi a,cinput ; set command byte for extended XIOS
sta cios+2 ; call
lxi d,cios
mvi c,50
call 5 ; char. returned in A Reg.
pop h
pop d
pop b
;
RET ;in modem data port
;
DB 0,0,0,0,0,0,0 ;spares if needed for non-PMMI
ANI$MODRCVB: ANI MODRCVB ! RET ;bit to test for receive ready
CPI$MODRCVR: CPI MODRCVR ! RET ;value of receive bit when ready
ANI$MODSNDB: ANI MODSNDB ! RET ;bit to test for send ready
CPI$MODSNDR: CPI MODSNDR ! RET ;value of send bit when ready
.
354,365c 24398
;
;====================== SPECIAL PMMI PORTS =============================
;
IN$BAUDRP: IN BAUDRP ! RET ;in baudrate port
OUT$BAUDRP: OUT BAUDRP ! RET ;out baudrate port
OUT$MODCTL1: OUT MODCTL1 ! RET ;out modem control port #1
OUT$MODCTL2: OUT MODCTL2 ! RET ;out modem control port #2
;
;================== END OF SPECIAL PMMI PORTS ==========================
.
365,373c 24654
LOGONPTR: DW LOGON
JMP$DIAL: JMP DIAL
JMP$DISCONNT: JMP DISCONNT
JMP$GOODBYE: JMP GOODBYE
JMP$INITMOD: JMP INITMOD
JMP$NEWBAUD: JMP NEWBAUD
JMP$NOPARITY: JMP NOPARITY
JMP$PARITY: JMP PARITY
JMP$SETUPR: JMP SETUPR
JMP$SPCLMENU: JMP SPCLMENU
JMP$SYSVER: JMP SYSVER
JMP$BREAK JMP SENDBRK
.
379,389c 24910
; NEXT SIX LINES SHOULD NOT BE CHANGED BY USER OVERLAY AS THESE GO TO
; SPECIFIC LOCATIONS IN THE MAIN PROGRAM, NOT IN THE OVERLAY.
;
JMP$ILPRT: JMP ILPRT
JMP$INBUF: JMP INBUF
JMP$INLNCOMP: JMP INLNCOMP
JMP$INMODEM: JMP INMODEM
JMP$NXTSCRN: JMP NXTSCRN
JMP$TIMER: JMP TIMER
.
390,391c 25166
; Clear sequences are for Televideo, Lear Siegler, etc. Change to match
; your terminal. (Heath uses ESC 4AH for clear to end of screen, ESC 45H
; to clear screen. Lear Siegler and others use ESC 79H for clear to end
; of screen and ESC 3AH to clear screen.) Room allowed for four bytes.
; (Last zero needed for stopping the string display. Any extra 0's just
; act as NOP's.)
;
CLREOS: CALL ILPRT
DB ESC,79H,0,0,0
.
402a 30242
CLRSCRN:CALL ILPRT
DB ESC,3AH,0,0,0
RET
;.....
;
;
.
426,427c 39546
SYSVER1:CALL ILPRT ;if not usig the PMMI S-100 board
DB 'Version for CompuPro running MP/M 816 and '
DB 'Hayes Smartmodem 1200',CR,LF,LF,0
.
453c 9912
INITMOD:
push b
push d
push h
;
; Make sure there is an available communications port
;
mvi b,0
mvi c,1
qloop2: mov a,c
adi 30h
sta qname+6 ; Make the Queue name
push b ; save the number of this port
mvi c,openq
lxi d,qpb
call bdos ; open queue
mvi c,readqcon
lxi d,qpb
call bdos ; see if queue has message
cpi 0ffh
jz setstat ; it's not available
; mvi c,writeq
; lxi d,qpb
; call bdos ; it's available, put message back for now
mvi a,0
setstat: cma ; make true=FFh, false=0h
pop b
lxi h,pstat1
dcx h
dad b
mov m,a ; store status
inr c
mvi a,3 ; check if done
cmp c
jnz qloop2 ; check the other queue
lda pstat1
mov b,a
lda pstat2
add b ; get sum of status'
jnz check1
lxi d,noportmsg ; no ports available
call pstring
mvi c,0
call bdos ; exit program
check1: cpi 0ffh ; only one available ?
jz tellifok ; tell user which one
lxi d,askwhich ; else, ask which one
call pstring
getchoice: mvi c,conin
call bdos ; get response
sta ptouse ; save response
cpi 33h
jnc badchoice
cpi 31h
jc badchoice
jz w2back
mvi a,31h
jmp wqback
w2back: mvi a,32h
wqback: sta qname+6
mvi c,writeq
lxi d,qpb
call bdos ; write the queue back that were not using
jmp setport ; choice ok
askwhich: db cr,lf,'Console 1 and Console 2 available as'
db ' communication ports.',cr,lf
db 'Please enter console number to use (1 or 2) ? $'
choices: db cr,lf,'The possible consoles choices are 1 or 2 - ? $'
pstat1: db 0
pstat2: db 0
noportmsg: db cr,lf,'NO Communication Ports available.'
db cr,lf,'Use COMM to activate communication ports.$'
tellmsg: db cr,lf,'Console '
tellport: db 0
db ' is the only available port. OK to use ? $'
ptousemsg: db cr,lf,cr,lf,'Please make sure console '
ptouse: db 0
db ' is properly connected '
db cr,lf,'for use as a communications '
db 'port.....',cr,lf,cr,lf,'$'
qpb: db 0,0 ;must be zero
dw 0 ;queue ID
dw 1 ;nmsgs
dw char ;buffer addr.
qname: db 'MXcomm_ ' ;name to open
db 0,0,0,0,0
char: db 0,0,0
pstring: mvi c,print
call bdos
ret
badchoice: lxi d,choices
call pstring
jmp getchoice ; ask again
tellifok: lda pstat1
ana a
jnz use1
mvi a,32h
sta tellport ; its console 2
jmp stickport
use1: mvi a,31h ; its console 1
sta tellport
stickport: sta ptouse
lxi d,tellmsg
call pstring
mvi c,conin
call bdos
ani 11011111b ; force to upper case
cpi 'Y'
jz setport
mvi c,0
call bdos ; else quit program
setport: lxi d,ptousemsg
call pstring
lda ptouse
sta qname+6
sui 30h ; convert to binary
sta cios+1 ; put into direct xios call block
; mvi c,readq
; lxi d,qpb
; call bdos ; read queue for good now
mvi c,164 ; get printer number and save it
call 5
sta ptrnum
pop h
pop d
pop b
ret
.
1175,1179c 8066
CALL ILPRT
DB CR,LF,LF,'++ Connected ++'
DB BELL,0
MVI B,5 ;wait half second for Smodem to spit out
CALL TIMER ;'CONNECT' else we'll see NNECT on CRT
;
.
1183,1186c 65296
; JMP TERM
; CALL STAT ;keypress?
; JZ CONMADE3 ;exit if no keys pressed
; CALL KEYIN
; XRA A
.
1195a 45343
;
.
1628c 26272
DB ' Additional Subcommands for PMMI Modems'
.
1636,1650c 23476
DB ' Both ends must be capable of these options'
DB CR,LF
DB ' which are available only in R and S modes.'
DB CR,LF
DB ' The parity checking will be part of the'
DB CR,LF
DB ' file transfer protocol.',CR,LF,LF
DB ' Speed Options:',CR,LF
DB ' After entering your primary and secondary '
DB 'options,',CR,LF
DB ' you can set the modem speed by placing a '
DB ' "." after',CR,LF
DB ' the options followed by the speed e.g., '
DB '300, 600.',CR,LF,LF
DB ' EXAMPLE: SBO.600 will set the modem for '
.
1852c 26107
DB VERSION MOD 10+'0',' 04/18/84 - (type M for Menu)',CR,LF,0
.
1930c 52906
; SHLD GOLIST+1 ;bios list device status jump vector
;we want to skip this for mpm
.
3092,3094c 38886
LSTMSG: LDA LISTFLG
.
3094a 3854
JMP ATTLST ;attempt to attach list device
;
attlst1:CALL ILPRT
DB 'Printer buffer is ',0
.
3102c 38008
;
LSTMSG1:CALL ILPRT
DB 'Printer buffer is ',0
CALL ILPRT
DB 'OFF',CR,LF,0
call detlst ; Detach list device
ret
;
detlst: push psw
push b
push d
push h
mvi c,159
call 5
pop h
pop d
pop b
pop psw
ret
;
attlst: push psw
push b
push d
push h
mvi c,161 ; Conditional list attach
call 5
ora a
jz attlst2 ; go ahead and attach
lda listflg
cma ; Else toggle flag off
sta listflg ; and tell user the printer is busy
lda ptrnum
adi 30h ; make prnum ascii
sta prnuma
mvi c,9
lxi d,prbusy
call 5
pop h
pop d
pop b
pop psw
jmp lstmsg1
attlst2: mvi c,158
call 5
pop h
pop d
pop b
pop psw
jmp attlst1
;
prbusy: db cr,lf,' Printer # '
prnuma: db 0
db ' is Busy',cr,lf,'$'
.
3157,3160c 38264
;...
.
3329a 8809
; List the character on the printer if it is ready, then see if at the
; top of the buffer.
;
;
GOLIST: push b
push d
push h
mvi c,50
lxi d,pstat
call 5
pop h
pop d
pop b
; CALL $-$
ORA A
RZ
JMP LIST$CONT
pstat: db 15
ptrnum: db 0 ; PRINTER NUMBER
db 0,0,0,0,0,0 ; Direct XIOS call memory area
;
;
;....
;
.
3452,3459d 59427
3455c 57117
LIST$CONT CALL CMP$I$O ; if the same then nothing to print
.
5402c 62832
PRTNAME:DB ' ','.',' ',0 ; 8 spaces, period, 3 spaces
.
6173c 1235
DB ' Single Letter Commands',CR,LF,LF
.
6181,6183c 7539
DB ' For copying text to disk use T (E or L) '
DB 'FILENAME.TYP',CR,LF
DB ' Start or Stop toggles described on subsequent'
.
6188,6199c 11265
DB ' COMMAND: R (or S) FILENAME.TYP',CR,LF
DB ' R and S can use the following subcommands:'
DB CR,LF
DB ' B - Bulk transfer using wildcards '
DB '(e.g., *.*)',CR,LF
DB ' D - Disconnect when done'
DB CR,LF
DB ' Q - Quiet mode (no messages to console)'
DB CR,LF
DB ' V - View <R> or <S> bytes on console'
DB CR,LF
DB ' X - When done, disconnect, go to CP/M'
.
6209,6210c 32460
DB ' Three Letter Commands',CR,LF,LF
DB 'MPM - Exit from this program to MP/M',CR,LF
.
6278c 8077
DB 0 ;Set command went here
.
6281c 11858
DB 'BYE - Disconnect, then return to MP/M'
.
6295c 3847
DB ' The following are terminal text '
.
6303c 30219
DB ' Local Commands while in Terminal Mode'
.
6344,6350c 60606
DB ' Start & Stop may be toggled as often as '
DB 'desired.',CR,LF
DB ' A ";" at start of line indicates buffer '
DB 'is copying.',CR,LF
DB ' XOFF automatically used to stop input '
DB 'when writing',CR,LF
DB ' full buffer to disk, XON sent to '
.
6431c 57216
DB 'MPM',0
.
6477,6479c 13434
CALL INLNCOMP ;after this went the set command
.
6533c 64117
DB ' SPECIAL FUNCTION KEY TABLE'
.
6590c 34013
DB CR,LF,'<< Exit to MP/M >>',CR,LF,0
.
7159c 52697
DB ' Library of Phone Numbers of Remote Systems'
.
7173c 40082
PUSH H ;save source address
.
7268c 54092
DB ' Current Settings',CR,LF,LF,0
.
$a 42947
.
09,6210c 32460
DB ' T