.title KRTDIA Dial command and related items .ident "V04.64" ; /E64/ 10-May-96 John Santos ; ; Conditionalize for RSTS/E. ; /63/ 25-Jan-96 Billy Youdelman ; ; use opentt in place of ttyini to set linksts flag ; move the modem definitions to a separate module KRTMDM.MAC ; SET$DTR and SET$MODEM back here from KRTDSP ; /62/ 27-Jul-93 Billy Youdelman V03.62 ; ; add support for call back modems, SET DIAL/PHONE [NO]ANSWER ; ; add a one-tick pacing delay in DODIAL's loop at 50$ (when the modem ; doesn't echo commands) to match what was done for echoing modems ; ; fix SHO MODEM for changes to SET DIAL [NO]ECHO and [NO]INIT-ONCE ; add initiate-prompt, dial-ack, confirm-ack, [no]binary-response ; ; added x.result (default "Hayes" xmode) and time.settle defaults, ; and in "Hayes" and Telebit modem definitions ; ; if DCD is high when exiting program, hang up modem ; add support for 38.4kb ; add Telebit T3000 modem def, needs KM handler and SET FLOW-CONTROL RTS ; ; double the settle-time value for the wait after dropping DTR, ; as some modems (like the T3000) need more time to recover ; /BBS/ 1-Dec-91 Billy Youdelman V03.61 ; ; set$mo now won't write bad modem name into modem: ; if DIAL/REDIAL succeeds jump to CONNECT automatically ; set linksts when dialing so ^C abort will catch correct ttname ; findmodem now does not try to process an empty string in modem: ; added c$idle, call to reset modem to idle (answer) mode ; findmodem/findnumber will match on partial input string ; added %X format effector for setting Hayes extended response mode ; added Telebit T2500 modem definitions ; ; redial loop moved to c$dial, runs faster without initializing ; the modem's lun every pass thru the loop, reduces cpu usage too ; ; load buffer with defmsg after displaying RING, to not overwrite ; the default message with call status stuff ; ; if DIAL can't translate an alias, say so then die (instead of ; prompting to continue with an empty number buffer) ; ; added xredial flag word, for keeping return path straight when ; connecting after a successful REDIAL. speed up redial process for ; modems which define init.once by not initting before every retry. ; init.once and mready (status flag) were added to support all this.. ; ; while waiting for a response after dialing modem, check for ; input from keyboard, allowing an easy abort ; ; .default patched to get/set handler speed from modem response, ; old speed is saved and restored, unless set different after.. ; Hayes definition completed and moved to it. this also renders ; Hayes responses displayable via SHO MODEM. ; ; diatmo from SET DIAL TIME-OUT gets written into dial.time(r4) ; when either c$dial or sho$dial is called. it's now usable with ; any modem type (not just user-defined) by setting the modem's ; internal timer to the max (ATS7=255 etc) then letting Kermit's ; timer take action first. ; ; modified waitfor to test for keyboard input, allowing a "strike ; any char" abort during dialing, now including the init string. ; DTR is dropped to ensure the modem will actually abort the call. ; ; SHO MODEM expanded to display everything ; result message must match from 1st byte to avoid embedded strings ; save modem init status to drop unnecessary inits ; SET MODEM now inits same, if a line (and speed) have been set ; echo everything from modem (if it echoes) during DIAL ; add CONNECT/nnnn for Hayes to alter DTE speed w/TSX and CL ; add Concord Data Systems 224 Auto-dial modem ; ; moved SET DTR code here, and reinit modem after DTR drop if one ; was on-line before it ; Copyright 1985,1986 Change Software, Inc. ; ; 18-Oct-85 20:06:09 Brian Nelson ; ; 04-Dec-85 11:22:32 BDN Add optional linked list structure to ; define modem responses, will be useful ; when adding a SET DIAL command ; 09-Jan-86 17:48:17 RTM Added support for the RIXON Intelligent ; auto-dial modem (R212A) (edit RTM01) ; 13-Feb-86 10:10:08 BDN Put the DF112 and DF224 responses into ; linked lists ; 23-Sep-86 14:10:30 BDN Vadic 4224 modems ; 23-Sep-86 14:10:42 BDN Added format effector %M for pulse/tone ; if a SET PHONE PULSE/TONE was done ; Added %B for "blind" dialing, enabled if ; SET PHONE BLIND ; 30-Sep-86 13:05:53 BDN Added CTS2424, Also SHO DIAL ; 09-Feb-89 00:00:00 JCH Complete definition of DF224 modem .include "IN:KRTMAC.MAC" .iif ndf KRTINC .error <; .include for IN:KRTMAC.MAC failed> ; /BBS/ This is used by SHOW MODEM to format the display of response messages ; and actions to them. It's the column at which the actions begin and may be ; increased if longer response strings must accommodated. COL.ACT = 18. .sbttl Local macros $$TRIP = 0 ; /63/ init trip counter .macro des type ,offset ,title .save ; /63/ .psect $pdata ; /63/ .if b .byte 0 ,0 .even ; /63/ do this here, once is enough.. $$trip=0 ; /63/ reset for possible future use .iff .if eq $$trip ; /63/ if at the first list entry deslist: ; /63/ insert the label for the list .endc $$trip=1 ; /63/ not the first entry any more .byte type ,offset ; type_0=integer, type_1=string .asciz @title@ ; /62/ type_2=on/off .endc .restore ; /63/ .endm des .macro ttgetc wait ; get one char from the link device .if b ; wait value is in seconds calls xbinread,<#1> ; /62/ this waits up to one second .iff calls xbinread, .endc .endm ttgetc .macro ttputc c ; send one char to the link device clr -(sp) ; create a one word buffer bisb c ,(sp) ; stuff in byte sans sign extension mov sp ,r0 ; point to buffer calls binwri , ; send it tst (sp)+ ; pop buffer .endm ttputc .macro ttputs s ; send a string to the link device mov r1 ,-(sp) ; a one word buffer mov s ,r1 ; pass string location to do.put call do.put ; /63/ send it mov (sp)+ ,r1 ; pop buffer .endm ttputstr .macro waitfor s ,time ,fail ; wait for a response from modem .if b