title k20pdc - Kermit (Visual) Packet Decoding ; All display code was removed from k20mit and moved to the k20dsp ; module as part of Edit 194 to address the issue of a very large ; single source file that unexpectedly began generating MCRNEC errors. ; ; With the exception the 'main' k20mit module, any time a module gets ; near 50 pages, a code split happens. Thus far, this has happened ; with: ; ; k20ioc - Kermit INPUT/OUTPUT/TRANSMIT support ; k20mac - Kermit Macros (DEFINE command) ; k20srv - Kermit Server Commands subttl Preliminaries search monsym,macsym,cmd,k20unv ;[194] cmdacs ;Clean up p1-p4 definitions sall ; Tidy listing .directive flblst ; We don't need to see all the ASCIZ bytes... extern rquote ; Receive quote character extern squote ; Send quote character extern $closd ; Close debugging log extern logjfn ; Debugging log JFN extern BOUTI% ; Byte output to JFN or append to string extern %%smsg ; smsg macro support remark ; N.B., %%smsg *ONLY* handles OWGP's!!!!! repeat 0,< remark ;;;; ; Put these in later to bum a BOUT% extern s8ccv7 ; String eight controlified convert to seven extern trnbuf ; Where it leaves this > .psect code/ronly ; Pure code. Pure Heaven subttl DIAMSG Print packet type and number if debugging "states" ;[114] DIAMSG ; ; Enter with: ; t1/ packet type ; t2/ packet number ; t4/ pointer to data ; logjfn/ debugging log file jfn ; Returns +1 always, with all ACs unchanged. diamsg: entry diamsg ;[221] Moved here from k20mit cain debug, 1 ; Only for protocol debugging. skipn logjfn ; Got a log JFN? ret ; Nope, forget it. saveac ; Save these. andi t1, 177 ;[235] Strip off any parity push p, t1 ; Save packet type for sec. move t1, logjfn ; Get debugging log file JFN. movei t3, ^d8 ;[194] ; JFN's are in octal... NOUT% ifje. r ;[194] Catch and ignore error pop p, t2 ;[194] Keep the stack straight!!!!! jrst deberr ;[174] else. ;[194] Otherwise, worked pop p, t2 ; Pop packet type endif. ;[194] call BOUTI% caie t2, "G" ; Generic command? ifskp. ;[194] Yes, first character of one move t3, t4 ; Log the first character of the data packet. ildb t2, t3 andi t2, 177 ;[235] Strip off any parity call BOUTI% ;[174] endif. ;[194] diamsz: movei t2, " " ; A space for delimitation. call BOUTI% ;[174] ret subttl Handle I/O errors writing to debugging log file. ;[174] deberr: entry deberr ;[221] Moved here from k20mit txmsg < %KERMIT-20: Error writing debug log file - > movei t1, .priou hrloi t2, .fhslf setz t3, ERSTR% erjmps .+2 ; Ignore its strange return erjmps .+1 ; Ignore its stranger return txmsg < > setz t1, ; Close the log file if possible call $closd ;[194] ; and turn off debug log. ret subttl Packet Decode ; t1/ LH, "S" or "R" (Sending or Receiving ; RH, Debugging log JFN or terminal device id ; t2/ Point 8, packet to send or packet we got pdecod: entry pdecod ; Called by k10mit packet routines remark ; *MUST* be saved by caller!!!! saveac ; Needs some more registers skipg p3, logjfn ; Do we have a logging JFN? (can be .priou) ret ; No, so don't log anything hlrz p1, t1 ; Load the packet context tlz t1, -1 ; And stomp it out of the register dmove q1, t1 ; Let's save these for a moment dmove q3, t3 ; all of the temporaries block. ; Carefully review the context character cain p1, "R" ; Receiving? retskp ; Yes, this is valid cain p1, "S" ; Sending? retskp ; Yes, that's valid, too ret ; Otherwise, some kind of bad endbk. ; End of block context ifskp. ; +2 means we thought it was fine cain p1, "R" ; Receiving? callret rpdecd ; Yes, go do something about that cain p1, "S" ; Receiving? callret spdecd ; Yes, go do something about that, too anskp. ; ??? Shouldn't happen--we just checked else. ; Otherwise, unknown context move t1, p3 ; Pick up the log JFN smsg <% "> ; Begin confusion blat move p1, p1 ; Pick up the unknown context character call BOUTI% ; Put it into the log file smsg <" is not a known transmission context > ; Finish the blat and close off the line ret ; Get out of here and don't risk bogosity endif. ; End case context character scrub ret ; Superstition... subttl Receive Context ; Invoked at the end of the receive ; ; AC's: ; ; t1/ Packet type ; t2/ Packet number ; t3/ Length of data field ; t4/ 8-bit byte pointer to data field extern rsthdr ; Start of Packet extern num ; Packet Number extern type ; Message Type extern datlen ; Data length extern pktlen ; Packet length extern islong ; Set if a long packet extern datptr ; Pointer to data area of packet extern pktbct ; Block check type for this packet on receive extern blkchk ; Final computed block check extern fintim ; Fine grained time of day (in K20TIM) subttl Decode a received packet rpdecd: remark ; Saved by original external caller remark ; Saved by internal control linkage repeat 0,< setzb t1, t2 ; Cons up some .CHNUL's dmovem t1, sop8st ; Start of Packet character as an 8 bit ASCII string dmovem t1, trnbuf ; Same character as expanded 7 bit ASCIZ > move t1, p3 ; Load the log file JFN smsg () ; "R" for Receive call fintim ; Print Time of Day down to HP ticks jrst deberr ; Something went wrong, stop doing this movei t4, "R" ; Flag that we're receiving call pkthdr ; Display packet head jrst deberr ; Failed somehow move t2, datptr ; Load what receieve sets up movem t2, sdatpt ; Pretend we're sending it for code re-use move t4, type ; Reload the type andi t4, 177 ;[235] Strip off any parity cail t4, "A" ; Before "A"? caile t4, "Z" ; or after "Z"? jrst invsnd ; Can't do the jump table block. ; Enter block context for better control flow cain t4, "Y" ; An acknowledge? ret ; Don't overwrite what ACK is ack'ing cain t4, "N" ; A negative acknowledge? ret ; Don't overwrite what NAK is nak'ing retskp ; Otherwise, OK to update context endbk. ; End of block context ifskp. ; +2 means OK to overwrite movem t4, lstpkt ; Remember last packet type endif. saveac ; Needs some scratch move q1, sdatpt ; Load the pointer to the packet's data field move q3, datlen ; Number of initialization bytes move t3, t4 ; Save a working copy subi t3, "A" ; Bring into offset range call @sndpkt(t3) ; Call the right routine ret ; Pass the error back up smsg < > ; Tie off the log file line ret ; +1, always subttl Decode a sent packet extern sseqn ; Sending Sequence Number extern sdatpt ; Sending Data Pointer (points inside the packet) extern spakpt ; Sending packet pointer spdecd: remark ; Saved by original external caller remark ; Saved by internal control linkage repeat 0,< setzb t1, t2 ; Cons up some .CHNUL's dmovem t1, sop8st ; Start of Packet character as an 8 bit ASCII string dmovem t1, trnbuf ; Same character as expanded 7 bit ASCIZ > move t1, p3 ; Load the log file JFN smsg () ; "S" for Send call fintim ; Print Time of Day down to HP ticks jrst deberr ; Something went wrong, stop doing this movei t4, "S" ; Flag that we're sending call pkthdr ; Dump basic packet headers jrst deberr ; Failed somehow move t4, type ; Reload the type andi t4, 177 ;[235] Strip off any parity cail t4, "A" ; Before "A"? caile t4, "Z" ; or after "Z"? jrst invsnd ; Can't do the jump table block. ; Enter block context for better control flow cain t4, "Y" ; An acknowledge? ret ; Don't overwrite what ACK is ack'ing cain t4, "N" ; A negative acknowledge? ret ; Don't overwrite what NAK is nak'ing retskp ; Otherwise, OK to update context endbk. ; End of block context ifskp. ; +2 means OK to overwrite movem t4, lstpkt ; Remember last packet type endif. saveac ; Needs some scratch move q1, sdatpt ; Load the pointer to the packet's data field move q3, datlen ; Number of initialization bytes move t3, t4 ; Save a working copy subi t3, "A" ; Bring into offset range call @sndpkt(t3) ; Call the right routine ret ; Pass the error back up smsg < > ; Otherwise, tie off the log file line ret ; Returns +1, always subttl Jump table for sent packet types .endps code ; Constant tables don't go in code .psect const ; they go into the constants psect sndpkt: INVSND ; "A" - Attributes sndeot ; "B" - EOT INVSND ; "C" - Largely unimplemented host command sndata ; "D" - Data snderr ; "E" - Error packet sndfil ; "F" - File Header sndgen ; "G" - Sending a generic command INVSND ; "H" - Undefined sndinz ; "I" - Info Packet INVSND ; "J" - Undefined INVSND ; "K" - Undefined INVSND ; "L" - Undefined INVSND ; "M" - Undefined sndnak ; "N" - Negative Acknowledge (NAK) INVSND ; "O" - Undefined INVSND ; "P" - Undefined INVSND ; "Q" - Undefined sndrec ; "R" - Receive (GET) sndini ; "S" - Send INVSND ; "T" - Specially handled, somehow INVSND ; "U" - Undefined INVSND ; "V" - Undefined INVSND ; "W" - Undefined sndtxt ; "X" - Text Header sndack ; "Y" - Acknowledge (ACK) sndeof ; "Z" - EOF .endps const ; Done with constants .psect code ; Back to generating code subttl Invalid Send Packet INVSND: move t1, p3 ; Load log file smsg (<, Invalid packet type: ">) ;" Fool font crock mode invsn1: move t2, t4 ; Load it call BOUTI% ; Put it in the log invsn2: movei t2, .chdbq ; Load closing double quote call BOUTI% ; Put it in the log sojl q3, RSKP ; Nothing here? That's fine callret sndata ; Dump any data that came along with it retskp ; Successfully whined ... subttl Various Commands, many mostly dinky sndeot: remark Sending a "B" - End of Transmission smsg (<, End of Transmission>) sojl q3, RSKP ; Nothing here? That's fine smsg <: > ; Shouldn't have anything in it, but... callret sndat1 ; Dump it sndata: remark Sending a "D" - Data Packet smsg <, Data: > ; The packet data sndat1: move t2, sdatpt ; Load pointer to data area of packet movn t3, datlen ; Length of same sndat2: ifn. t3 ; Ditch the SOUT% if nothing there SOUT% ; Spew that erjmpr deberr ; Or didn't else. ; That's odd smsg (<(null)>) ; Blat about it endif. ; End case non-zero data retskp snderr: remark Sending an "E" - Error (Fatal) smsg (<, Error>) sojl q3, RSKP ; Nothing here? That's fine callret sndata ; Dump it sndfil: remark Sending a "F" - (Fetch or Name this File) smsg <, File: > ; The packet name callret sndat1 ; Dump it sndinz: remark Sending an "I" - Initialization (here are my parameters) smsg (<, Initialization >) callret params ; Break out the parameters sndnak: remark Sending an "N" - Negative acknowledgement smsg (<, Negative Acknowledge>) retskp sndrec: remark Sending an "R" - Receive (this file) smsg <, Receive: > ; The packet name callret sndat1 ; Dump it sndini: remark Sending an "S" - Send Initiation smsg (<, Send Initiation >) callret params ; Break out the parameters sndtxt: remark Sending an "X" - Display this data on terminal smsg <, Text: > ; ; The packet name callret sndat1 ; Dump it subttl Sending Acknowledgement table .endps code ; Constant tables don't go in code .psect const ; they go into the constants psect acktab: defack ; "A" - Attributes defack ; "B" - EOT defack ; "C" - Largely unimplemented host command defack ; "D" - Data errack ; "E" - Error packet defack ; "F" - File Header defack ; "G" - Sending a generic command defack ; "H" - Undefined inzack ; "I" - Info Packet UNDACK ; "J" - Undefined UNDACK ; "K" - Undefined UNDACK ; "L" - Undefined UNDACK ; "M" - Undefined errack ; "N" - Negative Acknowledge (NAK) UNDACK ; "O" - Undefined UNDACK ; "P" - Undefined UNDACK ; "Q" - Undefined defack ; "R" - Receive (GET) iniack ; "S" - Send defack ; "T" - Specially handled, somehow UNDACK ; "U" - Undefined UNDACK ; "V" - Undefined UNDACK ; "W" - Undefined defack ; "X" - Text Header errack ; "Y" - Acknowledge (ACK) defack ; "Z" - EOF .endps const ; Done with constants .psect code ; Back to generating code subttl Acknowledgement dispatch sndack: saveac ; Needs some scratch move q1, sdatpt ; Load the pointer to the packet's data field move q3, datlen ; Number of initialization bytes move t4, lstpkt ; Load what we should be acknowledging andi t4, 177 ;[235] Strip off any parity move t3, t4 ; Save a working copy subi t3, "A" ; Bring into offset range callret @acktab(t3) ; Continue the right routine UNDACK: remark ; Packet type the Kermit-20 does not do smsg (<, Undefined Acknowlege for packet type: ">) ;" Fool font crock mode callret invsn1 ; Finish logging it errack: remark ; Shouldn't acknowledge "Y", "N" or "E" smsg (<, ERROR: should not be acknowledging a packet type: ">) ;" Fool callret invsn1 ; Finish logging it iniack: remark ; Response to "S" smsg (<, Send Initiation Acknowledgement >) callret params ; Break out the parameters inzack: remark ; Response to "I" smsg (<, Initialization Acknowledgement >) callret params ; Break out the parameters defack: remark ; All others is to print any contents ife. q3 ; If none, then nothing further to do smsg (<, Acknowledged packet type ">) ;" Fool font crock mode move t2, t4 ; Load what we're acknowledging andi t2, 177 ;[235] Strip off any parity call BOUTI% ; Append to log caie t2, "G" ; Was this a generic command? ifskp. ; It was, so provide a little more clarity move t2, lstgen ; Load the kind of last generic andi t2, 177 ;[235] Strip off any parity call BOUTI% ; Append to log endif. movei t2, .chdbq ; Closing double quote call BOUTI% ; Append that, too retskp ; Worked, wonderfully... endif. smsg (<, Ack(>) ; Short acknowledgement move t2, t4 ; Load what we're acknowledging andi t2, 177 ;[235] Strip off any parity call BOUTI% ; Append to log caie t2, "G" ; Was this a generic command? ifskp. ; It was, so provide a little more clarity move t2, lstgen ; By getting the last generic command andi t2, 177 ;[235] Strip off any parity call BOUTI% ; Append to log endif. smsg (<), >) ; Close and space over move t2, q1 ; Load the pointer to the data area movn t3, q3 ; Negative length of data area SOUT% ; Get the response into the log erjmpr deberr ; Or didn't... retskp ; Worked!! subttl Sending a "Z" - End of File sndeof: smsg (<, End of File>) move q1, sdatpt ; Load the pointer the packet's data field move q3, datlen ; Number of initialization bytes ; See if being told to discard file sojl q3, RSKP ; But only if there is a character ildb q2, q1 ; Load the action character andi q2, 177 ;[235] Strip off any parity caie q2, "D" ; Got told to discard? ifskp. ; We did smsg (<, Discarding>) ; Blat about it else. ; Otherwise, something odd smsg (<, >) ; So blat about that callret sndat1 ; and put into the log endif. ; End of Discard decision retskp ; Successfully decode the packet subttl Generic Send Packet Types .endps code ; Constant tables don't go in code .psect const ; they go into the constants psect sgenpt: genpwd ; A - PWD INVGEN ; B - Undefined gencwd ; C - CWD gendir ; D - Directory gendel ; E - Erase (delete) genfin ; F - Finish INVGEN ; G - Undefined genhlp ; H - Help INVGEN ; I - Login (not yet implemented) INVGEN ; J - Journal control (nyi) INVGEN ; K - Copy (nyi) genbye ; L - Logout, Bye INVGEN ; M - Undefined INVGEN ; N - Undefined INVGEN ; O - Undefined INVGEN ; P - Program invocation (nyi) gensta ; Q - Server status query INVGEN ; R - Rename (nyi) INVGEN ; S - Undefined INVGEN ; T - Type gendsk ; U - Disk Usage INVGEN ; V - Variable Set/Query INVGEN ; W - Who (Finger) INVGEN ; X - Undefined INVGEN ; Y - Undefined INVGEN ; Z - Undefined .endps const ; Done with constants .psect code ; Back to generating code subttl Send Generic Command sndgen: remark t1, p3 ; Already loaded with JFN smsg <, Generic, > ; A generic packet type sosl q3 ; Malformed? ifskp. ; It is smsg (<(% No action character)>) retskp ; Handled malformed character OK endif. ildb t4, q1 ; Pick up the generic command character andi t4, 177 ;[235] Strip off any parity cail t4, "A" ; Before "A"? caile t4, "Z" ; or after "Z"? jrst invgen ; Can't do the jump table movem t4, lstgen ; Set last generic move t3, t4 ; Save a copy in case of error subi t3, "A" ; Bring into offset range callret @sgenpt(t3) ; Invoke the correct decoding routine subttl Invalid Generic message type INVGEN: smsg () ;" Fool font crock mode callret invsn1 ; Finish logging it subttl Trivial Generic Requests genpwd: remark "A" smsg () retskp gencwd: remark "C" smsg () call genarg ; Print the working directory, if any nop ; Ignore error retskp gendir: remark "D" smsg () callret genarg gendel: remark "E" smsg () callret genarg genfin: remark "F" smsg () retskp genhlp: remark "H" smsg () retskp genbye: remark "L" smsg () retskp gensta: remark "Q" smsg () retskp gendsk: remark "U" smsg () retskp subttl Generic Argument Decode genarg: sojl q3, RSKP ; If nothing left, we're done ildb t4, q1 ; Pick up the length of the argument andi t4, 177 ;[235] Strip off any parity move p2, rquote ; Let's assume we are receiving caie p1, "R" ; However, are we? move p2, squote ; Nope, we are sending do. ; Enter loop context for each argument came p2, t4 ; Is the length the same as the quote ifskp. ; They are, so then the length has to be quoted sojl q3, RSKP ; If nothing left, we're done ildb t4, q1 ; Pick up the length of this argument andi t4, 177 ;[235] Strip off any parity endif. ; End case quoted length subi t4, .chspc ; Bring into numeric range jumple t4, RSKP ; No argument, depart smsg (<, >) ; Punctuate the argument move t2, q1 ; Load the properly advanced pointer movn t3, t4 ; Load the negative length SOUT% ; Put into the log erjmps r ; Shouldn't happen, JFN was fine move q1, t2 ; Update packet pointer sub q3, t4 ; Count off the characters we did sojl q3, RSKP ; See if we have another field and exit if not ildb t4, q1 ; Pick up the length of the argument andi t4, 177 ;[235] Strip off any parity loop. ; And go take care of that enddo. ; End loop lexical context retskp ; Superstition subttl Break out parameters for S and I packets ; Call: ; ; q1/ Pointer to packet's data field ; *q2/ Used internally for packet characters ; q3/ Number of bytes in packet's data field ; ; Return: ; ; +1 Some kind of failure ; +2 Successfully decoded params: smsg () move t2, datlen movei t3, ^d10 NOUT% erjmpr r sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the maximum length andi q2, 177 ;[235] Strip off any parity smsg (<, MaxL: >) move t2, q2 subi t2, .chspc movei t3, ^d10 NOUT% ; 1 Packet size erjmpr r sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the time out andi q2, 177 ;[235] Strip off any parity smsg (<, TimO: >) move t2, q2 subi t2, .chspc movei t3, ^d10 NOUT% ; 2 Time out erjmpr r sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the number of padding characters andi q2, 177 ;[235] Strip off any parity smsg (<, Npad: >) move t2, q2 subi t2, .chspc movei t3, ^d10 NOUT% ; 3 Padding (character count) erjmpr r sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the padding character andi q2, 177 ;[235] Strip off any parity smsg (<, PadC: >) ; 4 move t2, q2 addi t2, ^o100 ; It's in excess 64 (decimal) andi t2, ^o177 ; Clip if it went to eight bits call outc ; Output as a control character sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the packet terminator andi q2, 177 ;[235] Strip off any parity smsg (<, EOL: >) ; 5 move t2, q2 subi t2, .chspc ; Bring into control range call outc ; Output as a control character sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the control prefix andi q2, 177 ;[235] Strip off any parity smsg (<, Qctl: >) ; 6 move t2, q2 call outc ; Output as a control character sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the eight bit quote andi q2, 177 ;[235] Strip off any parity smsg (<, Qbin: >) ; 7 move t2, q2 caie t2, "Y" ; Am I agreeing? ifskp. ; I'm agreeable smsg else. ; Otherwise, could be other things caie t2, "N" ; Am I refusing 8 bit ifskp. ; I'm disagreeble smsg else. ; Neither one is the 8 bit quote character call outc ; Output as a possible control character endif. ; End case No or actual character endif. ; End case Yes or something else sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the block check type andi q2, 177 ;[235] Strip off any parity smsg (<, ChkT: >) ; 8 move t4, q2 dxtext (t2, ) cain t4, "1" dxtext (t2,<6-bit>) cain t4, "2" dxtext (t2,<12-bit>) cain t4, "3" dxtext (t2,<16-bit CRC>) call %%smsg ; Handle as if I did an smsg sojl q3, RSKP ; Only if there ildb q2, q1 ; Load the repeat count prefix andi q2, 177 ;[235] Strip off any parity smsg (<, Rept: >) ; 9 move t2, q2 call BOUTI% remark Extended capabilities sojl q3, RSKP ; If nothing left, we're done ildb q2, q1 ; Otherwise, pick up first capability mask andi q2, 177 ;[235] Strip off any parity subi q2, .chspc ; Bring into numeric range trnn q2, 2 ; Is the Long Packets capability bit on? retskp ; No, we can't do anything else smsg (<, Long: >) ; 10 block. ; Enter block context for better control flow sojl q3, r ; Stop if Sliding Windows isn't there ildb q2, q1 ; Yet ignore it because we don't do it andi q2, 177 ;[235] Strip off any parity sojl q3, r ; Stop if high order is not there ildb t2, q1 ; Load the high order andi t2, 177 ;[235] Strip off any parity subi t2, .chspc ; Bring into numeric range imuli t2, ^d95 ; High digit is base 94 sojl q3, r ; Fail if low order is not there ildb t3, q1 ; It's there, load it andi t3, 177 ;[235] Strip off any parity subi t3, .chspc ; Bring into numeric range add t2, t3 ; Combine with high order movei t3, ^d10 ; Base 10 retskp ; Flag we're actually doing long windows endbk. ; End block context ifskp. ; Have a number to type NOUT% ; Type it erjmpr r ; Or not retskp ; Succeed else. ; Otherwise, this is a request smsg () ; Say we'll accept it retskp ; This is OK, too endif. retskp ; This is superstition subttl Packet Header ; t4/ "R" or "S", depending on what we're doing pkthdr: move t1, p3 ; Load the logging JFN smsg <, type: > ; The packet type move t2, type ; Message Type andi t2, 177 ;[235] Strip off any parity call BOUTI% ; Will further expand downstream move t4, t2 ; Save a copy of the type smsg <, seq: > ; The sequence number move t2, sseqn ; Load the Sending Packet Number caie t4, "S" ; But are we? move t2, num ; No, so load the received Packet Number movei t3, ^d10 ; It's in base 10 NOUT% ; Type that erjmpr deberr ; Or not... smsg <, len: > ; Total packet length move t2, pktlen ; Includes the checksum movei t3, ^d10 ; It's in base 10 NOUT% ; Type that erjmpr deberr ; Or not... ifmn. islong ; Was this a long packet? movei t2, "L" ; Load flag for long packet call BOUTI% ; Append it as a c-like suffix endif. ; End case long packet smsg <, Blk: > ; Computed block check move t2, blkchk ; Load it movei t3, ^d10 ; We'll just use base 10 NOUT% ; Type it erjmpr deberr ; Or not retskp ; Worked subttl outc -- Output a single character, using ^X notation, DEL, etc. ; Call: ; ; t1/ JFN ; t2/ Character to frobinicate extern BOUTI% ; In case this is going into a string outc: andi t2, 177 ;[235] Strip off any parity caie t2, .chdel ; A rubout? ifskp. ; It is smsg ; Show it this way (^? being confusing?) ret ; Succeed endif. cail t2, .chspc ; Is it a control character? ifskp. ; It is push p, t2 ; Save the character movei t2, "^" ; Load the control quote call BOUTI% ; Output that pop p, t2 ; Restore original character ori t2, ^o100 ; Bring into printable range endif. callret BOUTI% ; Output possibly controlified character subttl Vestigial Code found to be largely uninformative repeat 0,< ; Mark character doesn't change move t1, p3 ; Load the logging JFN smsg < sop: > ; Indicate what should start the packet move t1, rsthdr ; Load Receive Start of Packet character rot t1, -^d8 ; Position as an eight bit ASCII string movem t1, sop8st ; And store it dmove t1, [ ^d1 ; We are only doing one dinky character point 8, sop8st ] ; And the source is what we just built call s8ccv7 ; String eight controlified convert to seven ret ; Shouldn't fail, but better give up >;;repeat 0 subttl Code .psect close out xlist ; Save the trees!! lit ; Dump the literals list ; Resume listing .endps code ; Close the code .psect subttl Module local working storage .psect data ; Open data storage lstpkt: block 1 ; Last packet type lstgen: block 1 ; Last generic type repeat 0,< sop8st: block 2 ; Start of Packet character as an 8 bit ASCII string > .endps data ; Close out the data .psect .xcmsy ; Ditch any superfluous MACSYM junk end ; End of module ; Local Modes: ; Mode:MACRO ; Comment Column:32 ; Comment Start:;[235] ; Comment Begin:;[235] ; Auto Fill Mode: 0 ; End: