ommand dbglst ,CONNECT,3 ,sd$con command dbglst ,FILE ,3 ,sd$fil command dbglst ,HELP ,3 ,sd$hel command dbglst ,NONE ,3 ,sd$none command dbglst ,OFF ,3 ,sd$off command dbglst ,ON ,2 ,sd$on command dbglst ,PACKET ,3 ,sd$pak command dbglst ,RAW ,3 ,sd$raw command dbglst ,RPACK ,3 ,sd$rpa command dbglst ,STATE ,3 ,sd$sta command dbglst ,TERMINAL,3 ,sd$ter command dbglst ,NOTERMINAL,3 ,sd$not command dbglst .sbttl routines for SET DEBUG .enabl lsb sd$none: sd$off::bic #log$al ,trace ; clear all debug bits now bit #log$op ,trace ; is there a log file open ? beq 20$ ; no calls close ,<#lun.lo> ; close it bic #log$op ,trace ; say it's closed please tst infomsg ; /41/ Inform the user? beq 20$ ; /41/ No message ,cr ; /41/ Call it Log file now 20$: clr r0 return sd$all: sd$on: bic #log$al ,trace ; insure previous logfile closed call rawchk ; disallow other logging if raw logging bcs 100$ ; oops call sdopen ; a debug file already open ? bcs 100$ ; no bis #log$al ,trace ; set debug on turns the world on clr r0 100$: return sd$ter: mov sp ,debug ; i/o to local kermit terminal clr r0 return sd$not: clr debug clr r0 return global .dsabl lsb .sbttl more set debug routines ; SD$CON enable logging of virtual connect i/o to disk file ; ; SD$PAK enable logging of all packets to disk file ; ; SD$STA enable logging of all states to disk file sd$con: call sdopen ; logfile open ? bcs 100$ ; no bis #log$co ,trace ; yes, set console emulation logging clr r0 100$: return sd$fil: call sdopen ; logfile open ? bcs 100$ ; no call rawchk ; disallow other logging if raw logging bcs 100$ ; oops bis #log$fi ,trace ; yes, set file opens and creates clr r0 100$: return sd$pak: call sdopen ; logfile open bcs 100$ ; no call rawchk ; disallow other logging if raw logging bcs 100$ ; oops bis #log$pa ,trace ; yes, set packet logging on clr r0 100$: return sd$sta: call sdopen ; logfile open bcs 100$ ; no call rawchk ; disallow other logging if raw logging bcs 100$ ; oops bis #log$st ,trace ; yes, set state logging on clr r0 100$: return .sbttl check for oding raw terminal i/o dumps .enabl lsb sd$raw: call sdopen ; logfile open bcs 100$ ; no mov trace ,r0 bic #log$op ,r0 tst r0 beq 10$ message message br 100$ 10$: bis #log$io ,trace ; yes, set state logging on calls close ,<#lun.lo> calls create ,<#logfil,#lun.lo,#binary> ; redo as image file message ,cr 100$: clr r0 return rawchk: bit #log$io ,trace beq 200$ message ,cr sec return 200$: clc return sd$rpa: bis #log$rp ,trace clr r0 return sd$hel: message message ,cr message < Connection logging SET DEBUG CONSOLE>,cr message < File opens/creates SET DEBUG FILE>,cr message < Packet traffic SET DEBUG PACKET>,cr message < Raw terminal i/o SET DEBUG RAW>,cr message < State transitions SET DEBUG STATE>,cr message message ,cr message ,cr message ,cr message return .dsabl lsb .sbttl set parity here .enabl lsb set$pa::calls getcm0 ,; find out which option was given tst r0 ; did we find one bmi 110$ ; no jsr pc ,@r1 ; dispatch now 20$: mov r0 ,parity ; save for the show command cmpb r0 ,#par$no ; no parity? beq 100$ ; yes, no problem message ,cr message ,cr message ,cr message ?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddf .sbttl set update value set$nu::clr blip clr r0 return set$up::calls l$val , ; get the interval into decimal tst r0 ; ok ? bne 100$ ; no mov r1 ,blip ; yes, set it up please clr r0 return 100$: mov #1 ,r0 return set$po::calls getcm0 ,; find out which option was given tst r0 ; did we find one bmi 110$ ; no jsr pc ,@r1 ; dispatch now clr r0 110$: return $cmglob = 0 command poslst ,NODTE ,2 ,spo$nd command poslst ,DTE ,2 ,spo$dt command poslst spo$nd: clr procom return spo$dt: mov sp ,procom return global .sbttl SET RSX set$rx::calls getcm0 ,; find out which option was given tst r0 ; did we find one bmi 110$ ; no jsr pc ,@r1 ; dispatch now 110$: return $cmglob = 0 command rsxlst ,CHARIO ,2 ,srx$ch command rsxlst ,LINEIO ,2 ,srx$li command rsxlst ,TC.DLU ,2 ,srx$tc command rsxlst ,CONNECT,2 ,srx$co command rsxlst srx$ch: mov sp ,chario clr r0 return srx$li: clr chario clr r0 return .enabl lsb srx$tc: mov argbuf ,r0 ; attempt to resolve the tc.dlu 10$: tstb @r0 ; question for connecting to a beq 90$ ; modem. cmpb (r0)+ ,#40 ; scan for a trailing space bne 10$ ; not found yet 20$: movb @r0 ,r1 ; found space, next character must sub #'0 ,r1 ; be a digit from 0..2 bmi 90$ ; no good cmp r1 ,#2 ; check for upper limit now bhi 90$ ; no good mov r1 ,tcdlu ; save it clr r0 ; and exit br 100$ 90$: message ,cr mov #1 ,r0 100$: return .dsabl lsb .enabl lsb srx$co: call nextarg ; next one please 20$: cmpb @r1 ,#'D&137 ; SET RSX CONNECT DEFAULT bne 30$ ; no clr con$dsp ; /44/ yes, clear ALTCON then br 100$ 30$: cmpb @r1 ,#'A&137 ; SET RSX CONNECT ALTERNATE bne 90$ ; no mov altcon ,con$dsp ; /44/ br 100$ 90$: message ,cr 100$: clr r0 return .dsabl lsb global global ; /44/ .sbttl SET RT11 (10-Sep-85 13:11:38) ; SET RT11 FLOW_CONTROL ON ; SET RT11 FLOW_CONTROL OFF ; SET RT11 [NO]FLOW_CONTROL ; SET RT11 [NO]VOLUME_VERIFY ; SET RT11 CREATE_SIZE n ; SET RT11 BREAK [LONG][SHORT] ; SET RT11 [NO]WILDCARD set$rt::calls getcm0 , tst r0 bmi 110$ jsr pc ,@r1 110$: return srt$wc: clr nowild ; /51/ Clear it clr r0 ; /51/ Success return srt$nw: mov sp ,nowild ; /51/ Set it clr r0 ; /51/ Success return ; /51/ Exit srt$cr: call nextarg ; see if another arg present tstb @r1 ; well? beq 90$ ; no calls l$val , ; yes, see if a good number tst r0 ; well ? bne 90$ ; no mov r1 ,en$siz ; yes, save it please return ; exit 90$: message <%SET-W SET RT11 CREATE_SIZE decimal_value>,cr return srt$fl: call nextarg ; get third argument in command tstb @r1 ; did we find one or stop on null beq 90$ ; null, assume SET RT11 FLOW_CONTROL cmpb (r1)+ ,#'O&137 ; must be 'O' next bne 110$ ; not 'O', error clr r0 ; assume no flow control cmpb (r1)+ ,#'F&137 ; 'F' --> SET RT11 FLOW OFF beq 100$ ; ok 90$: mov sp ,r0 ; not off, assume ON 100$: mov r0 ,rtflow ; store the value and exit clr r0 return 110$: message <%SET-W SET RT11 FLOW [ON][OFF]>,cr mov #1 ,r0 return srt$br: call nextarg ; /43/ Get third argument in command mov #17. ,r0 ; /43/ Assume short break tstb @r1 ; /43/ Did we find one or stop on null beq 100$ ; /43/ Assume SET RT11 BREAK SHORT cmpb @r1 ,#'S&137 ; /43/ 'SHORT' ? beq 100$ ; /43/ Yes, exit cmpb @r1 ,#'L&137 ; /43/ 'LONG' ? bne 110$ ; /43/ No, error mov #60.*3 ,r0 ; /43/ Yes, set three second break 100$: mov r0 ,brklen ; /43/ Store the value and exit clr r0 return 110$: message <%SET-W SET RT11 BREAK [SHORT][LONG]>,cr mov #1 ,r0 return srt$vo: mov sp ,rtvol clr r0 return srt$nv: clr rtvol clr r0 return srt$nf: clr rtflow clr r0 K11ST0MAC[.050032]K11ST0.MAC[.050032]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddftst r0 ; Did we find the option ? bmi 100$ ; No calls getcm1 ,; Yes, look for value clause now tst r0 ; Find it (or read it?) bmi 100$ ; No jsr pc ,@r1 ; Dispatch to correct action tst r0 beq 100$ message <%SET-W Unknown option in SET DIAL>,cr 100$: add #140 ,sp ; Pop buffer return .dsabl lsb command dialst ,WAKEUP ,2 ,ss$wak,,string command dialst ,WAKE_STRING ,6 ,ss$wak,,string command dialst ,PROMPT ,2 ,ss$pro,,string command dialst ,INITIATE ,2 ,ss$ini,,string command dialst ,FORMAT ,2 ,ss$for,,string command dialst ,SUCCESS ,2 ,ss$suc,,string command dialst ,INFORMATION ,2 ,ss$inf,,string command dialst ,FAILURE ,2 ,ss$fai,,string command dialst ,CONFIRM ,2 ,ss$con,,string command dialst ,WAKE_RATE ,6 ,ss$wra,,decnum command dialst ,DIAL_RATE ,6 ,ss$dra,,decnum command dialst ,DIAL_PAUSE ,6 ,ss$pau,,string command dialst ,TIMEOUT ,2 ,ss$tmo,,decnum command dialst ,TIME_OUT ,2 ,ss$tmo,,decnum command dialst .sbttl More SET DIAL commands ; MODEM type data structure. Taken directly from K11DIA.MAC mod.next =: 0 ; next modem in list mod.str =: 2 ; address of name of modem mod.val =: 4 ; numeric value for dispatching dial.time =: 6 ; value of dial time wake.string =: 10 ; address of wakeup string wake.rate =: 12 ; value of delay wake.prompt =: 14 ; address of wakeup prompt dmod.string =: 16 ; address of dial dial string dmod.prompt =: 20 ; address of prompt returned for dial dial.string =: 22 ; address of formatting string for dial dial.rate =: 24 ; value of delay wake.ack =: 26 ; address of wakeup response dial.ack =: 30 ; 1st = waitfor, 2nd to confirm number dial.online =: 32 ; online ack string dial.busy =: 34 ; busy ack dial.wait =: 36 ; Pause string dial.confirm =: 40 ; string to confirm number for dialing dial.go =: 42 ; ie, va212 returns "DIALING\n" res.bin =: 44 ; if <>, returns status with \n ; otherwise a binary response (DF03) dial.echo =: 46 ; if <>, numbers are echoed immediately mod.comment =: 50 ; res.head =: 52 ; ext.dial =: 54 ; if ne, address of external dialer dial.xabort =: 56 ; /45/ To abort call from modem dial.idle =: 60 ; /45/ Place modem in IDLE state dial.pulse =: 62 ; /45/ Switch to pulse dialing dial.nopulse =: 64 ; /45/ Switch to tone dialing def.guard =: 66 ; /45/ last thing (unused) .sbttl set dial, cont'd ss$pau: mov #dial.wait,r5 ; Pause character(s) call sd.chk ; Insert return ; and exit ss$wak: mov #wake.string,r5 ; Offset to setup call sd.chk ; Convert to binary and check return ss$for: mov #dial.string,r5 ; Formatting for dialing call sd.chk ; Convert, check and copy return ; Exit ss$pro: mov #wake.prompt,r5 ; String modem returns for wakeup, call sd.chk ; as in "HELLO: I'M READY" return ; Exit ss$ini: mov #dmod.string,r5 ; Could be part of SET DIAL FORMAT call sd.chk ; Used as in VA212 (D\015) return ss$con: mov #dial.confirm,r5 ; As in VA212PA, to confirm the call sd.chk ; number is actually correct return ss$suc: mov #1 ,r3 ; Message class call sd.res ; Insert response string return ss$inf: clr r3 ; Message class call sd.res ; Insert response string return ss$fai: mov #-1 ,r3 ; Message class call sd.res ; Insert response string return ss$dra: mov #dial.rate,r5 ; Stuff the value in now call sd.val ; .... return ; exit ss$wra: mov #wake.rate,r5 ; Stuff the value in now call sd.val ; .... return ; exit ss$tmo: calls l$val , ; This goes into a global tst r0 ; Success bne 100$ ; No mov r1 ,diatmo ; Yes, exit 100$: return ; Bye global .sbttl SET DIAL, cont'd .enabl lsb sd.chk: prsbuf r4 ; ExpanK11ST0MAC[.050032]K11ST0.MAC[.050032]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddfd and copy string to workbuffer tst r0 ; Successful? bne 100$ ; No strlen r4 ; Get the length of the result inc r0 ; Plus one for the null terminator inc r0 ; Insure NEXT is even address bic #1 ,r0 ; Even address boundary malloc r0 ; Ask for the allocation add umddef ,r5 ; mov r0 ,(r5) ; Insert the new buffer address strcpy (r5) ,r4 ; Copy the string and exit clr r0 ; Success br 100$ ; Exit 80$: message ,cr 100$: return .dsabl lsb .enabl lsb sd.res: prsbuf r4 ; Expand and copy string to workbuffer tst r0 ; Successful? bne 100$ ; No strlen r4 ; Get the length of the result add #2 ,r0 ; Plus one for the null terminator bic #1 ,r0 ; Insure on a word boundary add #4 ,r0 ; Space for link and status mov umddef ,r5 ; Get base address of structure add #res.hea,r5 ; Link to first entry 10$: tst (r5) ; End of the chain yet? beq 20$ ; Yes mov (r5) ,r5 ; No, get the next one please br 10$ ; And recheck 20$: malloc r0 ; Ask for an allocation tst r0 ; Did we get it beq 80$ ; No, exit mov r0 ,(r5) ; Yes, insert the address mov (r5) ,r5 ; Point directly to new area clr (r5)+ ; No link to next mov r3 ,(r5)+ ; Message class type strcpy r5 ,r4 ; Insert the string and exit clr r0 ; Success br 100$ ; Exit 80$: message ,cr 100$: return .dsabl lsb sd.val: add umddef ,r5 ; Point directly to the field calls l$val , ; Anything there thats any good? tst r0 ; Success? bne 100$ ; No mov r1 ,(r5) ; Yes, insert the value and exit 100$: return global .sbttl set PHONE ; added /45/ along with SET DIAL set$ph::calls getcm0 ,; Find out which option was given tst r0 ; Did we find the option ? bmi 100$ ; No calls getcm1 ,; Yes, look for value clause now tst r0 ; Find it (or read it?) bmi 100$ ; No jsr pc ,@r1 ; Dispatch to correct action 100$: return ; Exit command pholst ,NUMBER ,2 ,sph$nu,,string command pholst ,PULSE ,2 ,sph$pu command pholst ,TONE ,2 ,sph$to command pholst ,BLIND ,2 ,sph$bl command pholst sph$to: mov #1 ,pulse clr r0 return sph$pu: mov #-1 ,pulse clr r0 return sph$bl: mov #1 ,blind clr r0 return sph$nu: mov #pnhead ,r5 ; Get listhead for phone numbers 10$: tst (r5) ; Found the last entry yet ? beq 20$ ; Yes, insert new element here mov (r5) ,r5 ; No, check the next one br 10$ ; Keep looking 20$: strlen argbuf ; Get total length of data add #4 ,r0 ; Add in space for nulls and insure bic #1 ,r0 ; even length, also link next field malloc r0 ; Ask for the space please mov r0 ,(r5) ; Insert the address beq 90$ ; No space clr (r0)+ ; This is now the tail strcpy r0 ,argbuf ; Stuff the data in and exit clr r0 ; Success return ; Bye 90$: message ,cr inc r0 ; Exit with error return ; Bye global ; List header global ; /54/ global ; /54/ nextarg:mov argbuf ,r1 10$: tstb @r1 beq 100$ cmpb (r1)+ ,#40 bne 10$ 100$: return .end