.title KRTMDM Modem definitions .ident "V03.63" ; /63/ 27-Sep-97 Billy Youdelman V03.63 ; ; created this module as KRTDIA had become too large ; there are now 1793. words free in which more modems may be defined ; defined T3000X.42 modem (it's the T3000V.42 but with XOFF restraint) ; convert T3000 (DTE falls back to DCE) definition to XOFF flow control ; Copyright 1985,1986 Change Software, Inc. .psect $code ,ro,i,lcl,rel,con ; /63/ added this to.. .sbttl Load this overlay and return its location loamdm::mov #modinf ,r0 ; /63/ return address of top of list return ; /63/ done .sbttl Modem data base structure ; Loosely based on CKUDIAL.C ; ; Anything new that is needed in the modem database should be added at ; the end of the list (just prior to mod.size) then increment mod.size ; to include the new element. You must also conform the define macro, ; farther below in this module, to your changes and add a new macro to ; those which put data into the individual fields, immediately below. mod.next ==: 0 ; link to next modem in list mod.string ==: 2 ; address of name of modem dial.time ==: 4 ; dial time-out value in secs wake.string ==: 6 ; address of wakeup string wake.rate ==: 10 ; ticks delay between sending chars wake.prompt ==: 12 ; address of wakeup prompt string dmod.string ==: 14 ; address of dial initiate string and dmod.prompt ==: 16 ; address of prompt returned for it dial.string ==: 20 ; address of dial format string dial.rate ==: 22 ; ticks delay between sending chars dial.ack ==: 24 ; modem response to confirm number dial.blind ==: 26 ; if <> dial w/o wait for dial tone dial.wait ==: 30 ; string for pause format effector dial.confirm ==: 32 ; string to confirm number for dialing dial.go ==: 34 ; ie, va212 returns "DIALING\n" res.bin ==: 36 ; if <> it's binary responses (DF03) dial.echo ==: 40 ; if <> modem echoes its input mod.comment ==: 42 ; addr of brief description of modem res.head ==: 44 ; head of the list of result messages dial.xabort ==: 46 ; /45/ string to kill call in progress dial.idle ==: 50 ; /45/ string puts modem in idle state dial.pulse ==: 52 ; /45/ pulse dialing command string dial.nopulse ==: 54 ; /45/ tone dialing command string init.once ==: 56 ; /BBS/ if <> modem stays initialized time.settle ==: 60 ; /62/ reset settle-time in secs x.result ==: 62 ; /62/ "Hayes" style extended mode ph.answer ==: 64 ; /62/ enable answer mode string ph.noanswer ==: 66 ; /62/ disable answer mode string mod.size ==: 70 ; /62/ length of data defined above .sbttl Macros for individual fields of a modem's data structure ; NOTE: these first two fields are inserted by the define macro ; mod.next 0 link to next modem in list ; mod.string 2 address of name of modem .macro dial$time v modval v ,dial.time ; 4 dial time-out value in secs .endm dial$time .macro wake$string s modstr ,wake.string ; 6 address of wakeup string .endm wake$string .macro wake$rate v modval v ,wake.rate ; 10 ticks delay between chars .endm wake$rate .macro wake$prompt s modstr ^~s~ ,wake.prompt ; 12 address of wakeup prompt string .endm wake$prompt .macro dmod$string s modstr ,dmod.string ; 14 address of dial initiate string .endm dmod$string .macro dmod$prompt s modstr ,dmod.prompt ; 16 address of prompt returned by it .endm dmod$prompt .macro dial$string s modstr ,dial.string ; 20 address of dial format string .endm dial$string .macro dial$rate v modval v ,dial.rate ; 22 ticks delay between chars .endm dial$rate .macro dial$ack s modstr ,dial.ack ; 24 modem response to confirm number .endm dial$ack .macro dial$blind s modstr ,dial.blind ; 26 if <> dial w/o waiting dial tone .endm dial$blind .macro dial$wait s modstr ,dial.wait ; 30 string for pause format effector .endm dial$wait .macro dial$confirm s modstr ,dial.confirm ; 32 string to confirm dialed number .endm dial$confirm .macro dial$go s modstr ,dial.go ; 34 ie, va212 returns "DIALING\n" .endm dial$go .macro res$bin v modval v ,res.bin ; 36 if <> it's binary responses .endm res$bin .macro dial$echo v modval v ,dial.echo ; 40 if <> modem echoes its input .endm dial$echo .macro mod$comment s modstr ^~s~ ,mod.com ; 42 addr of brief modem description .endm mod$comment .macro mod$res s ,class ; 44 listhead of result messages ; ; res.head(current_modem) --> first entry of linked list ; ; .word link_to_next or zero for the last entry ; .word response_class <0 fail, 0 info, 1 ring, >1 success ; .asciz "response_string" ; .list me .save .psect resdat ,ro,d,lcl,rel,con ; /62/ .nlist me $res1 = . ; save current pc in "resdat" .word 0 ; link to next is zero for now.. .if b ; if class not specified, then .word 0 ; make it zero (info only message) .iff ; else insert specified .word class ; response class .endc .asciz "s" ; the actual text /BBS/ allow "/" .list me .even ; must do .restore .nlist me .if eq $res ; is this first time for new type? modval $res1 ,res.head ; yes, stuff the link header .iff ; not the first time .list me .save .psect resdat ,ro,d,lcl,rel,con $respc = . ; save the current pc . = $reslast ; back to link word of previous entry .word $res1 ; insert address of new entry . = $respc ; restore current pc .restore .nlist me .endc $reslast = $res1 ; lastlink = current_entry $res = 1 ; not the first time anymore .endm mod$res .macro dial$xabort s modstr ,dial.xabort ; 46 string to kill call in progress .endm dial$xabort .macro dial$idle s modstr ,dial.idle ; 50 string puts modem in idle state .endm dial$idle .macro dial$pulse s modstr ,dial.pulse ; 52 pulse dialing command string .endm dial$pulse .macro dial$nopulse s modstr ,dial.nopulse ; 54 tone dialing command string .endm dial$nopulse .macro init$once v modval v ,init.once ; 56 if <> modem stays initialized .endm init$once .macro time$settle v modval v ,time.settle ; 60 reset settle-time in secs .endm time$settle .macro x$result v modval v ,x.result ; 62 "Hayes" style extended mode .endm x$result .macro ph$answer s modstr ,ph.answer ; 64 enable answer mode string .endm ph$answer .macro ph$noanswer s modstr ,ph.noanswer ; 66 disable answer mode string .endm ph$noanswer .sbttl Macros to place data in the individual fields .macro modstr s ,offset ; insert a string in modem's data .list me .save .psect string ,ro,d,lcl,rel,con .nlist me $$addr = . $$ = 0 .irpc ch ,^~s~ ; translate "^M" syntax to ".byte 15" ch1 = ''ch ; get copy of char as a literal .if eq ch1-'^ $$ = 100 ; char is a ^, set flag for next char .iff .if ne $$ ; if not a ^ but last char flag is set .if ge -<'a!40> ; ensure alpha chars are upper case .iif le <-<'z!40>> ch1 = ch1&137 ; so char-100 works! .endc .endc .byte ch1-$$ ; char-100 = control char of same name $$ = 0 ; reset the ^ flag .endc .endr .byte 0 ; null terminate .list me .psect modinf ,ro,d,lcl,rel,con . = $$current+offset .word $$addr ; where to find it.. .restore .nlist me .endm modstr .macro modval val ,offset ; insert value (word) in modem's data .list me .save .psect modinf ,ro,d,lcl,rel,con . = $$current+offset ; it goes here.. .word val .restore .nlist me .endm modval .sbttl The actual modem definition macro ; The following creates a modem's data structure, inserting the default ; values as shown. These defaults may be modified using the individual ; data field macros. The individual modem definition entries following ; (two pages below) are good examples of how this is accomplished. .macro define lab ,s ,user .if eq $$trip ; /62/ this has to be done this way $$prev = modinf ; /62/ because "ndf" blows up the $$trip = 1 ; /62/ .LST output.. .endc ; /62/ $res = 0 ; init the result message $reslast = 0 ; macro counters .if nb ; if we are doing the "user-defined" .list me ; modem we need to be in a .save ; psect that is never swapped out .globl lab ; user-defined listhead must be global .psect usermd ,rw,d,gbl,rel,con ; this psect is forced into the root .nlist me ; by inclusion in KRTSJ and KRTXM .iff $modtail = . ; use this to link to "usermd" as it .endc ; avoids error from differing psects $$current = . ; save listhead for auxiliary macros .list me .save .psect string ,ro,d,lcl,rel,con ; switch to string psect $$ = . ; save location of .asciz "s" ; the modem type string .even .restore .nlist me lab: .word 0 ; 0 mod.next link to next please .word $$ ; 2 mod.string modem type string address .word 30. ; 4 dial.time dial time-out in secs .word null ; 6 wake.string init to dial out string .word 0 ; 10 wake.rate ticks between init chars .word null ; 12 wake.prompt command mode prompt string .word null ; 14 dmod.string optional dial cmd string .word null ; 16 dmod.prompt optional dial prompt string .word null ; 20 dial.string actual dial command string .word 0 ; 22 dial.rate ticks between dial chars .word null ; 24 dial.ack dialing acknowledged string .word null ; 26 dial.blind blind dial command string .word null ; 30 dial.wait pause character string .word null ; 32 dial.confirm optional "ok" string .word null ; 34 dial.go optional "dialing" string .word 0 ; 36 res.bin if <> single char response .word 0 ; 40 dial.echo if <> modem echos commands .word null ; 42 mod.comment modem comment string .word 0 ; 44 res.head result messages listhead .word null ; 46 dial.xabort abort dialing string .word null ; 50 dial.idle reset modem to idle string .word null ; 52 dial.pulse PULSE dialing string .word null ; 54 dial.nopulse TONE dialing string .word 0 ; 56 init.once if <> modem stays initted .word 20. ; 60 time.settle ticks to wait after a reset .word -1 ; 62 x.result Hayes Xmode, default is off .word null ; 64 ph.answer enable auto-answer string .word null ; 66 ph.noanswer disable auto-answer string $$end = . .iif ne <<$$end-$$current>-mod.size> .error <; 's define size error> .if b ; if not the user-defined modem . = $$prev ; insert link address of modem data .word lab ; just defined in the previous modem . = $$end ; then go back where we were $$prev = lab ; and save new address for next link .iff ; if this is the user-defined modem.. .list me .restore ; exit root, come back to this overlay $$$ = . . = $modtail ; /BBS/ back to top of last definition .word lab ; /62/ insert link to user-defined . = $$$ .nlist me .endc ; b .endm define .sbttl Modem response classes ; /BBS/ CON38400 ==: 38400. ; /62/ connect at designated speeds CON19200 ==: 19200. ; that is, when the modem's result message CON9600 ==: 9600. ; matches the string associated with one of CON7200 ==: 7200. ; these speed specific classes, then force CON4800 ==: 4800. ; the DTE speed to it (if possible).. CON2400 ==: 2400. ; see the Hayes definition below for an CON1200 ==: 1200. ; example of exactly how this is done CON300 ==: 300. CONNECT ==: 2 ; don't check or change speed RING ==: 1 ; a ring was detected INFO ==: 0 ; info only /62/ *** SEE NOTE BELOW *** FAILED ==: -1 ; call failed, modem has already stopped ABORTED ==: -2 ; aborted by program, need to kill modem ; /62/ NOTE: Since an INFO message is anything undefined, INFO ; messages have been dumped here to save space. .psect modinf ,ro,d,lcl,rel,con .sbttl Finally, we can define the modems ; /BBS/ NOTE: When a response string is a substring of another response ; string the response being the substring _MUST FOLLOW_ the other containing ; it as otherwise an unwanted match will occur on the first one encountered. ; /62/ Control chars may be included in strings using the "^X" notation per ; the modstr macro, above. ; /BBS/ Keep these in modem name alphabetical order for SET MODEM ? display. modinf: ; /62/ this is the top of the list $$TRIP = 0 ; /62/ init for the define macro define concord , ; /BBS/ added mod$comment wake$string <^M^M> ; keyboard interactive mode wake$prompt ^~CDS >~ dial$string dial$wait dial$echo 1 dial$pulse

dial$nopulse dial$xabort <^K> dial$idle dial$time 45. mod$res ,FAILED mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,RING mod$res ,FAILED define cts24 , mod$comment wake$string <^T^WAT^M> wake$rate 10 wake$prompt dial$string dial$rate 10 dial$wait <+> dial$echo 1 dial$blind <&> dial$pulse

dial$nopulse dial$xabort <^T^W> dial$idle <^T^W> dial$time 35. mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,CONNECT ; /BBS/ mod$res ,RING define df03 , mod$comment wake$string <^A^B> ; this inits to dial dial$string <%S^M> ; /62/ needs a return here dial$echo 1 dial$xabort <^C> ; /63/ dial$time 30. res$bin 1 ; single char responses mod$res ,CONNECT mod$res ,FAILED define df100 , mod$comment wake$string <^B> wake$prompt dial$string <%S#> ; /45/ dial$rate 10 dial$echo 1 dial$xabort <^M> dial$time 30. mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED define df200 , mod$comment wake$string <^B> wake$prompt dial$string <%B%M%S!> ; /60/ dial$echo 1 dial$blind <^A> ; /60/ dial$pulse

; /60/ dial$xabort <^B> ; /60/ dial$nopulse ; /60/ dial$time 30. mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED define hayes , ; /BBS/ updated.. mod$comment ^~Hayes Generic Command Set - DTE follows DCE speed~ wake$string ; note time-out set to wake$prompt ; 255 so dial$time (which dial$string ; is settable) will prevail.. dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 45. time$settle <25.> ; /62/ add a few ticks.. x$result <4> ; /62/ extended mode, "ATX4" ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CON19200 ; /62/ added mod$res ,CON19200 ; /63/ mod$res ,CON19200 ; /63/ mod$res ,CON9600 ; set DTE to indicated speed.. mod$res ,CON7200 ; /63/ mod$res ,CON4800 mod$res ,CON2400 mod$res ,CON1200 mod$res ,CON300 ; /63/ mod$res ,CON300 ; 300 is implied here mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED ; true Hayes mod$res ,FAILED ; many clones mod$res ,RING ; includes "RINGING" mod$res ,RING ; Telebit-style rringing mod$res ,FAILED define hayes.mnp , ; /BBS/ added from above.. mod$comment wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 60. time$settle <25.> x$result <4> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,RING mod$res ,RING mod$res ,FAILED define microcom , mod$comment wake$string <4445^MSE2^MS1C0^MSCE ON^M> wake$rate 10 wake$prompt dial$string dial$rate 10 dial$echo 1 dial$time 35. mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED define r212a , ; added by edit RTM01 mod$comment wake$string <^M^M> wake$rate 10 ; wait 8. ticks wake$prompt <$> dmod$string dmod$prompt dial$string <%S^M> dial$rate 10 dial$go dial$echo 1 dial$time 60. ; long time-out for overseas mod$res ,FAILED mod$res ,FAILED mod$res ,CONNECT mod$res ,CONNECT mod$res ,FAILED mod$res ,RING define T2500 , ; /BBS/ added.. mod$comment ^~Telebit w/o error correction - DTE follows DCE speed~ wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 45. x$result <3> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CON19200 ; /63/ mod$res ,CON19200 mod$res ,CON9600 mod$res ,CON4800 mod$res ,CON2400 mod$res ,CON1200 mod$res ,CON300 ; /63/ mod$res ,CON300 mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,RING define T2500MNP , ; /BBS/ added.. mod$comment wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 60. x$result <3> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CONNECT ; includes all CONNECT msgs mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,RING define T2500V.42 , ; /BBS/ added.. mod$comment wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 60. x$result <3> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,RING define T3000 , ; /62/ added.. mod$comment ^~Telebit w/o V.42/MNP - DTE follows DCE - XOFF restraint~ wake$string ; /63/ wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 45. time$settle <35.> ; the T3000 is SLOW to recover x$result <12.> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED ;mod$res ,CON38400 ; /63/ use this if you can, or mod$res ,CON19200 ; this if 19.2 is max speed.. mod$res ,CON38400 mod$res ,CON19200 mod$res ,CON19200 ; /63/ mod$res ,CON19200 ; /63/ mod$res ,CON9600 mod$res ,CON7200 mod$res ,CON4800 mod$res ,CON2400 mod$res ,CON1200 mod$res ,CON300 mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED ; /63/ mod$res ,RING define T3000V.42 , ; /62/ added.. mod$comment wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 60. time$settle <35.> ; the T3000 is SLOW to recover x$result <12.> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED ; /63/ mod$res ,RING define T3000X.42 , ; /63/ added.. mod$comment wake$string wake$prompt dial$string dial$echo 1 init$once 1 dial$pulse

dial$nopulse dial$xabort <^M> dial$idle dial$time 60. time$settle <35.> ; the T3000 is SLOW to recover x$result <12.> ph$answer ; /62/ ph$noanswer ; /62/ mod$res ,FAILED mod$res ,CONNECT mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED ; /63/ mod$res ,RING define vadic , mod$comment wake$string <^E^M> wake$rate 10 wake$prompt <*> dial$string <%S^M> dial$rate 10 dial$wait dial$ack <^M> dmod$string dmod$prompt dial$confirm <^M> dial$go dial$echo 1 dial$xabort <^M> dial$idle dial$time 35. mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,CONNECT mod$res ,CONNECT mod$res ,RING mod$res

dial$nopulse dial$xabort <^M> dial$idle dial$time 35. mod$res ,FAILED mod$res ,FAILED mod$res ,FAILED mod$res ,CONNECT ; /BBS/ CON2400 ? mod$res ,CONNECT ; /BBS/ CON1200 ? mod$res ,CONNECT ; /BBS/ CON300 ? mod$res ,CONNECT mod$res ,CONNECT mod$res ,RING mod$res