;PS:KERMIT.MAC.56, 4-May-83 09:01:16, Frank ;[32] Report bad checksums correctly when debugging. ; Report error message from server & "abort" if it can't get a file. ;PS:KERMIT.MAC.54, 26-Apr-83 19:08:00, Frank ;[31] Beep when done with a transfer, if local. ;PS:20KERMIT.MAC.8, 15-Apr-83 14:45:36, Frank ;[30] A NAK for the next packet is *not* the same as an ACK for the current ; packet if the current packet is Send-Init. ;PS:KERMIT.MAC.42, 15-Apr-83 11:39:08, Frank ;[29] When debugging packets, print checksum of incoming packets, and ; print bad packets. ;PS:KERMIT.MAC.41, 8-Apr-83 19:31:28, Frank ;[28] Add FINISH command. ;PS:KERMIT.MAC.29, 8-Apr-83 12:43:02, Frank ;[27] Fix ^C trap to DEBRK to the right place in all cases. ;PS:KERMIT.MAC.28, 8-Apr-83 09:38:49, Frank ;[26] Save and restore normal send timeout when going in & out of server ; command-wait. ;PS:KERMIT.MAC.27, 7-Apr-83 20:20:15, Bill C. ;[25] Neaten up SERVER mode time out changes. ;PS:KERMIT.MAC.20, 5-Apr-83 18:14:14, Frank ;[24] Fix SPAR to account for the actual length of an incoming SEND-INIT. ;PS:KERMIT.MAC.19, 5-Apr-83 17:46:23, Frank ;[23] Include both send and receieve parameters in SHOW command. ;PS:KERMIT.MAC.4, 3:20pm Tuesday, 5 April 1983, Frank ;[22] Add debugging options. Remove i/o to DIAJFN and just test LOCAL and ; DEBUG flag values. Make DEBUG an AC, move RTOT & STOT to memory. ;PS:KERMIT.MAC.81, 1-Apr-83 15:59:19, Frank ;[21] Change SET SEND/RECEIVE QUOTE to parse an octal number. The hairy ; .CMUQS/breakmask/.CMTOK parsing tended to hang the program... ;PS:KERMIT.MAC.75, 1-Apr-83 15:13:43, Bill C. ;[20] Make packet time outs longer if in server mode awaiting commands. ;PS:KERMIT.MAC.72, 1-Apr-83 12:55:40, Frank ;[19] Print "[OK]" for each file successfully sent or received, if local. ;PS:KERMIT.MAC.65, 31-Mar-83 16:43:20, Frank ;[18] Expanded help text, with individual help for each command. ; Added SET DUPLEX, SET SEND/RECEIVE START-OF-PACKET. ;PS:KERMIT.MAC.58, 31-Mar-83 13:35:57, Bill C. ;[17] Restore CFIBFs of yore. Clears up packet echoing and stacking. ;PS:KERMIT.MAC.52, 31-Mar-83 10:58:12, Frank ;[16] Add SET ESCAPE (for CONNECT), try to print remote message after BYE. ;PS:KERMIT.MAC.48, 30-Mar-83 19:54:32, Frank ;[15] Don't bomb if we can't open a file to be sent, just print nice msg. ;PS:KERMIT.MAC.47, 30-Mar-83 18:16:53, Frank ;[14] Add code for ^B interrupts, but don't use it for anything yet. ;PS:KERMIT.MAC.45, 30-Mar-83 15:06:42, Frank ;[13] Don't delay before send if local. ;PS:KERMIT.MAC.41, 30-Mar-83 13:52:57, Frank ;[12] When local, print name of file being sent or received. ;PS:KERMIT.MAC.33, 29-Mar-83 17:59:47, Frank ;[11] Talk to Kermit server. Added BYE and GET commands. ;************* Version 3 **************** ;PS:KERMIT.MAC.22, 28-Mar-83 14:56:39, Frank ;[10] Enable ^C capability if not on already (reported by Willis Dair, SCU). ; If we can't enable it, don't go on unless we're running under batch. ;PS:KERMIT.MAC.21, 20-Mar-83 17:55:27, Bill C. ;[9] Fixed SHOW command to print number of blips correctly. ;PS:KERMIT.MAC.17, 18-Mar-83 20:31:00, Frank ;[8] Added some help to the help text. ;PS:KERMIT.MAC.15, 18-Mar-83 19:03:51, Frank ;[7] Assign & deassign line if not already assigned. This prevents ; "?Line is not active" and similar errors if Kermit is run on top of TTLINK ; rather than vice versa, and not under DIAL (both TTLINK and DIAL will do ; their own assigning, if necessary). Thanks to Willis Dair, Santa Clara ; University, for pointing out the bug. ;PS:KERMIT.MAC.14, 18-Mar-83 18:44:39, Frank ;[6] Differentiate between remote & local timeouts in SHOW command. ; Add version #, date/time, etc, to SHOW. ; Replace a zillion NOUTs with NUMOUT macro. ;PS:KERMIT.MAC.12, 17-Mar-83 18:47:21, Frank ;[5] Give error message when initial connection can't be made, if local. ;PS:KERMIT.MAC.7, 17-Mar-83 15:54:33, Frank ;[4] When acting as local Kermit, show packet traffic by typing blips. ;PS:KERMIT.MAC.6, 17-Mar-83 15:31:30, Frank ;[3] When comparing packet numbers, allow for wraparound. ;PS:KERMIT.MAC.3, 17-Mar-83 10:53:03, Frank ;[2] Cont'd... Show range of timeouts in SHOW command. ;PS:KERMIT.MAC.2, 15-Mar-83 12:51:12, Frank ;[2] Make timeouts load-dependent. Fix spelling of "interrupt" everywhere. ;PS:20KERMIT.MAC.22, 20-Feb-83 14:13:19, Bill C. ;[1] Put in a CFIBF% in the INILIN code to clear the line at the beginning ; of each send or receive of backed up NAKs. This may not be just right. This ; can lose a Send Init packet some times. This will work til the problem can ; be looked at more closely. ;*************************** Major Version 2 ******************************** ;PS:KERMIT.MAC.20, 8-Feb-83 14:43:48, Bill C. ; Put in (FINALLY!) the SHOW command. ;PS:KERMIT.MAC.11, 8-Feb-83 10:04:10, Bill C. ; Add SET PARITY command. Eliminate IGNORE-PARITY as its functionality is ; replaced by SET PARITY SPACE. ;PS:20KERMIT.MAC.3, 4-Feb-83 11:04:08, Bill C. ; Change TELNET to TTLINK (by FdC) and remove TELNET command. ;PS:KERMIT.MAC.38, 26-Jan-83 15:35:37, Bill C. ; Make Kermit able to act as a SERVER. ;PS:20-KERMIT.MAC.29, 18-Jan-83 14:08:45, Bill C. ; Take care of the case where user set terminal pause char to ^A. ;PS:20-KERMIT.MAC.27, 11-Jan-83 13:19:06, Bill C. ; Fix ^C trap bug that caused illegal instruction. ;PS:20-KERMIT.MAC.22, 11-Jan-83 11:40:01, Bill C. ; Fix bug in SET IGNORE-PARITY COMMAND. ;PS:20-KERMIT.MAC.11, 10-Jan-83 16:52:03, Bill C. ; Add turn around char for the IBM running VM/CMS. ;PS:20-KERMIT.MAC.8, 7-Jan-83 17:59:01, Bill C. ; Fix numerous mispellings of received. ;PS:20-KERMIT.MAC.3, 7-Jan-83 16:06:04, Bill C. ; Clean up the diagnostic and error message code. ;PS:20-KERMIT.MAC.2, 7-Jan-83 15:06:02, Bill C. ; Add the TELNET command (thanks to Bill Schilit.) Change EXIT/CONT ; sequence to not throw away JFN. ;PS:KERMIT-20.MAC.2, 14-Dec-82 15:25:40, Bill C. ; Be scrupulous in PMAP use after errors. Don't make files with holes. ;PS:KERMIT.MAC.44, 28-Sep-82 09:47:32, Bill C. ; Add ignore parity option for some UNIX systems. ;PS:KERMIT.MAC.19, 28-Apr-82 16:00:31, Bill C. ; Big clean up. Consolidate duplicate sections of code. Also, ; no longer die on bad packet type, just NAK or retransmit. ; Removed empty show command. ;PS:KERMIT.MAC.18, 21-Apr-82 16:31:04, Bill C. ; Clean up line on ^C from transfer. ;PS:KERMIT.MAC.17, 17-Feb-82 16:16:10, Bill C. ; Add eight bit file mode. ;PS:KERMIT.MAC.16, 28-Jan-82 12:31:09, Bill C. ; Clean up better on some error conditions. ;PS:KERMIT.MAC.15, 6-Jan-82 12:18:06, Bill C. ; Fill out some of the SET command options. ; THINGS TO DO... ; ; * Add new server functions: directory, type, delete, etc, and user commands ; to invoke them. Must first implement "X" packet handling. ; ; * Add host commands. Fork an Exec, pass commands to it in rescan, somehow ; pipe the Exec's typeout back, packetized. Too bad this isn't UNIX... ; ; * Show incoming as well as outgoing packets when in debug mode? ; ; * Terminal interrupt for local Kermit to report status. ; ; * Terminal interrupt to "abort" transmission of current file. Stopping ; transmission of an outgoing file can be done easily by sending an error ; packet. The side receiving a file, upon receipt of an error packet should ; know to discard the file rather than simply close it. (?) ; ; * It would be even better to have a one way to quit the current file ; and go on to the next in a wildcard group, and another way to quit a whole ; file group. ; ; * Terminal interrupts to switch debugging modes during a transfer. ; ; * 2-character checksum option: parse, put it in the packet routines, add ; to SHOW command, etc. ; ; * Do 8th-bit quoting. There's code for this laying around somewhere. First ; get it working 20-to-20, then add it to Kermit-80 &/or -86. ; ; * Data compression using repeat count for repeated characters -- best savings ; realized in binary files. ; ; * Try this (make sure it doesn't break the other KERMITs) -- When receiving ; a file, put the name I open the file under in the data field of the ACK to ; the File Header. When receiving File Headers in local mode, print the ; contents of the data field instead of doing a JFNS if the data field is not ; empty. If this works OK, then try it out in some other KERMITs that ; actually have to change the file name to avoid conflicts. ; ; * Investigate complaint about server mode versus autobyte after output of ; an 8-bit file... ; ; * PUSH command. ; ; * TAKE command. ; ; * Automatic take of KERMIT.INIT or KERMIT.CMD? ; ; * Think a little more carefully about the load-dependent timeouts. If the ; timeout interval is set very long, maybe upon timing out we should check to ; see if a packet has partially arrived before NAKing it... Also, we should ; do some experimentation to adjust the timeout function & its parameters ; optimally -- right now, they're just rough stabs based on guesses. Also, ; take class scheduling into account when getting load average. Title Kermit -- That's Celtic for "free". ; Needs only standard DEC-distributed external files MONSYM, MACSYM, CMD. search monsym,macsym,cmd .require sys:macrel,sys:cmd SALL ; SHUT YOUR FACE .DIRECTIVE FLBLST $verno==^d3 ; Major version number. $mnver==^d0 ; Minor version number. $edno==^d32 ; Edit number. $who==^d0 ; Who edited. ; Written by Bill Catchings, April 1981. ; ; This program is the DEC-20 implementation of a file transfer protocol for ; use over serial asynchronous communication lines. See the KERMIT user and ; protocol manuals for the specifications. ; ; Version 1, 1981-82: Basic service. ; ; Version 2, Feb 83: Server service. ; ; Version 3, March 83: Talk to server. subttl Help Text. ;[18] All of this is edit 18. hkermi: asciz | KERMIT is a file transfer protocol for use over an asynchronous serial telecommunication line. Files are broken up into "packets" with checksums and other control information to ensure (with high probability) error-free and complete transmission. KERMIT-20 is the KERMIT implementation for the DECSYSTEM-20. KERMIT-20 can be run "locally" with a remote Kermit on the other end of an assigned TTY line (e.g. over an autodialer connection), or "remotely" from another computer (e.g. a microcomputer). You can run Kermit interactively by typing repeated commands in response to its "Kermit-20>" prompt, or you can invoke it from the TOPS-20 Exec with a command line argument (e.g. "kermit receive"), or you can run it as a remote server. KERMIT-20 commands -- optional parts are in [brackets]: * For exchanging files: SEND file(s) [(INITIAL) file] RECEIVE [file] GET remote-file(s) * For acting as local Kermit: SET LINE, SET PARITY, DUPLEX, ESCAPE CONNECT [line] * For acting as a server: SERVER * For talking to a server: BYE, GET remote-file(s), SEND file(s) * For running interactively: PROMPT * Setting nonstandard transmission and file parameters: SET DEBUG, DELAY, FILE-BYTE-SIZE, PARITY SET SEND (or RECEIVE) END-OF-LINE, START-OF-PACKET, PACKET-LENGTH, TIMEOUT, PADDING. * Getting information: HELP [topic], STATUS, SHOW * Leaving the program: EXIT, QUIT, BYE For further information, type "help" for any of the above, e.g. "help set", or see the "Kermit Users Guide" and the "Kermit Protocol Manual" for complete details. | hsend: asciz | SEND filespec1 [(INITIAL) filespec2] Send a file or file group from the DEC-20 to the other host. If filespec1 contains wildcard characters (* or %) then all matching files will be sent, in alphabetical order by name. The name of each file is passed to the other host in a file header packet, so that the file can be stored there with the same name. The INITIAL file in a wildcard group can be specified with the optional filespec2. This is handy to continue a previously interrupted wildcard transfer from where it left off, or to skip some files that would be transmitted first. If running as a local Kermit, the name of each file will be displayed on your screen as the transfer begins, a "." will be printed for every 5 data packets sucessfully sent, and a "%" for every retransmission or timeout that occurs. If you see many "%" characters, you are probably suffering from a noisy connection. If running as a remote Kermit, you should escape back to your local Kermit and give the RECEIVE command. If you don't do this fast enough, several "send-init" packets may arrive prematurely; don't worry, KERMIT-20 will keep sending them until it gets a response. | hrecei: asciz | RECEIVE [filespec] Receive a file or file group from the other host. If only one file is being received, you may include the optional filespec as the name to store it under when it arrives; otherwise, the name is taken from the incoming file header packet. Even if the name in the header packet is not a legal TOPS-20 file name, KERMIT-20 will store it under that name, in which case you can refer to it later only by quoting the illegal characters (spaces, lower case letters, control characters, etc) with ^V. If a file with the same name already exists, KERMIT-20 just creates a new generation. If running as a local Kermit, the names of the incoming files will be displayed on your screen, along with "." and "%" characters to indicate the packet traffic. If running as a remote Kermit, you should escape back to your local Kermit and give the SEND command. | hset: asciz | SET Establish system-dependent parameters. You can examine their values with the SHOW command. The following may be SET: DEBUG option Show packet traffic explicitly. Only use when local. Options are: OFF Don't show debugging information (OFF by default). STATES Show Kermit state transitions and packet numbers (brief). PACKETS Display each incoming and outgoing packet (verbose). DELAY number How many seconds to wait before sending the first packet. Use when remote and SENDing files back to your local Kermit. This gives you time to "escape" back and issue a RECEIVE command. FILE-BYTE-SIZE keyword Byte size for DEC-20 file input/output. The choices are SEVEN, EIGHT, and AUTO. If SEVEN, do normal ASCII character i/o. EIGHT is necessary for transmission of non-DEC-20 binary files, like .COM files from microcomputers. AUTO is equivalent to SEVEN for incoming files, and for outgoing files means to use EIGHT if the DEC-20 file bytsize (as shown by the Exec VDIR command) is 8, otherwise use SEVEN. The default is AUTO. PARITY keyword If the other computer is using parity on the communication line, you must inform KERMIT-20, so it can send the desired parity on outgoing characters, and strip it from incoming ones. The DEC-20 does not use parity on communication lines. The choices are NONE (the default), ODD, EVEN, MARK, and SPACE. NONE means no parity processing is done, and the 8th bit of each character can be used for data when transmitting binary files. The specified parity is used both for terminal connection (CONNECT) and file transfer (SEND, RECEIVE, GET). DUPLEX keyword For use when CONNECTed to a remote system. The choices are FULL and HALF. Full means the remote system echoes the characters you type, HALF means the local system echoes them. FULL is the default, and is used by most hosts. HALF is necessary when connecting to IBM mainframes. IBM-FLAG Equivalent to SET PARITY MARK and SET DUPLEX HALF, plus it instructs KERMIT-20 to look for the IBM system's "line turnaround" character before sending packets. LINE number Specify the octal TTY number to use for file transfer or CONNECT. If you issue this command, you will be running as a local Kermit, and you must log in to the remote system and run Kermit on that side in order to transfer a file. If you don't issue this command, KERMIT-20 assumes it is running remotely, and does file transfer over its job's controlling terminal line. ESCAPE number Tell what control character you want to use to "escape" from remote connections. 31 (Control-Y) by default. The number is the octal value of the ASCII control character, 1 to 37. SEND parameter Parameters for outgoing packets, as follows: END-OF-LINE number The octal value of the ASCII character to be used as a line terminator for packets, if one is required by the other system. Carriage return (15) by default. PACKET-LENGTH number Maximum packet length to send, decimal number, between 10 and 94, 80 by default. TIMEOUT number How many seconds to wait for a packet before trying again. PADDING number, PADCHAR number How much padding to send before a packet, if the other side needs padding, and what character to use for padding. Defaults are no padding, and NUL (0) for the padding character. No cases are presently known where this is necessary. QUOTE number What printable character to use for quoting of control characters. Specify an octal ASCII value. "#" (43) by default. There should be no reason to change this. START-OF-PACKET number The control character that marks the beginning of a packet. Normally SOH (Control-A, ASCII 1). There should be no reason to change this. RECEIVE parameter Parameters to request or expect for incoming packets, as follows: END-OF-LINE number Carriage return (15) by default. The DEC-20 does not actually need any line terminator for incoming packets. PACKET-LENGTH number Maximum packet length packet for the other side to send, decimal number, between 10 and 94, 80 by default. TIMEOUT number How many seconds the other Kermit should wait for a packet before asking for retransmission. PADDING number, PADCHAR number Never necessary; the DEC-20 needs no padding. QUOTE number What printable character to use for quoting of control characters. Specify the octal ASCII value. "#" (43) by default. There should be no reason to change this. START-OF-PACKET number The control character to mark the beginning of incoming packets. Normally SOH (Control-A, ASCII 1). There should be no reason to change this. | hshow: asciz | SHOW Display current SET parameters, version of KERMIT-20, and other info. Items under RECEIVE column show parameters for packets KERMIT-20 expects to receive, under SEND shows parameters for outgoing packets. | hstatu: asciz | STATUS Give statistics about the most recent file transfer. | hconne: asciz | CONNECT [number] Establish a terminal connection to the system connected to the octal TTY number specified here or in the most recent SET LINE command, using full duplex echoing and no parity unless otherwise specified in previous SET commands. Get back to KERMIT-20 by typing the escape character followed by the letter C. The escape character is Control-Y by default. When you type the escape character, several single-character commands are possible: C -- Close the connection and return to KERMIT-20. S -- Show status of the connection. P -- Push to a new Exec. POP from the Exec to get back to the connection. ^Y (or whatever you have set the escape character to be) -- Typing the escape character twice sends one copy of it to the connected host. You can use the SET ESCAPE command to define a different escape character. KERMIT-20 accomplishes the connection by running the TTLINK program in a lower fork. If all you want to do connect to a remote host over a TTY line, without file transfer, you can run TTLINK itself. TTLINK also provides other options, like logging of the remote session to provide "unguarded" capturing of files or typescripts from systems that do not have KERMIT. | hserve: asciz | SERVER Act as a server for another Kermit. Take all further commands only from the other Kermit. Only works when running remotely. After issuing this command, escape back to your local system and issue SEND, RECEIVE or GET, BYE, or other server-oriented commands from there. If your local KERMIT does not have a BYE command, it does not have the full ability to communicate with a KERMIT server (in which case you can only use the SEND command). If your local KERMIT does have a BYE command, use it to shut down and log out the KERMIT server when you are done with it; otherwise, connect back to the DEC-20, type several Control-C's to stop the server, and logout. For doing nonstandard kinds of file transfer (for instance to send binary files from a microcomputer), you should issue the appropriate SET commands before the SERVER command. | hfinis: asciz | FINISH When running as a local Kermit, talking to a KERMIT server over a TTY line specified in a SET LINE command, use the FINISH command to shut down the server without logging out the remote job, so that you can CONNECT back to it. | hbye: asciz | BYE When running as a local Kermit, talking to a KERMIT server over a TTY line specified in a SET LINE command, use the BYE command to shut down and log out the server. This will also exit from the local KERMIT. | hhelp: asciz | HELP [topic] Typing HELP alone prints a brief summary of KERMIT-20 and its commands. You can also type HELP command for any Kermit-20 command, e.g. "help send", to get more detailed information about a specific command. Type HELP ? to see a list of all the available help commands, or consult the Kermit Users Guide. | hexit: asciz | EXIT Exit from KERMIT-20. You can CONTINUE the program from the TOPS-20 Exec, provided you haven't run another program on top of it. | hquit: asciz | QUIT Synonym for EXIT. | hpromp: asciz | PROMPT If KERMIT-20 runs in server mode by default, typing the following command to the TOPS-20 Exec kermit prompt will start it up in interactive mode, and leave you at the "Kermit-20>" prompt. | hget: asciz | GET remote-filespec For use only when talking to a KERMIT server. When running as a local KERMIT (i.e. when communicating with a remote KERMIT over an assigned TTY line, which you have specified with the SET LINE command), you may use the GET command to request the remote KERMIT server to send you the specified files. The filespec is any string that can be a legal file specification for the remote system; it is not parsed or validated locally. As files arrive, their names will be displayed on your screen, along with "." and "%" characters to indicate the packet traffic. If the remote KERMIT is not capable of server functions, then you will probably get an error message back from it like "Illegal packet type". In this case, you must connect to the other Kermit, give a SEND command, escape back, and give a RECEIVE command. The GET command has no effect when running as a remote KERMIT. | subttl Definitions pdlsiz==^d100 ; Stack size. f=0 ; AC defs: flag AC, t4=+1>+1>+1 ; temporary AC's, q4=+1>+1>+1 ; and preserved AC's. state=q4+1 ; State of the automaton. rchr=state+1 ; Total data chars received. schr=rchr+1 ; Total data chars sent. debug=schr+1 ;[22] Debugging status (none, some, verbose) mappag==200 ; Where to map things in. SOH==^o001 ; Start of header char. XON==^o021 ; Control-Q. maxpkt=="~"-" "+2 ; Maximum size of a packet. dmxtry==5 ; Default number of retries on a packet. dimxtr==20 ; Default number of retries send initiate. drpsiz==^d80 ; Default receive packet size. dspsiz==^d80 ; Default send packet size. dstim==^d10 ; Default send time out interval. drtim==^d8 ; Default receive time out interval. dsrvtm==^d30 ;[20] Def timout when awaiting server commands. dspad==^o000 ; Default send padding char. drpad==^o000 ; Default receive padding char. dspadn==^d0 ; Default number of send padding chars. drpadn==^d0 ; Default number of receive padding chars. dseol==.chcrt ; Default send EOL char. dreol==.chcrt ; Default receive EOL char. dsquot=="#" ; Default send quote char. drquot=="#" ; Default receive quote char. ddelay==^d5 ; Default delay before the first packet, secs. dtrnrn==XON ; Default half duplex turnaround character. dxfull==0 ;[18] Full duplex. dxhalf==1 ;[18] Half duplex. ibmdpx==dxhalf ;[18] Duplex for IBM host. defpar==none ; Default parity. ibmpar==mark ; Parity for IBM host. maxtim=^d94 ;[2] Maximum timeout interval to set, secs. minlod=4.0 ;[2] Minimum ldav to consider for timeout. maxlod=50.0 ;[2] Maximum ldav to consider for timeout. blip=^d5 ;[4] Every this many packets, print a blip. diasw==0 ; Default is diagnostics off. subttl Macros define diamsg (msg) < ;;[22] Print state if normal debugging. call [ skipe local ;;[22] If not local, forget it. caie debug, 1 ;;[22] Only do this in normal debugging mode. ret ;;[22] saveac ;;[22] hrroi t1, [asciz/'msg/] ;;[22] PSOUT ;;[22] ret ] ;;[22] > ;[22] diamsg define ermsg (msg) < call [ tmsg < > hrroi t1, [asciz/?Kermit: 'msg/] movem t1, errptr ;; Save pointer to error mess for status. PSOUT% tmsg < > ret ] > ; Change the order to increase the likelyhood of the micro seeing ; the error packet. define kermsg (msg) < $count=0 irpc msg, <$count=$count+1> call [ movei t1, "E" ;; Send an error packet to the other side. move t2, pktnum ;; Packet number. movei t3, $count+^d13 ;; The count. move t4, [point 7, [asciz/?Kermit-20: 'msg/]] ;; Error mess. movem t4, errptr ;; Save pointer to error mess for status. call spack ;; Send the error packet. nop tmsg < ?Kermit: 'msg > ret ] > ; Error handling macros. define %jserr (msg, label) < ;; Use this immediately following a JSYS. erjmp [ tmsg < ?Kermit: 'msg> ;; Type given msg with our prefix, ifnb ,< call jserr0> ;; if given, put JSYS error after dash, ifb ,< call jsmsg0> ;; else right after "?Kermit: " ifb