zben@umd5 (Ben Cranston) (10/16/86)
Well, we finally got the manual scanned, and with about a day of manual editing it is reasonably usable (though certainly not perfect). Look for the source code over the next several nights. Thanks to Chris Torek and Liz Allen for the sharmaker. ------------ cut here ------------ : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=FALSE if [ x$1 = x-a ]; then all=TRUE fi echo Extracting man.readme sed 's/^X//' <<'//go.sysin dd *' >man.readme Some notes on the manual "manual.txt" file. I started from a xerox of a xerox of a xerox of a Daisy output that had overstrike bolding, underlining, and margin bars. We used a Kurzweil scanner to re-input the text. The bolding and margin bars didn't make it. The underlining was manually entered, with the control strings "<u" and ">u" signalling start-underlining and end-underlining respectively. The shell script "man.ul" just removes these control strings, so it can be used if your output device does not do underlining. If you have access to a device that does have underlining, you can use an analagous shell script to change the control strings into the control sequences your device uses to make underlining. Page-ups are marked by a "formfeed" character in the text. I hope they make it through the distribution process... //go.sysin dd * if [ `wc -c < man.readme` != 842 ]; then made=FALSE echo error transmitting man.readme -- echo length should be 842, not `wc -c < man.readme` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 man.readme echo -n ' '; ls -ld man.readme fi echo Extracting man.ul sed 's/^X//' <<'//go.sysin dd *' >man.ul sed <manual.txt -e 's/<u//g' -e 's/>u//g' //go.sysin dd * if [ `wc -c < man.ul` != 42 ]; then made=FALSE echo error transmitting man.ul -- echo length should be 42, not `wc -c < man.ul` else made=TRUE fi if [ $made = TRUE ]; then chmod 755 man.ul echo -n ' '; ls -ld man.ul fi echo Extracting manual.txt sed 's/^X//' <<'//go.sysin dd *' >manual.txt Appendix A-2 Kermit-][ for the Apple II July 1985 A2-i APPENDIX A-2 TABLE OF CONTENTS A2.1 Introduction . . . . . . . . . . . . . . . . . . . . . 1 A2.2 Getting started . . . . . . . . . . . . . . . . . . . 1 A2.3 SET and SHOW or STATUS commands . . . . . . . . . . . 1 A2.3.1 Baud . . . . . . . . . . . . . . . . . . . . . 2 A2.3.2 Local-echo . . . . . . . . . . . . . . . . . . 2 A2.3.3 Parity . . . . . . . . . . . . . . . . . . . . 2 A2.3.4 Slot . . . . . . . . . . . . . . . . . . . . . 2 A2.3.5 Card . . . . . . . . . . . . . . . . . . . . . 2 A2.3.6 Mark . . . . . . . . . . . . . . . . . . . . . 2 A2.3.7 Timeout . . . . . . . . . . . . . . . . . . . . 3 A2.3.8 File-warning . . . . . . . . . . . . . . . . . 3 A2.3.9 Debug . . . . . . . . . . . . . . . . . . . . 3 A2.3.10 Phone . . . . . . . . . . . . . . . . . . . . 3 A2.3.11 Scroll . . . . . . . . . . . . . . . . . . . . 4 A2.3.12 Video . . . . . . . . . . . . . . . . . . . . 4 A2.3.13 Escape . . . . . . . . . . . . . . . . . . . . 4 A2.3.14 Drive . . . . . . . . . . . . . . . . . . . . 5 A2.3.15 End of Line (EOL) . . . . . . . . . . . . . . 5 A2.3.16 Repeat-Proc . . . . . . . . . . . . . . . . . 5 A2.3.17 Save . . . . . . . . . . . . . . . . . . . . . 6 A2.4 Giving a DOS command within Kermit-][ . . . . . . . . 6 A2.5 CONNECT command . . . . . . . . . . . . . . . . . . . 6 A2.6 BREAK command . . . . . . . . . . . . . . . . . . . . 7 A2.7 Returning to Kermit-][ . . . . . . . . . . . . . . . . 8 A2.8 Transferring files from micro to host . . . . . . . . 8 A2.9 Transferring files from host to micro . . . . . . . . 10 A2.10 Exiting Kermit-][ . . . . . . . . . . . . . . . . . 12 A2.11 Converting an Applesoft BASIC file to a text file . . 12 A2.12 Converting text file to Applesoft BASIC program . . . 13 A2.13 Converting Apple binary file to/from text file . . . 13 A2.14 Kermit-][ transfer error messages . . . . . . . . . . 14 A2.15 Adding to or changing Kermit-][ code . . . . . . . . 18 A2-ii APPENDIX A-2 TABLE OF CONTENTS A2.16 Files on your Kermit-][ distribution disk . . . . . . 19 A2.17 Configuring a Kermit-][ working disk . . . . . . . . 22 A2.18 Modifying the KERMITA program . . . . . . . . . . . . 23 A2.19 Recent Improvements to SERDAC Kermit-][ . . . . . . . 24 Note: Changes to the original Kermit-][ documentation in Appendix A-2, published in May 1985, have been noted with vertical lines in the page margins. For a summary of major changes, see Section A2.19. A2-iii Appendix A-2 Kermit-][ for the Apple II A2.1 Introduction Kermit-][, Apple Kermit, can transfer sequential ASCII text files, with logical line lengths up to 256 characters, between an Apple II, II+, or IIe, running Apple DOS 3.3 (or any compatible Apple DOS operating system) and any host computer that is running its own version of Kermit. This appendix assumes that you know how to use both the Apple and the host you want to communicate with. The examples assume that you are communicating with the Sperry UNIVAC 1100, but it would be fairly easy to modify the commands to apply to other host computers. The commands necessary on the micro would remain essentially the same, no matter what host you are communicating with. There is a separate Appendix B describing the Kermit implementation for each SERDAC host computer. In the following examples, what Kermit (or the current computer operating system) prints is <uunderlined>u, what you should type is shown with bold type, and explanation and comments appear in ordinary type. A carriage return is indicated as (cr). You can abbreviate any Apple Kermit command, as long as the abbreviation is unambiguous. A2.2 Getting started To run Kermit-][, either boot with the Kermit-][ distribution disk, or, if you have previously booted with another disk, insert the Kermit-][ disk, and type EXEC GOKERM (cr) (if you would like an illustrated introduction to Kermit-][, insert the Kermit-][ disk, and type EXEC GOKERMIL (cr). After Kermit-][ is loaded, you will receive the prompt <uKERMIT-][>>u. You need not keep the Kermit-][ disk in the Apple's drive once Apple Kermit has been loaded, except when you need to SET SAVE command parameters (see Section A2.3.17). Typing HELP (cr) or ? (cr) at the prompt provides a list of valid Kermit-][ commands. A2.3 SET and SHOW or STATUS commands Before you connect to another computer, you must set certain Kermit-][ parameters. To display the current settings of these parameters, type SHOW (cr) or STATUS (cr). To change a parameter, use a SET command. To determine a parameter's possible values, follow the command with a question mark, e.g.: SET LOCAL-ECHO ? (cr) <uON OFF>u A2- 1 Note that although SET commands apply in most cases, due to hardware limitations, not all SET commands have an effect. For example, if you are using a Hayes Micromodem II, SET BAUD 1200 has no effect, since that modem works only at 300 baud. A2.3.1 Baud Your modem, serial interface card, and host system determine the correct baud rate to use. Default is 300. A2.3.2 Local-echo Set this parameter to ON when connecting with a host such as the UNIVAC 1100, which does not echo characters back to your terminal. Set it to OFF if the host does echo back characters (echoplex). Default is ON. A2.3.3 Parity Set parity to the parity of the host system. Default is EVEN. A2.3.4 Slot This is the Apple II slot number containing the serial interface or modem card you are using. Default is 2. A2.3.5 Card This parameter names the serial interface or modem card you are using. Kermit-][ is currently implemented for the following: Card SET CARD value Hayes Micromodem II MICROMODEM (or MIC) Apple Super Serial Card SUPER SERIAL (or SUP) Cal Comp Sys 7710-D Serial Card CCS Apple Communications Serial Card COMMUNICATIONS (or COM) Novation Apple Cat Modem NOVATION (or NOV) Default is MICROMODEM. A2.3.6 Mark Along with certain special pieces of information, characters in a text file are grouped into units called <upackets>u before being sent to the other computer during a file transfer. The first character of a packet is always the <umark>u character, which by default is CTRL-A (ASCII 001). On some systems, ASCII 001 may be a flow control character- for instance, it might mean "disconnect." Therefore, it may be necessary with some hosts to set MARK to some other character. Default is 001. A2- 2 A2.3.7 Timeout This is the time in seconds after which the Apple will <utimeout>u (abort a transfer) if it gets no response from the host system. If the host response time is very slow, or if the message <uTRANSFER ABORTED DUE TO TIMEOUT>u appears, set TIMEOUT to a larger number. Default is 10 seconds. A2.3.8 File-warning In most cases, it is desirable to set FILE-WARNING to ON. This causes Kermit-][ to check your disk when receiving a file to see if that file already exists. If it does exist, then you are given the option to append the new file to the existing one, to overwrite the existing file, or to specify a new file name. Default is ON. A2.3.9 Debug In most cases, DEBUG should be set to OFF. If you would like to see every character (Kermit protocol characters plus actual text) that is transmitted through the serial port during a transfer, DEBUG should be set to ON. This would normally not be done unless you were trying to debug a new version of Kermit-][ or to try to discover why a particular transfer was not working correctly. Having DEBUG ON does increase the time required for a file transfer, so you may wish to use it sparingly. A2.3.10 Phone There are four possible settings of the PHONE parameter: 1. If you are using a Hayes Micromodem II, set the PHONE parameter to the host's phone number; for example, SET PHONE 5530803. If you set the PHONE parameter to NONE, Kermit-][ prompts you to enter a number. Direct keyboard commands to the Micromodem are not available through Kermit-][. 2. If you are using a Novation Apple Cat Modem, set the PHONE parameter to NONE. If you have Apple Cat firmware, you will be directed to use firmware commands to dial the host. If you do not have firmware, then you will have to physically dial-up the host using an alternative Apple II data communications program <ubefore>u you run Kermit-][. There is presently no Kermit-][ autodial capability for this equipment. 3. If you are using a serial interface card and an external modem combination that permits autodialing, set the PHONE parameter to the appropriate modem command plus the phone number. For example, if you are using a Hayes Smartmodem, you might SET PHONE ATDT5530803. If you set the phone A2- 3 parameter to NONE, you can type modem commands and the telephone number after issuing the CONNECT command. 4. If you are definitely not using an autodial system, set the PHONE to NONE. After you CONNECT, you will be given an opportunity to do a manual dialup. Default is NONE. A2.3.11 Scroll You can set the SCROLL to ON or OFF. If SCROLL is ON, the actual text of the file being transferred will be scrolled onto your screen. While this is handy to see where you are in the file transfer, it does increase the time required for the transfer. Default is ON. A2.3.12 Video The video features of Kermit-][ are quite nice. Most of the information scrolled onto your screen is done in hi-res. The program has its own hi-res character set, so you can see transmitted characters in the proper case, without having to have any special hardware such as an 80 column card (you still cannot type lower case characters on an unequipped Apple II, though). If you have a good monitor (not a TV), you may also see a 70 column display rather than the normal 40 column display. Optionally, you may also look at scrolled data in <ureverse video>u, that is black on white. There are four parameters you can set with the SET VIDEO command:. I Reverse video N Normal video (default) A Auto line feed M No auto line feed (default) T Truncate at right edge W Wrap around to next line (default) 4 40 column display (default) 7 70 column display For example, to set the display for reverse video and 70 columns, enter: SET VIDEO I7 (cr). A2.3.13 Escape As explained in Section 3.3, once you are connected to the host, there must be a way for you to get back to the micro. This is accomplished with an escape character or sequence. As you type each character on the micro keyboard, it is checked to see A2- 4 if it is the escape character or if it is part of the escape sequence. When the character or sequence is recognized, control is returned to the micro Kermit. The escape character or sequence should always be easily typed on your keyboard and something rather unique that you would never output to the host in normal operations. Although it has a somewhat different meaning in other Kermits, the authors of Kermit-][ chose the default escape character to be ESCape. That is a sensible choice, but if you would like for it to be another character, you can specify it with the SET ESCAPE command. The parameter value should be the <udecimal>u value of the ASCII code- a value between 1 and 127. Default is 27, the decimal value for ASCII ESC. A2.3.14 Drive Sometimes while using Kermit-][, it is convenient to switch the default disk drive from 1 to 2 or vice versa. This can be accomplished by issuing some "throwaway" DOS command as described in Section A2.4 (e.g., CTRL-D CATALOG,D2), but it is much simpler just to use a SET command (e.g., SET DRIVE 2). Note that using the ,Dn specification with the SEND or RECEIVE commands (see Sections A2.9 and A2.8) also effectively changes the default drive. You may wish to use a SET DRIVE command to switch back to the other drive once a particular transfer is completed. Note that when you SET SAVE (see Section A2.3.17), the drive setting is always saved with the value 1. A2.3.15 End of Line (EOL) The Kermit protocol provides for the specification, by each computer participating in an exchange, of a character to denote the end of a terminal input line (in the case of Kermit, the end of a packet). In most systems, this character is the carriage return (ASCII code 13). The Apple doesn't really care what the value of EOL is; Kermit-][ will end packets (and recognize the end of packets) with whatever character the host wants to use. The catch is that both the Apple and host must agree on what EOL is, and for agreement, YOU must tell Kermit-][ what character the host needs to detect. Default is 13. A2.3.16 Repeat-Proc Kermit-][ allows for limited <urepeat character processing>u when RECEIVEing data. With most data, the default processing (Repeat-Proc = ON) is sufficient; transfers may be accomplished without loss of data or any problems, and the special processing will save transmission time. If you are RECEIVEing data with many long strings of repeated characters, Kermit-][ repeat character processing may fail, and you will receive the message <uREC BUFFER OVERFLOW. TRANSFER ABORTED.>u If this happens, change the default by typing SET REPEAT-PROC OFF. Then, restart the transfer on both the host and the Apple. See Section A2.14 (REC A2- 5 BUFFER OVERFLOW) for further information. Default is ON. A2.3.17 Save Since it would be very cumbersome to reset all the above parameters each time you use Kermit-][, you can use a SET SAVE command to save the current parameter settings onto your Kermit-][ diskette (note that DRIVE is always saved with a value of 1). Each time you run Kermit-][, the parameters are automatically loaded back and become the initial settings for the program. The distribution disk contains a KERMIT/SETSAVE file with the above described default settings. You may reset them as required, and your settings, if saved, will become the new defaults. A2.4 Giving a DOS command within Kermit-][ You need not exit from Kermit-][ to issue most required Apple DOS commands (e.g., CATALOG, DELETE, RENAME). Instead, type CTRL-D at the <uKERMIT-][>>u prompt, followed immediately by the DOS command and (cr). If the DOS command you give is illegal, you will receive the message <uSYNTAX ERROR>u. If the command is not executable (e.g., you try to delete a non-existent file), you will receive the message <uDOS COMMAND CANNOT BE EXECUTED>u. A2.5 CONNECT command The CONNECT command lets you log onto a host system as well as to return to terminal operation from Kermit-][. The <ufirst>u time you use a CONNECT command, and subsequently, whenever you reSET the local-echo, parity, baud, card, slot, or phone parameters, Kermit-][ initializes itself with the last values you SET and readies itself for a new dial-up and log-on to the host. If you are already logged-on to the host, this may break the connection and force you to log-on again. You may also have to reSET any Kermit parameters you SET previously. Otherwise, CONNECT commands merely return you to the host. Remember: Normally, to <uinitialize>u Kermit-][, you must reSET at least one of the parameters listed in the paragraph above. You may SET the parameter to the same value it had previously, but it must be SET (e.g., if you were using the CCS card, you could initialize Kermit-][ by typing SET CARD CCS (cr)). Kermit-][ <umust>u be initialized anytime you wish to CONNECT to a host the first time (dial-up and log-on). Kermit-][ does <unot>u need to be reinitialized once you are physically connected to a host. If it <uis>u reinitialized while you are connected, the connection may be broken. Note: You may CONNECT to and log onto a host once all SET parameters have been correctly established. However, there may A2- 6 be DIP switch settings required on your serial interface or modem card that you will also have to change. On the Super Serial Card, for example, the terminal/modem block must point towards modem. On the CCS card, you must set the DIP switches for the desired baud rate. See your particular serial card or modem card manual for required switch settings! You should now be ready to log-on to a host. Type CONNECT (cr) at the <uKERMIT-][>>u prompt. As mentioned in Section A2.3.10, there are four different ways of dialing up a host. Consult Appendix D if you are not using a modem, or if you have difficulty connecting. If you are using an autodial modem and have set the PHONE parameter accordingly, just wait for the modem's response telling you that the host's modem has answered the phone and that you have a carrier signal. This is usually a <uCONNECT>u message. If you are manually dialing, you will be instructed to do so. If you do not get a connection (the host number is busy, for example), most autodial modems send a message <uNO CARRIER>u and hangup. If this happens, with one of the supported serial cards installed, you may reinitialize Kermit-][ (without issuing a SET command) and retry the same phone number by typing the Kermit-][ escape character ESCape, followed immediately (within 2-3 seconds) by the letter N. When you see the prompt, just type CONNECT (cr) . If the retry fails, or if you are using one of the supported internal modems, you will then have to ESCape back to Kermit-][, reSET the PHONE (or CARD) parameter and try to CONNECT again. When you know that you are connected to the host, type in the appropriate RETURNS or whatever to tell the host you wish to log-on. Log-on to the host and set its Kermit running with the appropriate commands. If you want to log off the host system and log back on to it or another host, you will have to get Kermit-][ to reinitialize itself as described at the beginning of this section. A2.6 BREAK command If you are using the Apple Super Serial Card, you may use the BREAK command to send a break signal to the host. The BREAK command will have no effect at all if you do not have the Super Serial Card installed! The break signal may be required to log-on to or disconnect from certain hosts (not the SERDAC UNIVAC!). If you need to send a break to log-on, first initialize Kermit-][ by SETting the appropriate parameters. Then, at the prompt, type in BREAK (cr). This will do an automatic CONNECT, let you dial-up, if applicable, and send the break signal. To complete the log-on to the host, type in the key-ins you would normally need after the break signal. If you need to send a break signal to disconnect a host, type the escape character to get the <uKERMIT-][>>u prompt, type BREAK (cr), and answer the <uDISCONNECT HOST?>u question with a Y (cr). You will be disconnected and then will have the opportunity to reconnect. A2- 7 Kermit-][ will be automatically reinitialized for the host and physical connection you were just using. If you do not wish to reconnect, type the escape character to get the prompt back. Reinitialize Kermit-][ to connect to another host or to do whatever is desired. No matter what kind of equipment you are using, if you need to send a break signal to the SERDAC UNIVAC (to interrupt output and @@X something), it's much better and easier to break by typing CTRL-SHIFT-P while "talking to" the host. A2.7 Returning to Kermit-][ To return to Kermit-][ from terminal operation, simply type the appropriate escape character. The default escape character is the ESCape key. After typing it, you should get the <uKERMIT-][>>u prompt. Note: When you are using one of the supported serial cards, the first time you escape back to your Apple, there will be a slight (2-3 second) delay before you get the prompt. A2.8 Transferring files from micro to host After CONNECTing and logging-on to the host: <u>>u@USE K.,KERMIT*KERMIT. (cr) Run Kermit on the host (the Sperry <uI:002333 USE complete>u UNIVAC in these examples. The host <u>>u@K.KERMIT,R MY*FILE. (cr) commands will vary from host to <uKermit 1100 2.3 test>u host). Use your own file name or element name in place of MY*FILE. If you specify none, the target UNIVAC name(s) will be determined by the Apple Kermit SEND command(s). Note that the R option is used to give the UNIVAC Kermit a RECEIVE command. ESC Press the ESCape key to get out of terminal mode and return to Kermit-][. [Back at Apple] <uKERMIT-][>>uSEND CHESS (cr) Specify the file to be sent from the default disk. Substitute your own file name for CHESS. If SCROLL is ON, the actual text will scroll A2- 8 by on your screen as it is being sent. You may send a file from any drive by appending ,Dn to the file name; for example, SEND CHESS,D2 to send a file from a drive 2 disk. You can abort the transfer at any time, by typing the escape character several times. When the transfer is complete, you will see: *********************** * TRANSFER COMPLETED * *********************** and Kermit-][ will sound a bell. As stated in Sections 3.7 and A2.14, there are a number of conditions that can interrupt or abort a Kermit transfer, and different ways of handling those kinds of situations. If, for example, you should get an error message, <uTRANSFER ABORTED DUE TO>u <uTIMEOUT>u, reSET Kermit-]['s TIMEOUT parameter to a higher value, and start the whole transfer over again. At this point, <uif you specified no>u <ufile name on the UNIVAC Kermit>u <ucall>u, and the SEND was completed normally, you may SEND other Apple files to the UNIVAC without reCONNECTing to it. The received files on the UNIVAC will have the same names as the ones you specify in the SEND commands you use, so be careful to use simple names legal to the UNIVAC, and make sure that you don't overwrite something on the host! Or, if you want to be conservative:. <uKERMIT-][>>uCONNECT (cr) CONNECT to the host again to check that the file (or element) was properly received, to set the host Kermit up to receive/send another file, or to log-off if you are finished. There is no need to re-establish the physical connection (dialing or whatever method was used) or to rerun Kermit-][; all CONNECT commands A2- 9 after the first one put you directly back to the host, as long as you have not reSET any transmission parameters. @EOF (cr) When you return to the UNIVAC after <uKermit end>u a transfer, you should ALWAYS type > @EOF (cr) (or just @ (cr)) to terminate UNIVAC's Kermit and get the operating system prompt (>). (You may have to type a few RETURNs to get other hosts' attention so you can terminate or command their Kermits). >....... Tell the host what to do next, and then return to Kermit-][ by typing:. ESC A2.9 Transferring files from host to micro After CONNECTing and logging-on to the host: >@USE K.,KERMIT*KERMIT. (cr) Run Kermit on the host (the Sperry <uI:002333 USE complete>u UNIVAC in these examples. The host >@K.KERMIT,SW MY*FILE. (cr) commands will vary from host to <uKermit 1100 2.3 test>u host). Use your own file name or element name in place of MY*FILE. Note that the S option is used to give the UNIVAC Kermit a SEND command. The W option is used to specify a time delay so that you will have time to return to the Apple and set it up to receive the file. ESC Press the ESCape key to get out of terminal mode and return to Kermit-][. [Back at Apple] <uKERMIT-][>>uRECEIVE (cr) Tell Kermit-][ to receive the incoming file and to store it on the default disk. (You can change the default by using a SET DRIVE command (see Section A2.3.14) A2-10 <ubefore>u typing the RECEIVE command. If desired, you may also indicate the drive you want to use to store particular received data by appending ,Dn to the RECEIVE command, e.g., RECEIVE,D2 will have Kermit-][ store the data on the disk in drive 2). If SCROLL is ON, the actual text will scroll by on your screen as it is being received. Note that the file will be put on the default disk with the same name as you specified on the host Kermit SEND. You can abort the transfer at any time, by typing the escape character several times. When the transfer is complete, you will see: ********************** * TRANSFER COMPLETED * ********************** and Kermit-][ will sound a bell. As stated in Sections 3.7 and A2.14, there are a number of conditions that can interrupt or abort a Kermit transfer, and different ways of handling those kinds of situations. If, for example, you should get an error message, <uTRANSFER ABORTED DUE TO>u <uTIEMOUT>u, reSET Kermit-]['s TIMEOUT parameter to a higher value, and start the whole transfer over again. <uKERMIT-][>>uCONNECT (cr) CONNECT to the host again to set the host Kermit up to send/receive another file, or to log-off if you are finished. There is no need to re-establish the physical connection (dialing or whatever method was used) or to rerun Kermit-][; all CONNECT commands after the first one put you directly back to the host, as long as you have not reSET any transmission parameters. A2-11 @EOF (cr) When you return to the UNIVAC after <uKermit end>u a transfer, you should ALWAYS type > @EOF (cr) (or just @ (cr)) to terminate UNIVAC's Kermit and get the operating system prompt (>). (You may have to type a few RETURNs to get other hosts' attention so you can terminate or command their Kermits). >....... Tell the host what to do next, and then return to Kermit-][ by typing:. ESC A2.10 Exiting Kermit-][ After logging-off the host computer and terminating your physical connection (e.g., hanging up the phone), get back to Kermit-][ by typing the escape character. When you see the <uKERMIT-][>>u prompt, type either EXIT (cr) or QUIT (cr) to end the Kermit-][ session. A2.11 Converting an Applesoft BASIC file to a text file Since Kermit-][ transfers only sequential text files, you must convert Applesoft BASIC programs to text files before transferring them. A utility program called B2T (for BASIC-to-text) is on your Kermit-][ distribution disk specifically for this purpose. You can use B2T on any Applesoft BASIC program, as long as there is no line number 0 in it. To create a text file, load your Applesoft program and type: EXEC B2T (cr). To change the Applesoft program PRIMESl to a text file stored on disk as PRIMES2, for example: <u]>uLOAD PRIMESl (cr) <u]>uEXEC B2T (cr) <u]>u <u]>u <u]>uRUN (cr) <uNAME OF FILE TO BE WRITTEN?>uPRIMES2 (cr) Note that at this writing (7/85) there may be some difficulties encountered in transferring Applesoft BASIC text files to and from the UNIVAC. UNIVAC's UMd-Kermit will accept text lines greater than 132 characters in length, but it "breaks" the lines at character 132. For example, if you send a line of 157 characters, the UNIVAC will make it into two lines- one with 132 characters and one with 25 characters. When you transfer A2-12 the text file back to your Apple, and try to EXEC it back to a BASIC program (see next section), the second part of your original line, now a line of its own, will be taken as a SYNTAX ERROR or, if it happens to begin with a number, as an undesired BASIC statement. We are trying to modify the UNIVAC Kermit so that this problem will not occur, but in the meantime, it would be a good idea not to write new BASIC programs with lines exceeding 132 characters if you plan to transfer them to and from the UNIVAC. If this is not possible, or if you have old programs with many long lines that you need to transfer, contact SERDAC; we have developed several interim Applesoft BASIC utility programs to detect and fix "split" lines. Another thing that you should be aware of when transferring Applesoft BASIC text files to the UNIVAC is that the usual call to the UNIVAC Text Editor (@ED file-or-elt-name) WILL NOT let you look at columns 81-132 (132 characters is the maximum length you can look at). If you have uploaded an Applesoft BASIC text file, with lines 81-132 characters long, and you would like to look at or edit it, MAKE SURE to use the "D" option on the Text Editor call (i.e. @ED,D file-or-elt-name)! A2.12 Converting text file to Applesoft BASIC program This is very simple. Merely EXEC your file and SAVE it. If a file contains BASIC line numbers and statements, EXEC-ing that file causes the text to be read into memory and stored as a BASIC program, as if you had typed it directly into the system itself. You must then SAVE the program with an appropriate name. To change the text file PRIMES2 back to a BASIC program file and store it on disk as PRIMESl:. <u]>uEXEC PRIMES2 (cr) <u]>u (a series of right brackets will appear) <u]>uSAVE PRIMESl (cr) A2.13 Converting Apple binary file to/from text file Although the host will not be able to interpret the contents of a micro binary file under ordinary circumstances, it may be handy to store one on the host disk for future transfer back to an appropriate micro. Unfortunately, as with Applesoft files, there is no direct way to do such a transfer with Kermit-][. The Apple binary file must first be translated into a <uhex-text>u file before it may be transferred to the host. The hex-text file must be easily convertible back to binary when it is transferred back to an appropriate micro. This process is relatively straightforward. For the specific purpose of converting Apple II hi-res pictures in memory locations $2000-$3FFF or $4000-$5FFF (or binary files containing those memory ranges), we have included a complete picture un/packer and binary <--> text A2-13 picture file converter on the Kermit-][ distribution disk-- Applesoft programs P/U-GO and P/U, which call Apple binary files PACK/UNPACK, BIN2TXT, and TXT2BIN. If you would like to un/convert other memory ranges (or binary files containing known memory ranges), we have included several Applesoft BASIC and 6502 assembler utility programs on the Kermit-][ distribution disk. Programs BITXT (executed via EXEC EBITXT) and B-T will convert a binary file or memory range to a transferable hex-text file. Programs TXBIN (executed via EXEC ETXBIN) and T-B will unconvert a hex-text file back to binary. Those programs should only be used for memory ranges between $300 and $89FF. A2.14 Kermit-][ transfer error messages As explained in Section 3.7, there are a number of conditions which can interrupt or abort a Kermit transfer. Specific Kermit-][ error messages and associated remedial actions are reviewed below: Micro-to-host transfer While you are SENDing a file to the host (uploading), you may see the following Kermit-][ transfer error messages: <uFILE NOT ON DISK>u The file you specified to SEND is not on the default drive's disk. The file transfer from the Apple cannot be begun. Check to make sure where the desired file is, and type the correct SEND command when you see the <uKERMIT-][>>u prompt. <uI/O ERROR. TRANSFER ABORTED.>u An error was encountered while trying to read the file that you specified to SEND. The transfer is aborted at the point of error. The received file or element on the host will be incomplete. Make sure that the default drive is ready. Take out the disk and reinsert it; flip the drive door open and closed several times. Then, retype the SEND command when you see the <uKERMIT-][>>u prompt. If the error reoccurs, you will have to "repair" the file or submit another copy of it on a different disk. <uFILE NOT A TEXT FILE. TRANSFER ABORTED>u The file you specified to SEND is on the default disk, but it is <unot>u a text file. The file transfer cannot be initiated. Check to see if you have the right disk in the default drive and have spelled the text file name correctly in the SEND command. Wait for the <uKERMIT-][>>u prompt and type in the correct SEND command. A2-14 <uTRANSFER ABORTED DUE TO TIMEOUT>u The host is taking too long to acknowledge data packets sent from Kermit-][. The received file or element on the host will be incomplete. ReSET the Kermit-][ TIMEOUT parameter to a higher value (say 5 or 10 higher than the current value) and restart the transfer on both host and micro. <uTRANSFER ABORTED DUE TO COMMUNICATION LINE PROBLEM>u <uTRY DISCONNECTING AND REDIALING>u The micro <--> host physical connection is excessively noisy. The electrical interference is causing packets to be lost or distorted on the way to and from the host. Whenever the noise level exceeds tolerance, the transfer is automatically aborted. The received file or element on the host will be incomplete. You may know a way to eliminate the noise and proceed with your Kermit session by restarting the transfer on both the host and the micro. If you cannot eliminate the noise, re-establish your physical connection (i.e. hang up, reinitialize Kermit (see Section A2.5), reCONNECT, and redial (if applicable)), log-on, and restart the transfer on both host and micro. <uTRANSFER ABORTED BY USER>u You have chosen to manually abort the transfer by typing the Kermit-][ escape character several times. Any received file or element on the host will be incomplete. When you see the <uKERMIT-][>>u prompt, you may type in any legal command. If desired, you may reSEND the same file or SEND another by typing the appropriate SEND command when you see the <uKERMIT-][>>u prompt. <uUNRECOGNIZED STATUS CODE>u When you see this message without any accompanying explanation, there may have been a problem in exchange of Kermit initialization or control packets (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the target host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the SEND is illegal to the UNIVAC). The transfer is aborted, often before data is really sent. Check the status of the target host file or element. Make sure that the name used in the SEND is "translatable" to a legal UNIVAC name. If the name is in doubt, and you don't want to specify a legal target name in the host Kermit call, you may have to RENAME the Apple file before attempting to SEND it again. Alternatively. there may have been a line noise problem during data transfer which scrambled some of the critical packet information (such as sequence number or packet type) so that the A2-15 computers got confused in verifying whether packets were properly sent/received. In either of the cases just mentioned, the transfer should be restarted on both the host and the micro. Host-to-micro transfer While you are RECEIVEing a file from the host (downloading), you may see the following Kermit-][ transfer error messages: <uDISK IS WRITE PROTECTED. TRANSFER ABORTED.>u (preceded by error # and line #) The Apple disk in the default drive is write protected, and no received data can be written onto it. Insert another disk, or remove the write protection strip. Restart the transfer on both the host and the micro. <uI/O ERROR. TRANSFER ABORTED.>u (preceded by error # and line #) An error was encountered while trying to write the received file to the Apple disk. The received micro file will be incomplete. Make sure that the default disk drive is ready. Take out the disk and reinsert it; flip the drive door open and closed several times. Restart the transfer on both the host and the micro. If the error persists, use another Apple II disk. <uDISK FULL, PREMATURE END OF TRANSFER.>u (preceded by error # and line #) While trying to write the received data to the Apple disk, the disk was filled up. The received micro file will be incomplete. Delete some files from the disk or insert another. Restart the transfer on both the host and the micro. <uFILE TYPE MISMATCH. TRANSFER ABORTED.>u Kermit-][ is attempting to append a text file to an existing Apple II file which is <unot>u a text file. Check to see if the file or element name you specified to be sent by the host already exists on the micro disk. If it does, and the file is not a text file, delete it, rename it, or copy the host file or element to one with a different name before reSENDing it. Restart the transfer on both the host and the micro. <uTRANSFER ABORTED DUE TO TIMEOUT>u The host is taking too long to acknowledge ACK/NAK packets sent from Kermit-][. The received file on the micro will be incomplete. Reset the Kermit-][ TIMEOUT parameter to a higher value (say 5 or 10 higher than the current value) and restart the transfer on both host and micro. A2-16 <uTRANSFER ABORTED DUE TO COMMUNICATION LINE PROBLEM.>u <uTRY DISCONNECTING AND REDIALING>u The micro <--> host physical connection is excessively noisy. The electrical interference is causing packets to be lost or distorted on the way to and from the host. Whenever the noise level exceeds tolerance, the transfer is automatically aborted. The received file on the micro will be incomplete. You may know a way to eliminate the noise and proceed with your Kermit session by restarting the transfer on both the host and the micro. If you cannot eliminate the noise, re-establish your physical connection (i.e. hang up, reinitialize Kermit (see Section A2.5), reCONNECT, and redial (if applicable)), log-on, and restart the transfer on both host and micro. <uREC BUFFER OVERFLOW. TRANSFER ABORTED.>u There are two conditions that can cause this error message. XFirst, Kermit-][ cannot accept logical lines greater than 256 characters in length. If the file that you are trying to transfer to the Apple has such lines, you must figure out some way of shortening them before you can use Kermit-][ to transfer them. Second, the Kermit protocol provides for <urepeat character>u <uprocessing,>u whereby a sending Kermit can condense any string of repeated characters (whose length is greater than four and less than 94) to only three coded characters in a Kermit packet. The coded string is decoded by the receiving Kermit back to the original string. Thus, data with repeated characters may be transferred very efficiently by Kermit. Kermit-][ allows for repeat character processing when you are RECEIVEing data from a host. Unfortunately, because of design deficiencies in the code we received from the University of Wisconsin, this ability is not always adequate. If you are RECEIVEing data with numerous long strings of repeated characters in close proximity to each other within the file, Kermit-][ repeat character processing may fail. If it does, you will receive the <uREC BUFFER OVERFLOW>u message. If you know that your data has long strings of repeated characters, get the <uKERMIT-][>>u prompt and SET REPEAT-PROC OFF. Then, restart the transfer on both the host and the micro. If you aborted due to too many repeat characters, turning off repeat processing should always correct the problem. <uTRANSFER ABORTED BY USER>u You have chosen to manually abort the transfer by typing the Kermit-][ escape character several times. Any received file on the micro will be incomplete. When you see the prompt, you may CONNECT back to the host to restart the transfer, or you may type any other legal command. A2-17 <uUNEXPECTED PACKET TYPE. TRANSFER ABORTED>u, There has been a problem in micro <--> host exchange of Kermit-][ initialization packets, or there has been some problem on the host which has interrupted the normal flow of data packets. (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the host SEND is illegal to the UNIVAC). Any received file on the micro will be incomplete. Restart the transfer on both the host and the micro. <uUNRECOGNIZED STATUS CODE>u When you see this message without any accompanying explanation, there may have been a problem in exchange of Kermit initialization or control packets (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the host SEND is illegal to the UNIVAC). The transfer is aborted, often before data is really sent. Check the status of the host file or element you wanted to SEND. Alternatively, there may have been a line noise problem, during data transfer, which scrambled some of the critical packet information (such as sequence number or packet type) so that the computers got confused in verifying whether packets were properly sent/received. In either of the cases just mentioned, the transfer should be restarted on both the host and the micro. A2.15 Adding to or changing Kermit-][ code We encourage users to add code for presently unsupported Apple II serial or internal modem cards, or to improve on the existing code. The code modules you may need to access are described in the next section. As you can see by listing it, the Applesoft KERMSHELL code contains a large gap between statement numbers 3850 and 6170. This is where you would normally insert BASIC statements to drive a particular serial or modem card. The following information is needed for each additional card. If assigned to the proper variables as described below, the subroutine at statement 6250 will poke this information into KERMITA (KERM = 2065 decimal): Variable Poke to: Function STREG% KERM-l2 Status register address (least significant byte) TRREG% KERM-13 Transmit register address (lsb) RCREG% KERM-l4 Receive register address (lsb) TBIT% KERM-l5 Transmit bit mask RBIT% KERM-l6 Receive bit mask A2-18 Do pokes for parity, local echo, and baud using the variables PARITY$, LOC$, and BAUD. CALL KERM + 17,A$ sends a variable such as A$ out the serial port. Autodialing may be done in this manner. CALL KERM + 20 initializes the communications interface card and re-establishes previously set video parameters. Call this entry point before a call to KERM + 17, and before trying to autodial the Hayes Micromodem II. CALL KERM + 3 sends keyboard typeins out the serial port (checking for the escape character) and displays serial port input on the Apple screen. CALL KERM + 6 fast reads a line of text from the Apple disk file you are SENDing from. CALL KERM + 0 sends out a packet from the Apple and returns the status code of the packet sent back by the host. CALL KERM + 23 re-establishes previously poked video parameters. Call this entry point after any PR#0 statements. If you do successfully make changes, corrections, or additions to Kermit-][ or its documentation, or you have suggestions for same, please contact Robert Holley at SERDAC, (305)-554-2700 (SUNCOM 441-2700) or at @MAIL Mailstop BOB=HOLLEY. We would like to know about your work! A2.16 Files on your Kermit-][ distribution disk The following files should be on your Apple Kermit-][ distribution disk. The stars indicate locked files: * HELLO - Applesoft BASIC boot file for Kermit-][; invokes GOKERM. * GOKERM - Apple II EXEC file to relocate and RUN KERMIT. * GOKERMIL - Apple II EXEC file to relocate and RUN KERMIT, including an illustrated introduction. RUNs program FROGPROG to provide this introduction. * FROGPROG - Applesoft BASIC program to provide an illustrated introduction to Kermit-][. * FROGPIX - Apple II binary hi-res picture file loaded by program FROGPROG. A2-19 KERMIT - Applesoft BASIC part of Kermit-][. This includes the user interface to Kermit-][, and acts as a driver for KERMITA. The KERMIT file you originally receive on the distribution disk is set up to run with the Hayes Micromodem II and with the above defined defaults. If you have a different serial or modem card, you will need to DELETE the original KERMIT file and recreate it as described in the next section. * KERMITA - This is an Apple II binary file loaded by KERMIT. It contains the 6502 machine code that creates and decodes Kermit protocol packets, handles character I/O, sends ACK/NAK packets to the host, implements the video, scroll, and debug features, etc. * KERMITA.S - This is an Apple II text file containing the source 6502 assembler statements for KERMITA, as written for the Apple II Applesoft Tool Kit Assembler. * SET40 - This is an Apple II binary file that contains the special hi-res 40 column graphics character set used by Kermit-][. KERMIT/SETSAVE This is an Apple II text file that contains your saved SET parameters. It is used to initialize Kermit-][ each time it is RUN or each time you do a SET SAVE. * KERMSHELL - This is an Applesoft BASIC file containing all the statements you need to create an appropriate KERMIT program, except for those statements which are needed for a particular serial or modem card. * MIC.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Hayes Micromodem II. * SUP.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Apple Super Serial Card. A2-20 * CCS.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the California Computer Systems 7710-D Serial Card. * COM.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Apple Communications Serial Card. * NOV.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Novation Apple Cat internal modem (both the 300 baud card and the 1200 baud card, if applicable). * B2T - This is an Apple II EXEC file used to convert Applesoft BASIC files to Kermit-][ transferable text files (see Section A2.11). * EBITXT - Apple II EXEC file used to relocate and RUN Applesoft BASIC program BITXT. * BITXT - Applesoft BASIC program which can be used to convert an Apple binary file or memory range to a transferable hex-text file. * ETXBIN - Apple II EXEC file used to relocate and RUN Applesoft BASIC program TXBIN. * TXBIN - Applesoft BASIC program which can be used to unconvert a hex-text file (originally produced by program BITXT) back to a binary file or memory range. * B-T - This is an Apple II binary file loaded by program BITXT. It contains the 6502 machine code which is needed to convert binary to hex-text. * T-B - This is an Apple II binary file loaded by program TXBIN. It contains the 6502 machine code which is needed to unconvert hex-text back to binary. A2-21 * TEXTTOPRINT - This is a useful Applesoft BASIC utility program you may use to print out the contents of a text file or to scroll them to your screen. * P/U-GO - This is an Applesoft BASIC program which introduces and documents the P/U program described below. When the intro is complete, it automatically RUNs P/U. * P/U - This is an Applesoft BASIC program which may be used to compact Apple II binary "picture files" or hi-res screen memory banks and to convert them to Kermit-][ transferable text files. * PACK/UNPACK - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to pack/unpack Apple II hi-res pictures into a compressed binary form. * BIN2TXT - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to convert an Apple II binary file to a hex-text file. * TXT2BIN - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to convert an Apple II hex-text file back to a binary file. A2.17 Configuring a Kermit-][ working disk Many of the files on your Kermit-][ distribution disk will not be needed for your normal work. We suggest that you make one backup copy of the original distribution disk, and then make a working copy with only the files you really need. That way you will have some extra space with which to store text files to be sent/received. At the minimum, you will need HELLO, GOKERM, an appropriate KERMIT program file for your equipment (see below), an appropriate KERMIT/SETSAVE file, and KERMITA. B2T and TEXTTOPRINT may be very useful and only take up a few tracks. To minimize the size of the Applesoft KERMIT program, it is configured for only <uone>u specific serial/modem card. The distribution disk contains a KERMIT program configured to drive the Hayes Micromodem II internal modem. If you are using a Novation Apple Cat internal modem or one of the supported serial cards, you <uwill>u <unot>u be able to use the furnished KERMIT program. You will need to follow the procedure outlined below to A2-22 configure a new KERMIT program: 1) Boot your system with your System Master disk. Remove it and insert the copy of the distribution disk. 2) <u]>uDELETE KERMIT (cr) 3) <u]>uLOAD KERMSHELL (cr) 4) <u]>uEXEC name.T (cr) 5) <u]>uLIST (cr) (if desired) 6) <u]>uSAVE KERMIT (cr) where "name" in step 4 is either NOV, CCS, COM, or SUP as determined by the equipment you plan to use. EXEC MIC.T (cr) if you need to recreate the KERMIT originally on the distribution disk. Then: 7) BRUN the System Master FID program to copy from the Kermit-][ distribution disk to your working disk, the KERMIT file you just created, HELLO (replace the HELLO on the initialized working disk), GOKERM, KERMITA, and KERMIT/SETSAVE. Also copy to the working disk any of the other files you think would be useful in your ordinary work. 8) Place the working disk in the default drive, and run Kermit-][ by typing in EXEC GOKERM (cr). SET all the parameters you need for your serial/modem card, and the host you plan to contact. Then, do a SET SAVE (cr) to save those default parameters on the working disk. You needn't change anything else on your working disk again, unless you plan to SET SAVE parameters for a different host or an alternative phone number or communications parameter like baud rate. If you want to change serial/modem cards, you will need to reconfigure the Applesoft KERMIT program file as outlined above in Steps 1-6. You will also need to run the new KERMIT-][ and SET SAVE appropriate parameters. A2.18 Modifying the KERMITA program Since page 1 of Apple II hi-res memory is utilized by Kermit-][, and the Applesoft KERMIT program is loaded over page 2 of the hi-res memory and above, there is really not much room left to expand the KERMITA code, but you may want to make small A2-23 changes. Follow the procedure outlined below:. 1) Delete the existing KERMITA file and make sure that binary file SET40 and text file KERMITA.S are available on the disk. 2) Modify KERMITA.S as required, and reassemble using the Applesoft Tool Kit or some similar 6502 assembler. Note the hex code address of the label SET40. Store the object code back into a disk file named KERMITA. 3) BLOAD KERMITA 4) BLOAD SET40,A$xxxx where xxxx is the hex code address saved in Step 1. 5) BSAVE KERMITA,A$801,L$1800 A2.19 Recent Improvements to SERDAC Kermit-][ Appendix A-2 of this manual has been revised to document the 7/85 version of SERDAC Kermit-][ and the associated programs distributed on the 7/85 Kermit-][ distribution disk. Changes to the documentation since the 5/85 Kermit-][ distribution have been noted by vertical lines in the page margins. Specifically, the 7/85 Kermit-][ contains the following corrections/improvements:. (1) Kermit-][ problems with SENDing files with logical line lengths of 128-256 characters have been corrected. Note that, for the present, caution must be exercised when transferring files with logical line lengths greater than 132 characters to/from the UNIVAC (see Section A2.11). (2) Kermit-][ problems with RECEIVEing files with long strings of repeated characters have been corrected. An option (SET REPEAT-PROC OFF) has been provided to disable repeat character processing if it is inadequate to handle specific data transfers. (3) It is now possible to SET SAVE a phone number with an embedded comma pause character. (4) A diagnostic message has been provided to warn you if you are trying to RECEIVE logical lines longer than 256 characters. (5) Screen instructions for auto-dialing when using an external modem and the Apple Communications Card have been corrected. (6) Statements 5449-50 in the Applesoft KERMIT program (see EXEC text file COM.T) have been removed. The Apple A2-24 Communications Card, as originally sold, can only be used with Kermit-][ at 300 baud. If the card has been modified for use at 1200/300 baud, it can only be used with Kermit-][ at 1200 baud. (7) Several redundancies and inconsistencies in Kermit-][ error messages have been eliminated. (8) Diagnostic messages have been added to flag erroneous or unexecutable Kermit-][ DOS commands. (9) Bells have been added to attract your attention to the normal (or abnormal) end of a file transfer, where you might not be watching your screen. (10) You can now toggle the default disk drive with a SET DRIVE command. (11) There is a new screen format for the SHOW/STATUS display. (12) It is now possible to toggle the default drive by appending the drive number to the RECEIVE command (e.g., RECEIVE,D2). (13) It is now possible to specify the Kermit EOL parameter (SET EOL) for transfers with a host machine which does not use the standard carriage return for EOL. (14) There is now an option to invoke Kermit-][ with an illustrated introduction. This requires the presence of files GOKERMIL, FROGPROG, and FROGPIX on the working disk. Associated programs on the 7/85 Kermit-][ distribution disk contain the following corrections/improvements: (1) There are four new programs (BITXT, B-T, TXBIN, T-B) and two new EXEC files (EBITXT and ETXBIN) which will allow you to convert Apple II binary files (or memory ranges), to transferable hex-text files and to unconvert such hex-text files back to binary. (2) A small error has been corrected in the P/U picture utility program. If you happen to answer the "PACK/UNPACK PIX FROM SCREEN 1 OR 2?" question with a non-numeric answer, the question will be repeated. A2-25 //go.sysin dd * if [ `wc -c < manual.txt` != 63514 ]; then made=FALSE echo error transmitting manual.txt -- echo length should be 63514, not `wc -c < manual.txt` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 manual.txt echo -n ' '; ls -ld manual.txt fi ------------ ereh tuc ------------ -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"
zben@umd5.umd.EDU (10/18/86)
GVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGV From: Ben Cranston <zben@umd5.umd.edu> Subject: Kermit ][ (file 1 of 3) Documents To: unix-sources@brl-smoke.arpa Return-Path: <unix-sources-request@BRL.ARPA> Received: from BRL-SMOKE.ARPA by Xerox.COM ; 17 OCT 86 16:35:33 PDT Received: from USENET by SMOKE.BRL.ARPA id a017123; 17 Oct 86 15:33 EDT Newsgroups: net.sources Message-ID: <1293@umd5> Original-Date: 16 Oct 86 20:48:49 GMT Keywords: kermit apple GVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGV Well, we finally got the manual scanned, and with about a day of manual editing it is reasonably usable (though certainly not perfect). Look for the source code over the next several nights. Thanks to Chris Torek and Liz Allen for the sharmaker. ------------ cut here ------------ : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=FALSE if [ x$1 = x-a ]; then all=TRUE fi echo Extracting man.readme sed 's/^X//' <<'//go.sysin dd *' >man.readme Some notes on the manual "manual.txt" file. I started from a xerox of a xerox of a xerox of a Daisy output that had overstrike bolding, underlining, and margin bars. We used a Kurzweil scanner to re-input the text. The bolding and margin bars didn't make it. The underlining was manually entered, with the control strings "<u" and ">u" signalling start-underlining and end-underlining respectively. The shell script "man.ul" just removes these control strings, so it can be used if your output device does not do underlining. If you have access to a device that does have underlining, you can use an analagous shell script to change the control strings into the control sequences your device uses to make underlining. Page-ups are marked by a "formfeed" character in the text. I hope they make it through the distribution process... //go.sysin dd * if [ `wc -c < man.readme` != 842 ]; then made=FALSE echo error transmitting man.readme -- echo length should be 842, not `wc -c < man.readme` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 man.readme echo -n ' '; ls -ld man.readme fi echo Extracting man.ul sed 's/^X//' <<'//go.sysin dd *' >man.ul sed <manual.txt -e 's/<u//g' -e 's/>u//g' //go.sysin dd * if [ `wc -c < man.ul` != 42 ]; then made=FALSE echo error transmitting man.ul -- echo length should be 42, not `wc -c < man.ul` else made=TRUE fi if [ $made = TRUE ]; then chmod 755 man.ul echo -n ' '; ls -ld man.ul fi echo Extracting manual.txt sed 's/^X//' <<'//go.sysin dd *' >manual.txt Appendix A-2 Kermit-][ for the Apple II July 1985 A2-i APPENDIX A-2 TABLE OF CONTENTS A2.1 Introduction . . . . . . . . . . . . . . . . . . . . . 1 A2.2 Getting started . . . . . . . . . . . . . . . . . . . 1 A2.3 SET and SHOW or STATUS commands . . . . . . . . . . . 1 A2.3.1 Baud . . . . . . . . . . . . . . . . . . . . . 2 A2.3.2 Local-echo . . . . . . . . . . . . . . . . . . 2 A2.3.3 Parity . . . . . . . . . . . . . . . . . . . . 2 A2.3.4 Slot . . . . . . . . . . . . . . . . . . . . . 2 A2.3.5 Card . . . . . . . . . . . . . . . . . . . . . 2 A2.3.6 Mark . . . . . . . . . . . . . . . . . . . . . 2 A2.3.7 Timeout . . . . . . . . . . . . . . . . . . . . 3 A2.3.8 File-warning . . . . . . . . . . . . . . . . . 3 A2.3.9 Debug . . . . . . . . . . . . . . . . . . . . 3 A2.3.10 Phone . . . . . . . . . . . . . . . . . . . . 3 A2.3.11 Scroll . . . . . . . . . . . . . . . . . . . . 4 A2.3.12 Video . . . . . . . . . . . . . . . . . . . . 4 A2.3.13 Escape . . . . . . . . . . . . . . . . . . . . 4 A2.3.14 Drive . . . . . . . . . . . . . . . . . . . . 5 A2.3.15 End of Line (EOL) . . . . . . . . . . . . . . 5 A2.3.16 Repeat-Proc . . . . . . . . . . . . . . . . . 5 A2.3.17 Save . . . . . . . . . . . . . . . . . . . . . 6 A2.4 Giving a DOS command within Kermit-][ . . . . . . . . 6 A2.5 CONNECT command . . . . . . . . . . . . . . . . . . . 6 A2.6 BREAK command . . . . . . . . . . . . . . . . . . . . 7 A2.7 Returning to Kermit-][ . . . . . . . . . . . . . . . . 8 A2.8 Transferring files from micro to host . . . . . . . . 8 A2.9 Transferring files from host to micro . . . . . . . . 10 A2.10 Exiting Kermit-][ . . . . . . . . . . . . . . . . . 12 A2.11 Converting an Applesoft BASIC file to a text file . . 12 A2.12 Converting text file to Applesoft BASIC program . . . 13 A2.13 Converting Apple binary file to/from text file . . . 13 A2.14 Kermit-][ transfer error messages . . . . . . . . . . 14 A2.15 Adding to or changing Kermit-][ code . . . . . . . . 18 A2-ii APPENDIX A-2 TABLE OF CONTENTS A2.16 Files on your Kermit-][ distribution disk . . . . . . 19 A2.17 Configuring a Kermit-][ working disk . . . . . . . . 22 A2.18 Modifying the KERMITA program . . . . . . . . . . . . 23 A2.19 Recent Improvements to SERDAC Kermit-][ . . . . . . . 24 Note: Changes to the original Kermit-][ documentation in Appendix A-2, published in May 1985, have been noted with vertical lines in the page margins. For a summary of major changes, see Section A2.19. A2-iii Appendix A-2 Kermit-][ for the Apple II A2.1 Introduction Kermit-][, Apple Kermit, can transfer sequential ASCII text files, with logical line lengths up to 256 characters, between an Apple II, II+, or IIe, running Apple DOS 3.3 (or any compatible Apple DOS operating system) and any host computer that is running its own version of Kermit. This appendix assumes that you know how to use both the Apple and the host you want to communicate with. The examples assume that you are communicating with the Sperry UNIVAC 1100, but it would be fairly easy to modify the commands to apply to other host computers. The commands necessary on the micro would remain essentially the same, no matter what host you are communicating with. There is a separate Appendix B describing the Kermit implementation for each SERDAC host computer. In the following examples, what Kermit (or the current computer operating system) prints is <uunderlined>u, what you should type is shown with bold type, and explanation and comments appear in ordinary type. A carriage return is indicated as (cr). You can abbreviate any Apple Kermit command, as long as the abbreviation is unambiguous. A2.2 Getting started To run Kermit-][, either boot with the Kermit-][ distribution disk, or, if you have previously booted with another disk, insert the Kermit-][ disk, and type EXEC GOKERM (cr) (if you would like an illustrated introduction to Kermit-][, insert the Kermit-][ disk, and type EXEC GOKERMIL (cr). After Kermit-][ is loaded, you will receive the prompt <uKERMIT-][>>u. You need not keep the Kermit-][ disk in the Apple's drive once Apple Kermit has been loaded, except when you need to SET SAVE command parameters (see Section A2.3.17). Typing HELP (cr) or ? (cr) at the prompt provides a list of valid Kermit-][ commands. A2.3 SET and SHOW or STATUS commands Before you connect to another computer, you must set certain Kermit-][ parameters. To display the current settings of these parameters, type SHOW (cr) or STATUS (cr). To change a parameter, use a SET command. To determine a parameter's possible values, follow the command with a question mark, e.g.: SET LOCAL-ECHO ? (cr) <uON OFF>u A2- 1 Note that although SET commands apply in most cases, due to hardware limitations, not all SET commands have an effect. For example, if you are using a Hayes Micromodem II, SET BAUD 1200 has no effect, since that modem works only at 300 baud. A2.3.1 Baud Your modem, serial interface card, and host system determine the correct baud rate to use. Default is 300. A2.3.2 Local-echo Set this parameter to ON when connecting with a host such as the UNIVAC 1100, which does not echo characters back to your terminal. Set it to OFF if the host does echo back characters (echoplex). Default is ON. A2.3.3 Parity Set parity to the parity of the host system. Default is EVEN. A2.3.4 Slot This is the Apple II slot number containing the serial interface or modem card you are using. Default is 2. A2.3.5 Card This parameter names the serial interface or modem card you are using. Kermit-][ is currently implemented for the following: Card SET CARD value Hayes Micromodem II MICROMODEM (or MIC) Apple Super Serial Card SUPER SERIAL (or SUP) Cal Comp Sys 7710-D Serial Card CCS Apple Communications Serial Card COMMUNICATIONS (or COM) Novation Apple Cat Modem NOVATION (or NOV) Default is MICROMODEM. A2.3.6 Mark Along with certain special pieces of information, characters in a text file are grouped into units called <upackets>u before being sent to the other computer during a file transfer. The first character of a packet is always the <umark>u character, which by default is CTRL-A (ASCII 001). On some systems, ASCII 001 may be a flow control character- for instance, it might mean "disconnect." Therefore, it may be necessary with some hosts to set MARK to some other character. Default is 001. A2- 2 A2.3.7 Timeout This is the time in seconds after which the Apple will <utimeout>u (abort a transfer) if it gets no response from the host system. If the host response time is very slow, or if the message <uTRANSFER ABORTED DUE TO TIMEOUT>u appears, set TIMEOUT to a larger number. Default is 10 seconds. A2.3.8 File-warning In most cases, it is desirable to set FILE-WARNING to ON. This causes Kermit-][ to check your disk when receiving a file to see if that file already exists. If it does exist, then you are given the option to append the new file to the existing one, to overwrite the existing file, or to specify a new file name. Default is ON. A2.3.9 Debug In most cases, DEBUG should be set to OFF. If you would like to see every character (Kermit protocol characters plus actual text) that is transmitted through the serial port during a transfer, DEBUG should be set to ON. This would normally not be done unless you were trying to debug a new version of Kermit-][ or to try to discover why a particular transfer was not working correctly. Having DEBUG ON does increase the time required for a file transfer, so you may wish to use it sparingly. A2.3.10 Phone There are four possible settings of the PHONE parameter: 1. If you are using a Hayes Micromodem II, set the PHONE parameter to the host's phone number; for example, SET PHONE 5530803. If you set the PHONE parameter to NONE, Kermit-][ prompts you to enter a number. Direct keyboard commands to the Micromodem are not available through Kermit-][. 2. If you are using a Novation Apple Cat Modem, set the PHONE parameter to NONE. If you have Apple Cat firmware, you will be directed to use firmware commands to dial the host. If you do not have firmware, then you will have to physically dial-up the host using an alternative Apple II data communications program <ubefore>u you run Kermit-][. There is presently no Kermit-][ autodial capability for this equipment. 3. If you are using a serial interface card and an external modem combination that permits autodialing, set the PHONE parameter to the appropriate modem command plus the phone number. For example, if you are using a Hayes Smartmodem, you might SET PHONE ATDT5530803. If you set the phone A2- 3 parameter to NONE, you can type modem commands and the telephone number after issuing the CONNECT command. 4. If you are definitely not using an autodial system, set the PHONE to NONE. After you CONNECT, you will be given an opportunity to do a manual dialup. Default is NONE. A2.3.11 Scroll You can set the SCROLL to ON or OFF. If SCROLL is ON, the actual text of the file being transferred will be scrolled onto your screen. While this is handy to see where you are in the file transfer, it does increase the time required for the transfer. Default is ON. A2.3.12 Video The video features of Kermit-][ are quite nice. Most of the information scrolled onto your screen is done in hi-res. The program has its own hi-res character set, so you can see transmitted characters in the proper case, without having to have any special hardware such as an 80 column card (you still cannot type lower case characters on an unequipped Apple II, though). If you have a good monitor (not a TV), you may also see a 70 column display rather than the normal 40 column display. Optionally, you may also look at scrolled data in <ureverse video>u, that is black on white. There are four parameters you can set with the SET VIDEO command:. I Reverse video N Normal video (default) A Auto line feed M No auto line feed (default) T Truncate at right edge W Wrap around to next line (default) 4 40 column display (default) 7 70 column display For example, to set the display for reverse video and 70 columns, enter: SET VIDEO I7 (cr). A2.3.13 Escape As explained in Section 3.3, once you are connected to the host, there must be a way for you to get back to the micro. This is accomplished with an escape character or sequence. As you type each character on the micro keyboard, it is checked to see A2- 4 if it is the escape character or if it is part of the escape sequence. When the character or sequence is recognized, control is returned to the micro Kermit. The escape character or sequence should always be easily typed on your keyboard and something rather unique that you would never output to the host in normal operations. Although it has a somewhat different meaning in other Kermits, the authors of Kermit-][ chose the default escape character to be ESCape. That is a sensible choice, but if you would like for it to be another character, you can specify it with the SET ESCAPE command. The parameter value should be the <udecimal>u value of the ASCII code- a value between 1 and 127. Default is 27, the decimal value for ASCII ESC. A2.3.14 Drive Sometimes while using Kermit-][, it is convenient to switch the default disk drive from 1 to 2 or vice versa. This can be accomplished by issuing some "throwaway" DOS command as described in Section A2.4 (e.g., CTRL-D CATALOG,D2), but it is much simpler just to use a SET command (e.g., SET DRIVE 2). Note that using the ,Dn specification with the SEND or RECEIVE commands (see Sections A2.9 and A2.8) also effectively changes the default drive. You may wish to use a SET DRIVE command to switch back to the other drive once a particular transfer is completed. Note that when you SET SAVE (see Section A2.3.17), the drive setting is always saved with the value 1. A2.3.15 End of Line (EOL) The Kermit protocol provides for the specification, by each computer participating in an exchange, of a character to denote the end of a terminal input line (in the case of Kermit, the end of a packet). In most systems, this character is the carriage return (ASCII code 13). The Apple doesn't really care what the value of EOL is; Kermit-][ will end packets (and recognize the end of packets) with whatever character the host wants to use. The catch is that both the Apple and host must agree on what EOL is, and for agreement, YOU must tell Kermit-][ what character the host needs to detect. Default is 13. A2.3.16 Repeat-Proc Kermit-][ allows for limited <urepeat character processing>u when RECEIVEing data. With most data, the default processing (Repeat-Proc = ON) is sufficient; transfers may be accomplished without loss of data or any problems, and the special processing will save transmission time. If you are RECEIVEing data with many long strings of repeated characters, Kermit-][ repeat character processing may fail, and you will receive the message <uREC BUFFER OVERFLOW. TRANSFER ABORTED.>u If this happens, change the default by typing SET REPEAT-PROC OFF. Then, restart the transfer on both the host and the Apple. See Section A2.14 (REC A2- 5 BUFFER OVERFLOW) for further information. Default is ON. A2.3.17 Save Since it would be very cumbersome to reset all the above parameters each time you use Kermit-][, you can use a SET SAVE command to save the current parameter settings onto your Kermit-][ diskette (note that DRIVE is always saved with a value of 1). Each time you run Kermit-][, the parameters are automatically loaded back and become the initial settings for the program. The distribution disk contains a KERMIT/SETSAVE file with the above described default settings. You may reset them as required, and your settings, if saved, will become the new defaults. A2.4 Giving a DOS command within Kermit-][ You need not exit from Kermit-][ to issue most required Apple DOS commands (e.g., CATALOG, DELETE, RENAME). Instead, type CTRL-D at the <uKERMIT-][>>u prompt, followed immediately by the DOS command and (cr). If the DOS command you give is illegal, you will receive the message <uSYNTAX ERROR>u. If the command is not executable (e.g., you try to delete a non-existent file), you will receive the message <uDOS COMMAND CANNOT BE EXECUTED>u. A2.5 CONNECT command The CONNECT command lets you log onto a host system as well as to return to terminal operation from Kermit-][. The <ufirst>u time you use a CONNECT command, and subsequently, whenever you reSET the local-echo, parity, baud, card, slot, or phone parameters, Kermit-][ initializes itself with the last values you SET and readies itself for a new dial-up and log-on to the host. If you are already logged-on to the host, this may break the connection and force you to log-on again. You may also have to reSET any Kermit parameters you SET previously. Otherwise, CONNECT commands merely return you to the host. Remember: Normally, to <uinitialize>u Kermit-][, you must reSET at least one of the parameters listed in the paragraph above. You may SET the parameter to the same value it had previously, but it must be SET (e.g., if you were using the CCS card, you could initialize Kermit-][ by typing SET CARD CCS (cr)). Kermit-][ <umust>u be initialized anytime you wish to CONNECT to a host the first time (dial-up and log-on). Kermit-][ does <unot>u need to be reinitialized once you are physically connected to a host. If it <uis>u reinitialized while you are connected, the connection may be broken. Note: You may CONNECT to and log onto a host once all SET parameters have been correctly established. However, there may A2- 6 be DIP switch settings required on your serial interface or modem card that you will also have to change. On the Super Serial Card, for example, the terminal/modem block must point towards modem. On the CCS card, you must set the DIP switches for the desired baud rate. See your particular serial card or modem card manual for required switch settings! You should now be ready to log-on to a host. Type CONNECT (cr) at the <uKERMIT-][>>u prompt. As mentioned in Section A2.3.10, there are four different ways of dialing up a host. Consult Appendix D if you are not using a modem, or if you have difficulty connecting. If you are using an autodial modem and have set the PHONE parameter accordingly, just wait for the modem's response telling you that the host's modem has answered the phone and that you have a carrier signal. This is usually a <uCONNECT>u message. If you are manually dialing, you will be instructed to do so. If you do not get a connection (the host number is busy, for example), most autodial modems send a message <uNO CARRIER>u and hangup. If this happens, with one of the supported serial cards installed, you may reinitialize Kermit-][ (without issuing a SET command) and retry the same phone number by typing the Kermit-][ escape character ESCape, followed immediately (within 2-3 seconds) by the letter N. When you see the prompt, just type CONNECT (cr) . If the retry fails, or if you are using one of the supported internal modems, you will then have to ESCape back to Kermit-][, reSET the PHONE (or CARD) parameter and try to CONNECT again. When you know that you are connected to the host, type in the appropriate RETURNS or whatever to tell the host you wish to log-on. Log-on to the host and set its Kermit running with the appropriate commands. If you want to log off the host system and log back on to it or another host, you will have to get Kermit-][ to reinitialize itself as described at the beginning of this section. A2.6 BREAK command If you are using the Apple Super Serial Card, you may use the BREAK command to send a break signal to the host. The BREAK command will have no effect at all if you do not have the Super Serial Card installed! The break signal may be required to log-on to or disconnect from certain hosts (not the SERDAC UNIVAC!). If you need to send a break to log-on, first initialize Kermit-][ by SETting the appropriate parameters. Then, at the prompt, type in BREAK (cr). This will do an automatic CONNECT, let you dial-up, if applicable, and send the break signal. To complete the log-on to the host, type in the key-ins you would normally need after the break signal. If you need to send a break signal to disconnect a host, type the escape character to get the <uKERMIT-][>>u prompt, type BREAK (cr), and answer the <uDISCONNECT HOST?>u question with a Y (cr). You will be disconnected and then will have the opportunity to reconnect. A2- 7 Kermit-][ will be automatically reinitialized for the host and physical connection you were just using. If you do not wish to reconnect, type the escape character to get the prompt back. Reinitialize Kermit-][ to connect to another host or to do whatever is desired. No matter what kind of equipment you are using, if you need to send a break signal to the SERDAC UNIVAC (to interrupt output and @@X something), it's much better and easier to break by typing CTRL-SHIFT-P while "talking to" the host. A2.7 Returning to Kermit-][ To return to Kermit-][ from terminal operation, simply type the appropriate escape character. The default escape character is the ESCape key. After typing it, you should get the <uKERMIT-][>>u prompt. Note: When you are using one of the supported serial cards, the first time you escape back to your Apple, there will be a slight (2-3 second) delay before you get the prompt. A2.8 Transferring files from micro to host After CONNECTing and logging-on to the host: <u>>u@USE K.,KERMIT*KERMIT. (cr) Run Kermit on the host (the Sperry <uI:002333 USE complete>u UNIVAC in these examples. The host <u>>u@K.KERMIT,R MY*FILE. (cr) commands will vary from host to <uKermit 1100 2.3 test>u host). Use your own file name or element name in place of MY*FILE. If you specify none, the target UNIVAC name(s) will be determined by the Apple Kermit SEND command(s). Note that the R option is used to give the UNIVAC Kermit a RECEIVE command. ESC Press the ESCape key to get out of terminal mode and return to Kermit-][. [Back at Apple] <uKERMIT-][>>uSEND CHESS (cr) Specify the file to be sent from the default disk. Substitute your own file name for CHESS. If SCROLL is ON, the actual text will scroll A2- 8 by on your screen as it is being sent. You may send a file from any drive by appending ,Dn to the file name; for example, SEND CHESS,D2 to send a file from a drive 2 disk. You can abort the transfer at any time, by typing the escape character several times. When the transfer is complete, you will see: *********************** * TRANSFER COMPLETED * *********************** and Kermit-][ will sound a bell. As stated in Sections 3.7 and A2.14, there are a number of conditions that can interrupt or abort a Kermit transfer, and different ways of handling those kinds of situations. If, for example, you should get an error message, <uTRANSFER ABORTED DUE TO>u <uTIMEOUT>u, reSET Kermit-]['s TIMEOUT parameter to a higher value, and start the whole transfer over again. At this point, <uif you specified no>u <ufile name on the UNIVAC Kermit>u <ucall>u, and the SEND was completed normally, you may SEND other Apple files to the UNIVAC without reCONNECTing to it. The received files on the UNIVAC will have the same names as the ones you specify in the SEND commands you use, so be careful to use simple names legal to the UNIVAC, and make sure that you don't overwrite something on the host! Or, if you want to be conservative:. <uKERMIT-][>>uCONNECT (cr) CONNECT to the host again to check that the file (or element) was properly received, to set the host Kermit up to receive/send another file, or to log-off if you are finished. There is no need to re-establish the physical connection (dialing or whatever method was used) or to rerun Kermit-][; all CONNECT commands A2- 9 after the first one put you directly back to the host, as long as you have not reSET any transmission parameters. @EOF (cr) When you return to the UNIVAC after <uKermit end>u a transfer, you should ALWAYS type > @EOF (cr) (or just @ (cr)) to terminate UNIVAC's Kermit and get the operating system prompt (>). (You may have to type a few RETURNs to get other hosts' attention so you can terminate or command their Kermits). >....... Tell the host what to do next, and then return to Kermit-][ by typing:. ESC A2.9 Transferring files from host to micro After CONNECTing and logging-on to the host: >@USE K.,KERMIT*KERMIT. (cr) Run Kermit on the host (the Sperry <uI:002333 USE complete>u UNIVAC in these examples. The host >@K.KERMIT,SW MY*FILE. (cr) commands will vary from host to <uKermit 1100 2.3 test>u host). Use your own file name or element name in place of MY*FILE. Note that the S option is used to give the UNIVAC Kermit a SEND command. The W option is used to specify a time delay so that you will have time to return to the Apple and set it up to receive the file. ESC Press the ESCape key to get out of terminal mode and return to Kermit-][. [Back at Apple] <uKERMIT-][>>uRECEIVE (cr) Tell Kermit-][ to receive the incoming file and to store it on the default disk. (You can change the default by using a SET DRIVE command (see Section A2.3.14) A2-10 <ubefore>u typing the RECEIVE command. If desired, you may also indicate the drive you want to use to store particular received data by appending ,Dn to the RECEIVE command, e.g., RECEIVE,D2 will have Kermit-][ store the data on the disk in drive 2). If SCROLL is ON, the actual text will scroll by on your screen as it is being received. Note that the file will be put on the default disk with the same name as you specified on the host Kermit SEND. You can abort the transfer at any time, by typing the escape character several times. When the transfer is complete, you will see: ********************** * TRANSFER COMPLETED * ********************** and Kermit-][ will sound a bell. As stated in Sections 3.7 and A2.14, there are a number of conditions that can interrupt or abort a Kermit transfer, and different ways of handling those kinds of situations. If, for example, you should get an error message, <uTRANSFER ABORTED DUE TO>u <uTIEMOUT>u, reSET Kermit-]['s TIMEOUT parameter to a higher value, and start the whole transfer over again. <uKERMIT-][>>uCONNECT (cr) CONNECT to the host again to set the host Kermit up to send/receive another file, or to log-off if you are finished. There is no need to re-establish the physical connection (dialing or whatever method was used) or to rerun Kermit-][; all CONNECT commands after the first one put you directly back to the host, as long as you have not reSET any transmission parameters. A2-11 @EOF (cr) When you return to the UNIVAC after <uKermit end>u a transfer, you should ALWAYS type > @EOF (cr) (or just @ (cr)) to terminate UNIVAC's Kermit and get the operating system prompt (>). (You may have to type a few RETURNs to get other hosts' attention so you can terminate or command their Kermits). >....... Tell the host what to do next, and then return to Kermit-][ by typing:. ESC A2.10 Exiting Kermit-][ After logging-off the host computer and terminating your physical connection (e.g., hanging up the phone), get back to Kermit-][ by typing the escape character. When you see the <uKERMIT-][>>u prompt, type either EXIT (cr) or QUIT (cr) to end the Kermit-][ session. A2.11 Converting an Applesoft BASIC file to a text file Since Kermit-][ transfers only sequential text files, you must convert Applesoft BASIC programs to text files before transferring them. A utility program called B2T (for BASIC-to-text) is on your Kermit-][ distribution disk specifically for this purpose. You can use B2T on any Applesoft BASIC program, as long as there is no line number 0 in it. To create a text file, load your Applesoft program and type: EXEC B2T (cr). To change the Applesoft program PRIMESl to a text file stored on disk as PRIMES2, for example: <u]>uLOAD PRIMESl (cr) <u]>uEXEC B2T (cr) <u]>u <u]>u <u]>uRUN (cr) <uNAME OF FILE TO BE WRITTEN?>uPRIMES2 (cr) Note that at this writing (7/85) there may be some difficulties encountered in transferring Applesoft BASIC text files to and from the UNIVAC. UNIVAC's UMd-Kermit will accept text lines greater than 132 characters in length, but it "breaks" the lines at character 132. For example, if you send a line of 157 characters, the UNIVAC will make it into two lines- one with 132 characters and one with 25 characters. When you transfer A2-12 the text file back to your Apple, and try to EXEC it back to a BASIC program (see next section), the second part of your original line, now a line of its own, will be taken as a SYNTAX ERROR or, if it happens to begin with a number, as an undesired BASIC statement. We are trying to modify the UNIVAC Kermit so that this problem will not occur, but in the meantime, it would be a good idea not to write new BASIC programs with lines exceeding 132 characters if you plan to transfer them to and from the UNIVAC. If this is not possible, or if you have old programs with many long lines that you need to transfer, contact SERDAC; we have developed several interim Applesoft BASIC utility programs to detect and fix "split" lines. Another thing that you should be aware of when transferring Applesoft BASIC text files to the UNIVAC is that the usual call to the UNIVAC Text Editor (@ED file-or-elt-name) WILL NOT let you look at columns 81-132 (132 characters is the maximum length you can look at). If you have uploaded an Applesoft BASIC text file, with lines 81-132 characters long, and you would like to look at or edit it, MAKE SURE to use the "D" option on the Text Editor call (i.e. @ED,D file-or-elt-name)! A2.12 Converting text file to Applesoft BASIC program This is very simple. Merely EXEC your file and SAVE it. If a file contains BASIC line numbers and statements, EXEC-ing that file causes the text to be read into memory and stored as a BASIC program, as if you had typed it directly into the system itself. You must then SAVE the program with an appropriate name. To change the text file PRIMES2 back to a BASIC program file and store it on disk as PRIMESl:. <u]>uEXEC PRIMES2 (cr) <u]>u (a series of right brackets will appear) <u]>uSAVE PRIMESl (cr) A2.13 Converting Apple binary file to/from text file Although the host will not be able to interpret the contents of a micro binary file under ordinary circumstances, it may be handy to store one on the host disk for future transfer back to an appropriate micro. Unfortunately, as with Applesoft files, there is no direct way to do such a transfer with Kermit-][. The Apple binary file must first be translated into a <uhex-text>u file before it may be transferred to the host. The hex-text file must be easily convertible back to binary when it is transferred back to an appropriate micro. This process is relatively straightforward. For the specific purpose of converting Apple II hi-res pictures in memory locations $2000-$3FFF or $4000-$5FFF (or binary files containing those memory ranges), we have included a complete picture un/packer and binary <--> text A2-13 picture file converter on the Kermit-][ distribution disk-- Applesoft programs P/U-GO and P/U, which call Apple binary files PACK/UNPACK, BIN2TXT, and TXT2BIN. If you would like to un/convert other memory ranges (or binary files containing known memory ranges), we have included several Applesoft BASIC and 6502 assembler utility programs on the Kermit-][ distribution disk. Programs BITXT (executed via EXEC EBITXT) and B-T will convert a binary file or memory range to a transferable hex-text file. Programs TXBIN (executed via EXEC ETXBIN) and T-B will unconvert a hex-text file back to binary. Those programs should only be used for memory ranges between $300 and $89FF. A2.14 Kermit-][ transfer error messages As explained in Section 3.7, there are a number of conditions which can interrupt or abort a Kermit transfer. Specific Kermit-][ error messages and associated remedial actions are reviewed below: Micro-to-host transfer While you are SENDing a file to the host (uploading), you may see the following Kermit-][ transfer error messages: <uFILE NOT ON DISK>u The file you specified to SEND is not on the default drive's disk. The file transfer from the Apple cannot be begun. Check to make sure where the desired file is, and type the correct SEND command when you see the <uKERMIT-][>>u prompt. <uI/O ERROR. TRANSFER ABORTED.>u An error was encountered while trying to read the file that you specified to SEND. The transfer is aborted at the point of error. The received file or element on the host will be incomplete. Make sure that the default drive is ready. Take out the disk and reinsert it; flip the drive door open and closed several times. Then, retype the SEND command when you see the <uKERMIT-][>>u prompt. If the error reoccurs, you will have to "repair" the file or submit another copy of it on a different disk. <uFILE NOT A TEXT FILE. TRANSFER ABORTED>u The file you specified to SEND is on the default disk, but it is <unot>u a text file. The file transfer cannot be initiated. Check to see if you have the right disk in the default drive and have spelled the text file name correctly in the SEND command. Wait for the <uKERMIT-][>>u prompt and type in the correct SEND command. A2-14 <uTRANSFER ABORTED DUE TO TIMEOUT>u The host is taking too long to acknowledge data packets sent from Kermit-][. The received file or element on the host will be incomplete. ReSET the Kermit-][ TIMEOUT parameter to a higher value (say 5 or 10 higher than the current value) and restart the transfer on both host and micro. <uTRANSFER ABORTED DUE TO COMMUNICATION LINE PROBLEM>u <uTRY DISCONNECTING AND REDIALING>u The micro <--> host physical connection is excessively noisy. The electrical interference is causing packets to be lost or distorted on the way to and from the host. Whenever the noise level exceeds tolerance, the transfer is automatically aborted. The received file or element on the host will be incomplete. You may know a way to eliminate the noise and proceed with your Kermit session by restarting the transfer on both the host and the micro. If you cannot eliminate the noise, re-establish your physical connection (i.e. hang up, reinitialize Kermit (see Section A2.5), reCONNECT, and redial (if applicable)), log-on, and restart the transfer on both host and micro. <uTRANSFER ABORTED BY USER>u You have chosen to manually abort the transfer by typing the Kermit-][ escape character several times. Any received file or element on the host will be incomplete. When you see the <uKERMIT-][>>u prompt, you may type in any legal command. If desired, you may reSEND the same file or SEND another by typing the appropriate SEND command when you see the <uKERMIT-][>>u prompt. <uUNRECOGNIZED STATUS CODE>u When you see this message without any accompanying explanation, there may have been a problem in exchange of Kermit initialization or control packets (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the target host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the SEND is illegal to the UNIVAC). The transfer is aborted, often before data is really sent. Check the status of the target host file or element. Make sure that the name used in the SEND is "translatable" to a legal UNIVAC name. If the name is in doubt, and you don't want to specify a legal target name in the host Kermit call, you may have to RENAME the Apple file before attempting to SEND it again. Alternatively. there may have been a line noise problem during data transfer which scrambled some of the critical packet information (such as sequence number or packet type) so that the A2-15 computers got confused in verifying whether packets were properly sent/received. In either of the cases just mentioned, the transfer should be restarted on both the host and the micro. Host-to-micro transfer While you are RECEIVEing a file from the host (downloading), you may see the following Kermit-][ transfer error messages: <uDISK IS WRITE PROTECTED. TRANSFER ABORTED.>u (preceded by error # and line #) The Apple disk in the default drive is write protected, and no received data can be written onto it. Insert another disk, or remove the write protection strip. Restart the transfer on both the host and the micro. <uI/O ERROR. TRANSFER ABORTED.>u (preceded by error # and line #) An error was encountered while trying to write the received file to the Apple disk. The received micro file will be incomplete. Make sure that the default disk drive is ready. Take out the disk and reinsert it; flip the drive door open and closed several times. Restart the transfer on both the host and the micro. If the error persists, use another Apple II disk. <uDISK FULL, PREMATURE END OF TRANSFER.>u (preceded by error # and line #) While trying to write the received data to the Apple disk, the disk was filled up. The received micro file will be incomplete. Delete some files from the disk or insert another. Restart the transfer on both the host and the micro. <uFILE TYPE MISMATCH. TRANSFER ABORTED.>u Kermit-][ is attempting to append a text file to an existing Apple II file which is <unot>u a text file. Check to see if the file or element name you specified to be sent by the host already exists on the micro disk. If it does, and the file is not a text file, delete it, rename it, or copy the host file or element to one with a different name before reSENDing it. Restart the transfer on both the host and the micro. <uTRANSFER ABORTED DUE TO TIMEOUT>u The host is taking too long to acknowledge ACK/NAK packets sent from Kermit-][. The received file on the micro will be incomplete. Reset the Kermit-][ TIMEOUT parameter to a higher value (say 5 or 10 higher than the current value) and restart the transfer on both host and micro. A2-16 <uTRANSFER ABORTED DUE TO COMMUNICATION LINE PROBLEM.>u <uTRY DISCONNECTING AND REDIALING>u The micro <--> host physical connection is excessively noisy. The electrical interference is causing packets to be lost or distorted on the way to and from the host. Whenever the noise level exceeds tolerance, the transfer is automatically aborted. The received file on the micro will be incomplete. You may know a way to eliminate the noise and proceed with your Kermit session by restarting the transfer on both the host and the micro. If you cannot eliminate the noise, re-establish your physical connection (i.e. hang up, reinitialize Kermit (see Section A2.5), reCONNECT, and redial (if applicable)), log-on, and restart the transfer on both host and micro. <uREC BUFFER OVERFLOW. TRANSFER ABORTED.>u There are two conditions that can cause this error message. XFirst, Kermit-][ cannot accept logical lines greater than 256 characters in length. If the file that you are trying to transfer to the Apple has such lines, you must figure out some way of shortening them before you can use Kermit-][ to transfer them. Second, the Kermit protocol provides for <urepeat character>u <uprocessing,>u whereby a sending Kermit can condense any string of repeated characters (whose length is greater than four and less than 94) to only three coded characters in a Kermit packet. The coded string is decoded by the receiving Kermit back to the original string. Thus, data with repeated characters may be transferred very efficiently by Kermit. Kermit-][ allows for repeat character processing when you are RECEIVEing data from a host. Unfortunately, because of design deficiencies in the code we received from the University of Wisconsin, this ability is not always adequate. If you are RECEIVEing data with numerous long strings of repeated characters in close proximity to each other within the file, Kermit-][ repeat character processing may fail. If it does, you will receive the <uREC BUFFER OVERFLOW>u message. If you know that your data has long strings of repeated characters, get the <uKERMIT-][>>u prompt and SET REPEAT-PROC OFF. Then, restart the transfer on both the host and the micro. If you aborted due to too many repeat characters, turning off repeat processing should always correct the problem. <uTRANSFER ABORTED BY USER>u You have chosen to manually abort the transfer by typing the Kermit-][ escape character several times. Any received file on the micro will be incomplete. When you see the prompt, you may CONNECT back to the host to restart the transfer, or you may type any other legal command. A2-17 <uUNEXPECTED PACKET TYPE. TRANSFER ABORTED>u, There has been a problem in micro <--> host exchange of Kermit-][ initialization packets, or there has been some problem on the host which has interrupted the normal flow of data packets. (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the host SEND is illegal to the UNIVAC). Any received file on the micro will be incomplete. Restart the transfer on both the host and the micro. <uUNRECOGNIZED STATUS CODE>u When you see this message without any accompanying explanation, there may have been a problem in exchange of Kermit initialization or control packets (Kermit-][ may have an incompatibility with the host Kermit-][), or in getting access to the host disk file or element (e.g., the desired UNIVAC file is not assigned to your run or is rolled out, or the filename you specified in the host SEND is illegal to the UNIVAC). The transfer is aborted, often before data is really sent. Check the status of the host file or element you wanted to SEND. Alternatively, there may have been a line noise problem, during data transfer, which scrambled some of the critical packet information (such as sequence number or packet type) so that the computers got confused in verifying whether packets were properly sent/received. In either of the cases just mentioned, the transfer should be restarted on both the host and the micro. A2.15 Adding to or changing Kermit-][ code We encourage users to add code for presently unsupported Apple II serial or internal modem cards, or to improve on the existing code. The code modules you may need to access are described in the next section. As you can see by listing it, the Applesoft KERMSHELL code contains a large gap between statement numbers 3850 and 6170. This is where you would normally insert BASIC statements to drive a particular serial or modem card. The following information is needed for each additional card. If assigned to the proper variables as described below, the subroutine at statement 6250 will poke this information into KERMITA (KERM = 2065 decimal): Variable Poke to: Function STREG% KERM-l2 Status register address (least significant byte) TRREG% KERM-13 Transmit register address (lsb) RCREG% KERM-l4 Receive register address (lsb) TBIT% KERM-l5 Transmit bit mask RBIT% KERM-l6 Receive bit mask A2-18 Do pokes for parity, local echo, and baud using the variables PARITY$, LOC$, and BAUD. CALL KERM + 17,A$ sends a variable such as A$ out the serial port. Autodialing may be done in this manner. CALL KERM + 20 initializes the communications interface card and re-establishes previously set video parameters. Call this entry point before a call to KERM + 17, and before trying to autodial the Hayes Micromodem II. CALL KERM + 3 sends keyboard typeins out the serial port (checking for the escape character) and displays serial port input on the Apple screen. CALL KERM + 6 fast reads a line of text from the Apple disk file you are SENDing from. CALL KERM + 0 sends out a packet from the Apple and returns the status code of the packet sent back by the host. CALL KERM + 23 re-establishes previously poked video parameters. Call this entry point after any PR#0 statements. If you do successfully make changes, corrections, or additions to Kermit-][ or its documentation, or you have suggestions for same, please contact Robert Holley at SERDAC, (305)-554-2700 (SUNCOM 441-2700) or at @MAIL Mailstop BOB=HOLLEY. We would like to know about your work! A2.16 Files on your Kermit-][ distribution disk The following files should be on your Apple Kermit-][ distribution disk. The stars indicate locked files: * HELLO - Applesoft BASIC boot file for Kermit-][; invokes GOKERM. * GOKERM - Apple II EXEC file to relocate and RUN KERMIT. * GOKERMIL - Apple II EXEC file to relocate and RUN KERMIT, including an illustrated introduction. RUNs program FROGPROG to provide this introduction. * FROGPROG - Applesoft BASIC program to provide an illustrated introduction to Kermit-][. * FROGPIX - Apple II binary hi-res picture file loaded by program FROGPROG. A2-19 KERMIT - Applesoft BASIC part of Kermit-][. This includes the user interface to Kermit-][, and acts as a driver for KERMITA. The KERMIT file you originally receive on the distribution disk is set up to run with the Hayes Micromodem II and with the above defined defaults. If you have a different serial or modem card, you will need to DELETE the original KERMIT file and recreate it as described in the next section. * KERMITA - This is an Apple II binary file loaded by KERMIT. It contains the 6502 machine code that creates and decodes Kermit protocol packets, handles character I/O, sends ACK/NAK packets to the host, implements the video, scroll, and debug features, etc. * KERMITA.S - This is an Apple II text file containing the source 6502 assembler statements for KERMITA, as written for the Apple II Applesoft Tool Kit Assembler. * SET40 - This is an Apple II binary file that contains the special hi-res 40 column graphics character set used by Kermit-][. KERMIT/SETSAVE This is an Apple II text file that contains your saved SET parameters. It is used to initialize Kermit-][ each time it is RUN or each time you do a SET SAVE. * KERMSHELL - This is an Applesoft BASIC file containing all the statements you need to create an appropriate KERMIT program, except for those statements which are needed for a particular serial or modem card. * MIC.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Hayes Micromodem II. * SUP.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Apple Super Serial Card. A2-20 * CCS.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the California Computer Systems 7710-D Serial Card. * COM.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Apple Communications Serial Card. * NOV.T - This is an Apple II EXEC file containing the Applesoft BASIC statements needed for the KERMIT program to control the Novation Apple Cat internal modem (both the 300 baud card and the 1200 baud card, if applicable). * B2T - This is an Apple II EXEC file used to convert Applesoft BASIC files to Kermit-][ transferable text files (see Section A2.11). * EBITXT - Apple II EXEC file used to relocate and RUN Applesoft BASIC program BITXT. * BITXT - Applesoft BASIC program which can be used to convert an Apple binary file or memory range to a transferable hex-text file. * ETXBIN - Apple II EXEC file used to relocate and RUN Applesoft BASIC program TXBIN. * TXBIN - Applesoft BASIC program which can be used to unconvert a hex-text file (originally produced by program BITXT) back to a binary file or memory range. * B-T - This is an Apple II binary file loaded by program BITXT. It contains the 6502 machine code which is needed to convert binary to hex-text. * T-B - This is an Apple II binary file loaded by program TXBIN. It contains the 6502 machine code which is needed to unconvert hex-text back to binary. A2-21 * TEXTTOPRINT - This is a useful Applesoft BASIC utility program you may use to print out the contents of a text file or to scroll them to your screen. * P/U-GO - This is an Applesoft BASIC program which introduces and documents the P/U program described below. When the intro is complete, it automatically RUNs P/U. * P/U - This is an Applesoft BASIC program which may be used to compact Apple II binary "picture files" or hi-res screen memory banks and to convert them to Kermit-][ transferable text files. * PACK/UNPACK - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to pack/unpack Apple II hi-res pictures into a compressed binary form. * BIN2TXT - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to convert an Apple II binary file to a hex-text file. * TXT2BIN - This is an Apple II binary file loaded by P/U. It contains the 6502 machine code which is used to convert an Apple II hex-text file back to a binary file. A2.17 Configuring a Kermit-][ working disk Many of the files on your Kermit-][ distribution disk will not be needed for your normal work. We suggest that you make one backup copy of the original distribution disk, and then make a working copy with only the files you really need. That way you will have some extra space with which to store text files to be sent/received. At the minimum, you will need HELLO, GOKERM, an appropriate KERMIT program file for your equipment (see below), an appropriate KERMIT/SETSAVE file, and KERMITA. B2T and TEXTTOPRINT may be very useful and only take up a few tracks. To minimize the size of the Applesoft KERMIT program, it is configured for only <uone>u specific serial/modem card. The distribution disk contains a KERMIT program configured to drive the Hayes Micromodem II internal modem. If you are using a Novation Apple Cat internal modem or one of the supported serial cards, you <uwill>u <unot>u be able to use the furnished KERMIT program. You will need to follow the procedure outlined below to A2-22 configure a new KERMIT program: 1) Boot your system with your System Master disk. Remove it and insert the copy of the distribution disk. 2) <u]>uDELETE KERMIT (cr) 3) <u]>uLOAD KERMSHELL (cr) 4) <u]>uEXEC name.T (cr) 5) <u]>uLIST (cr) (if desired) 6) <u]>uSAVE KERMIT (cr) where "name" in step 4 is either NOV, CCS, COM, or SUP as determined by the equipment you plan to use. EXEC MIC.T (cr) if you need to recreate the KERMIT originally on the distribution disk. Then: 7) BRUN the System Master FID program to copy from the Kermit-][ distribution disk to your working disk, the KERMIT file you just created, HELLO (replace the HELLO on the initialized working disk), GOKERM, KERMITA, and KERMIT/SETSAVE. Also copy to the working disk any of the other files you think would be useful in your ordinary work. 8) Place the working disk in the default drive, and run Kermit-][ by typing in EXEC GOKERM (cr). SET all the parameters you need for your serial/modem card, and the host you plan to contact. Then, do a SET SAVE (cr) to save those default parameters on the working disk. You needn't change anything else on your working disk again, unless you plan to SET SAVE parameters for a different host or an alternative phone number or communications parameter like baud rate. If you want to change serial/modem cards, you will need to reconfigure the Applesoft KERMIT program file as outlined above in Steps 1-6. You will also need to run the new KERMIT-][ and SET SAVE appropriate parameters. A2.18 Modifying the KERMITA program Since page 1 of Apple II hi-res memory is utilized by Kermit-][, and the Applesoft KERMIT program is loaded over page 2 of the hi-res memory and above, there is really not much room left to expand the KERMITA code, but you may want to make small A2-23 changes. Follow the procedure outlined below:. 1) Delete the existing KERMITA file and make sure that binary file SET40 and text file KERMITA.S are available on the disk. 2) Modify KERMITA.S as required, and reassemble using the Applesoft Tool Kit or some similar 6502 assembler. Note the hex code address of the label SET40. Store the object code back into a disk file named KERMITA. 3) BLOAD KERMITA 4) BLOAD SET40,A$xxxx where xxxx is the hex code address saved in Step 1. 5) BSAVE KERMITA,A$801,L$1800 A2.19 Recent Improvements to SERDAC Kermit-][ Appendix A-2 of this manual has been revised to document the 7/85 version of SERDAC Kermit-][ and the associated programs distributed on the 7/85 Kermit-][ distribution disk. Changes to the documentation since the 5/85 Kermit-][ distribution have been noted by vertical lines in the page margins. Specifically, the 7/85 Kermit-][ contains the following corrections/improvements:. (1) Kermit-][ problems with SENDing files with logical line lengths of 128-256 characters have been corrected. Note that, for the present, caution must be exercised when transferring files with logical line lengths greater than 132 characters to/from the UNIVAC (see Section A2.11). (2) Kermit-][ problems with RECEIVEing files with long strings of repeated characters have been corrected. An option (SET REPEAT-PROC OFF) has been provided to disable repeat character processing if it is inadequate to handle specific data transfers. (3) It is now possible to SET SAVE a phone number with an embedded comma pause character. (4) A diagnostic message has been provided to warn you if you are trying to RECEIVE logical lines longer than 256 characters. (5) Screen instructions for auto-dialing when using an external modem and the Apple Communications Card have been corrected. (6) Statements 5449-50 in the Applesoft KERMIT program (see EXEC text file COM.T) have been removed. The Apple A2-24 Communications Card, as originally sold, can only be used with Kermit-][ at 300 baud. If the card has been modified for use at 1200/300 baud, it can only be used with Kermit-][ at 1200 baud. (7) Several redundancies and inconsistencies in Kermit-][ error messages have been eliminated. (8) Diagnostic messages have been added to flag erroneous or unexecutable Kermit-][ DOS commands. (9) Bells have been added to attract your attention to the normal (or abnormal) end of a file transfer, where you might not be watching your screen. (10) You can now toggle the default disk drive with a SET DRIVE command. (11) There is a new screen format for the SHOW/STATUS display. (12) It is now possible to toggle the default drive by appending the drive number to the RECEIVE command (e.g., RECEIVE,D2). (13) It is now possible to specify the Kermit EOL parameter (SET EOL) for transfers with a host machine which does not use the standard carriage return for EOL. (14) There is now an option to invoke Kermit-][ with an illustrated introduction. This requires the presence of files GOKERMIL, FROGPROG, and FROGPIX on the working disk. Associated programs on the 7/85 Kermit-][ distribution disk contain the following corrections/improvements: (1) There are four new programs (BITXT, B-T, TXBIN, T-B) and two new EXEC files (EBITXT and ETXBIN) which will allow you to convert Apple II binary files (or memory ranges), to transferable hex-text files and to unconvert such hex-text files back to binary. (2) A small error has been corrected in the P/U picture utility program. If you happen to answer the "PACK/UNPACK PIX FROM SCREEN 1 OR 2?" question with a non-numeric answer, the question will be repeated. A2-25 //go.sysin dd * if [ `wc -c < manual.txt` != 63514 ]; then made=FALSE echo error transmitting manual.txt -- echo length should be 63514, not `wc -c < manual.txt` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 manual.txt echo -n ' '; ls -ld manual.txt fi ------------ ereh tuc ------------ -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"
zben@umd5 (Ben Cranston) (10/19/86)
This is a mimimal subset of the stuff to get it working. The rest of the stuff mentioned in the documentation will follow tomorrow night. Best of luck and happy Kermiting. ------------ cut here ------------ : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=FALSE if [ x$1 = x-a ]; then all=TRUE fi echo Extracting README sed 's/^X//' <<'//go.sysin dd *' >README The KERMIT Basic program is hypervariable for the different serial cards. The invariant portion is in A-KERMSHELL and the variant portions are in files named MIC.T, SUP.T, CCS.T, COM.T, and NOV.T in text form. They are EXECed in when the program is built. Therefore do NOT waste your time getting A-KERMIT down unless you have a MicroModem card (the default). You need to get these files down to the Apple. Whatever scheme you can think of: Xmodem, ASCII capture with careful proofreading (:-), or even manual data entry [:-(]. A-KERMSHELL BASIC shell for Kermit program A-TXBIN Text to binary translator XX-KERMITA-T Hex for KERMITA machine code GOKERM EXEC to start up Kermit ETXBIN EXEC to start up Text to binary translator KERMIT-SETSAVE Set/Show parameter save file [CARD].T Additional BASIC for one of the supported serial cards. If you don't have an assembler you can manually enter the T-B routine through the [call -151] monitor - it is only 49 bytes long. The A-x files are Basic programs packaged in EXEC files. When you EXEC one of them, the BASIC program is materialized onto the disk and locked. Do this for A-KERMSHELL and A-TXBIN. The shell KERMSHELL plus the additional BASIC in one of the card-specific files results in the actual KERMIT program. When I tested this version I typed: ]LOAD KERMSHELL ]EXEC SUP.T ]SAVE KERMIT ]LOCK KERMIT This completes the BASIC part of Kermit, but we still need the machine code portion (KERMITA). Even if one reassembles from KERMITA.S one would still need to link in the SET40 character set (for which there is no source), so in any case we need to get the Text to Binary program operational. There are two ways to make the T-B routine. One way is to reassemble from the source T-B.S which I reverse-engineered from the original binary file. The other way is to enter it manually, from the hex listing in the left column of file DIS-T-B in this directory. To do this: ]CALL -151 *95C7: A2 01 20 0C FD C9 8D F0 F9 *95D0: C9 8A F0 F5 C9 BA 10 1A *95D8: 38 E9 B0 E0 00 F0 0B 0A *95E0: 0A 0A 0A 8D C5 95 CA 4C *95E8: C9 95 18 6D C5 95 8D C6 *95F0: 95 60 38 E9 07 4C D8 95 *<ctl-D>BSAVE T-B,A$95C7,L49 Needless to say the <ctl-D> symbol means to hold the CTRL key down and type the D key (we are calling a DOS command from inside the monitor). Next, EXEC the ETXBIN script. If all goes well it will ask you for the name of the hex-text file to convert. We will be unpacking the XX-KERMITA-T file, so answer the question with X-KERMITA without the trailing -T suffix. When it finishes translation it will ask to store memory to a binary file. Say YES. It will ask for the binary file name. Give it KERMITA for the binary file name. Now, there is only one thing left to do before trying it out. Rename the file KERMIT-SETSAVE into KERMIT/SETSAVE (because Unix didn't let me put the slash in its name). ]RENAME KERMIT-SETSAVE,KERMIT/SETSAVE Your disk should look something like this: A 002 HELLO T 095 A-KERMSHELL T 012 A-TXBIN T 050 X-KERMITA-T T 002 GOKERM T 002 ETXBIN T 002 KERMIT/SETSAVE T 009 SUP.T *A 066 KERMSHELL *A 009 TXBIN *A 071 KERMIT B 002 T-B B 026 KERMITA To call in the Kermit, type: ]EXEC GOKERM and if everything went well you should be in the Kermit program. The first thing to do is set up the parameters. The default parameter file KERMIT/SETSAVE will in general have the wrong serial card name, the wrong slot, the wrong baud rate, and the wrong parity. In addition it will have local echoing turned on. Use the Kermit SET command to change the parameters to reasonable ones. For communications with Unix systems I strongly recommend PARITY NONE, as this is the usual default. Use the SHOW command to make sure everything is correct. Then use the SET SAVE command to cause the KERMIT/SETSAVE file to be rewritten. That's about it - refer to the included documentation for more details and for a description of the other files of the distribution. The converse of the hex to binary program we used above is the binary to hex program which consists of EBITXT, BITXT, and the B-T machine language file. Like T-B we didn't get the source, so I reverse engineered it. You can assemble it yourself or type it in manually much as described above. The disassembled files for B-T and T-B are in files DIS-B-T and DIS-T-B in this distribution. I also added my own disassembler (in file A-DIS) because it is so handy. To get it to disassemble B-T and T-B I found I had to move the Basic program area before loading it, in this fashion: ]HIMEM: 38340 ]POKE 104,138 ]POKE 138*256,0 ]LOAD DIS ]BLOAD T-B ]RUN XFIRST: 95C7 LAST: 95F7 XFILE: DIS-T-B The HIMEM and the POKEs came from the EBITXT and ETXBIN scripts and I really can't tell you exactly what they do. They just seem to work. Ask a real Apple guru sometime... -zben 9/8/86 p.s. here is a list of the name-translations done: ON ORIGINAL THIS APPLE DISK DISTRIBUTION ----------- ------------ *A HELLO A-HELLO *T GOKERM GOKERM *T GOKERMIL GOKERMIL *A FROGPROG A-FROGPROG *B FROGPIX X-FROGPIX-T *A KERMIT A-KERMIT *B KERMITA X-KERMITA-T *T KERMITA.S KERMITA.S *B SET40 X-SET40-T T KERMIT/SETSAVE KERMIT-SETSAVE *A KERMSHELL A-KERMSHELL *T MIC.T MIC.T *T SUP.T SUP.T *T CCS.T CCS.T *T COM.T COM.T *T NOV.T NOV.T *T B2T B2T *T EBITXT EBITXT *A BITXT A-BITXT *T ETXBIN ETXBIN *A TXBIN A-TXBIN *B B-T B-T.S and DIS-B-T *B T-B T-B.S and DIS-T-B *A TEXTTOPRINT A-TEXTTOPRINT *A P/U-GO A-P-U-GO *A P/U A-P-U *B PACK/UNPACK X-PACK-UNPACK-T *B BIN2TXT X-BIN2TXT-T *B TXT2BIN X-TXT2BIN-T *** END OF README *** //go.sysin dd * if [ `wc -c < README` != 6635 ]; then made=FALSE echo error transmitting README -- echo length should be 6635, not `wc -c < README` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 README echo -n ' '; ls -ld README fi echo Extracting a-kermshell sed 's/^X//' <<'//go.sysin dd *' >a-kermshell NEW 10 REM 30 REM BASIC CODE BY R.LICHY- LAST MOD 4/85 32 REM ASM CODE BY T.WHITTAKER-LAST MOD 12/84 35 REM MODIFIED FOR SERDAC BY R. HOLLEY 7/85 37 REM KERMSHELL 8.3 50 REM 90 POKE 33,40 110 KERM = 2065 120 POKE KE + 30,0 150 D$ = CHR$ (13) + CHR$ (4):Q$ = CHR$ (17):FF$ = CHR$ (6):H$ = CHR$ (8) 151 CO$ = "COMMUNICATION LINE PROBLEMS. TRY" 152 DI$ = "DISCONNECTING AND REDIALING." 153 AC$ = "AMBIGUOUS SET COMMAND " 154 AS$ = "********************" 155 BL$ = CHR$ (7) + CHR$ (7) 156 TC$ = "TRANSFER COMPLETED" 160 USE$ = "USE ESC CHAR TO RETURN TO APPLE KERMIT" 161 NSUP$ = "PARITY NOT SUPPORTED ON CARD" 162 OO$ = "MUST BE SET ON OR OFF" 164 AB$ = "TRANSFER ABORTED " 166 BS$ = BL$ + BL$ + BL$ + BL$ + BL$ 168 UR$ = "UNRECOGNIZED STATUS CODE" 170 FIRST = 1 190 PHNUM$ = "31108" 210 TIMEO = 10 230 PD = 0:EOL = 13 250 FW$ = "ON":MARK = 1 270 NPAD = 0:MB = 94 275 QUOTE$ = "#":CK$ = "1":B8$ = "&" 276 REM SEE STMTS 6625, 7694-7, AND 9390-9398 FOR SETTINGS OF RPT$ 280 PRINT D$"PR#0": TEXT 290 HOME : VTAB (10): HTAB (12): PRINT "KERMIT-]"; CHR$ (91);" VERS 2.8" 310 PRINT : PRINT TAB( 15)" APRIL 1985" 330 VTAB (15): PRINT TAB( 3)" UNIVERSITY OF WISCONSIN - MADISON" 350 VTAB (16): PRINT TAB( 9)"PUBLIC DOMAIN SOFTWARE" 359 PRINT : PRINT : PRINT 360 PRINT : PRINT " MODIFIED FOR SERDAC USE -- 7/85" 370 PRINT D$"BLOAD KERMITA 390 PRINT D$"OPEN KERMIT/SETSAVE": PRINT D$"READKERMIT/SETSAVE" 410 INPUT BAUD: INPUT LECHO$: INPUT PRITY$: INPUT SLOT: INPUT CARD$: INPUT MARK: INPUT TIMEO: INPUT FW$: INPUT DEBUG$: INPUT DRIVE: INPUT PHNUM$: INPUT SC$: INPUT VI$: INPUT ES: INPUT EOL: INPUT RT$ 430 PRINT D$"CLOSEKERMIT/SETSAVE" 435 P3$ = ",":P2$ = "%": GOSUB 9600 437 PH$ = P1$ 450 IF LECHO$ = "ON" THEN POKE KERM + 11,255 470 HOME 489 VL$ = VI$: GOTO 3332: REM SET VIDEO 490 ONERR GOTO 510 510 PRINT : PRINT "KERMIT-]"; CHR$ (91);">"; 512 RESP$ = "":CH$ = "" 513 GET CHAR$ 514 IF CHAR$ = CHR$ (8) AND LEN (RE$) = 0 THEN 513 515 PRINT CH$; 516 IF LEN (RE$) = 1 AND CH$ = CHR$ (8) THEN RE$ = "": GOTO 513 518 IF CHAR$ = CHR$ (8) THEN RE$ = LEFT$ (RE$, LEN (RE$) - 1): GOTO 513 520 IF CH$ < > CHR$ (13) THEN RE$ = RE$ + CHAR$: GOTO 513 530 REM 550 REM **********COMMAND PARSER****** 570 REM 590 WNUM = 1:CMD$ = "":PARM$ = "":VLUE$ = "" 610 IF RESP$ = "" THEN 490 620 PRINT 730 FOR I = 1 TO LEN (RESP$) 770 CHAR$ = MID$ (RESP$,I,1) 790 IF CHAR$ = " " AND PCHAR$ = " " THEN 950 800 IF CH$ = " " AND WNUM = 3 THEN 910 810 IF CHAR$ = " " THEN WNUM = WNUM + 1: GOTO 930 830 IF CHAR$ = "?" AND I = 1 THEN 1210 850 IF CHAR$ = "?" AND PCHAR$ < > " " THEN WNUM = WNUM + 1 870 IF WNUM = 1 THEN CMD$ = CMD$ + CHAR$ 890 IF WNUM = 2 THEN PARM$ = PARM$ + CHAR$ 910 IF WNUM > 2 THEN VLUE$ = VLUE$ + CHAR$ 930 PCHAR$ = CHAR$ 950 NEXT I 970 LSTR = LEN (CMD$):LPARM = LEN (PARM$):LVLUE = LEN (VLUE$) 980 IF LEFT$ (RESP$,1) = CHR$ (4) THEN 1137 982 IF CMD$ = "S" THEN PRINT "AMBIGUOUS COMMAND": PRINT "(SET, SEND, STATUS, OR SHOW)?": GOTO 490 983 IF CMD$ = "SE" THEN PRINT "AMBIGUOUS COMMAND (SET OR SEND)?": GOTO 490 990 IF LEFT$ ("CONNECT",LSTR) = CMD$ THEN 3750 1000 IF LEFT$ ("BREAK", LEN (CMD$)) = CMD$ THEN 3711 1010 IF LEFT$ ("QUIT",LSTR) = CMD$ OR LEFT$ ("EXIT",LSTR) = CMD$ THEN 9430 1030 IF LEFT$ ("RECEIVE",LSTR) = CMD$ THEN 7530 1050 IF LEFT$ ("SHOW",LSTR) = CMD$ AND LSTR > 1 THEN 3410 1060 IF LEFT$ ("STATUS",LSTR) = CMD$ AND LSTR > 1 THEN 3410 1070 IF LEFT$ ("SET",LSTR) = CMD$ AND LSTR > 2 THEN 1510 1090 IF LEFT$ ("SEND",LSTR) = CMD$ AND LSTR > 2 THEN 6510 1110 IF LEFT$ ("HELP",LSTR) = CMD$ OR CMD$ = "?" THEN 1210 1111 IF LSTR < 4 THEN 1130: REM CHECK FOR D2 1112 PA$ = RIGHT$ (CMD$,3) 1114 CMD$ = LEFT$ (CMD$, LEN (CMD$) - 3) 1116 IF LEFT$ ("RECEIVE", LEN (CMD$)) = CMD$ AND (PA$ = ",D1" OR PA$ = ",D2") THEN 7530 1130 PRINT BL$: INPUT "INVALID COMMAND, DO YOU WANT HELP?";ANS$: IF LEFT$ (ANS$,1) < > "Y" THEN 490 1131 GOTO 1210 1132 REM **************** 1134 REM DO DOS COMMAND 1136 REM ***************** 1137 ONERR GOTO 1145 1138 IF LEFT$ (RESP$,1) < > CHR$ (4) THEN ONERR GOTO 490:GOT0730 1140 PRINT RE$ 1144 GOTO 490 1145 X = PEEK (222): IF X = 11 OR X = 16 THEN PRINT : PRINT "SYNTAX ERROR": PRINT BL$: PRINT : GOTO 490 1147 PRINT : PRINT "DOS COMMAND CANNOT BE EXECUTED": PRINT BL$: PRINT : GOTO 490 1150 REM 1170 REM ******** HELP SCREEN ********* 1190 REM 1210 PRINT CHR$ (16): PRINT TAB( 15)"HELP SCREEN" 1230 VTAB 3: PRINT "VALID KERMIT-]"; CHR$ (91);" COMMANDS ARE:" 1240 PRINT : PRINT 1250 PRINT "CONNECT CONNECTS APPLE TO HOST" 1270 PRINT "EXIT / QUIT RETURNS CONTROL TO BASIC" 1290 PRINT "HELP / ? PRINTS THIS SCREEN" 1310 PRINT "SET SETS COMM OPTIONS" 1330 PRINT "SEND SEND APPLE FILE TO HOST" 1350 PRINT "RECEIVE RECEIVES FILE FROM HOST" 1370 PRINT "SHOW / STATUS DISPLAYS COMM PARAMETERS" 1380 PRINT "BREAK TRANSMIT BREAK (SSC ONLY)" 1390 PRINT "<CTRL-D> CMND DO LOCAL DOS COMMAND" 1410 VTAB (24) 1430 GOTO 490 1450 REM 1470 REM ********** SET COMMAND ***** 1490 REM 1510 IF PARM$ < > "?" AND PARM$ < > "" THEN 1850 1530 PRINT CHR$ (16);"POSSIBLE SET COMMANDS ARE:" 1550 PRINT : PRINT "BAUD" 1570 PRINT "LOCAL-ECHO" 1590 PRINT "PARITY" 1610 PRINT "SLOT" 1630 PRINT "CARD" 1650 PRINT "MARK" 1670 PRINT "TIMEOUT" 1690 PRINT "FILE-WARNING" 1710 PRINT "DEBUG" 1720 PRINT "EOL" 1750 PRINT "SAVE" 1770 PRINT "PHONE #" 1780 PRINT "SCROLL" 1785 PRINT "VIDEO" 1786 PRINT "ESCAPE" 1788 PRINT "DRIVE" 1789 PRINT "REPEAT-PROC" 1790 PRINT : PRINT 1810 GOTO 490 1830 REM ---------------- SET BAUD 1850 IF LEFT$ ("BAUD",LPARM) < > PARM$ THEN 1950 1870 IF VLUE$ = "?" OR NOT (VL$ = "300" OR VL$ = "1200" OR VL$ = "2400" OR VL$ = "4800" OR VL$ = "9600") THEN PRINT "BAUD MUST BE: 300,1200,2400,4800 OR 9600": GOTO 490 1890 BAUD = VAL (VLUE$) 1900 FIRST = 1 1910 GOTO 490 1930 REM ---------------- SET LOCAL ECHO 1950 IF NOT ( LEFT$ ("LOCAL-ECHO",LPARM) = PARM$ OR LEFT$ ("ECHO",LPARM) = PARM$) THEN 2110 1960 IF PA$ = "E" THEN PRINT AC$: PRINT "(ECHO, EOL, OR ESCAPE?)": GOTO 490 1970 IF VLUE$ = "?" THEN PRINT "ON OFF": GOTO 490 1990 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 2010 LECHO$ = VLUE$ 2030 IF LECHO$ = "ON" THEN POKE KERM + 11,255 2050 IF LECHO$ = "OFF" THEN POKE KERM + 11,0 2060 FIRST = 1 2070 GOTO 490 2090 REM ---------------- SET PARITY 2110 IF LEFT$ ("PARITY",LPARM) < > PARM$ THEN 2240 2120 IF PA$ = "P" THEN PRINT AC$;"(PHONE OR PARITY?)": GOTO 490 2130 IF VLUE$ = "?" THEN PRINT "ODD EVEN MARK SPACE, OR NONE": GOTO 490 2140 FIRST = 1 2150 IF LEFT$ ("EVEN",LVLUE) = VLUE$ THEN PRITY$ = "EVEN": GOTO 490 2170 IF LEFT$ ("ODD",LVLUE) = VLUE$ THEN PRITY$ = "ODD": GOTO 490 2175 IF LEFT$ ("MARK",LVLUE) = VLUE$ THEN PRITY$ = "MARK": GOTO 490 2177 IF LEFT$ ("SPACE",LVLUE) = VLUE$ THEN PR$ = "SPACE": GOTO 490 2190 IF LEFT$ ("NONE",LVLUE) = VLUE$ THEN PRITY$ = "NONE": GOTO 490 2210 PRINT "INVALID PARITY": GOTO 490 2230 REM ---------------- SET SLOT 2240 IF PA$ = "S" THEN PRINT AC$;"(SLOT OR SAVE?)": GOTO 490 2250 IF LEFT$ ("SLOT",LPARM) < > PARM$ THEN 2355 2270 IF VLUE$ = "?" THEN PRINT "1 2 3 4 5 6 7": GOTO 490 2290 VLUE = VAL (VLUE$) 2310 IF VLUE < 1 OR VLUE > 7 THEN PRINT "INVALID SLOT NUMBER": GOTO 490 2330 SLOT = VLUE 2340 FIRST = 1 2350 GOTO 490 2353 REM ------- DRIVE TOGGLE 2355 IF LEFT$ ("DRIVE",LP) < > PA$ THEN 2390 2356 IF PA$ = "D" THEN PRINT AC$;"(DRIVE OR DEBUG?)": GOTO 490 2357 IF VL$ = "?" OR NOT (VL$ = "1" OR VL$ = "2") THEN PRINT "SWITCH DEFAULT DRIVE TO 1 OR 2": PRINT "(NOT SET SAVED)": GOTO 490 2365 PRINT "DEFAULT DRIVE = ";VL$ 2366 PRINT D$"OPEN A";BS$;",D";VL$: PRINT D$"DELETE A";BS$: GOTO 490 2370 REM ----------------CARD TYPE 2390 IF LEFT$ ("CARD",LPARM) < > PARM$ THEN 2570 2410 IF VLUE$ = "?" THEN PRINT "MICROMODEM": PRINT "SUPER SERIAL": PRINT "COMMUNICATIONS": PRINT "CCS": PRINT "NOVATION": GOTO 490 2420 FIRST = 1 2425 POKE KE + 30,0 2430 IF LEFT$ ("MICROMODEM",LVLUE) = VLUE$ THEN CARD$ = "MICROMODEM": GOTO 490 2450 IF LEFT$ ("SUPER SERIAL",LVLUE) = VLUE$ THEN CARD$ = "SUPER SERIAL": GOTO 490 2470 IF LEFT$ ("CCS",LVLUE) = VLUE$ THEN CARD$ = "CCS": GOTO 490 2500 IF LEFT$ ("COMMUNICATIONS",LV) = VLUE$ THEN CARD$ = "COMMUNICATIONS": GOTO 490 2510 IF LEFT$ ("NOVATION",LVLUE) = VLUE$ THEN CARD$ = "NOVATION": GOTO 490 2530 PRINT "INVALID CARD TYPE": GOTO 490 2550 REM ---------------- MARK 2570 IF LEFT$ ("MARK",LPARM) < > PARM$ THEN 2630 2590 IF VLUE$ = "?" THEN PRINT "ASCII VALUE FOR START OF PACKET": PRINT "(THE DEFAULT IS 1)": GOTO 490 2610 MARK = VAL (VLUE$): GOTO 490 2630 REM --------------- TIMEO 2650 IF LEFT$ ("TIMEOUT",LPARM) < > PARM$ THEN 2790 2670 IF VLUE$ = "?" THEN PRINT "TIMEOUT SHOULD BE A NUMBER FROM": PRINT "0 TO 15. (THE DEFAULT IS 10)": PRINT "IF THE HOST SYSTEM IS SLOW, SET TIMEOUT TO 15": GOTO 490 2690 VLUE = VAL (VLUE$) 2710 IF VLUE < 0 OR VLUE > 60 THEN PRINT "TIMEOUT MUST BE BETWEEN 0 AND 60": GOTO 490 2730 TI = VL: GOTO 490 2750 REM -------------- FILE-WARNING 2770 IF VLUE$ = "?" THEN PRINT "ON OR OFF": PRINT "THIS CHECKS FOR A FILE ALREADY EXISTING": PRINT "ON YOUR DISK WHEN THE APPLE IS RECEIVING A FILE": PRINT "(THE DEFAULT IS 'ON')": GOTO 490 2790 IF LEFT$ ("FILE-WARNING",LPARM) < > PARM$ THEN 2850 2810 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 2830 FW$ = VLUE$: GOTO 490 2850 REM --------------- DEBUG 2870 IF NOT ( LEFT$ ("DEBUG",LPARM) = PARM$ AND LPAR > 1) THEN 2962 2890 IF VLUE$ = "?" THEN PRINT "ON OR OFF": PRINT "THIS IS AN AID IN MODIFYING THE KERMIT": PRINT "PROGRAM ITSELF. IN ALL OTHER CASES": PRINT "DEBUG SHOULD BE OFF": GOTO 490 2900 IF NOT (VL$ = "ON" OR VL$ = "OFF") THEN PRINT OO$: GOTO 490 2910 IF VLUE$ = "ON" THEN POKE KERM + 10,255 2930 IF VLUE$ = "OFF" THEN POKE KERM + 10,0 2950 DEBUG$ = VLUE$ 2952 GOTO 490 2960 REM --------EOL 2962 IF NOT ( LEFT$ ("EOL",LPARM) = PARM$) THEN 2972 2964 IF VL$ = "?" OR NOT ( VAL (VL$) > 1 AND VAL (VL$) < 128) THEN PRINT "EOL IS THE DECIMAL ASCII VALUE FOR THE": PRINT "LINE TERMINATOR OF THE REMOTE KERMIT": PRINT "THE DEFAULT IS 13 (CARRIAGE RETURN)": GOTO 490 2966 EOL = VAL (VL$): GOTO 490 2970 REM ------ REPEAT PROCESSING 2972 IF NOT ( LEFT$ ("REPEAT-PROC",LPARM) = PA$) THEN 3000 2974 IF VL$ = "?" THEN PRINT "ON OR OFF. NORMALLY ON.": PRINT "IF WHILE RECEIVING, YOU SEE MESSAGE": PRINT "'REC BUFFER OVERFLOW,' SET REPEAT-PROC": PRINT "TO 'OFF' AND RESTART TRANSFER.": GOTO 490 2976 IF NOT (VL$ = "ON" OR VL$ = "OFF") THEN PRINT OO$: GOTO 490 2978 RT$ = VL$: GOTO 490 2990 REM ---------SET SAVE 3000 IF NOT ( LEFT$ ("SAVE",LPARM) = PARM$ AND LPARM > 1) THEN 3250 3010 IF VL$ = "?" THEN PRINT "SAVES ALL SET PARAMETERS": GOTO 510 3015 P2$ = ",":P3$ = "%": GOSUB 9600 3017 XX$ = PH$:PH$ = P1$ 3020 PRINT D$"DELETE KERMIT/SETSAVE" 3030 PRINT D$"OPENKERMIT/SETSAVE": PRINT D$"WRITEKERMIT/SETSAVE" 3050 PRINT BAUD: PRINT LECHO$: PRINT PRITY$: PRINT SLOT: PRINT CARD$: PRINT MARK: PRINT TIMEO: PRINT FW$: PRINT DEBUG$: PRINT DRIVE: PRINT PHNUM$: PRINT SC$: PRINT VI$: PRINT ES: PRINT EOL: PRINT RT$ 3070 PRINT D$"CLOSEKERMIT/SETSAVE" 3075 PH$ = XX$ 3090 GOTO 490 3230 REM ---------SET PHONE # 3250 IF NOT ( LEFT$ ("PHONE #",LPARM) = PARM$ AND LPARM > 1) THEN 3312 3270 IF VLUE$ = "?" THEN PRINT "ENTER PHONE # OR MODEM COMMAND PLUS #": PRINT "THIS IS USED FOR AUTODIAL MODEMS ONLY": PRINT "ENTER 'NONE' OTHERWISE": GOTO 490 3280 IF VL$ = "" OR VL$ = " " THEN PH$ = "NONE": GOTO 490 3290 PHNUM$ = VLUE$ 3292 FIRST = 1 3310 GOTO 490 3311 REM ----------SCROLL 3312 IF NOT ( LEFT$ ("SCROLL",LPARM) = PARM$ AND LPARM > 1) THEN 3320 3314 IF VLUE$ = "?" THEN PRINT "ON OR OFF": GOTO 490 3316 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 3318 SCROLL$ = VLUE$: GOTO 490 3319 REM ------------SET VIDEO 3320 IF LEFT$ ("VIDEO",LPARM) < > PARM$ THEN 3352 3321 IF VLUE$ < > "?" THEN 3332 3322 HOME : PRINT "POSSIBLE SET VIDEO VALUES ARE:": PRINT " I,N,A,M,T,W,4,7": PRINT : PRINT "I INVERSE VIDEO" 3323 PRINT "N NORMAL VIDEO" 3324 PRINT : PRINT "A AUTO LINE FEED" 3325 PRINT "M NO AUTO LINE FEED" 3326 PRINT : PRINT "T TRUNCATE RIGHT MARGIN" 3327 PRINT "W WRAP LINE AROUND" 3328 PRINT : PRINT "4 40 COLUMN DISPLAY" 3329 PRINT "7 70 COLUMN DISPLAY" 3330 GOTO 490 3332 FOR I = 1 TO LEN (VLUE$):A$ = MID$ (VLUE$,I,1) 3333 IF A$ = "I" THEN POKE KE + 15,127 3334 IF A$ = "N" THEN POKE KE + 15,0 3335 IF A$ = "T" THEN POKE KE + 14,1 3336 IF A$ = "W" THEN POKE KE + 14,0 3337 IF A$ = "A" THEN POKE KE + 13,1 3338 IF A$ = "M" THEN POKE KE + 13,0 3339 IF A$ = "7" THEN POKE KE + 16,0 3340 IF A$ = "4" THEN POKE KE + 16,255 3345 NEXT I 3346 VI$ = VL$ 3347 CALL KE + 23 3350 GOTO 490 3351 REM ------ ESCAPE 3352 IF LEFT$ ("ESCAPE",LP) < > PA$ THEN 3360 3353 IF VL$ = "?" THEN PRINT "ESCAPE CODE VALUE IS DECIMAL ASCII": PRINT "BETWEEN 1 AND 127, 27 IS THE DEFAULT": GOTO 490 3354 IF VAL (VL$) < 1 OR VAL (VL$) > 127 THEN PRINT "ESC MUST BE BETWEEN 1 AND 127.": PRINT "27 IS DEFAULT": GOTO 490 3355 ES = VAL (VL$):ES$ = VL$:ES = ES + 128 3356 FIRST = 1 3359 GOTO 490 3360 PRINT "INVALID SET COMMAND": GOTO 490 3365 REM 3370 REM *********STATUS/SHOW SCREEN ******************** 3390 REM 3410 PRINT : PRINT CHR$ (16) CHR$ (10);" STATUS OF KERMIT-]"; CHR$ (91): PRINT 3430 PRINT " (USE 'SET SAVE' TO SAVE THIS STATUS)": PRINT 3450 PRINT "BAUD RATE......"BA 3470 PRINT "LOCAL-ECHO....."LE$ 3490 PRINT "PARITY........."PR$ 3510 PRINT "SLOT..........."SL 3530 PRINT "CARD..........."CA$ 3550 PRINT "MARK..........."MA 3570 PRINT "TIMEOUT........"TI 3590 PRINT "FILE-WARNING..."FW$ 3610 PRINT "DEBUG.........."DE$ 3650 PRINT "PHONE #........"PH$ 3655 PRINT "SCROLL........."SC$ 3660 PRINT "VIDEO.........."VI$ 3665 PRINT "ESCAPE........."ES - 128 3666 PRINT "EOL............"EO 3668 PRINT "REPEAT-PROC...."RT$ 3670 PRINT 3690 PRINT : GOTO 490 3710 REM *********SEND A BREAK**** 3711 ZZ$ = "" 3712 IF PA$ < > "?" THEN 3714 3713 PRINT : PRINT "IF YOU HAVE SUPER SERIAL CARD,": PRINT "USE BREAK TO DIS/CONNECT NON-UNIVAC HOST": PRINT :GOT0490 3714 IF LEFT$ (CA$,3) < > "SUP" THEN PRINT : PRINT "WRONG EQUIP FOR THIS COMMAND": PRINT "FOR BREAK, CONNECT--": PRINT "THEN TYPE: CTL-SHIFT-P": PRINT : GOTO 490 3715 IF FIRST THEN CMD$ = "SKIP":ZZ$ = "Y": GOTO 3730 3716 PRINT : INPUT "DISCONNECT HOST (NON-UNIVAC) (Y/N)?";ZZ$ 3717 IF LEFT$ (ZZ$,1) < > "Y" THEN PRINT D$;"PR#";SL: PRINT CHR$ (1);"B": PRINT D$;"PR#0": CALL KE + 23:CMD$ = "":ZZ$ = "": CALL KERM + 3: GOTO 490 3719 GOTO 4390 3730 REM *********** CONNECT ******** 3750 REM 3751 PRINT 3752 IF PARM$ < > "?" THEN 3810 3754 PRINT "CONNECT IS USED EITHER TO INITIALLY" 3755 PRINT "CONNECT TO A HOST OR TO RECONNECT" 3756 PRINT "AFTER PREVIOUSLY LOGGING ON" 3758 GOTO 490 3810 POKE KERM - 9,0: REM RESET PACKET COUNTER 3811 POKE KE - 2,EOL 3820 POKE KE - 11,TI: REM TIMEOUT 3830 IF NOT FIRST THEN CALL KERM + 3: GOTO 490 3840 POKE KE + 31,ES: REM ESCAPE CHAR 3850 FIRST = 0 5730 REM 5750 REM ******* NEW CARDS ***** 5770 REM 5790 REM 6170 PRINT "KERMIT IS NOT CURRENTLY CONFIGURED FOR THIS CARD": GOTO 490 6190 REM 6210 REM SUBROUTINE TO POKE KERM 6230 REM 6250 POKE KERM - 12,STREG%: REM STATUS REGISTER 6270 POKE KERM - 13,TRREG%: REM TRANS REG 6290 POKE KERM - 14,RCREG%: REM RECEIVE REG 6310 POKE KERM - 15,TBIT%: REM TRANSMIT BIT 6330 POKE KERM - 16,RBIT%: REM RECEIVE BIT 6350 RETURN 6370 REM ***********SEND************* 6390 REM 6410 IF PEEK (222) = 6 THEN PRINT "FILE NOT ON DISK";BS$: GOTO 490 6430 IF PEEK (222) = 5 THEN GOTO 6930: REM EOF 6450 IF PEEK (222) = 8 THEN PRINT BS$: PRINT "I/O ERROR, ";AB$: GOTO 6930 6470 IF PEEK (222) = 13 THEN PRINT "FILE NOT A TEXT FILE. ";BS$: GOTO 490 6490 PRINT : PRINT "ERROR #"; PEEK (222);" AT LINE "; PEEK (218) + 256 * PEEK (219): PRINT D$"CLOSE": GOTO 490 6510 ONERR GOTO 6410 6511 IF PA$ = "?" THEN PRINT "SEND A TEXT FILE TO THE HOST": PRINT "EX. SEND LETTER": GOTO 510 6512 IF VL$ < > "" THEN PA$ = PA$ + " " + VL$ 6530 IF PARM$ = "" THEN INPUT "ENTER FILE TO SEND: ";PARM$: GOTO 6530 6531 F$ = PA$ 6532 IF RIGHT$ (PA$,3) = ",D1" OR RIGHT$ (PA$,3) = ",D2" THEN F$ = LEFT$ (PA$, LEN (PA$) - 3) 6570 PRINT D$;"VERIFY";PA$ 6575 GOSUB 9500 6590 PRINT D$;"OPEN ";PA$ 6610 PRINT D$;"READ ";F$ 6620 POKE KERM + 12,0: REM SEND MODE 6625 RPT$ = CHR$ (32): POKE KE - 8,0: REM SET RPT$ FOR SEND 6630 DTA$ = CHR$ (MB + 32) + CHR$ (TIMEO + 32) + CHR$ (NPD + 32) + CHR$ (PD + 64) + CHR$ (EOL + 32) + QUOTE$ + B8$ + CK$ + RPT$ 6650 TYPE$ = "S" 6710 GOSUB 7130 6730 GOSUB 8870: REM SEND INIT HANDLER 6750 TYPE$ = "F":DTA$ = F$ 6770 GOSUB 7130 6790 TYPE$ = "D" 6810 DTA$ = "" 6830 X = FRE (0) 6850 CALL KERM + 6,DTA$: REM ONE LINE 6870 IF SC$ = "ON" THEN PRINT "X";DTA$; 6890 GOSUB 7130 6910 GOTO 6790 6930 TYPE$ = "Z":DTA$ = "": REM EOF 6950 GOSUB 7130 6955 IF PEEK (222) = 8 GOTO 6990 6970 PRINT : PRINT AS$: PRINT "*";: PRINT TC$;: PRINT "*": PRINT AS$: PRINT BS$: PRINT 6990 TYPE$ = "B":DTA$ = "": REM EOT (BREAK) 7010 CALL KERM,TYPE$,DTA$ 7030 PRINT D$;"CLOSE " 7050 GOTO 490 7070 REM -------------------------- 7090 REM SEND PACKET TO KERM 7110 REM HANDLE RETURNED STATUS CODES 7130 CALL KERM,TYPE$,DTA$ 7150 IF TYPE$ = "Y" THEN RETURN 7170 IF TYPE$ = "1" THEN PRINT AB$;"BY USER": POP : GOTO 6990 7190 IF TYPE$ = "2" THEN PRINT BS$: PRINT AB$;"DUE TO TIMEOUT": POP : GOTO 6990 7210 IF TYPE$ = "N" THEN PRINT : PRINT BS$: PRINT AB$;"DUE TO": PRINT CO$: PRINT DI$: POP : GOTO 3070 7230 PRINT UR$: POP : GOTO 6990 7250 REM --------------------------- 7270 REM 7290 REM ********** RECEIVE ******** 7310 REM 7330 IF PEEK (222) = 5 THEN GOTO 8090: REM SHORT FILE IS ON DISK 7350 IF PEEK (222) = 6 THEN GOTO 8250: REM FILE NOT FOUND, OK TO WRITE A NEW ONE 7370 PRINT "ERROR #"; PEEK (222);" AT LINE " PEEK (218) + PEEK (219) * 256 7390 TYPE$ = "E": PRINT D$;"CLOSE ";F$ 7410 CALL KERM,TYPE$,DTA$ 7430 IF PEEK (222) = 4 THEN PRINT "DISK IS WRITE PROTECTED. ";AB$ 7450 IF PEEK (222) = 8 THEN PRINT BS$: PRINT "I/O ERROR. ";AB$ 7470 IF PEEK (222) = 9 THEN PRINT BS$: PRINT "DISK FULL. PREMATURE END OF TRANSFER." 7490 IF PEEK (222) = 13 THEN PRINT "FILE TYPE MISMATCH. ";AB$ 7510 GOTO 490 7530 ONERR GOTO 7330 7535 IF (PA$ < > "" AND PA$ < > "?" AND PA$ < > ",D1" AND PA$ < > ",D2") THEN 1130 7540 IF PA$ = "?" THEN PRINT "RECEIVE A FILE FROM THE HOST": GOTO 510 7550 POKE KER - 11,30 7570 IF SC$ = "ON" THEN PRINT D$;"MON O" 7590 REM 7610 REM - GET REMOTE'S SEND-INIT------- 7630 TYPE$ = "0" 7650 POKE KERM + 12,255: REM SET RECV MODE 7670 GOSUB 8530 7690 IF TYPE$ < > "S" THEN GOSUB 8710 7694 REM DEFINE REPEAT PROCESSING DESIRED 7695 IF RT$ = "ON" THEN RPT$ = CHR$ (126): POKE KE - 8,126: GOTO 7750 7697 RPT$ = CHR$ (32): POKE KE - 8,0 7710 REM 7730 REM -NEXT POKE VALUES FROM REMOTE'S SEND INIT PACKET AND SEND APPLE'S INITIAL CONNECTION PARMS------ 7750 GOSUB 8870: REM SEND INIT HANDLER 7770 TYPE$ = "Y" 7780 DTA$ = CHR$ (MB + 32) + CHR$ (TI + 32) + CHR$ (32) + CHR$ (64) + CHR$ (EOL + 32) + QU$ + B8$ + CK$ + RPT$ 7790 GOSUB 8530 7810 REM 7830 REM --KERM SHOULD COME BACK WITH AN F PACKET--------------- 7850 IF TYPE$ = "S" THEN DTA$ = "":TYPE$ = "0": GOSUB 8530 7870 IF TYPE$ = "S" OR TYPE$ = "Z" THEN DTA$ = "":TYPE$ = "Y": GOSUB 8530: GOTO 7870 7890 IF TYPE$ < > "F" THEN GOSUB 8690 7910 F$ = "": FOR I = 1 TO LEN (DTA$) 7930 CHAR$ = MID$ (DTA$,I,1) 7950 IF CHAR$ = "." AND I = LEN (DTA$) THEN GOTO 8010 7970 F$ = F$ + CHAR$ 7990 NEXT I 8010 IF FW$ = "OFF" THEN GOTO 8250 8030 REM 8050 REM CHECK FOR FILE ALREADY ON DISK 8070 PRINT D$"VERIFY ";F$;PA$: REM WILL ERROR IF NO FILE 8090 PRINT : PRINT : PRINT : PRINT : PRINT BS$: PRINT "FILE '";F$;"' ALREADY EXISTS": PRINT : PRINT : PRINT : PRINT "A)APPEND": PRINT "B)OVERWRITE": PRINT "C)ENTER A NEW NAME": PRINT : PRINT : PRINT 8110 INPUT "ENTER CHOICE: ";ANS$ 8130 IF ANS$ = "A" THEN PRINT D$;"APPEND ";F$: GOSUB 9500: GOTO 8270 8150 IF ANS$ = "C" THEN INPUT "ENTER NEW FILE NAME: ";F$: GOTO 8070 8170 IF ANS$ = "B" THEN PRINT D$;"DELETE ";F$: GOTO 8250 8190 GOTO 8090 8210 REM 8230 REM -------- GET DATA------- 8250 GOSUB 9500 8255 PRINT D$;"OPEN ";F$ 8270 PRINT D$;"WRITE ";F$ 8290 DTA$ = "" 8310 TYPE$ = "Y": GOSUB 8530: REM TELL KERM READY FOR DATA 8330 REM 8350 REM -------GET DATA PACKETS--- 8370 IF NOT (TYPE$ = "D" OR TYPE$ = "Z") THEN GOSUB 8710 8390 IF TYPE$ = "D" THEN PRINT DTA$; 8410 IF TYPE$ = "Z" THEN PRINT D$;"CLOSE ";F$:TYPE$ = "Y":DTA$ = "": GOSUB 8530: GOTO 7870 8430 TYPE$ = "Y":DTA$ = "": GOSUB 8530: REM GET NEXT PACKET 8450 GOTO 8390 8470 REM ------------------------------ 8490 REM SEND PACKET TO KERM, CHECK STATUS CODES 8510 REM 8530 CALL KERM,TYPE$,DTA$ 8550 IF (TYPE$ = "D" OR TYPE$ = "S" OR TYPE$ = "F" OR TYPE$ = "Z") THEN RETURN 8570 PRINT D$;"CLOSE ": PRINT D$;"NOMON O" 8590 PRINT 8610 IF TYPE$ = "N" THEN PRINT : PRINT BS$: PRINT AB$;"DUE TO": PRINT CO$: PRINT DI$: GOTO 8730 8630 IF TYPE$ = "1" THEN PRINT AB$;"BY USER": GOTO 8730 8650 IF TYPE$ = "2" THEN PRINT BS$: PRINT AB$;"DUE TO TIMEOUT.": GOTO 8730 8670 IF TYPE$ = "B" THEN PRINT AS$: PRINT "*";: PRINT TC$;: PRINT "*": PRINT AS$: PRINT BS$:TY$ = "9": GOTO 8750 8675 IF TY$ = "4" THEN PRINT "REC BUFFER OVERFLOW. ";AB$;BS$: PRINT : PRINT "TRY SETTING REPEAT-PROC TO 'OFF'": PRINT "AND RESTART TRANSFER": GOTO 8730 8680 IF TY$ = "E" GOTO 8710 8690 PRINT BS$: PRINT UR$: PRINT "CODE=";TY$: PRINT AB$: GOTO 8730 8710 PRINT : PRINT "UNEXPECTED PACKET TYPE ";TYPE$: PRINT AB$: PRINT BS$ 8730 TYPE$ = "E" 8750 DTA$ = "": REM NOTHING... 8770 CALL KERM,TYPE$,DTA$ 8790 POP : PRINT D$;"NOMON O": GOTO 490 8810 REM ------------------------------ 8830 REM ******* SEND INIT HANDLER *** 8850 REM 8870 LDTA = LEN (DTA$) 8890 IF LDTA = 0 THEN RETURN 8910 TMP$ = LEFT$ (DTA$,1):RMB = ASC (TMP$) - 32 8930 IF RMB < = 96 THEN POKE KERM - 1,RMB 8935 IF RMB < = 96 AND RMB > 5 THEN POKE 2258,RMB - 5: REM TEMP FIX 8950 IF LDTA < 2 THEN RETURN 8970 TMP$ = MID$ (DTA$,2,1):TMOUT = ASC (TMP$) - 32 8990 POKE KERM - 11,TMOUT 9010 IF LDTA < 3 THEN RETURN 9030 TMP$ = MID$ (DTA$,3,1):RNPAD = ASC (TMP$) - 32 9050 IF RNPAD > 0 THEN POKE KERM - 4,RNPAD 9070 IF LDTA < 4 THEN RETURN 9090 TMP$ = MID$ (DTA$,4,1):RPAD = ASC (TMP$) - 64 9110 IF RPAD > 0 THEN POKE KERM - 3,RPAD 9130 IF LDTA < 5 THEN RETURN 9150 TMP$ = MID$ (DTA$,5,1):EOL = ASC (TMP$) - 32 9170 POKE KERM - 2,EOL 9190 IF LDTA < 6 THEN RETURN 9210 RQU$ = MID$ (DTA$,6,1) 9230 IF PEEK (KE + 12) = 255 AND NOT (RQU$ = CHR$ (32)) THEN POKE KE - 6, ASC (RQU$): REM REC ONLY 9250 IF LDTA < 7 THEN RETURN 9270 R8B$ = MID$ (DTA$,7,1) 9290 IF NOT (R8B$ = "N" OR R8B$ = CHR$ (32)) THEN POKE KE - 7, ASC (R8B$) 9292 IF R8B$ = "Y" THEN POKE KE - 7, ASC (B8$): REM B8$ SET IN STMT 275 9350 IF LDTA < 9 THEN RETURN 9370 TMP$ = MID$ (DTA$,9,1):RPT = ASC (TMP$) 9390 IF ( PEEK (KE + 12) = 0 OR RT$ = "OFF") THEN RETURN 9392 IF RPT = 126 THEN RETURN 9395 RPT$ = CHR$ (RPT) 9397 IF RPT = 32 THEN POKE KE - 8,0: REM NO REP CHAR 9398 IF RPT < > 32 THEN POKE KE - 8,RPT 9410 RETURN 9430 TEXT : PRINT D$;"PR#0": POKE 104,8: POKE 8 * 256,0: END 9500 IF SC$ = "OFF" AND DE$ = "OFF" THEN PRINT : PRINT : PRINT "TRANSMISSION IN PROGRESS -- WAIT": PRINT : PRINT 9505 RETURN 9600 REM PHNUM$ COMMA SUBR 9605 P1$ = "" 9610 FOR I = 1 TO LEN (PH$) 9615 XX$ = MID$ (PH$,I,1) 9620 IF XX$ < > P2$ THEN P1$ = P1$ + XX$: GOTO 9630 9625 P1$ = P1$ + P3$ 9630 NEXT I 9640 RETURN SAVE KERMSHELL LOCK KERMSHELL //go.sysin dd * if [ `wc -c < a-kermshell` != 23880 ]; then made=FALSE echo error transmitting a-kermshell -- echo length should be 23880, not `wc -c < a-kermshell` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-kermshell echo -n ' '; ls -ld a-kermshell fi echo Extracting a-txbin sed 's/^X//' <<'//go.sysin dd *' >a-txbin NEW 5 REM PROGRAM TXBIN 10 POKE 33,40 15 INPUT Z$: REM DUMMY READ OF ETXBIN FILE 20 REM PROGRAM TO CONVERT HEX TEXT FILE TO BINARY FILE 25 REM THIS PROGRAM REQUIRES DATA OUTPUT VIA PROGRAM BITXT 27 REM DO NOT RUN THIS PROGRAM DIRECTLY. USE EXEC FILE SUCH AS ETXBIN, WHICH SETS HIMEM AT $95C4 AND LOADS PROGRAM AT $8A00 30 REM DO NOT USE THIS PROGRAM IF BINARY FILE BEGIN ADDRESS < $300 OR > $89FF 35 REM ROBERT M. HOLLEY, JR. - SERDAC - 7/85 40 D$ = CHR$ (13) + CHR$ (4) 43 BL$ = CHR$ (7) 45 TB = 38343 60 PRINT D$"BLOAD T-B,A$95C7 80 HOME 85 PRINT " HEX-TEXT FILE TO BINARY": PRINT 90 PRINT " SERDAC 7/85": PRINT : PRINT 100 PRINT "NAME OF HEX-TEXT FILE": INPUT "DO NOT INCLUDE -T SUFFIX:";F$ 120 IF LEN (F$) < 1 THEN PRINT : GOTO 100 140 PRINT : PRINT 160 HTAB (12): INVERSE : PRINT "TEXT --> BINARY": NORMAL : PRINT : HTAB (4): INVERSE : FLASH : PRINT "TRANSLATION IN PROGRESS -- WAIT": NORMAL 180 ONERR GOTO 2000 185 SOUR = 1 200 PRINT D$"VERIFY ";F$;"-T" 220 PRINT D$"OPEN ";F$;"-T" 240 PRINT D$"READ ";F$;"-T" 260 INPUT XB: INPUT TL 265 SOUR = 2 280 FOR X = 0 TO TL - 1 300 CALL TB 320 POKE XB + X, PEEK (38342) 340 NEXT X 360 PRINT D$"CLOSE ";F$;"-T" 380 HOME 400 VTAB (5): PRINT "TRANSLATED BINARY NOW STORED IN MEMORY": PRINT : PRINT 420 PRINT "BEGIN ADDRESS: ";XB;" DEC": PRINT 440 PRINT " END ADDRESS: ";XB + TL - 1;" DEC": PRINT 460 PRINT " LENGTH: ";TL;" BYTES": PRINT : PRINT 480 INPUT "STORE MEMORY TO BINARY FILE?";Z$ 500 Z$ = LEFT$ (Z$,1): PRINT 520 IF Z$ < > "Y" AND Z$ < > "N" GOTO 480 540 IF Z$ = "N" GOTO 640 560 INPUT "BINARY FILE NAME?";BF$ 580 SOUR = 3 600 PRINT D$"BSAVE ";BF$;",A";XB;",L";TL 620 PRINT : PRINT "HEX-TEXT FILE ";F$;"-T": PRINT : PRINT "TRANSLATED TO BINARY FILE: ";BF$ 630 PRINT : PRINT : PRINT BL$: PRINT 640 INPUT "CONVERT ANOTHER FILE?";Z$ 660 Z$ = LEFT$ (Z$,1) 680 IF Z$ = "Y" GOTO 80 720 POKE 104,8 730 POKE 8 * 256,0 740 END 1999 REM ERROR ROUTINE 2000 Y = PEEK (222) 2010 PRINT : PRINT "ERROR ";Y;" AT LINE "; PEEK (218) + PEEK (219) * 256: PRINT : PRINT 2020 IF Y < 4 OR Y = 7 OR Y = 11 OR Y = 12 OR Y > 13 THEN GOTO 640 2030 IF Y = 6 THEN PRINT "FILE NOT ON DISK";BL$: PRINT 2040 IF Y = 8 THEN PRINT "I/O ERROR";BL$: PRINT 2050 IF Y = 13 THEN PRINT "WRONG FILE TYPE";BL$: PRINT 2060 IF Y = 9 THEN PRINT "DISK IS FULL";BL$: PRINT 2070 IF Y = 4 THEN PRINT "FILE WRITE PROTECTED";BL$: PRINT 2080 IF Y = 10 THEN PRINT "FILE IS LOCKED";BL$: PRINT 2090 IF Y = 5 THEN PRINT "UNEXPECTED END OF DATA";BL$: PRINT 2200 ON SOUR GOTO 100,720,560 SAVE TXBIN LOCK TXBIN //go.sysin dd * if [ `wc -c < a-txbin` != 2622 ]; then made=FALSE echo error transmitting a-txbin -- echo length should be 2622, not `wc -c < a-txbin` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-txbin echo -n ' '; ls -ld a-txbin fi echo Extracting x-kermita-t sed 's/^X//' <<'//go.sysin dd *' >x-kermita-t 2049 6144 8001C0C2C10F00000000230100000D604C31084CBF124C01137F000000000000FF4C970A20381220 68124CCF1200001B20100CA000B1FA8D090BAD090BC95AF047C944F066A9008D0A0BAD090BC930D0 04206F0E6020BA0AAD090BC939D009A9598D090B207B0960C938D004A942D0F1C937D004A945D0E9 C953D008A9008D08088D070820540960AD0A0BF012A9448D090B205409AD090BC959F0EC4CE90FA9 5A8D090B20BA0A2054096020BA0AADD208CD0A0B9008A9598D090B4CE90F205409AD090BC959D0F3 A9448D090BD0DF00005A00B4A5B0C3A6CAF0A081B8D8B0D485A090A0A0B8C29FA095B0A0C4A09EA0 XF0A0A180A0A9A087A082BAA3A0A0FEA095A08BFFC285A0A2B0A5C3D9A5A083B187C4A0A9B4AFB0DB A0A0ADA085B2B9B0CD85CC85A0F0B8C3B0C4A0A0A4A0A0B8C285A0A5B0A0C4CFD8C4B9C2FD80A0D6 A0A0A090BAC2A7A0F8C4A5B9D9CFA080B1A0B9207B09A9008DD308206F0EAD090BC94EF004C932D0 10EED308ADD308C90AF00620780A4C5C0960A9008DD0088D0B0CAD0C088DD408AD090BC959F004C9 4ED006AD07088D0808AD08081869208DD608186D090B8DD108AD090B8DD708AC0B0CCC0A0BD00590 034C420AEE0B0CAD090BC944F006B90B0B4C180AA9008D6A0EB90B0B2980F013A90320330AAD0A08 201E0AB90B0B297F990B0BB90B0BCD0B08F013CD0A08F00ECD0908F009C920B016A9408D6A0EA902 20330AAD0B08201E0AB90B0B4D6A0E201E0A4CB009AED0089DD808204C0CEED008ADD008CDD208F0 0E60186DD008CDD208B00160CE0B0C6868ADD0081869238DD508204C0C20560CAED0089DD808AD0F 089DD90820AA0AA000AE0B0CEC0A0BB00ABD0B0B990B0BE8C8D0F18C0A0B18A000B9D40820CD10CD 0F08F003C8D0F2AC0D08F009AD0E0820CD1088D0F560203812202B0CA000B1FC20CD10C8C6FED0F6 60EE0808AD0808C940D005A9008D080860AD0A0B18690265FE9012205409AD090BC959F0034CBC08 A9448D090BAE0A0BA000A5FEF00EB1FC2D1A089D0B0BE8C8C6FED0F2AD090BC944D011A90DDD0A0B XF0049D0B0BE8A90A9D0B0BE88E0A0B600000A0A4B1CEB0A08FA0FEA099A0D8C6C5A2A094C5A0C1D0 8DA0ACB0A0C6A0CCA085C2A5B5A0FDA0D8A0A4A0A0CFA0A5A085FFA0F0A0A5A086B8D0C8A0E0B483 A0C180A0CCB2A0B0A087A0ADA083A0D9B0CEA5A0AAC5A0C1D1D5A0E8B0A0C6A09FA085A0A5B8A085 A0D8A0ADFFC4CFA086A0CDFFA0C5C6A5A0F0B6B0A1A0A0B480A0C698A0CCB3A0A0A085C1ADA083C6 D9B0C4A5C3C7C5ACC1C1C8A0E8B0A0C6A0A0A090A081B9A0A5A0A0A0ADFFC4A3A086A0CDFFC5C5A0 A5A0F0B6C6A1A0CCB485A0A0A0A090B3E6B0A0CCC1A3A0A0A0C3B0CD90A0C7C5A0C1D8C8B8E8A0A0 C6A0A0A09FA0E7B9A097A0CFA096FFA080A0C9A081E6A083A086B8D0C8A0E0B083A000B0C4CEE020 BEDE20E3DFA001B18385FAC8B18385FBA5838D0C0CA5848D0D0C20BEDE20E3DFA000B18385FEC8B1 8385FCC8B18385FDA5838D0E0CA5848D0F0C6018486DD1088DD1086860ADD1082A2A2A2903186DD1 08293F1869206000B3A9A0A0A0A085A0E5A0A080A0F0A081BAA5C3A098A0A5B6A5BAA080B3A0A0C8 B1A0A9B6A5A0BAA0A085A081B7E680D2D0A0BBB6ACA0A0E3C3ACA0B9A0A0B0A0A5AAD2A0A0A0A0A5 A08CA0CF80A08AA0A0BAD1C4A0A0A0B2B6E9A0C3E5B3A0A0E5B6C3A9B68AB3C0A0A0D0A0B0B7FD80 CEA0A0C1B6E9A0A084C3E9A0B9A0A0B0A095D38AA0A0FFA0ABC1A2A0A080A0CFA0EFBAA5A0A0A0A0 XFFA088B0A0B5A086A089A0A5B8A097A0F6A0A0FFD5A3A08DA0C8A0A0A5A0C9A0AFB0A0A2A08AB5E5 A0B0F5A0FFB3A4A0CDA5D090A085C3D3B0A0C0AAA5B5A0C3C39EA088B0A0B6A0A9C3A5A0A5B8A0E0 A0F6A0A0FFA0A3A08DA0A6A0A0A5A097A098B0A0FFB597B5A0B0CFA5D2D6B5A0C3C383B8F0A0A0B6 A085CD85A0C5A0A08AC3A8A0C8FFA0A0A0A0A0FAB4A0B8A085A0B0CECB85B7A4B5A0A0C9D0A085B5 90A0C8A5D092A0A0C3A0B0CFA5D2D6A0A0C3C383B8AFA0A0B6A089CDCCA0A580A0A0C388A0F4FFA0 8AA0ACB8FAB6A09CC585A0A2C1B385B8A4B6A9A0A0D0A091B590A0C4A0D0A5A0E6C3A0B0CFCDA0A8 A0A0C3D3A0A0A2B0A0B6A089A0B5A0A5B7A4B6A0A0C9D0A085B590A0C8A5D092A0E6C3A0B0CFCDD2 A8A0A0C3C3A0B8AFB0A0B6A089A0CCA0A580A0A0A088A0F4FFC38AA0ACB8E7B6A09CC5E0A0A2C1B3 89B8A4B6A9A0A0B0A091B690A0C4A0D2A5A0E6C3A0B0CECDA0A8A0A0C3D3A0A0A2B0A0B6A092A0B8 00000000000020B212205710CD0C08D0F8A0008C680C8C6A0E8C6B0E8C6C0E205710CD0F08F00699 690CC8D0F28C680CAD690C8DD10838E9208D690EAD6A0C204C0C38E9208D6D0EAD6B0C204C0C8D09 0BA002A2004C520FB9690C204C0CAD090BC944F006B9690C4C200FAD6A0EF00DB9690C2940D035B9 690C4C1E0FB9690CCD0908D00FC8B9690C204C0C38E9218D6C0ED055CD0A08D007A9808D6B0ED049 CD0B08D007A9408D6A0ED03DB9690C4D6A0E0D6B0EF01C9D690DC90AD007AD6E0EC90DF00EE8D008 A9348D090B4CCB0F8D6E0EAD6C0EF009CE6C0EBD680D4C200FA9008D6A0E8D6B0EC8CC690EF0034C C10E20560CD9690CF013A94E8D090B2C1D08104520FF0FCE07084C6F0EAD090BC953F048AD6D0E38 ED0708F00FC901F03BC9C1F037A9338D090BD0362C1D083019AD090BC959D00CAD6D0ED007ADD608 C920F018A94E8D090B60AD090BC945F011A9598D090B20FF0F4C6F0EAD6D0E8D07088E690EAD0E0C 8583AD0F0C8584AD690EA0009183C8A9699183C8A90D9183A002AD0C0C8583AD0D0C8584A90B9183 88A909918360AD0C088DD408A9238DD5088DD108AD6D0E8D07088D08081869208DD608204C0CAD09 0B8DD708204C0C20560C8DD808AD0F088DD90820780A20AA0A60D0C1C3CBC5D4A0D2C5D4D2C1CED3 CDC9D4D4C5C4AEAEAE8D00A2FFC5AD06088D5610A9FF8D55108D54104E56106E55106E54104E5610 6E55106E54102C10C0CE5410D00ECE5510D009CE5610D004A932D02B2C00C0102EAD00C0C98DD015 2C10C020780AA200BD3B10F01A207014E8D0F53012CD3008D00D2C10C0A9318D090B68684CCB0F20 0E1290B5ADCC102D1A0860008DCC10AD00C02900F0F9ADCC108D00C02C1B0810080980207014ADCC 1060000082C8ACC3FAB9C89CD485A0A2C4C285B880E2A0FDB4C980D085A0C8A0A0B0A089CC94A0EF A0A0B1A082A0A0A0A0FFC3E6D5A4A0A080A0A9A090BAA5B8A09FC8E8A0E8BAA397B6B9A0A6B0A08A A0A9B690A0A089A0A9B48580D2A2A085A0A0C2A0F0CCB1A0EFC3A0B1CF99A0E5A0A0FFC3C0D5E9A0 A0C2A0EEA0F0BAB7C2A0A0C880A0E8BAA3A0B6B9A0A6B2A0F0A0A9B6E6BEA089A0A5B4B080C1CFA0 E5C2A4C3A0C8D2A5A0FAB0A0B1CF99A0E5A0A0FFC1C0D5E9A0A0C2A0EEA0A0BAB9C2A093A089A0A9 BAD0A4B689A0CCC1A0A0A094B6E6A2A09EA0A5B4B080D2CFA0E5C5A4C3B0C8C496A0CCB0D4B1A0A0 A0A5A0A0FFC18DA0AAA0A0C2D5A5A0A0BAA1C3A08A48AEEB10AD00C02900F012AD2F08F0038D00C0 AD00C09DED10E88EEB1068AA6020ED118A48AEEC10ECEB10F019BDED108DCC10E88EEC102C1B0810 0320701468AAADCC10386068AA1860AD05088DD1108DF311AD01088DF611AD02088DD410AD03088D 0212AD04088DDB10AD2E088DFF1138AD1008E9058DD208AD1E088D1517AD1F088D1617AD20088D1B 17290F8D1A17AD2108A000A246C9FFD00AA228AD1B178D1A17A0038E1C178C1D172CBE123008206A 14A9FF8DBE12A9708536A914853720EA0320ED11A9008DEB108DEC1060002038122C00C01027AD00 C0CD3008D0092C10C0A9018D1517602C10C0297F20CD102C1B0830092C1C0810040980D00D200E12 90CFADCC102C1B0830F32070144CEE1220BEDE20E3DFA200200CFD9D0002E8297FC90DD0F3A0008A 9183C8A9009183A902C89183608D12178E13178C1417A94085E6AD55C0AD52C0A20320F0F620AF13 207213A69BA49A38A9BFE5982011F420AF13B01320721338A9BFE598A8A59BA69A203AF54C50138A 297FC91DF0CF4C5F14A5948598A595859926982698269846996698469966984699669846996698A5 96859BA597859A269B269B269B469A669B469A669B469A669B469A669B60A000200E1290FBAA291F 859C8A2960C940D00DA59C859698F004A59385971860C920D007A59C8593C8D0D7C960D00EA59C85 9498F0CAA59385954CAF1338600000008D12178C14178E1317A94085E6AD55C0AD52C0A900AAA88D XF0138DEF138DEE132011F4EEEE13ADEE13C904F0062054144C1414205414ACEF13C02810029126C8 8CEF13C02CF0034C2414EEF013ADF013C9C0D002A9BFA200A0008CEF132011F44C2414200E1290FB C9FDD00C6868AD54C0A92085E64CFA14602074164CFA148D12178E13178C1417297F8D0F17C92010 68A9FF8D181720AB15A9008D1817AD0F17C90DD010A9008D0E17AD1517F04D203D154CED14C90AD0 06203D154CED14C908D010CE0E1730034CED14A9008D0E174CED14C910D00BA9008D0D178D0E1720 5416C907D016A080A90C20A8FC20ED11AD30C088D0F24CED144C0415A9FF8D181720AB15A9008D18 17AD1217AE1317AC141760AD0F170D111738E9208D0F17AD10178D111720AB15EE0E17AD0E17CD1C 1730C9AD1617F009AE1C17CA8E0E17D0BB203D15A9008D0E174CED14AD0D17186D19178D0D17C9BB B0034CFA14AD1717853C186D1917AAA43CB933178D7815B9F3178D7915BD33178D7515BDF3178D76 15A027B90D17990D178810F720ED11E63CE8E0C0D0D1A63C8E0D17BD33178D9E15BDF3178D9F15A0 27AD1B17990D178810FAE8E0C0D0E44CFA14AC0F17B9B3188DEE15B91319186D1D178DEF15AC0E17 B9731985A3B9B919A8B92C17859EB91E17859FB9251785A0A900859D18AA6D0D17A8B93317853CB9 XF317853DBDED154D1A172C2108304B85A1A90085A2A4A32C1817302A06A1A69EF00706A126A2CAD0 XF91866A1B13C259F05A1913CC8B13C25A005A2913CE69DA59DC908D0AF60A59F49FF513C913CC8A5 A049FF513C913C4C2616AC0E172C18171004B13C49FF913C4C2616AE1717BD33178D6916BDF3178D 6A16A027AD1B179900008810FAE8E0C0D0E460A9008D0D1720E2F3AD52C0A20320F0F6AD0D17A200 A0002011F4A526AC0D17993317A52799F317EE0D17AD0D17C9C0D0DFA9008D0E1785A3859DAC0E17 A5A3997319A59D99B919EE0E17AD0E17C946F019A59DC906F00BE69DA59D6AB0DCE6A3D0D8A90085 9DE6A3D0D0A9008D0D178D0E17A260A9F7853CA919853DA000A53C186908853C99B318A53D690085 3D991319C8CAD0E9205416600000000000000000010100000800004600F08FE19FC3BF87FFFEFFFC XFFF8FF00040105020603A0E8A0A0B1A0A0A090A081C2D3A5CCA0A0ADFFC7A3D386B1CDFFA0C5A0A5 A0F0B1B0A1A0A0A085A0A098A090B6E6A0A0CCC4A3A0A0A0C2B1C690A0C7B1A0B7A0C8A0E8A0A0B1 A0A0A09FA0E7C2A0A5CCCFA096FFD280D3C9B1A2FFA0AAA0B9A0F0B1B08DA0CCB7A0A0ACA0A0AAB7 B8C6A0CCC4E9A0AFA0C2B1C689A094B1A0B7A0D6A0A5A0A0B1A0E1A09FA0F5C3C497CFAFA0FDFFD2 ACCCA4A086B0A0D0A0B1A0A2B0B6D2A0A0B7A0A0ACD8A0AAB8B8C6A0E0C4E9A089B7C2B1C6E2A0E0 B1A0B390A0C6A0C4A5A0E6B7A9A4A7A0A5A0FAA0A0B1C899D3E5A0A0FFC2C0CFAAA0A0B1A0A5A0A0 BAB9B9A093A089A0A9BAA0A4B289B1CCB0A0A0C694A0E6A2A09EA0A5A0A080A0CFA0E8A0A4A0A0A9 A096A0CCA0C6B1D5A0C3A5A0A0FFC28DA0AAA0A0B1A0A5A0A0BAA1B9A093B190A085BAB0B0B2B8B1 E8B0A0C0C6D2A08580A089A0F0A0A080A0AEA0E8A0BDA0A0A9C496A0A4A0A0B1D28FC389A0A0FFC2 E7A0A0B2A0B1A082C8B7BAA5C1A0A9B190A0C9BAA0B0B2FDB1A0B0A0C0B7C9A0A080B0A0A0A0A0A6 B0B0B8D497A098B0A0FFB397B7E5A0A0A9A0A9B297A0C6A5C480A0A0B7C2B1C6A5D4D6B1A0B7A083 A0F0A0A0B2A085CF85B1C5A0C58AC1A8A0C8FFB1A0A0A0B0FAB0B0B8B8A7A098A0CCA0A0B1D2A0C3 A5A0A0FFC28DA0AAA0A0A0F0A0A5A086B0B6C8A0E0A083A0AC80A0CCB8CEC6A087C2FEA083A0C2C6 C6A5A0AAB1A0B7C2D5C8E8A0A0B2A09FA085A0A5C6A085CED8A0A4FFC3CFC1A5A0CDFFA0F0A0A5A0 XF0B0A0A1A0A0A080A0A098A0CCB9A0A0A085C4ADA083A0C2B1C6A0F4FFB08AA0ACB1FAB0A09CA085 A0B0A0A085B6A4B7A0A0A0D0A085B590A0C6A5C492A0E6B7A0B1A0CDC3A8A0A0B7A0A0A0AFA0A0B3 A089D2CCC6A580D3A0D488A0F4FFB08A86A089C6A5B3CE97CFF6A0A0FFB1A3A08DB1C8B0B4A5A0C9 A0AFB0C6A2A08AB7E5A0A0F5A0FFB4A4A0C6A5C490A085B7C2B1C6C0C3A5B1A0B7C29EA088A0A0B2 A0A9D5A5A0C800000000000000000202020202000200050505000000000002020702070202000207 03020607020000010402020104000002050203050704020202000000000004020101010204000102 04040402010000050207020500000002020702020000000000000002020100000007000000000000 00000000020004040202020101000205050505050200020302020202070002050404020107000304 04030404030004060507040404000701030404040300020501030505020007040402020101000205 05020505020002050506040502000000020002000000000002000202010000040201020400000000 07000700000000010204020100000205040202000200000707070105060002050507050505000305 05030505030002050101010502000305050505050300070101070101070007010107010101000205 01070505060005050507050505000702020202020700040404040405020005050303030505000101 01010101070005070707050505000505070707050500070505050505070003050503010101000205 05050502040003050503050505000205010204050200070202020202020005050505050506000505 05050502020005050507070705000505020202050500050505020202020007040402010107000701 01010101070001010202020404000704040404040700000205000000000000000000000000070102 04000000000000000204060506000101030505050300000006010101060004040605050506000000 02050701060002050103010101000000060505060403010103050505050000020003020207000004 00040404050201010503010305000302020202020700000005070705050000000305050505000000 02050505020000000305050301010000060505060404000002050101010000000601020403000002 07020202040000000505050506000000050505050200000005050707050000000505020505000000 05050506040300000704020107000602020102020600020202020202020003020204020203000603 00000000000000000000000000000000000000000000080808080800080014141400000000002894 7E14BF8A0A00083C0A1C281E08000626100804323000040A0A042A122C0008080800000000000804 0202020408000810202020100800082A1C081C2A08000008083E0808000000000000008C88840000 003E000000000000000000008C0000201008040200008C92222222928C00080C080808081C001C22 201084823E003E90101820221C00101814123E1010003E021E2020221C001804821E22221C003E90 1088088404001C22221C22221C001C22223C90100C0000008C00008C000000008C00008C88841008 04020408100000003E003E00000004081020100804001C229088080008001C222A3A1A023C00088C 14923E2222001E22221E22221E001C22020202221C001E22222222221E003E02021E02023E003E02 021E020202003C02020232223C002222223E222222001C08080808081C002020202020221C002212 0A060A1222000202020202023E0022362A2A222222002222262A322222001C22222222221C001E22 221E020202001C2222222A122C001E22221E0A1222001C22021C20221C003E080808080808002222 222222221C0022222292148C08002222222A2A362200229214081492220022921408080808003E90 100804823E003E06060606063E0000020408102000003E30303030303E0000000814220000000000 00000000007F040810000000000000001C203C223C0002021E2222221E0000003C0202023C002020 3C2222223C0000001C223E023C001824041E0404040000001C22223C201C02021E22222222000800 0C0808081C00100018101010120C020222120E1222000C08080808081C000000362A2A2A22000000 1E222222220000001C2222221C0000001E22221E020200003C22223C202000003A06020202000000 3C021C201E0004041E04042418000000222222322C0000002292148C0800000022222A2A36000000 22140814220000002292148C088600003E1008043E00380C0C060C0C380008080808080808080E18 183018180E002C1A0000000000007F7F7F7F7F7F7F7F8DC2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF //go.sysin dd * if [ `wc -c < x-kermita-t` != 12485 ]; then made=FALSE echo error transmitting x-kermita-t -- echo length should be 12485, not `wc -c < x-kermita-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-kermita-t echo -n ' '; ls -ld x-kermita-t fi echo Extracting gokerm sed 's/^X//' <<'//go.sysin dd *' >gokerm XFP POKE 104,65 POKE 65*256,0 RUN KERMIT //go.sysin dd * if [ `wc -c < gokerm` != 40 ]; then made=FALSE echo error transmitting gokerm -- echo length should be 40, not `wc -c < gokerm` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 gokerm echo -n ' '; ls -ld gokerm fi echo Extracting etxbin sed 's/^X//' <<'//go.sysin dd *' >etxbin XFP HIMEM: 38340 POKE 104,138 POKE 138*256,0 RUN TXBIN //go.sysin dd * if [ `wc -c < etxbin` != 55 ]; then made=FALSE echo error transmitting etxbin -- echo length should be 55, not `wc -c < etxbin` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 etxbin echo -n ' '; ls -ld etxbin fi echo Extracting kermit-setsave sed 's/^X//' <<'//go.sysin dd *' >kermit-setsave 300 ON EVEN 2 MICROMODEM 1 10 ON OFF 1 NONE ON N4 155 13 ON //go.sysin dd * if [ `wc -c < kermit-setsave` != 61 ]; then made=FALSE echo error transmitting kermit-setsave -- echo length should be 61, not `wc -c < kermit-setsave` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 kermit-setsave echo -n ' '; ls -ld kermit-setsave fi echo Extracting mic.t sed 's/^X//' <<'//go.sysin dd *' >mic.t 365 PRINT : PRINT " HAYES MICROMODEM VERSION" 3910 REM 3915 IF CARD$ < > "MICROMODEM" THEN 5750 3920 IF BAUD < > 300 THEN PRINT "ONLY 300 BAUD SUPPORTED WITH MICROMODEM": PRINT : PRINT "BAUD RATE NOW SET TO 300":BAUD = 300 3925 IF PR$ = "MARK" OR PR$ = "SPACE" THEN PRINT NSUP$: GOTO 490 3927 PRINT : INPUT "ARE YOU ALREADY CONNECTED TO HOST?";Z$ 3928 IF LEFT$ (Z$,1) = "Y" THEN Z$ = "Y": PRINT : GOTO 3950 3931 PRINT : PRINT "COMMENCE HOST DIAL-UP": PRINT "WHEN CARRIER, TYPE SIGN-ON KEYINS": PRINT 3932 PRINT D$;"PR#";SLOT 3934 PRINT CHR$ (26): REM CTRL-Z, HANG UP 3935 HOME : FOR I = 1 TO 500: NEXT I 3936 PRINT D$;"PR#0": CALL KE + 23 3950 STREG% = 134 + SLOT * 16 3970 TRREG% = STREG% + 1:RCREG% = TRREG% 3990 TBIT% = 2:RBIT% = 1 4010 GOSUB 6250 4030 HOME 4050 PRINT USE$ 4055 IF Z$ = "Y" THEN 4150 4060 IF PH$ < > "NONE" THEN 4070 4062 INPUT "ENTER PHONE #: ";PH$ 4064 PRINT "PHONE # IS ";PH$;" OK? (Y/N)";: 4065 GET RE$: PRINT RE$ 4066 IF RE$ < > "Y" THEN 4062 4068 CALL KE + 20 4070 PRINT D$;"PR#";SLOT 4090 PRINT Q$;PHNUM$ 4100 PRINT 4110 PRINT D$;"PR#0": CALL KE + 23 4150 POKE - 16250 + 16 * SLOT,3 4170 IF PRITY$ = "EVEN" THEN TMP = 9: GOTO 4230: REM 7E1 4190 IF PRITY$ = "ODD" THEN TMP = 13: GOTO 4230: REM 7O1 4210 TMP = 21: REM 8N1 4230 POKE - 16250 + 16 * SLOT,TMP 4235 IF Z$ = "Y" THEN 4250 4240 TMP = 0 4242 IF TMP > 50 THEN PRINT "NO CARRIER":FIRST = 1: GOTO 490 4244 IF PEEK (49286 + 16 * SL) > = 4 THEN TMP = TMP + 1: GOTO 4242 4246 PRINT "CONNECT" 4250 CALL KERM + 3 4270 GOTO 490 4290 REM 4310 REM //go.sysin dd * if [ `wc -c < mic.t` != 1589 ]; then made=FALSE echo error transmitting mic.t -- echo length should be 1589, not `wc -c < mic.t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 mic.t echo -n ' '; ls -ld mic.t fi echo Extracting nov.t sed 's/^X//' <<'//go.sysin dd *' >nov.t 365 PRINT : PRINT " NOVATION APPLE CAT VERSION" 5634 REM -------------NOVATION APPLE CAT 5635 REM 5636 IF CARD$ < > "NOVATION" THEN GOTO 5750 5637 STREG% = 143 + SLOT * 16 5638 TRREG% = STREG% - 1:RCREG% = STREG% - 4 5639 TBIT% = 16:RBIT% = 8 5640 GOSUB 6250 5641 POKE KE + 29,141 + 16 * SL: POKE KE + 30,17: IF BA = 1200 THEN POKE KE + 30,31 5642 BS = 49280 + 16 * SLOT 5643 PRINT : INPUT "DO YOU HAVE NOVATION FIRMWARE?";Z$ 5644 IF LEFT$ (Z$,1) = "Y" THEN 5649 5645 PRINT : PRINT "EXIT KERMIT & RUN EXTERNAL DATA COMM ": PRINT "SOFTWARE FOR PROTOCOL AND DIALUP.": PRINT : PRINT "EXIT IT W/O HANGING UP. THEN, INSERT": PRINT "KERMIT DISK AND RUN HELLO.": PRINT : PRINT 5646 PRINT "AT THIS POINT--": PRINT : PRINT "TYPE 'C' IF CONNECTED TO HOST": PRINT "TYPE 'E' TO EXIT KERMIT": PRINT : INPUT ">>";Z$ 5647 IF Z$ = "C" THEN 5651 5648 IF Z$ = "E" THEN 9430 5649 POKE BS + 2,0: POKE BS + 1,1: POKE BS + 3,15: POKE BS + 13,31: POKE BS + 12,4 5650 PRINT : PRINT "USE FIRMWARE COMMANDS TO DIAL HOST": PRINT "WAIT FOR HOST CARRIER, THEN PRESS RETURN": GET Z$: PRINT Z$ 5651 IF BA = 1200 THEN GOTO 5670 5652 POKE BS + 1,129 5653 POKE BS + 2,2 5654 POKE BS + 3,6 5656 POKE BS + 9,101 5658 GOSUB 5710: POKE BS + 10,ZZ 5660 POKE BS + 11,34 5661 POKE BS + 12,5 5662 POKE BS + 13,17 5664 POKE BS + 15,0 5666 GOTO 5690 5670 POKE BS + 1,161: FOR I = 1 TO 5: NEXT I: POKE BS + 1,33 5672 POKE BS + 2,2 5674 POKE BS + 3,6 5676 GOSUB 5710: POKE BS + 10,ZZ 5677 POKE BS + 11,0 5678 POKE BS + 12,5 5679 POKE BS + 13,31 5680 POKE BS + 15,10 5690 PRINT : PRINT "WAIT FOR APPLE'S CARRIER. TYPE SIGN-ON KEYINS": PRINT 5692 PRINT USE$ 5694 CALL KE + 3 5696 GOTO 490 5710 ZZ = 0 5712 IF (PR$ < > "NONE") THEN ZZ = ZZ + 64 5714 IF (PR$ = "EVEN") THEN ZZ = ZZ + 0 5716 IF (PR$ = "ODD") THEN ZZ = ZZ + 32 5718 IF (PR$ = "MARK") THEN ZZ = ZZ + 48 5720 IF (PR$ = "SPACE") THEN ZZ = ZZ + 16 5722 IF (PR$ = "NONE") THEN ZZ = ZZ + 3 5724 IF (PR$ < > "NONE") THEN ZZ = ZZ + 1 5726 RETURN 5730 REM //go.sysin dd * if [ `wc -c < nov.t` != 2025 ]; then made=FALSE echo error transmitting nov.t -- echo length should be 2025, not `wc -c < nov.t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 nov.t echo -n ' '; ls -ld nov.t fi echo Extracting sup.t sed 's/^X//' <<'//go.sysin dd *' >sup.t 365 PRINT : PRINT " APPLE SUPER SERIAL CARD VERSION" 4330 REM ---------------- SUPER SERIAL 4350 REM 4370 IF CARD$ < > "SUPER SERIAL" THEN GOTO 5750 4390 HOME : PRINT : PRINT "IN TERMINAL MODE OF SUPER SERIAL CARD" 4410 PRINT "USE ESCAPE CHARACTER TO RETURN TO APPLE KERMIT" 4412 IF CMD$ = "SKIP" THEN 4430 4415 GOSUB 4745 4430 PRINT D$;"PR#";SLOT 4448 BD = 0 4450 IF BAUD = 300 THEN BD = 6 4452 IF BA = 1200 THEN BD = 8 4454 IF BA = 2400 THEN BD = 10 4456 IF BA = 4800 THEN BD = 12 4458 IF BA = 9600 THEN BD = 14 4460 IF BD = 0 THEN PRINT "BAUD MUST BE 300,1200,2400,4800,OR 9600": GOTO 490 4465 A$ = CHR$ (1) 4470 PRINT A$;BD;" B" 4492 IF PR$ = "EVEN" THEN PR = 3 4494 IF PR$ = "ODD" THEN PR = 1 4496 IF PR$ = "MARK" THEN PR = 5 4498 IF PR$ = "SPACE" THEN PR = 7 4500 IF PR$ = "NONE" THEN PR = 0 4510 PRINT A$;PRITY;" P" 4530 PRINT A$;"1 DATA" 4540 IF PR = 0 THEN PRINT A$;"0D": REM IF PR <> 0, DEFAULT TO CARD SW2 SETTINGS 4550 PRINT A$;"LF DISABLE" 4570 PRINT A$;"0F" 4590 PRINT A$;"0L" 4610 PRINT D$;"PR#0": CALL KE + 23 4630 STREG% = 137 + SLOT * 16 4650 TRREG% = STREG% - 1:RCREG% = TRREG% 4670 TBIT% = 16:RBIT% = 8 4690 GOSUB 6250: REM POKE REGISTERS 4691 PRINT D$"PR#0": CALL KE + 23 4692 IF PH$ < > "NONE" THEN 4698 4694 PRINT : PRINT "MANUALLY DIAL PHONE": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS": PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 4696 GOTO 4709 4698 PRINT : PRINT "AUTO-DIALING": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS": PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 4700 CALL KE + 20 4701 PRINT D$"PR#";SL 4702 PH$ = PH$ + CHR$ (13) 4704 CALL KE + 17,PH$ 4709 GOSUB 4745 4710 CALL KERM + 3 4712 PRINT D$"PR#0": CALL KE + 23: FOR ZZ = 1 TO 500: NEXT ZZ 4713 IF PEEK ( - 16384) < 127 THEN 490 4714 GET ZX$: IF ZX$ = "N" THEN ZX$ = "":FIRST = 1 4740 GOTO 490 4742 REM SEND OUT A BREAK SIGNAL 4745 IF LEFT$ (ZZ$,1) = "Y" THEN D$ = CHR$ (4): PRINT D$;"PR#";SL: PRINT CHR$ (1);"B": PRINT D$;"PR#0": CALL KE + 23:CMD$ = "":ZZ$ = "" 4750 RETURN //go.sysin dd * if [ `wc -c < sup.t` != 2038 ]; then made=FALSE echo error transmitting sup.t -- echo length should be 2038, not `wc -c < sup.t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 sup.t echo -n ' '; ls -ld sup.t fi echo Extracting ccs.t sed 's/^X//' <<'//go.sysin dd *' >ccs.t 365 PRINT : PRINT " CCS 7710-D SERIAL CARD VERSION" 4770 REM -----------------CCS 7710 4790 REM 4810 IF CARD$ < > "CCS" THEN GOTO 5750 4830 STREG% = 134 + SLOT * 16 4850 TRREG% = STREG% + 1:RCREG% = TRREG% 4870 TBIT% = 2:RBIT% = 1 4890 GOSUB 6250 4910 TMP = STREG% + 49152 - 6 4930 ZZ = 0 4932 IF PR$ = "EVEN" THEN ZZ = 9: REM 7E1 4934 IF PR$ = "ODD" THEN ZZ = 13: REM 7O1 4936 IF PR$ = "NONE" THEN ZZ = 21: REM 8N1 4938 IF ZZ = 0 THEN PRINT : PRINT NSUP$: GOTO 490 4940 POKE TMP,35: POKE TMP,ZZ: REM SET DATA WORD, PARITY 4950 PRINT USE$ 4951 IF PH$ < > "NONE" THEN 4959 4953 PRINT : PRINT "MANUALLY DIAL PHONE": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS": PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 4957 GOTO 4970 4959 PRINT : PRINT "AUTO-DIALING-- TYPE RETURN": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS": PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 4963 CALL KE + 20 4965 CALL KE + 17,PH$ 4970 CALL KERM + 3 4972 PRINT D$"PR#0": CALL KE + 23: FOR ZZ = 1 TO 500: NEXT ZZ 4974 IF PEEK ( - 16384) < 127 THEN 490 4976 GET ZX$: IF ZX$ = "N" THEN ZX$ = "":FIRST = 1 4990 GOTO 490 //go.sysin dd * if [ `wc -c < ccs.t` != 1128 ]; then made=FALSE echo error transmitting ccs.t -- echo length should be 1128, not `wc -c < ccs.t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 ccs.t echo -n ' '; ls -ld ccs.t fi echo Extracting com.t sed 's/^X//' <<'//go.sysin dd *' >com.t 365 PRINT : PRINT " APPLE COMMUNICATIONS CARD VERSION" 5270 REM ------------APPLE COMMUNICATIONS CARD 5290 REM 5310 IF CARD$ < > "COMMUNICATIONS" THEN 5750 5330 STREG% = 142 + SLOT * 16 5350 TRREG% = STREG% + 1:RCREG% = TRREG% 5370 TBIT% = 2:RBIT% = 1 5390 GOSUB 6250 5395 PRINT USE$ 5400 IF PH$ = "NONE" THEN 5428 5402 PRINT : PRINT "AUTO DIALING--": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS" 5403 PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 5410 PRINT D$;"PR#";SL 5420 PRINT PH$ 5425 PRINT D$;"PR#0": CALL KE + 23 5426 GOTO 5430 5428 PRINT : PRINT "MANUALLY DIAL PHONE": PRINT "WHEN CARRIER, TYPE SIGN-ON KEY-INS.": PRINT "IF NO CARRIER, TYPE ESCAPE, THEN 'N'" 5430 POKE 49294 + 16 * SLOT,3 5440 IF PR$ = "MARK" OR PR$ = "SPACE" THEN PRINT NSUP$: GOTO 490 5442 IF PR$ = "NONE" THEN TMP% = 21: REM 8N1 5444 IF PR$ = "EVEN" THEN TMP% = 9: REM 7E1 5446 IF PR$ = "ODD" THEN TMP% = 13: REM 7O1 5448 POKE 49294 + 16 * SL,TMP% 5610 CALL KERM + 3 5612 FOR ZZ = 1 TO 500: NEXT ZZ 5614 IF PEEK ( - 16384) < 127 THEN 490 5616 GET ZX$: IF ZX$ = "N" THEN ZX$ = "":FIRST = 1 5630 GOTO 490 5632 REM //go.sysin dd * if [ `wc -c < com.t` != 1131 ]; then made=FALSE echo error transmitting com.t -- echo length should be 1131, not `wc -c < com.t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 com.t echo -n ' '; ls -ld com.t fi ------------ ereh tuc ------------ -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"
zben@umd5 (Ben Cranston) (10/20/86)
This is everything that was not posted in parts one or two. ------------ cut here ------------ : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=FALSE if [ x$1 = x-a ]; then all=TRUE fi echo Extracting a-bitxt sed 's/^X//' <<'//go.sysin dd *' >a-bitxt NEW 5 REM PROGRAM BITXT 7 INPUT Z$: REM DUMMY READ OF EXEC FILE 10 POKE 33,40 15 REM PROGRAM TO CONVERT BINARY FILE TO HEX TEXT FILE 22 REM THIS PROGRAM OUTPUTS DATA FOR EVENTUAL INPUT TO PROGRAM TXBIN 24 REM DO NOT USE THIS PROGRAM IF BINARY FILE ADDRESS IS < $300 OR > $89FF 26 REM DO NOT RUN THIS PROGRAM DIRECTLY. USE EXEC FILE SUCH AS EBITXT, WHICH SETS HIMEM AT $95C4 AND LOADS PROGRAM AT $8A00 30 REM ROBERT M. HOLLEY, JR - SERDAC - 7/85 40 D$ = CHR$ (13) + CHR$ (4) 43 BL$ = CHR$ (7) 45 BT = 38343 60 PRINT D$"BLOAD B-T,A$95C7 80 HOME 85 PRINT " CONVERT BINARY FILE TO HEX-TEXT FILE": PRINT 90 PRINT " SERDAC 7/85" 95 PRINT : PRINT : PRINT 100 PRINT : PRINT "BEGIN ADDRESS": INPUT "(IF HEX, PREFACE WITH $):";XB$ 120 ARG$ = XB$: GOSUB 1000:XB = RET: IF XB = 65000 THEN PRINT : PRINT : PRINT BL$: PRINT "ILLEGAL HEX #": PRINT : PRINT : GOTO 100 122 IF XB = 66000 THEN PRINT : PRINT : PRINT BL$: PRINT "ILLEGAL DEC #": PRINT : PRINT : GOTO 100 140 PRINT : PRINT "END ADDRESS": INPUT "(IF HEX, PREFACE WITH $):";XE$ 150 ARG$ = XE$: GOSUB 1000:XE = RET: IF XE = 65000 THEN PRINT : PRINT : PRINT BL$: PRINT "ILLEGAL HEX #": PRINT : PRINT :GOT0140 152 IF XE = 66000 THEN PRINT : PRINT : PRINT BL$: PRINT "ILLEGAL DEC #": PRINT : PRINT : GOTO 140 180 TL = XE - XB + 1 190 IF TL < = 0 THEN PRINT : PRINT : PRINT BL$: PRINT "LENGTH OF MEMORY LT OR EQ ZERO.": GOTO 95 200 PRINT : PRINT : INPUT "FILE ALREADY IN MEMORY?";Z$ 210 Z$ = LEFT$ (Z$,1) 220 IF Z$ < > "Y" AND Z$ < > "N" THEN PRINT BL$: GOTO 200: PRINT 240 IF Z$ = "Y" THEN 300 250 PRINT : INPUT "NAME OF BINARY FILE?";F$ 260 ONERR GOTO 2000 265 SOUR = 1 270 PRINT D$"BLOAD ";F$;",A";XB 300 SEC40 = INT (TL / 10240) + 1 320 RM = TL - 10240 * (SEC40 - 1) 340 LN = INT ((RM + 39) / 40) 360 POKE 1,SEC40: POKE 2,LN 380 POKE 3,XB - ( INT (XB / 256) * 256): POKE 4, INT (XB / 256) 400 PRINT : PRINT "OUTPUT HEX-TEXT FILE NAME": INPUT "DO NOT INCLUDE -T SUFFIX:";F$ 420 PRINT : PRINT : HTAB (12): INVERSE : PRINT "BINARY --> TEXT": NORMAL : PRINT : HTAB (4): INVERSE : FLASH : PRINT "TRANSLATION IN PROGRESS -- WAIT": NORMAL 430 ONERR GOTO 2000 435 SOUR = 2 440 PRINT D$"OPEN ";F$;"-T" 460 PRINT D$"DELETE ";F$;"-T" 480 PRINT D$"OPEN ";F$;"-T" 500 PRINT D$"WRITE ";F$;"-T" 520 PRINT XB 540 PRINT TL 560 CALL BT 580 PRINT D$"CLOSE ";F$;"-T" 600 HOME 610 VTAB (5) 620 PRINT "BINARY FILE TRANSLATED": PRINT "TO THE HEX-TEXT FILE:";F$;"-T" 640 PRINT : PRINT : PRINT BL$ 660 INPUT "CONVERT ANOTHER FILE?";Z$ 680 Z$ = LEFT$ (Z$,1) 700 IF Z$ = "Y" GOTO 80 705 POKE 104,8 710 POKE 8 * 256,0 720 END 999 REM RETRIEVE DEC # 1000 L = LEN (ARG$) 1002 IF L = 0 THEN RET = 66000: RETURN 1003 IF L = 1 AND ARG$ = "$" THEN RET = 65000: RETURN 1005 RET = VAL (ARG$) 1010 IF LEFT$ (ARG$,1) = "$" THEN 1050 1015 FOR I = 1 TO L 1020 C$ = MID$ (ARG$,I,1) 1025 IF ASC (C$) < 48 OR ASC (C$) > 57 THEN RET = 66000:I = L: GOTO 1030 1030 NEXT I 1035 RETURN 1050 RET = 0 1060 FOR I = 1 TO L - 1 1080 LT$ = RIGHT$ (ARG$,1) 1100 IF ASC (LT$) > = 48 AND ASC (LT$) < = 57 THEN RET = RET + 16 ^ (I - 1) * VAL (LT$): GOTO 1200 1120 IF ASC (LT$) < 65 OR ASC (LT$) > 70 THEN RET = 65000:I = L: GOTO 1250 1140 NM = ASC (LT$) - 65 + 10 1160 RET = RET + 16 ^ (I - 1) * NM 1200 ARG$ = LEFT$ (ARG$,L - I) 1250 NEXT I 1300 RETURN 1999 REM ERROR ROUTINE 2000 Y = PEEK (222) 2010 PRINT : PRINT "ERROR ";Y;" AT LINE "; PEEK (218) + PEEK (219) * 256: PRINT : PRINT 2020 IF Y < 4 OR Y = 7 OR Y = 11 OR Y = 12 OR Y > 13 THEN GOTO 660 2030 IF Y = 6 THEN PRINT "FILE NOT ON DISK";BL$: PRINT 2040 IF Y = 8 THEN PRINT "I/O ERROR";BL$: PRINT 2050 IF Y = 13 THEN PRINT "WRONG FILE TYPE";BL$: PRINT 2060 IF Y = 9 THEN PRINT "DISK IS FULL";BL$: PRINT 2070 IF Y = 4 THEN PRINT "FILE WRITE PROTECTED";BL$: PRINT 2080 IF Y = 10 THEN PRINT "FILE IS LOCKED";BL$: PRINT 2090 IF Y = 5 THEN PRINT "UNEXPECTED END OF DATA";BL$: PRINT 2100 ON SOUR GOTO 250,400 2200 END SAVE BITXT LOCK BITXT //go.sysin dd * if [ `wc -c < a-bitxt` != 4027 ]; then made=FALSE echo error transmitting a-bitxt -- echo length should be 4027, not `wc -c < a-bitxt` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-bitxt echo -n ' '; ls -ld a-bitxt fi echo Extracting a-dis sed 's/^X//' <<'//go.sysin dd *' >a-dis NEW 1 REM ARKABLE PROGRAM 2 REM TO DISASSEMBLE 3 REM PROGRAMS FROM CORE 4 REM TO A TEXT FILE! 5 REM YOU GIVE IT START 6 REM AND END ADDRESSES 7 REM AND THE NAME OF THE 8 REM FILE IT PUTS IT IN. 9 REM 100 REM 101 REM POKE ASSEMBLY INTO 102 REM LOW-CORE ($300) 103 REM 110 GOSUB 7000 200 REM 201 REM GET START ADDRESS 202 REM 210 INPUT "FROM: ";H$ 220 GOSUB 6000 230 IF D > = 0 GOTO 260 240 PRINT "OOPS!" 250 GOTO 210 260 LET F = D 270 LET B1 = INT (F / 256) 280 LET B2 = F - 256 * B1 290 POKE 58,B2: POKE 59,B1 300 REM 301 REM GET END ADDRESS 302 REM 310 INPUT " TO : ";H$ 320 GOSUB 6000 330 IF D > = 0 GOTO 360 340 PRINT "OOPS!" 350 GOTO 310 360 LET T = D 370 IF T > = F GOTO 400 380 PRINT "WILL NEVER GET THERE!" 390 GOTO 310 400 REM 401 REM GET FILENAME 402 REM IF NONE THEN 403 REM OUTPUT TO SCREEN 404 REM 410 INPUT "FILE: ";F$ 420 IF LEN (F$) = 0 GOTO 500 430 ONERR GOTO 450 440 PRINT CHR$ (4);"DELETE ";F$ 450 POKE 216,0 470 PRINT CHR$ (4);"OPEN ";F$ 480 PRINT CHR$ (4);"WRITE ";F$ 500 REM 501 REM DO THE DISASSEMBLY. 502 REM 510 GOSUB 8000 520 FOR I = 512 TO 511 + PEEK (6) 530 PRINT CHR$ ( PEEK (I)); 540 NEXT I 550 LET F = 256 * PEEK (59) + PEEK (58) 560 IF F < = T GOTO 510 600 REM 601 REM IF OUTPUT TO FILE 602 REM THEN CLOSE FILE 603 REM 610 PRINT CHR$ (13) 620 IF LEN (F$) = 0 GOTO 9999 630 PRINT CHR$ (4);"CLOSE ";F$ 640 GOTO 9999 6000 REM 6001 REM HEX TO DEC CONVERT. 6002 REM 6010 LET D = 0 6020 FOR I = 1 TO LEN (H$) 6030 LET H = ASC ( MID$ (H$,I,1)) - 48 6040 IF H > = 0 AND H < = 9 GOTO 6070 6050 LET H = H - 7 6060 IF H < 10 OR H > 15 GOTO 6200 6070 LET D = 16 * D + H 6080 NEXT I 6090 RETURN 6200 REM 6201 REM HEX NUMBER ERROR. 6202 REM 6210 LET D = - 1 6220 RETURN 7000 REM 7001 REM POKE ASSEMBLY ROUTINE 7002 REM USED BY BELOW. 7003 REM 7010 FOR I = 768 TO 785 7020 READ B 7030 POKE I,B 7040 NEXT I 7050 RETURN 7100 REM 7101 REM LISTING OF ASSEMBLY 7102 REM ROUTINE USED TO CALL 7103 REM MONITOR DISASSEMBLER. 7104 REM 7110 REM ORG $300 7111 REM PTR EQU $6 7112 REM YSV EQU $7 7113 REM BUF EQU $200 7114 REM LIST2 EQU $FE63 7115 REM * 7116 REM * CALL DISASSEMBLER. 7117 REM * 7118 REM DOIT LDA #1 7119 REM JSR LIST2 7120 REM RTS 7121 REM * 7122 REM * INTERCEPT ROUTINE. 7123 REM * 7124 REM ZAP STY YSV 7125 REM LDY PTR 7126 REM STA BUF,Y 7127 REM LDY YSV 7128 REM INC PTR 7129 REM RTS 7200 REM 7201 REM THIS IS THE CODE 7202 REM FOR ABOVE THAT 7203 REM WE POKE INTO CORE. 7204 REM 7220 DATA 169,001,032,099 7230 DATA 254,096,132,007 7240 DATA 164,006,153,000 7250 DATA 002,164,007,230 7260 DATA 006,096 8000 REM 8001 REM DISASSEMBLE PROGRAM 8002 REM FROM MEMORY. 8003 REM 8030 LET S1 = PEEK (54) 8040 LET S2 = PEEK (55) 8050 POKE 54,6: POKE 55,3 8060 POKE 6,0 8070 CALL 768 8080 POKE 54,S1: POKE 55,S2 8090 RETURN 9999 END SAVE DIS LOCK DIS //go.sysin dd * if [ `wc -c < a-dis` != 2985 ]; then made=FALSE echo error transmitting a-dis -- echo length should be 2985, not `wc -c < a-dis` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-dis echo -n ' '; ls -ld a-dis fi echo Extracting a-frogprog sed 's/^X//' <<'//go.sysin dd *' >a-frogprog NEW 10 REM FROGGY INTRO TO KERMIT 20 REM NOTE FROGGY ART 25 REM COPYRIGHT 1980 BY APPLE COMPUTER 30 PRINT CHR$ (4);"BLOAD FROGPIX,A$2000 40 POKE - 16304,0: POKE - 16297,0 45 POKE - 16302,0 50 PRINT CHR$ (4);"EXEC GOKERM" SAVE FROGPROG LOCK FROGPROG //go.sysin dd * if [ `wc -c < a-frogprog` != 265 ]; then made=FALSE echo error transmitting a-frogprog -- echo length should be 265, not `wc -c < a-frogprog` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-frogprog echo -n ' '; ls -ld a-frogprog fi echo Extracting a-hello sed 's/^X//' <<'//go.sysin dd *' >a-hello NEW 10 D$ = CHR$ (4) 50 PRINT D$;"EXEC GOKERM" SAVE HELLO LOCK HELLO //go.sysin dd * if [ `wc -c < a-hello` != 71 ]; then made=FALSE echo error transmitting a-hello -- echo length should be 71, not `wc -c < a-hello` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-hello echo -n ' '; ls -ld a-hello fi echo Extracting a-kermit sed 's/^X//' <<'//go.sysin dd *' >a-kermit NEW 10 REM 30 REM BASIC CODE BY R.LICHY- LAST MOD 4/85 32 REM ASM CODE BY T.WHITTAKER-LAST MOD 12/84 35 REM MODIFIED FOR SERDAC BY R. HOLLEY 7/85 37 REM KERMSHELL 8.3 50 REM 90 POKE 33,40 110 KERM = 2065 120 POKE KE + 30,0 150 D$ = CHR$ (13) + CHR$ (4):Q$ = CHR$ (17):FF$ = CHR$ (6):H$ = CHR$ (8) 151 CO$ = "COMMUNICATION LINE PROBLEMS. TRY" 152 DI$ = "DISCONNECTING AND REDIALING." 153 AC$ = "AMBIGUOUS SET COMMAND " 154 AS$ = "********************" 155 BL$ = CHR$ (7) + CHR$ (7) 156 TC$ = "TRANSFER COMPLETED" 160 USE$ = "USE ESC CHAR TO RETURN TO APPLE KERMIT" 161 NSUP$ = "PARITY NOT SUPPORTED ON CARD" 162 OO$ = "MUST BE SET ON OR OFF" 164 AB$ = "TRANSFER ABORTED " 166 BS$ = BL$ + BL$ + BL$ + BL$ + BL$ 168 UR$ = "UNRECOGNIZED STATUS CODE" 170 FIRST = 1 190 PHNUM$ = "31108" 210 TIMEO = 10 230 PD = 0:EOL = 13 250 FW$ = "ON":MARK = 1 270 NPAD = 0:MB = 94 275 QUOTE$ = "#":CK$ = "1":B8$ = "&" 276 REM SEE STMTS 6625, 7694-7, AND 9390-9398 FOR SETTINGS OF RPT$ 280 PRINT D$"PR#0": TEXT 290 HOME : VTAB (10): HTAB (12): PRINT "KERMIT-]"; CHR$ (91);" VERS 2.8" 310 PRINT : PRINT TAB( 15)" APRIL 1985" 330 VTAB (15): PRINT TAB( 3)" UNIVERSITY OF WISCONSIN - MADISON" 350 VTAB (16): PRINT TAB( 9)"PUBLIC DOMAIN SOFTWARE" 359 PRINT : PRINT : PRINT 360 PRINT : PRINT " MODIFIED FOR SERDAC USE -- 7/85" 365 PRINT : PRINT " HAYES MICROMODEM VERSION" 370 PRINT D$"BLOAD KERMITA 390 PRINT D$"OPEN KERMIT/SETSAVE": PRINT D$"READKERMIT/SETSAVE" 410 INPUT BAUD: INPUT LECHO$: INPUT PRITY$: INPUT SLOT: INPUT CARD$: INPUT MARK: INPUT TIMEO: INPUT FW$: INPUT DEBUG$: INPUT DRIVE: INPUT PHNUM$: INPUT SC$: INPUT VI$: INPUT ES: INPUT EOL: INPUT RT$ 430 PRINT D$"CLOSEKERMIT/SETSAVE" 435 P3$ = ",":P2$ = "%": GOSUB 9600 437 PH$ = P1$ 450 IF LECHO$ = "ON" THEN POKE KERM + 11,255 470 HOME 489 VL$ = VI$: GOTO 3332: REM SET VIDEO 490 ONERR GOTO 510 510 PRINT : PRINT "KERMIT-]"; CHR$ (91);">"; 512 RESP$ = "":CH$ = "" 513 GET CHAR$ 514 IF CHAR$ = CHR$ (8) AND LEN (RE$) = 0 THEN 513 515 PRINT CH$; 516 IF LEN (RE$) = 1 AND CH$ = CHR$ (8) THEN RE$ = "": GOTO 513 518 IF CHAR$ = CHR$ (8) THEN RE$ = LEFT$ (RE$, LEN (RE$) - 1): GOTO 513 520 IF CH$ < > CHR$ (13) THEN RE$ = RE$ + CHAR$: GOTO 513 530 REM 550 REM **********COMMAND PARSER****** 570 REM 590 WNUM = 1:CMD$ = "":PARM$ = "":VLUE$ = "" 610 IF RESP$ = "" THEN 490 620 PRINT 730 FOR I = 1 TO LEN (RESP$) 770 CHAR$ = MID$ (RESP$,I,1) 790 IF CHAR$ = " " AND PCHAR$ = " " THEN 950 800 IF CH$ = " " AND WNUM = 3 THEN 910 810 IF CHAR$ = " " THEN WNUM = WNUM + 1: GOTO 930 830 IF CHAR$ = "?" AND I = 1 THEN 1210 850 IF CHAR$ = "?" AND PCHAR$ < > " " THEN WNUM = WNUM + 1 870 IF WNUM = 1 THEN CMD$ = CMD$ + CHAR$ 890 IF WNUM = 2 THEN PARM$ = PARM$ + CHAR$ 910 IF WNUM > 2 THEN VLUE$ = VLUE$ + CHAR$ 930 PCHAR$ = CHAR$ 950 NEXT I 970 LSTR = LEN (CMD$):LPARM = LEN (PARM$):LVLUE = LEN (VLUE$) 980 IF LEFT$ (RESP$,1) = CHR$ (4) THEN 1137 982 IF CMD$ = "S" THEN PRINT "AMBIGUOUS COMMAND": PRINT "(SET, SEND, STATUS, OR SHOW)?": GOTO 490 983 IF CMD$ = "SE" THEN PRINT "AMBIGUOUS COMMAND (SET OR SEND)?": GOTO 490 990 IF LEFT$ ("CONNECT",LSTR) = CMD$ THEN 3750 1000 IF LEFT$ ("BREAK", LEN (CMD$)) = CMD$ THEN 3711 1010 IF LEFT$ ("QUIT",LSTR) = CMD$ OR LEFT$ ("EXIT",LSTR) = CMD$ THEN 9430 1030 IF LEFT$ ("RECEIVE",LSTR) = CMD$ THEN 7530 1050 IF LEFT$ ("SHOW",LSTR) = CMD$ AND LSTR > 1 THEN 3410 1060 IF LEFT$ ("STATUS",LSTR) = CMD$ AND LSTR > 1 THEN 3410 1070 IF LEFT$ ("SET",LSTR) = CMD$ AND LSTR > 2 THEN 1510 1090 IF LEFT$ ("SEND",LSTR) = CMD$ AND LSTR > 2 THEN 6510 1110 IF LEFT$ ("HELP",LSTR) = CMD$ OR CMD$ = "?" THEN 1210 1111 IF LSTR < 4 THEN 1130: REM CHECK FOR D2 1112 PA$ = RIGHT$ (CMD$,3) 1114 CMD$ = LEFT$ (CMD$, LEN (CMD$) - 3) 1116 IF LEFT$ ("RECEIVE", LEN (CMD$)) = CMD$ AND (PA$ = ",D1" OR PA$ = ",D2") THEN 7530 1130 PRINT BL$: INPUT "INVALID COMMAND, DO YOU WANT HELP?";ANS$: IF LEFT$ (ANS$,1) < > "Y" THEN 490 1131 GOTO 1210 1132 REM **************** 1134 REM DO DOS COMMAND 1136 REM ***************** 1137 ONERR GOTO 1145 1138 IF LEFT$ (RESP$,1) < > CHR$ (4) THEN ONERR GOTO 490:GOT0730 1140 PRINT RE$ 1144 GOTO 490 1145 X = PEEK (222): IF X = 11 OR X = 16 THEN PRINT : PRINT "SYNTAX ERROR": PRINT BL$: PRINT : GOTO 490 1147 PRINT : PRINT "DOS COMMAND CANNOT BE EXECUTED": PRINT BL$: PRINT : GOTO 490 1150 REM 1170 REM ******** HELP SCREEN ********* 1190 REM 1210 PRINT CHR$ (16): PRINT TAB( 15)"HELP SCREEN" 1230 VTAB 3: PRINT "VALID KERMIT-]"; CHR$ (91);" COMMANDS ARE:" 1240 PRINT : PRINT 1250 PRINT "CONNECT CONNECTS APPLE TO HOST" 1270 PRINT "EXIT / QUIT RETURNS CONTROL TO BASIC" 1290 PRINT "HELP / ? PRINTS THIS SCREEN" 1310 PRINT "SET SETS COMM OPTIONS" 1330 PRINT "SEND SEND APPLE FILE TO HOST" 1350 PRINT "RECEIVE RECEIVES FILE FROM HOST" 1370 PRINT "SHOW / STATUS DISPLAYS COMM PARAMETERS" 1380 PRINT "BREAK TRANSMIT BREAK (SSC ONLY)" 1390 PRINT "<CTRL-D> CMND DO LOCAL DOS COMMAND" 1410 VTAB (24) 1430 GOTO 490 1450 REM 1470 REM ********** SET COMMAND ***** 1490 REM 1510 IF PARM$ < > "?" AND PARM$ < > "" THEN 1850 1530 PRINT CHR$ (16);"POSSIBLE SET COMMANDS ARE:" 1550 PRINT : PRINT "BAUD" 1570 PRINT "LOCAL-ECHO" 1590 PRINT "PARITY" 1610 PRINT "SLOT" 1630 PRINT "CARD" 1650 PRINT "MARK" 1670 PRINT "TIMEOUT" 1690 PRINT "FILE-WARNING" 1710 PRINT "DEBUG" 1720 PRINT "EOL" 1750 PRINT "SAVE" 1770 PRINT "PHONE #" 1780 PRINT "SCROLL" 1785 PRINT "VIDEO" 1786 PRINT "ESCAPE" 1788 PRINT "DRIVE" 1789 PRINT "REPEAT-PROC" 1790 PRINT : PRINT 1810 GOTO 490 1830 REM ---------------- SET BAUD 1850 IF LEFT$ ("BAUD",LPARM) < > PARM$ THEN 1950 1870 IF VLUE$ = "?" OR NOT (VL$ = "300" OR VL$ = "1200" OR VL$ = "2400" OR VL$ = "4800" OR VL$ = "9600") THEN PRINT "BAUD MUST BE: 300,1200,2400,4800 OR 9600": GOTO 490 1890 BAUD = VAL (VLUE$) 1900 FIRST = 1 1910 GOTO 490 1930 REM ---------------- SET LOCAL ECHO 1950 IF NOT ( LEFT$ ("LOCAL-ECHO",LPARM) = PARM$ OR LEFT$ ("ECHO",LPARM) = PARM$) THEN 2110 1960 IF PA$ = "E" THEN PRINT AC$: PRINT "(ECHO, EOL, OR ESCAPE?)": GOTO 490 1970 IF VLUE$ = "?" THEN PRINT "ON OFF": GOTO 490 1990 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 2010 LECHO$ = VLUE$ 2030 IF LECHO$ = "ON" THEN POKE KERM + 11,255 2050 IF LECHO$ = "OFF" THEN POKE KERM + 11,0 2060 FIRST = 1 2070 GOTO 490 2090 REM ---------------- SET PARITY 2110 IF LEFT$ ("PARITY",LPARM) < > PARM$ THEN 2240 2120 IF PA$ = "P" THEN PRINT AC$;"(PHONE OR PARITY?)": GOTO 490 2130 IF VLUE$ = "?" THEN PRINT "ODD EVEN MARK SPACE, OR NONE": GOTO 490 2140 FIRST = 1 2150 IF LEFT$ ("EVEN",LVLUE) = VLUE$ THEN PRITY$ = "EVEN": GOTO 490 2170 IF LEFT$ ("ODD",LVLUE) = VLUE$ THEN PRITY$ = "ODD": GOTO 490 2175 IF LEFT$ ("MARK",LVLUE) = VLUE$ THEN PRITY$ = "MARK": GOTO 490 2177 IF LEFT$ ("SPACE",LVLUE) = VLUE$ THEN PR$ = "SPACE": GOTO 490 2190 IF LEFT$ ("NONE",LVLUE) = VLUE$ THEN PRITY$ = "NONE": GOTO 490 2210 PRINT "INVALID PARITY": GOTO 490 2230 REM ---------------- SET SLOT 2240 IF PA$ = "S" THEN PRINT AC$;"(SLOT OR SAVE?)": GOTO 490 2250 IF LEFT$ ("SLOT",LPARM) < > PARM$ THEN 2355 2270 IF VLUE$ = "?" THEN PRINT "1 2 3 4 5 6 7": GOTO 490 2290 VLUE = VAL (VLUE$) 2310 IF VLUE < 1 OR VLUE > 7 THEN PRINT "INVALID SLOT NUMBER": GOTO 490 2330 SLOT = VLUE 2340 FIRST = 1 2350 GOTO 490 2353 REM ------- DRIVE TOGGLE 2355 IF LEFT$ ("DRIVE",LP) < > PA$ THEN 2390 2356 IF PA$ = "D" THEN PRINT AC$;"(DRIVE OR DEBUG?)": GOTO 490 2357 IF VL$ = "?" OR NOT (VL$ = "1" OR VL$ = "2") THEN PRINT "SWITCH DEFAULT DRIVE TO 1 OR 2": PRINT "(NOT SET SAVED)": GOTO 490 2365 PRINT "DEFAULT DRIVE = ";VL$ 2366 PRINT D$"OPEN A";BS$;",D";VL$: PRINT D$"DELETE A";BS$: GOTO 490 2370 REM ----------------CARD TYPE 2390 IF LEFT$ ("CARD",LPARM) < > PARM$ THEN 2570 2410 IF VLUE$ = "?" THEN PRINT "MICROMODEM": PRINT "SUPER SERIAL": PRINT "COMMUNICATIONS": PRINT "CCS": PRINT "NOVATION": GOTO 490 2420 FIRST = 1 2425 POKE KE + 30,0 2430 IF LEFT$ ("MICROMODEM",LVLUE) = VLUE$ THEN CARD$ = "MICROMODEM": GOTO 490 2450 IF LEFT$ ("SUPER SERIAL",LVLUE) = VLUE$ THEN CARD$ = "SUPER SERIAL": GOTO 490 2470 IF LEFT$ ("CCS",LVLUE) = VLUE$ THEN CARD$ = "CCS": GOTO 490 2500 IF LEFT$ ("COMMUNICATIONS",LV) = VLUE$ THEN CARD$ = "COMMUNICATIONS": GOTO 490 2510 IF LEFT$ ("NOVATION",LVLUE) = VLUE$ THEN CARD$ = "NOVATION": GOTO 490 2530 PRINT "INVALID CARD TYPE": GOTO 490 2550 REM ---------------- MARK 2570 IF LEFT$ ("MARK",LPARM) < > PARM$ THEN 2630 2590 IF VLUE$ = "?" THEN PRINT "ASCII VALUE FOR START OF PACKET": PRINT "(THE DEFAULT IS 1)": GOTO 490 2610 MARK = VAL (VLUE$): GOTO 490 2630 REM --------------- TIMEO 2650 IF LEFT$ ("TIMEOUT",LPARM) < > PARM$ THEN 2790 2670 IF VLUE$ = "?" THEN PRINT "TIMEOUT SHOULD BE A NUMBER FROM": PRINT "0 TO 15. (THE DEFAULT IS 10)": PRINT "IF THE HOST SYSTEM IS SLOW, SET TIMEOUT TO 15": GOTO 490 2690 VLUE = VAL (VLUE$) 2710 IF VLUE < 0 OR VLUE > 60 THEN PRINT "TIMEOUT MUST BE BETWEEN 0 AND 60": GOTO 490 2730 TI = VL: GOTO 490 2750 REM -------------- FILE-WARNING 2770 IF VLUE$ = "?" THEN PRINT "ON OR OFF": PRINT "THIS CHECKS FOR A FILE ALREADY EXISTING": PRINT "ON YOUR DISK WHEN THE APPLE IS RECEIVING A FILE": PRINT "(THE DEFAULT IS 'ON')": GOTO 490 2790 IF LEFT$ ("FILE-WARNING",LPARM) < > PARM$ THEN 2850 2810 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 2830 FW$ = VLUE$: GOTO 490 2850 REM --------------- DEBUG 2870 IF NOT ( LEFT$ ("DEBUG",LPARM) = PARM$ AND LPAR > 1) THEN 2962 2890 IF VLUE$ = "?" THEN PRINT "ON OR OFF": PRINT "THIS IS AN AID IN MODIFYING THE KERMIT": PRINT "PROGRAM ITSELF. IN ALL OTHER CASES": PRINT "DEBUG SHOULD BE OFF": GOTO 490 2900 IF NOT (VL$ = "ON" OR VL$ = "OFF") THEN PRINT OO$: GOTO 490 2910 IF VLUE$ = "ON" THEN POKE KERM + 10,255 2930 IF VLUE$ = "OFF" THEN POKE KERM + 10,0 2950 DEBUG$ = VLUE$ 2952 GOTO 490 2960 REM --------EOL 2962 IF NOT ( LEFT$ ("EOL",LPARM) = PARM$) THEN 2972 2964 IF VL$ = "?" OR NOT ( VAL (VL$) > 1 AND VAL (VL$) < 128) THEN PRINT "EOL IS THE DECIMAL ASCII VALUE FOR THE": PRINT "LINE TERMINATOR OF THE REMOTE KERMIT": PRINT "THE DEFAULT IS 13 (CARRIAGE RETURN)": GOTO 490 2966 EOL = VAL (VL$): GOTO 490 2970 REM ------ REPEAT PROCESSING 2972 IF NOT ( LEFT$ ("REPEAT-PROC",LPARM) = PA$) THEN 3000 2974 IF VL$ = "?" THEN PRINT "ON OR OFF. NORMALLY ON.": PRINT "IF WHILE RECEIVING, YOU SEE MESSAGE": PRINT "'REC BUFFER OVERFLOW,' SET REPEAT-PROC": PRINT "TO 'OFF' AND RESTART TRANSFER.": GOTO 490 2976 IF NOT (VL$ = "ON" OR VL$ = "OFF") THEN PRINT OO$: GOTO 490 2978 RT$ = VL$: GOTO 490 2990 REM ---------SET SAVE 3000 IF NOT ( LEFT$ ("SAVE",LPARM) = PARM$ AND LPARM > 1) THEN 3250 3010 IF VL$ = "?" THEN PRINT "SAVES ALL SET PARAMETERS": GOTO 510 3015 P2$ = ",":P3$ = "%": GOSUB 9600 3017 XX$ = PH$:PH$ = P1$ 3020 PRINT D$"DELETE KERMIT/SETSAVE" 3030 PRINT D$"OPENKERMIT/SETSAVE": PRINT D$"WRITEKERMIT/SETSAVE" 3050 PRINT BAUD: PRINT LECHO$: PRINT PRITY$: PRINT SLOT: PRINT CARD$: PRINT MARK: PRINT TIMEO: PRINT FW$: PRINT DEBUG$: PRINT DRIVE: PRINT PHNUM$: PRINT SC$: PRINT VI$: PRINT ES: PRINT EOL: PRINT RT$ 3070 PRINT D$"CLOSEKERMIT/SETSAVE" 3075 PH$ = XX$ 3090 GOTO 490 3230 REM ---------SET PHONE # 3250 IF NOT ( LEFT$ ("PHONE #",LPARM) = PARM$ AND LPARM > 1) THEN 3312 3270 IF VLUE$ = "?" THEN PRINT "ENTER PHONE # OR MODEM COMMAND PLUS #": PRINT "THIS IS USED FOR AUTODIAL MODEMS ONLY": PRINT "ENTER 'NONE' OTHERWISE": GOTO 490 3280 IF VL$ = "" OR VL$ = " " THEN PH$ = "NONE": GOTO 490 3290 PHNUM$ = VLUE$ 3292 FIRST = 1 3310 GOTO 490 3311 REM ----------SCROLL 3312 IF NOT ( LEFT$ ("SCROLL",LPARM) = PARM$ AND LPARM > 1) THEN 3320 3314 IF VLUE$ = "?" THEN PRINT "ON OR OFF": GOTO 490 3316 IF NOT (VLUE$ = "ON" OR VLUE$ = "OFF") THEN PRINT OO$: GOTO 490 3318 SCROLL$ = VLUE$: GOTO 490 3319 REM ------------SET VIDEO 3320 IF LEFT$ ("VIDEO",LPARM) < > PARM$ THEN 3352 3321 IF VLUE$ < > "?" THEN 3332 3322 HOME : PRINT "POSSIBLE SET VIDEO VALUES ARE:": PRINT " I,N,A,M,T,W,4,7": PRINT : PRINT "I INVERSE VIDEO" 3323 PRINT "N NORMAL VIDEO" 3324 PRINT : PRINT "A AUTO LINE FEED" 3325 PRINT "M NO AUTO LINE FEED" 3326 PRINT : PRINT "T TRUNCATE RIGHT MARGIN" 3327 PRINT "W WRAP LINE AROUND" 3328 PRINT : PRINT "4 40 COLUMN DISPLAY" 3329 PRINT "7 70 COLUMN DISPLAY" 3330 GOTO 490 3332 FOR I = 1 TO LEN (VLUE$):A$ = MID$ (VLUE$,I,1) 3333 IF A$ = "I" THEN POKE KE + 15,127 3334 IF A$ = "N" THEN POKE KE + 15,0 3335 IF A$ = "T" THEN POKE KE + 14,1 3336 IF A$ = "W" THEN POKE KE + 14,0 3337 IF A$ = "A" THEN POKE KE + 13,1 3338 IF A$ = "M" THEN POKE KE + 13,0 3339 IF A$ = "7" THEN POKE KE + 16,0 3340 IF A$ = "4" THEN POKE KE + 16,255 3345 NEXT I 3346 VI$ = VL$ 3347 CALL KE + 23 3350 GOTO 490 3351 REM ------ ESCAPE 3352 IF LEFT$ ("ESCAPE",LP) < > PA$ THEN 3360 3353 IF VL$ = "?" THEN PRINT "ESCAPE CODE VALUE IS DECIMAL ASCII": PRINT "BETWEEN 1 AND 127, 27 IS THE DEFAULT": GOTO 490 3354 IF VAL (VL$) < 1 OR VAL (VL$) > 127 THEN PRINT "ESC MUST BE BETWEEN 1 AND 127.": PRINT "27 IS DEFAULT": GOTO 490 3355 ES = VAL (VL$):ES$ = VL$:ES = ES + 128 3356 FIRST = 1 3359 GOTO 490 3360 PRINT "INVALID SET COMMAND": GOTO 490 3365 REM 3370 REM *********STATUS/SHOW SCREEN ******************** 3390 REM 3410 PRINT : PRINT CHR$ (16) CHR$ (10);" STATUS OF KERMIT-]"; CHR$ (91): PRINT 3430 PRINT " (USE 'SET SAVE' TO SAVE THIS STATUS)": PRINT 3450 PRINT "BAUD RATE......"BA 3470 PRINT "LOCAL-ECHO....."LE$ 3490 PRINT "PARITY........."PR$ 3510 PRINT "SLOT..........."SL 3530 PRINT "CARD..........."CA$ 3550 PRINT "MARK..........."MA 3570 PRINT "TIMEOUT........"TI 3590 PRINT "FILE-WARNING..."FW$ 3610 PRINT "DEBUG.........."DE$ 3650 PRINT "PHONE #........"PH$ 3655 PRINT "SCROLL........."SC$ 3660 PRINT "VIDEO.........."VI$ 3665 PRINT "ESCAPE........."ES - 128 3666 PRINT "EOL............"EO 3668 PRINT "REPEAT-PROC...."RT$ 3670 PRINT 3690 PRINT : GOTO 490 3710 REM *********SEND A BREAK**** 3711 ZZ$ = "" 3712 IF PA$ < > "?" THEN 3714 3713 PRINT : PRINT "IF YOU HAVE SUPER SERIAL CARD,": PRINT "USE BREAK TO DIS/CONNECT NON-UNIVAC HOST": PRINT :GOT0490 3714 IF LEFT$ (CA$,3) < > "SUP" THEN PRINT : PRINT "WRONG EQUIP FOR THIS COMMAND": PRINT "FOR BREAK, CONNECT--": PRINT "THEN TYPE: CTL-SHIFT-P": PRINT : GOTO 490 3715 IF FIRST THEN CMD$ = "SKIP":ZZ$ = "Y": GOTO 3730 3716 PRINT : INPUT "DISCONNECT HOST (NON-UNIVAC) (Y/N)?";ZZ$ 3717 IF LEFT$ (ZZ$,1) < > "Y" THEN PRINT D$;"PR#";SL: PRINT CHR$ (1);"B": PRINT D$;"PR#0": CALL KE + 23:CMD$ = "":ZZ$ = "": CALL KERM + 3: GOTO 490 3719 GOTO 4390 3730 REM *********** CONNECT ******** 3750 REM 3751 PRINT 3752 IF PARM$ < > "?" THEN 3810 3754 PRINT "CONNECT IS USED EITHER TO INITIALLY" 3755 PRINT "CONNECT TO A HOST OR TO RECONNECT" 3756 PRINT "AFTER PREVIOUSLY LOGGING ON" 3758 GOTO 490 3810 POKE KERM - 9,0: REM RESET PACKET COUNTER 3811 POKE KE - 2,EOL 3820 POKE KE - 11,TI: REM TIMEOUT 3830 IF NOT FIRST THEN CALL KERM + 3: GOTO 490 3840 POKE KE + 31,ES: REM ESCAPE CHAR 3850 FIRST = 0 3910 REM 3915 IF CARD$ < > "MICROMODEM" THEN 5750 3920 IF BAUD < > 300 THEN PRINT "ONLY 300 BAUD SUPPORTED WITH MICROMODEM": PRINT : PRINT "BAUD RATE NOW SET TO 300":BAUD = 300 3925 IF PR$ = "MARK" OR PR$ = "SPACE" THEN PRINT NSUP$: GOTO 490 3927 PRINT : INPUT "ARE YOU ALREADY CONNECTED TO HOST?";Z$ 3928 IF LEFT$ (Z$,1) = "Y" THEN Z$ = "Y": PRINT : GOTO 3950 3931 PRINT : PRINT "COMMENCE HOST DIAL-UP": PRINT "WHEN CARRIER, TYPE SIGN-ON KEYINS": PRINT 3932 PRINT D$;"PR#";SLOT 3934 PRINT CHR$ (26): REM CTRL-Z, HANG UP 3935 HOME : FOR I = 1 TO 500: NEXT I 3936 PRINT D$;"PR#0": CALL KE + 23 3950 STREG% = 134 + SLOT * 16 3970 TRREG% = STREG% + 1:RCREG% = TRREG% 3990 TBIT% = 2:RBIT% = 1 4010 GOSUB 6250 4030 HOME 4050 PRINT USE$ 4055 IF Z$ = "Y" THEN 4150 4060 IF PH$ < > "NONE" THEN 4070 4062 INPUT "ENTER PHONE #: ";PH$ 4064 PRINT "PHONE # IS ";PH$;" OK? (Y/N)";: 4065 GET RE$: PRINT RE$ 4066 IF RE$ < > "Y" THEN 4062 4068 CALL KE + 20 4070 PRINT D$;"PR#";SLOT 4090 PRINT Q$;PHNUM$ 4100 PRINT 4110 PRINT D$;"PR#0": CALL KE + 23 4150 POKE - 16250 + 16 * SLOT,3 4170 IF PRITY$ = "EVEN" THEN TMP = 9: GOTO 4230: REM 7E1 4190 IF PRITY$ = "ODD" THEN TMP = 13: GOTO 4230: REM 7O1 4210 TMP = 21: REM 8N1 4230 POKE - 16250 + 16 * SLOT,TMP 4235 IF Z$ = "Y" THEN 4250 4240 TMP = 0 4242 IF TMP > 50 THEN PRINT "NO CARRIER":FIRST = 1: GOTO 490 4244 IF PEEK (49286 + 16 * SL) > = 4 THEN TMP = TMP + 1: GOTO 4242 4246 PRINT "CONNECT" 4250 CALL KERM + 3 4270 GOTO 490 4290 REM 4310 REM 5730 REM 5750 REM ******* NEW CARDS ***** 5770 REM 5790 REM 6170 PRINT "KERMIT IS NOT CURRENTLY CONFIGURED FOR THIS CARD": GOTO 490 6190 REM 6210 REM SUBROUTINE TO POKE KERM 6230 REM 6250 POKE KERM - 12,STREG%: REM STATUS REGISTER 6270 POKE KERM - 13,TRREG%: REM TRANS REG 6290 POKE KERM - 14,RCREG%: REM RECEIVE REG 6310 POKE KERM - 15,TBIT%: REM TRANSMIT BIT 6330 POKE KERM - 16,RBIT%: REM RECEIVE BIT 6350 RETURN 6370 REM ***********SEND************* 6390 REM 6410 IF PEEK (222) = 6 THEN PRINT "FILE NOT ON DISK";BS$: GOTO 490 6430 IF PEEK (222) = 5 THEN GOTO 6930: REM EOF 6450 IF PEEK (222) = 8 THEN PRINT BS$: PRINT "I/O ERROR, ";AB$: GOTO 6930 6470 IF PEEK (222) = 13 THEN PRINT "FILE NOT A TEXT FILE. ";BS$: GOTO 490 6490 PRINT : PRINT "ERROR #"; PEEK (222);" AT LINE "; PEEK (218) + 256 * PEEK (219): PRINT D$"CLOSE": GOTO 490 6510 ONERR GOTO 6410 6511 IF PA$ = "?" THEN PRINT "SEND A TEXT FILE TO THE HOST": PRINT "EX. SEND LETTER": GOTO 510 6512 IF VL$ < > "" THEN PA$ = PA$ + " " + VL$ 6530 IF PARM$ = "" THEN INPUT "ENTER FILE TO SEND: ";PARM$: GOTO 6530 6531 F$ = PA$ 6532 IF RIGHT$ (PA$,3) = ",D1" OR RIGHT$ (PA$,3) = ",D2" THEN F$ = LEFT$ (PA$, LEN (PA$) - 3) 6570 PRINT D$;"VERIFY";PA$ 6575 GOSUB 9500 6590 PRINT D$;"OPEN ";PA$ 6610 PRINT D$;"READ ";F$ 6620 POKE KERM + 12,0: REM SEND MODE 6625 RPT$ = CHR$ (32): POKE KE - 8,0: REM SET RPT$ FOR SEND 6630 DTA$ = CHR$ (MB + 32) + CHR$ (TIMEO + 32) + CHR$ (NPD + 32) + CHR$ (PD + 64) + CHR$ (EOL + 32) + QUOTE$ + B8$ + CK$ + RPT$ 6650 TYPE$ = "S" 6710 GOSUB 7130 6730 GOSUB 8870: REM SEND INIT HANDLER 6750 TYPE$ = "F":DTA$ = F$ 6770 GOSUB 7130 6790 TYPE$ = "D" 6810 DTA$ = "" 6830 X = FRE (0) 6850 CALL KERM + 6,DTA$: REM ONE LINE 6870 IF SC$ = "ON" THEN PRINT "X";DTA$; 6890 GOSUB 7130 6910 GOTO 6790 6930 TYPE$ = "Z":DTA$ = "": REM EOF 6950 GOSUB 7130 6955 IF PEEK (222) = 8 GOTO 6990 6970 PRINT : PRINT AS$: PRINT "*";: PRINT TC$;: PRINT "*": PRINT AS$: PRINT BS$: PRINT 6990 TYPE$ = "B":DTA$ = "": REM EOT (BREAK) 7010 CALL KERM,TYPE$,DTA$ 7030 PRINT D$;"CLOSE " 7050 GOTO 490 7070 REM -------------------------- 7090 REM SEND PACKET TO KERM 7110 REM HANDLE RETURNED STATUS CODES 7130 CALL KERM,TYPE$,DTA$ 7150 IF TYPE$ = "Y" THEN RETURN 7170 IF TYPE$ = "1" THEN PRINT AB$;"BY USER": POP : GOTO 6990 7190 IF TYPE$ = "2" THEN PRINT BS$: PRINT AB$;"DUE TO TIMEOUT": POP : GOTO 6990 7210 IF TYPE$ = "N" THEN PRINT : PRINT BS$: PRINT AB$;"DUE TO": PRINT CO$: PRINT DI$: POP : GOTO 3070 7230 PRINT UR$: POP : GOTO 6990 7250 REM --------------------------- 7270 REM 7290 REM ********** RECEIVE ******** 7310 REM 7330 IF PEEK (222) = 5 THEN GOTO 8090: REM SHORT FILE IS ON DISK 7350 IF PEEK (222) = 6 THEN GOTO 8250: REM FILE NOT FOUND, OK TO WRITE A NEW ONE 7370 PRINT "ERROR #"; PEEK (222);" AT LINE " PEEK (218) + PEEK (219) * 256 7390 TYPE$ = "E": PRINT D$;"CLOSE ";F$ 7410 CALL KERM,TYPE$,DTA$ 7430 IF PEEK (222) = 4 THEN PRINT "DISK IS WRITE PROTECTED. ";AB$ 7450 IF PEEK (222) = 8 THEN PRINT BS$: PRINT "I/O ERROR. ";AB$ 7470 IF PEEK (222) = 9 THEN PRINT BS$: PRINT "DISK FULL. PREMATURE END OF TRANSFER." 7490 IF PEEK (222) = 13 THEN PRINT "FILE TYPE MISMATCH. ";AB$ 7510 GOTO 490 7530 ONERR GOTO 7330 7535 IF (PA$ < > "" AND PA$ < > "?" AND PA$ < > ",D1" AND PA$ < > ",D2") THEN 1130 7540 IF PA$ = "?" THEN PRINT "RECEIVE A FILE FROM THE HOST": GOTO 510 7550 POKE KER - 11,30 7570 IF SC$ = "ON" THEN PRINT D$;"MON O" 7590 REM 7610 REM - GET REMOTE'S SEND-INIT------- 7630 TYPE$ = "0" 7650 POKE KERM + 12,255: REM SET RECV MODE 7670 GOSUB 8530 7690 IF TYPE$ < > "S" THEN GOSUB 8710 7694 REM DEFINE REPEAT PROCESSING DESIRED 7695 IF RT$ = "ON" THEN RPT$ = CHR$ (126): POKE KE - 8,126: GOTO 7750 7697 RPT$ = CHR$ (32): POKE KE - 8,0 7710 REM 7730 REM -NEXT POKE VALUES FROM REMOTE'S SEND INIT PACKET AND SEND APPLE'S INITIAL CONNECTION PARMS------ 7750 GOSUB 8870: REM SEND INIT HANDLER 7770 TYPE$ = "Y" 7780 DTA$ = CHR$ (MB + 32) + CHR$ (TI + 32) + CHR$ (32) + CHR$ (64) + CHR$ (EOL + 32) + QU$ + B8$ + CK$ + RPT$ 7790 GOSUB 8530 7810 REM 7830 REM --KERM SHOULD COME BACK WITH AN F PACKET--------------- 7850 IF TYPE$ = "S" THEN DTA$ = "":TYPE$ = "0": GOSUB 8530 7870 IF TYPE$ = "S" OR TYPE$ = "Z" THEN DTA$ = "":TYPE$ = "Y": GOSUB 8530: GOTO 7870 7890 IF TYPE$ < > "F" THEN GOSUB 8690 7910 F$ = "": FOR I = 1 TO LEN (DTA$) 7930 CHAR$ = MID$ (DTA$,I,1) 7950 IF CHAR$ = "." AND I = LEN (DTA$) THEN GOTO 8010 7970 F$ = F$ + CHAR$ 7990 NEXT I 8010 IF FW$ = "OFF" THEN GOTO 8250 8030 REM 8050 REM CHECK FOR FILE ALREADY ON DISK 8070 PRINT D$"VERIFY ";F$;PA$: REM WILL ERROR IF NO FILE 8090 PRINT : PRINT : PRINT : PRINT : PRINT BS$: PRINT "FILE '";F$;"' ALREADY EXISTS": PRINT : PRINT : PRINT : PRINT "A)APPEND": PRINT "B)OVERWRITE": PRINT "C)ENTER A NEW NAME": PRINT : PRINT : PRINT 8110 INPUT "ENTER CHOICE: ";ANS$ 8130 IF ANS$ = "A" THEN PRINT D$;"APPEND ";F$: GOSUB 9500: GOTO 8270 8150 IF ANS$ = "C" THEN INPUT "ENTER NEW FILE NAME: ";F$: GOTO 8070 8170 IF ANS$ = "B" THEN PRINT D$;"DELETE ";F$: GOTO 8250 8190 GOTO 8090 8210 REM 8230 REM -------- GET DATA------- 8250 GOSUB 9500 8255 PRINT D$;"OPEN ";F$ 8270 PRINT D$;"WRITE ";F$ 8290 DTA$ = "" 8310 TYPE$ = "Y": GOSUB 8530: REM TELL KERM READY FOR DATA 8330 REM 8350 REM -------GET DATA PACKETS--- 8370 IF NOT (TYPE$ = "D" OR TYPE$ = "Z") THEN GOSUB 8710 8390 IF TYPE$ = "D" THEN PRINT DTA$; 8410 IF TYPE$ = "Z" THEN PRINT D$;"CLOSE ";F$:TYPE$ = "Y":DTA$ = "": GOSUB 8530: GOTO 7870 8430 TYPE$ = "Y":DTA$ = "": GOSUB 8530: REM GET NEXT PACKET 8450 GOTO 8390 8470 REM ------------------------------ 8490 REM SEND PACKET TO KERM, CHECK STATUS CODES 8510 REM 8530 CALL KERM,TYPE$,DTA$ 8550 IF (TYPE$ = "D" OR TYPE$ = "S" OR TYPE$ = "F" OR TYPE$ = "Z") THEN RETURN 8570 PRINT D$;"CLOSE ": PRINT D$;"NOMON O" 8590 PRINT 8610 IF TYPE$ = "N" THEN PRINT : PRINT BS$: PRINT AB$;"DUE TO": PRINT CO$: PRINT DI$: GOTO 8730 8630 IF TYPE$ = "1" THEN PRINT AB$;"BY USER": GOTO 8730 8650 IF TYPE$ = "2" THEN PRINT BS$: PRINT AB$;"DUE TO TIMEOUT.": GOTO 8730 8670 IF TYPE$ = "B" THEN PRINT AS$: PRINT "*";: PRINT TC$;: PRINT "*": PRINT AS$: PRINT BS$:TY$ = "9": GOTO 8750 8675 IF TY$ = "4" THEN PRINT "REC BUFFER OVERFLOW. ";AB$;BS$: PRINT : PRINT "TRY SETTING REPEAT-PROC TO 'OFF'": PRINT "AND RESTART TRANSFER": GOTO 8730 8680 IF TY$ = "E" GOTO 8710 8690 PRINT BS$: PRINT UR$: PRINT "CODE=";TY$: PRINT AB$: GOTO 8730 8710 PRINT : PRINT "UNEXPECTED PACKET TYPE ";TYPE$: PRINT AB$: PRINT BS$ 8730 TYPE$ = "E" 8750 DTA$ = "": REM NOTHING... 8770 CALL KERM,TYPE$,DTA$ 8790 POP : PRINT D$;"NOMON O": GOTO 490 8810 REM ------------------------------ 8830 REM ******* SEND INIT HANDLER *** 8850 REM 8870 LDTA = LEN (DTA$) 8890 IF LDTA = 0 THEN RETURN 8910 TMP$ = LEFT$ (DTA$,1):RMB = ASC (TMP$) - 32 8930 IF RMB < = 96 THEN POKE KERM - 1,RMB 8935 IF RMB < = 96 AND RMB > 5 THEN POKE 2258,RMB - 5: REM TEMP FIX 8950 IF LDTA < 2 THEN RETURN 8970 TMP$ = MID$ (DTA$,2,1):TMOUT = ASC (TMP$) - 32 8990 POKE KERM - 11,TMOUT 9010 IF LDTA < 3 THEN RETURN 9030 TMP$ = MID$ (DTA$,3,1):RNPAD = ASC (TMP$) - 32 9050 IF RNPAD > 0 THEN POKE KERM - 4,RNPAD 9070 IF LDTA < 4 THEN RETURN 9090 TMP$ = MID$ (DTA$,4,1):RPAD = ASC (TMP$) - 64 9110 IF RPAD > 0 THEN POKE KERM - 3,RPAD 9130 IF LDTA < 5 THEN RETURN 9150 TMP$ = MID$ (DTA$,5,1):EOL = ASC (TMP$) - 32 9170 POKE KERM - 2,EOL 9190 IF LDTA < 6 THEN RETURN 9210 RQU$ = MID$ (DTA$,6,1) 9230 IF PEEK (KE + 12) = 255 AND NOT (RQU$ = CHR$ (32)) THEN POKE KE - 6, ASC (RQU$): REM REC ONLY 9250 IF LDTA < 7 THEN RETURN 9270 R8B$ = MID$ (DTA$,7,1) 9290 IF NOT (R8B$ = "N" OR R8B$ = CHR$ (32)) THEN POKE KE - 7, ASC (R8B$) 9292 IF R8B$ = "Y" THEN POKE KE - 7, ASC (B8$): REM B8$ SET IN STMT 275 9350 IF LDTA < 9 THEN RETURN 9370 TMP$ = MID$ (DTA$,9,1):RPT = ASC (TMP$) 9390 IF ( PEEK (KE + 12) = 0 OR RT$ = "OFF") THEN RETURN 9392 IF RPT = 126 THEN RETURN 9395 RPT$ = CHR$ (RPT) 9397 IF RPT = 32 THEN POKE KE - 8,0: REM NO REP CHAR 9398 IF RPT < > 32 THEN POKE KE - 8,RPT 9410 RETURN 9430 TEXT : PRINT D$;"PR#0": POKE 104,8: POKE 8 * 256,0: END 9500 IF SC$ = "OFF" AND DE$ = "OFF" THEN PRINT : PRINT : PRINT "TRANSMISSION IN PROGRESS -- WAIT": PRINT : PRINT 9505 RETURN 9600 REM PHNUM$ COMMA SUBR 9605 P1$ = "" 9610 FOR I = 1 TO LEN (PH$) 9615 XX$ = MID$ (PH$,I,1) 9620 IF XX$ < > P2$ THEN P1$ = P1$ + XX$: GOTO 9630 9625 P1$ = P1$ + P3$ 9630 NEXT I 9640 RETURN SAVE KERMIT LOCK KERMIT //go.sysin dd * if [ `wc -c < a-kermit` != 25467 ]; then made=FALSE echo error transmitting a-kermit -- echo length should be 25467, not `wc -c < a-kermit` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-kermit echo -n ' '; ls -ld a-kermit fi echo Extracting a-p-u sed 's/^X//' <<'//go.sysin dd *' >a-p-u NEW 1 POKE 33,40 10 REM MAIN ROUTINE PACK/UNPACK 12 REM ROBERT M. HOLLEY, JR. 13 REM SE REGIONAL DATA CENTER, MIAMI, FL 14 REM JULY, 1985 20 QU = 0 25 D$ = CHR$ (13) + CHR$ (4) 30 LOC = 24831 32 TXT2BIN = 830:BIN2TXT = 780 35 PACK = 24700:UNPACK = 24576 190 GOSUB 45000: REM GET STACK SAVER 200 GOSUB 50000: REM GET BIN2TEXT 210 GOSUB 55000: REM GET TEXT2BIN 220 GOSUB 60000: REM GET P/U 250 HOME 251 PRINT "(P)ACK OR (U)NPACK?"; 252 POKE - 16368,0: GET PU$ 255 IF PU$ < > "P" AND PU$ < > "U" THEN PRINT : GOTO 251 257 PRINT PU$: PRINT 260 IF PU$ = "P" THEN GOSUB 1000 270 IF PU$ = "U" THEN GOSUB 2000 300 IF QUIT = 1 THEN END 350 GOTO 250 999 REM PACK PIX TO BIN AND/OR TEXT 1000 PRINT : INPUT "PACK PIX FROM HIRES SCREEN 1 OR 2?";SS$ 1005 S = VAL (SS$) 1010 IF S < > 1 AND S < > 2 THEN 1000 1020 PRINT : PRINT "PACK PIX FROM (M)EMORY OR (F)ILE?"; 1022 POKE - 16368,0: GET MF$ 1030 IF MF$ < > "M" AND MF$ < > "F" THEN PRINT : GOTO 1020 1035 PRINT MF$: PRINT 1040 IF MF$ = "M" THEN 1200 1050 PRINT : INPUT "NAME OF UNPACKED PIX FILE:";UF$ 1055 IF UF$ = "" THEN 1050 1060 SPEC$ = "BLOAD " + UF$ + ",A" + STR$ (S * 8192) 1065 OK = 1:SOURCE = 1 1070 GOSUB 10000 1080 IF OK THEN 1200 1090 GOTO 1050 1200 PRINT : INPUT "WOULD YOU LIKE TO DISPLAY PIX?";Z$ 1205 GOSUB 9900 1206 IF Z$ = "N" THEN 1250 1210 GOSUB 12000 1220 PRINT : INPUT "IS PIX OK?";Z$ 1225 GOSUB 9900 1240 IF Z$ = "N" THEN 1000 1250 POKE 0,LOC - ( INT (LOC / 256) * 256): POKE 1, INT (LOC / 256): POKE 230,S * 32 1260 CALL PACK 1265 LN = PEEK (0) + PEEK (1) * 256 - LOC: REM LENGTH 1270 PRINT : PRINT "NAME OF FILE(S) TO STORE PACKED DATA IN": PRINT "DO NOT INCLUDE -PAC OR -PAC-T SUFFIX.": PRINT : INPUT "NAME:";PF$ 1275 IF PF$ = "" THEN 1270 1280 PRINT : INPUT "SAVE PACKED PIX IN BINARY FILE?";Z$ 1290 GOSUB 9900 1300 IF Z$ = "N" THEN 1400 1315 OK = 1:SOURCE = 2 1320 SPEC$ = "BSAVE " + PF$ + "-PAC,A" + STR$ (LOC) + ",L" + STR$ (LN) 1325 GOSUB 10000 1330 IF NOT OK THEN 1280 1340 PRINT : PRINT "PACKED PIX --> BIN FILE: ";PF$;"-PAC" 1345 PRINT : PRINT 1400 PRINT : INPUT "SAVE PACKED PIX IN TEXT FILE?";Z$ 1405 GOSUB 9900 1410 IF Z$ = "N" THEN 1500 1430 POKE 2,(LN + 39) / 40 1440 POKE 3,LOC - ( INT (LOC / 256) * 256): POKE 4, INT (LOC / 256) 1445 OK = 1:SOURCE = 3 1450 ONERR GOTO 12500 1455 PRINT D$"OPEN ";PF$;"-PAC-T" 1460 PRINT D$"DELETE ";PF$;"-PAC-T" 1465 PRINT D$"OPEN ";PF$;"-PAC-T" 1470 PRINT D$"WRITE ";PF$;"-PAC-T" 1475 CALL BIN2TXT 1480 PRINT D$"CLOSE ";PF$;"-PAC-T" 1490 IF NOT OK THEN 1400 1495 PRINT "PACKED PIX --> TEXT FILE: ";PF$;"-PAC-T" 1497 PRINT : PRINT 1500 PRINT : PRINT : INPUT "PACK OR UNPACK ANOTHER PIX?";Z$ 1505 GOSUB 9900 1510 IF Z$ = "Y" THEN QU = 0: RETURN 1520 QU = 1: RETURN 1999 REM UNPACK ROUTINE 2000 MSG1$ = "NAME OF DISK FILE" + CHR$ (13) + " TO STORE DATA" 2009 PRINT : PRINT : PRINT "UNPACK FROM (T)EXT OR (B)IN FILE?"; 2010 POKE - 16368,0: GET TB$ 2015 IF TB$ < > "T" AND TB$ < > "B" THEN PRINT : GOTO 2009 2020 PRINT TB$: PRINT 2025 PRINT : PRINT "NAME OF PACKED FILE": INPUT "W/O -PAC OR -PAC-T SUFFIX?";PF$ 2030 IF TB$ = "T" THEN 2100 2040 OK = 1:SOURCE = 4 2050 SPEC$ = "BLOAD " + PF$ + "-PAC,A" + STR$ (LOC) 2060 GOSUB 10000 2070 IF OK THEN 2200 2080 GOTO 2025 2100 HOME : VTAB 12: HTAB 3: PRINT "DECODING TEXT FILE-- PLEASE WAIT" 2110 OK = 1:SOURCE = 5 2120 ONERR GOTO 12500 2130 PRINT D$"VERIFY ";PF$;"-PAC-T" 2135 PRINT D$"OPEN ";PF$;"-PAC-T" 2140 PRINT D$"READ ";PF$;"-PAC-T" 2150 Y = LOC:LN = 0 2155 FOR X = 0 TO 10000 2157 CALL TXT2BIN 2160 POKE Y + X, PEEK (829) 2162 LN = LN + 1 2165 NEXT X 2167 IF NOT OK THEN 2009 2170 HOME 2200 PRINT : INPUT "UNPACK PIX TO HIRES SCREEN 1 OR 2?";SS$ 2205 S = VAL (SS$) 2210 IF S < > 1 AND S < > 2 THEN 2200 2220 POKE 0,LOC - ( INT (LOC / 256) * 256): POKE 1, INT (LOC / 256): POKE 230,32 * S 2230 CALL UNPACK 2300 PRINT : PRINT "DO YOU WISH TO-": PRINT : PRINT " (V)IEW PICTURE": PRINT " (N)ORMAL PIX SAVE TO BIN FILE": PRINT " (P)ACKED PIX SAVE TO BIN FILE": PRINT " (C)ONTINUE PACK/UNPACK": PRINT " (Q)UIT PROGRAM": PRINT 2310 POKE - 16368,0: GET CH$: PRINT CH$ 2400 IF CH$ = "V" THEN GOSUB 12000: GOTO 2300 2500 IF CH$ < > "N" THEN 2600 2510 PRINT : PRINT MSG1$;: INPUT NF$ 2515 IF NF$ = "" THEN 2510 2520 OK = 1:SOURCE = 6 2530 SPEC$ = "BSAVE " + NF$ + ",A" + STR$ (S * 8192) + ",L" + STR$ (8192) 2540 GOSUB 10000 2550 IF NOT OK THEN 2510 2555 PRINT "PIX --> NORMAL BIN FILE:";NF$: PRINT : PRINT 2560 GOTO 2300 2600 IF CH$ < > "P" THEN 2700 2610 PRINT : PRINT MSG1$: INPUT "W/O -PAC SUFFIX?";PF$ 2615 IF PF$ = "" THEN 2610 2620 OK = 1:SOURCE = 7 2630 SPEC$ = "BSAVE " + PF$ + "-PAC,A" + STR$ (LOC) + ",L" + STR$ (LN) 2640 GOSUB 10000 2650 IF NOT OK THEN 2610 2655 PRINT "PACKED PIX --> BIN FILE:";PF$: PRINT : PRINT 2660 GOTO 2300 2700 IF CH$ < > "C" THEN 2800 2710 QU = 0: RETURN 2800 IF CH$ < > "Q" THEN 2900 2810 QU = 1: RETURN 2900 PRINT : PRINT "IMPROPER CHOICE-- CHOOSE AGAIN": GOTO 2310 9899 REM CHECK YES OR NO ANSWER 9900 Z$ = LEFT$ (Z$,1) 9905 IF Z$ = "Y" OR Z$ = "N" THEN RETURN 9910 INVERSE 9920 PRINT : INPUT "ANSWER Y OR N:";Z$ 9925 NORMAL 9930 GOTO 9900 9999 REM BLOAD/BSAVE SUBROUTINE 10000 ONERR GOTO 10200 10010 PRINT D$;SPEC$ 10020 OK = 1: RETURN 10200 GOSUB 13000: RETURN 11999 REM DISPLAY HIRES PIX 12000 POKE - 16304,0: POKE - 16297,0: POKE - 16302,0 12005 IF S = 2 THEN POKE - 16299,0 12010 POKE - 16368,0: GET Z$ 12020 TEXT : HOME : RETURN 12499 REM ERROR HANDLER 12500 Y = PEEK (222):OK = 0 12502 IF Y = 5 AND SOURCE = 5 AND X > 0 THEN OK = 1: CALL 768: GOTO 2167 12503 IF SOURCE = 5 THEN PRINT "PROBLEM READING TEXT FILE": PRINT "CHECK FILE NAME & DISK DRIVE": PRINT "PRESS RETURN TO CONTINUE": CALL 768: GET Z$: GOTO 2167 12505 GOSUB 13000 12510 ON SOURCE GOTO 1080,1330,1490,2167,2145,2550,2650 12999 REM PRINT DOS ERROR MSGS 13000 Y = PEEK (222):OK = 0: CALL 768 13005 PRINT : PRINT "ERROR ";Y;" * ";SO;","; PEEK (218) + PEEK (219) * 256 13007 INVERSE 13010 IF Y = 6 THEN PRINT "FILE NOT ON DISK" 13020 IF Y = 8 THEN PRINT "I/O ERROR" 13030 IF Y = 13 THEN PRINT "WRONG FILE TYPE" 13040 IF Y = 9 THEN PRINT "DISK IS FULL" 13045 IF Y = 4 THEN PRINT "WRITE PROTECTED" 13050 IF Y = 10 THEN PRINT "FILE EXISTS/LOCKED" 13057 NORMAL : PRINT 13060 IF Y < 4 OR Y > 13 THEN END 13065 IF Y = 7 OR Y = 5 OR Y = 11 OR Y = 12 THEN END 13070 CALL 768: RETURN 44999 REM GET STACK SAVER 45000 POKE 768,104: POKE 769,168: POKE 770,104: POKE 771,166: POKE 772,223: POKE 773,154: POKE 774,72: POKE 775,152: POKE 776,72: POKE 777,96 45010 RETURN 49999 REM GET BIN2TXT ROUTINE 50000 PRINT D$"BLOAD BIN2TXT,A$030C 50010 RETURN 54999 REM GET TXT2BIN ROUTINE 55000 PRINT D$"BLOAD TXT2BIN,A$033E 55010 RETURN 59999 REM GET PACK/UNPACK ROUTINE 60000 PRINT D$"BLOAD PACK/UNPACK" 60010 POKE 24635,2: REM ASSY PATCH 60015 RETURN SAVE P/U LOCK P/U //go.sysin dd * if [ `wc -c < a-p-u` != 6975 ]; then made=FALSE echo error transmitting a-p-u -- echo length should be 6975, not `wc -c < a-p-u` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-p-u echo -n ' '; ls -ld a-p-u fi echo Extracting a-p-u-go sed 's/^X//' <<'//go.sysin dd *' >a-p-u-go NEW 1 POKE 33,40 10 REM PROGRAM TO INTRO & DOC 20 REM APPLE II PICTURE UTIL 25 REM AFTER INTRO/DOC, RUNS 30 REM PROGRAM P/U 40 D$ = CHR$ (4) 45 HOME : PRINT "SERDAC APPLE II HI-RES PICTURE UTILITY" 46 PRINT : PRINT "COMPACTS STORED OR ACTUAL APPLE H/R PIX": PRINT "& CONVERTS COMPACT BINARY TO ASCII HEX": PRINT "TEXT FILE SO IT CAN BE UP/DOWNLOADED." 47 PRINT "ALSO DECODES HEX TEXT FILES BACK TO": PRINT "UNCOMPACTED BIN FILES OR ACTUAL H/R PIX" 48 PRINT : PRINT "PIX COMPACTION ROUTINE BY DAV HOLLE &": PRINT "MARK PELCZARSKI, SOFTALK, 5/83, P. 237": PRINT 57 PRINT "BASED ON IDEAS BY M.GEIER & B. SHERMAN,": PRINT "MIAMI'S 'BIG APPLE' BULLETIN BOARD SYS" 59 PRINT : PRINT "APPLESOFT PROGRAM P/U & 6502 ASSY PROG": PRINT "BIN2TXT WRITTEN SPECIALLY FOR ARTNET": PRINT : PRINT " BY ROBERT M. HOLLEY, JR.": PRINT : PRINT "S.E. REGIONAL DATA CENTER, MIAMI, FLA": PRINT " MAY, 1985": PRINT : 65 INPUT "NEED INSTRUCTIONS?";Z$ 70 IF LEFT$ (Z$,1) < > "Y" THEN 2045 72 HOME 999 HOME 1000 PRINT "INSTRUCTIONS FOR USING SERDAC APPLE II" 1005 PRINT " PICTURE UTILITY" 1010 PRINT : PRINT 1015 PRINT "THE FIRST CHOICE YOU WILL HAVE IN USING" 1020 PRINT "THIS PROGRAM IS WHETHER TO (P)ACK OR" 1025 PRINT "TO (U)NPACK AN APPLE II HI-RES PICTURE." 1030 PRINT : PRINT 1035 PRINT "*** PACK ***" 1040 PRINT 1045 PRINT "THE 'PACK' FEATURE ALLOWS YOU TO" 1050 PRINT "'COMPRESS' A HI-RES APPLE PICTURE INTO" 1055 PRINT "THE SMALLEST POSSIBLE MEMORY " 1060 PRINT "AND/OR DISK FILE SPACE. BECAUSE OF" 1065 PRINT "THE UNIQUE WAY APPLE PICTURES ARE" 1070 PRINT "STORED IN MEMORY, AND THE LARGE AREAS" 1075 PRINT "OF SOLID COLOR WHICH COMPOSE MANY" 1080 PRINT "PICTURES, IT IS POSSIBLE TO COMPRESS" 1085 PRINT "SOME PICTURES BY AS MUCH AS 5 TIMES;" 1090 PRINT "MOST CAN BE COMPRESSED BY AT LEAST A" 1095 PRINT "FACTOR OF TWO. THAT MEANS THAT" 1096 PRINT 1097 INPUT "PRESS RETURN TO CONTINUE";Z$ 1099 HOME 1100 PRINT "INSTEAD OF TAKING UP 34 SECTORS ON A" 1105 PRINT "DISK TO STORE A PICTURE, YOU WILL" 1110 PRINT "NEED ONLY 7-17 SECTORS. MORE" 1115 PRINT "IMPORTANTLY, IF YOU PLAN TO TRANSMIT A" 1120 PRINT "PICTURE FROM ONE COMPUTER TO ANOTHER," 1125 PRINT "IT WILL TAKE ONLY 20-50% OF THE" 1130 PRINT "TRANSMISSION TIME REQUIRED FOR AN" 1135 PRINT "AN UNCOMPRESSED PICTURE. 1140 PRINT 1145 PRINT "THE 'PACK' FEATURE ALSO INCLUDES AN " 1150 PRINT "OPTION TO CONVERT/STORE THE COMPRESSED" 1155 PRINT "BINARY PICTURE AS A 'HEX TEXT' FILE." 1160 PRINT "HEX TEXT FILES ARE TWICE AS BIG AS THE" 1165 PRINT "CORRESPONDING BINARY FILE FOR THE SAME" 1170 PRINT "PICTURE, SO THEY DON'T MAKE VERY GOOD" 1175 PRINT "SENSE FOR PERMANENT STORAGE, BUT THEY" 1180 PRINT "ARE ALMOST INDISPENSABLE IF YOU PLAN" 1185 PRINT "TO TRANSMIT PICTURES TO ANOTHER" 1190 PRINT "COMPUTER. MOST APPLE II DATA TRANSFER" 1195 PRINT "PROGRAMS WILL NOT ALLOW YOU TO TRANSFER" 1200 PRINT "BINARY FILES. 1203 PRINT 1205 INPUT "PRESS RETURN TO CONTINUE";Z$ 1206 HOME 1210 PRINT "IF YOU DECIDE TO 'PACK' A PICTURE, YOU" 1215 PRINT "WILL * FIRST * BE ASKED TO CHOOSE" 1220 PRINT "WHICH HI-RES SCREEN (1 OR 2) TO PACK" 1225 PRINT "IT FROM. THERE ARE REALLY THREE" 1230 PRINT "POSSIBILITIES HERE:" 1232 PRINT 1235 PRINT "(1) YOU ARE CURRENTLY LOOKING AT A HI- 1240 PRINT "RES PICTURE, IN WHICH CASE YOU SHOULD" 1245 PRINT "KNOW WHICH SCREEN IS BEING VIEWED (IN" 1250 PRINT "MOST CASES, IT'S SCREEN 1); THAT'S THE" 1255 PRINT "ONE YOU WANT TO PACK FROM. 1257 PRINT 1260 PRINT "(2) YOU HAVE LOADED A PICTURE TO HI-RES" 1265 PRINT "SCREEN 1 ($2000-$3FFF) OR TO SCREEN 2" 1270 PRINT "($4000-$5FFF), BUT IT'S NOT UP ON YOUR" 1275 PRINT "SCREEN. THE AREA YOU LOADED IS THE ONE" 1280 PRINT "YOU WANT TO PACK FROM. 1281 VTAB (23) 1282 INPUT "PRESS RETURN TO CONTINUE";Z$ 1283 HOME 1285 PRINT "(3) THE PICTURE YOU WANT IS NOT IN THE" 1290 PRINT "MEMORY YET; IT IS IN A BINARY DISK FILE." 1295 PRINT "IN THAT CASE, YOU MAY SELECT EITHER" 1300 PRINT "SCREEN. THE PROGRAM WILL LOAD THE FILE" 1305 PRINT "TO THAT MEMORY AND PACK IT FROM THERE." 1308 PRINT 1315 PRINT "* SECOND *, YOU WILL BE ASKED, 'PACK" 1320 PRINT "PIX FROM (M)EMORY OR (F)ILE?'" 1325 PRINT "(M)EMORY COVERS POSSIBILITIES (1) AND" 1330 PRINT "(2) ABOVE. (F)ILE COVERS THE THIRD " 1335 PRINT "POSSIBILITY." 1338 PRINT 1350 PRINT "* THIRD *, IF YOU SELECT (F)ILE, YOU'LL" 1355 PRINT "BE ASKED THE NAME OF THE BINARY FILE" 1360 PRINT "THAT THE PICTURE IS STORED IN. THIS" 1365 PRINT "SHOULD ALWAYS BE A FILE NAME WHOSE" 1370 PRINT "CATALOG ENTRY HAS A 'B' AND A '033' OR" 1375 PRINT "'034' IN FRONT OF IT-- A BINARY FILE OF" 1380 PRINT "33-34 SECTORS." 1382 VTAB (23) 1383 INPUT "PRESS RETURN TO CONTINUE";Z$ 1384 HOME 1390 PRINT 1395 PRINT "* FOURTH *, YOU WILL BE ASKED IF YOU" 1400 PRINT "WOULD LIKE TO DISPLAY PIX?" 1405 PRINT 1410 PRINT "* FIFTH *, YOU WILL BE ASKED IF" 1415 PRINT "'PIX IS OK?'" 1420 PRINT 1425 PRINT "* SIXTH *, IF PIX IS OK, YOU WILL BE" 1430 PRINT "ASKED FOR A FILE NAME UNDER WHICH TO" 1435 PRINT "STORE THE COMPRESSED BINARY AND/OR HEX" 1440 PRINT "TEXT." 1445 PRINT 1450 PRINT "THE 'PACK' FEATURE AUTOMATICALLY" 1455 PRINT "APPENDS THE SUFFIX -PAC TO ANY NAME" 1460 PRINT "YOU SPECIFY AND STORES THE COMPRESSED" 1465 PRINT "BINARY AS NAME-PAC. SIMILARLY, IT" 1470 PRINT "APPENDS THE SUFFIX -PAC-T TO ANY NAME" 1475 PRINT "YOU SPECIFY AND STORES COMPRESSED HEX" 1480 PRINT "TEXT FILES AS NAME-PAC-T. 1482 VTAB (23) 1484 INPUT "PRESS RETURN TO CONTINUE";Z$ 1485 HOME 1490 PRINT "* SEVENTH *, YOU WILL BE ASKED IF YOU" 1495 PRINT "WISH TO 'SAVE PACKED PIX IN BINARY 1500 PRINT "FILE?' (EXCELLENT FOR DISK STORAGE)." 1510 PRINT 1515 PRINT "* EIGHTH *, YOU WILL BE ASKED IF YOU" 1520 PRINT "WISH TO 'SAVE PACKED PIX IN TEXT FILE?'" 1525 PRINT "(WASTEFUL OF DISK STORAGE, BUT NEEDED" 1530 PRINT "IF YOU WISH TO TRANSMIT THE PICTURE)." 1540 PRINT 1545 PRINT "* NINTH *, AFTER PICTURE IS STORED," 1550 PRINT "YOU WILL BE ASKED IF YOU WISH TO" 1555 PRINT "'PACK OR UNPACK ANOTHER FILE?'. IF YOU" 1560 PRINT "SAY 'NO', THE PROGRAM WILL QUIT. IF" 1565 PRINT "YOU SAY 'YES', THE PROGRAM WILL RETURN" 1570 PRINT "TO THE VERY FIRST CHOICE YOU HAD--" 1575 PRINT "'(P)ACK OR (U)NPACK?'. 1576 VTAB (23) 1577 INPUT "PRESS RETURN TO CONTINUE";Z$ 1580 HOME 1655 PRINT " ** UNPACK ** " 1660 PRINT : PRINT 1665 PRINT "THE 'UNPACK' FEATURE ALLOWS YOU TO" 1670 PRINT "'DECOMPACT' AN APPLE II PICTURE STORED" 1675 PRINT "IN EITHER OF THE TYPES OF COMPACTED" 1680 PRINT "FILES PRODUCED BY THE 'PACK' FEATURE OF" 1685 PRINT "THIS PROGRAM. UNPACKING IS NECESSARY" 1690 PRINT "TO VIEW THE PICTURE ON YOUR SCREEN OR" 1695 PRINT "TO STORE IT IN AN ORDINARY DECOMPACTED" 1700 PRINT "FILE THE WAY APPLE II PICTURES ARE" 1710 PRINT "NORMALLY STORED (OTHER PEOPLE AND" 1715 PRINT "PROGRAMS CAN'T LOOK AT A COMPACTED" 1720 PRINT "PICTURE UNLESS THEY HAVE ACCESS TO THIS" 1725 PRINT "UTILITY PROGRAM). TO DECOMPACT A HEX" 1730 PRINT "TEXT FILE BACK TO SOMETHING VIEWABLE, " 1735 PRINT "THE 'UNPACK' FEATURE ALSO HAS TO" 1740 PRINT "CONVERT THE HEX TEXT FORMAT BACK TO" 1745 PRINT "BINARY." 1746 VTAB (23) 1748 INPUT "PRESS RETURN TO CONTINUE";Z$ 1750 HOME 1755 PRINT "IF YOU DECIDE TO 'UNPACK' A PICTURE," 1760 PRINT "YOU WILL * FIRST * BE ASKED WHETHER YOU" 1765 PRINT "ARE UNPACKING IT 'FROM A (T)EXT FILE OR" 1770 PRINT "FROM A (B)INARY FILE?' COMPRESSED HEX" 1775 PRINT "TEXT FILES PRODUCED BY THE 'PACK'" 1780 PRINT "FEATURE ALL END IN -PAC-T (IF YOU" 1785 PRINT "HAVE A COMPACTED HEX TEXT FILE YOU HAVE" 1790 PRINT "TRANSFERRED FROM ANOTHER MACHINE, MAKE" 1795 PRINT "SURE TO RENAME IT 'SOMETHING-PAC-T' IF" 1800 PRINT "IT DOESN'T ALREADY HAVE THIS SUFFIX)." 1805 PRINT "COMPACTED BINARY FILES PRODUCED BY THE" 1810 PRINT "'PACK' FEATURE ALL END IN -PAC" 1820 PRINT 1825 PRINT "* SECOND *, YOU WILL BE ASKED THE 'NAME" 1830 PRINT "OF PACKED FILE?'-- WITHOUT THE -PAC-T" 1835 PRINT "OR -PAC SUFFIX." 1836 VTAB (23) 1838 INPUT "PRESS RETURN TO CONTINUE";Z$ 1840 HOME 1845 PRINT "AFTER YOU GIVE THE NAME, IF THE FILE IS" 1850 PRINT "A HEX TEXT FILE, THE PROGRAM WILL WHIRR" 1855 PRINT "AWAY FOR SEVERAL MINUTES DECODING THE" 1860 PRINT "HEX TEXT BACK TO BINARY. YOU WILL SEE" 1865 PRINT "THE MESSAGE,'DECODING TEXT FILE--PLEASE" 1870 PRINT "WAIT'. IN CONTRAST, IT ONLY TAKES A" 1875 PRINT "FEW SECONDS TO DECOMPACT A COMPACTED" 1880 PRINT "BINARY FILE." 1885 PRINT 1890 PRINT "* THIRD *, YOU WILL BE ASKED 'UNPACK " 1895 PRINT "PIX TO HIRES SCREEN 1 OR 2?'. UNLESS" 1900 PRINT "YOU HAVE A SPECIAL REASON TO UNPACK IT" 1905 PRINT "TO SCREEN 2, ANSWER 1. 1910 PRINT 1915 PRINT "* FOURTH *, YOU WILL BE ASKED IF YOU" 1920 PRINT "WISH TO '(V)IEW PICTURE, (N)ORMAL" 1925 PRINT "SAVE TO BINARY FILE, (P)ACKED PIX" 1930 PRINT "SAVE TO BINARY FILE, (C)ONTINUE TO" 1935 PRINT "PACK/UNPACK, OR (Q)UIT'" 1936 VTAB (23) 1938 INPUT "PRESS RETURN TO CONTINUE";Z$ 1940 HOME 1945 PRINT "(V)IEW LETS YOU LOOK AT THE PICTURE" 1950 PRINT "YOU JUST DECOMPACTED" 1955 PRINT 1960 PRINT "(N)ORMAL STORES THE PICTURE IN AN " 1965 PRINT "UNCOMPACTED BINARY FILE (33-34" 1970 PRINT "SECTORS); YOU WILL BE ASKED FOR A FILE" 1975 PRINT "NAME TO STORE IT IN. 1980 PRINT 1985 PRINT "(P)ACKED STORES THE PICTURE IN A" 1990 PRINT "COMPRESSED BINARY FILE (7-17 SECTORS);" 1995 PRINT "YOU WILL BE ASKED FOR A FILE NAME TO" 2000 PRINT "STORE IT IN-- JUST GIVE A 'ROOT'" 2005 PRINT "NAME; DO NOT INCLUDE THE -PAC SUFFIX." 2007 PRINT 2010 PRINT "(C)ONTINUE TAKES YOU BACK TO THE VERY" 2015 PRINT "FIRST CHOICE YOU HAD-- '(P)ACK OR" 2020 PRINT "(U)NPACK?' 2025 PRINT 2030 PRINT "(Q)UIT EXITS THE P/U PICTURE UTILITY" 2038 VTAB (23) 2040 INPUT "PRESS RETURN TO RUN PIX UTILITY PROGRAM";Z$ 2045 HOME : VTAB (15): PRINT "LOADING PICTURE UTILITY PROGRAM" 3000 PRINT D$;"RUN P/U" SAVE P/U-GO LOCK P/U-GO //go.sysin dd * if [ `wc -c < a-p-u-go` != 10064 ]; then made=FALSE echo error transmitting a-p-u-go -- echo length should be 10064, not `wc -c < a-p-u-go` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-p-u-go echo -n ' '; ls -ld a-p-u-go fi echo Extracting a-texttoprint sed 's/^X//' <<'//go.sysin dd *' >a-texttoprint NEW 1 REM TEXTTOPRINT 2 REM NOTE THIS PROGRAM ONLY READS UPPER CASE ASCII 3 REM UNLESS YOUR APPLE IS EQUIPPED WITH U/L CASE 5 HOME : TEXT : VTAB 12 100 D$ = CHR$ (13) + CHR$ (4) 110 PRINT "INSERT DISK WITH YOUR TEXT FILE": PRINT "IN THE APPROPRIATE DRIVE." 111 PRINT : INPUT "TYPE 'GO' WHEN READY ";G$: IF G$ < > "GO" THEN 111 112 PRINT : INPUT "DO YOU NEED CATALOG?";Z$ 113 IF LEFT$ (Z$,1) < > "Y" THEN 116 115 PRINT D$"CATALOG" 116 PRINT 120 INPUT "ENTER FILE NAME:";F$: ONERR GOTO 230 121 PRINT D$"VERIFY ";F$ 122 PRINT : INPUT "DO YOU WANT A PRINTOUT?";P$ 126 IF P$ < > "Y" AND P$ < > "YES" THEN 130 127 PRINT : INPUT "PRINTER IS IN SLOT?";N 128 IF N > 7 OR N < 1 THEN 128: 129 PRINT : PRINT "READY PRINTER IN SLOT ";N: PRINT : INPUT "THEN, PRESS RETURN";Z$: PRINT D$"PR#";N 130 PRINT D$"MONI" 140 PRINT D$"OPEN"F$;D$"READ"F$ 160 ONERR GOTO 250 180 GET C$: PRINT C$;: GOTO 180 230 IF PEEK (222) = 6 THEN PRINT "NO SUCH FILE ON DISK": PRINT : GOTO 120 250 PRINT D$"CLOSE"F$ 255 PRINT D$"PR#0": END 300 REM M BOB SANDER-CEDERLOF 310 REM REVISED BY DAVID SPRUNG 315 REM REVISED BY R. HOLLEY 3/20/85 400 REM DOWNLOADED FROM MIAMI BIG APPLE 305-948-8000 SAVE TEXTTOPRINT LOCK TEXTTOPRINT //go.sysin dd * if [ `wc -c < a-texttoprint` != 1250 ]; then made=FALSE echo error transmitting a-texttoprint -- echo length should be 1250, not `wc -c < a-texttoprint` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 a-texttoprint echo -n ' '; ls -ld a-texttoprint fi echo Extracting b-t.s sed 's/^X//' <<'//go.sysin dd *' >b-t.s * SOURCE TO B-T BINARY FILE * REVERSE ENGINEERED BY ZBEN * SEPTEMBER 1986 * ORG $95C7 ; AS PER ORIG CHUNKS EQU 1 ; # 256 X 40 CHUNKS BLOCKS EQU 2 ; # 40 BYTE BLOCKS POINTL EQU 3 ; DATA POINTER POINTH EQU 4 ; DATA POINTER TEMP EQU 6 ; TEMP STORAGE CROUT EQU $FD8E ; OUTPUT CRLF PRBYTE EQU $FDDA ; HEX OUTPUT * BT000 LDX #0 ; BEGIN 256 X 40 BT010 LDY #0 ; BEGIN 40 BLOCK BT020 LDA (POINTL),Y ; GET BYTE STY TEMP ; SAVE JSR PRBYTE ; OUTPUT HEX LDY TEMP ; INY ; COUNT BYTE CPY #40 ; DONE 40 YET? BCC BT020 ; NO, LOOP * JSR CROUT ; DO CRLF LDA POINTL ; INCREMENT CLC ; POINTL ADC #40 ; BY 40 STA POINTL ; REPLACE LDA POINTH ; PROPAGATE ADC #0 ; CARRY STA POINTH ; (IF ANY) INX ; COUNT 40 BLOCKS BEQ BT030 ; AT FF-00 BREAK OUT CPX #$FF ; AT FF BEQ BT010 ; DO MORE CPX BLOCKS ; IF DONE BCC BT010 ; DO MORE * BT030 LDA #$FF ; GET 256 STA BLOCKS ; SET LIMIT DEC CHUNKS ; COUNT CHUNKS BNE BT000 ; BACK FOR MORE RTS ; RETURN TO CALLER * * END OF B-T.S ZBEN 9/86 //go.sysin dd * if [ `wc -c < b-t.s` != 992 ]; then made=FALSE echo error transmitting b-t.s -- echo length should be 992, not `wc -c < b-t.s` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 b-t.s echo -n ' '; ls -ld b-t.s fi echo Extracting b2t sed 's/^X//' <<'//go.sysin dd *' >b2t 0 D$ = CHR$ (4): PRINT D$"CLOSE B2T": INPUT "NAME OF FILE TO BE WRITTEN?";Z$: PRINT D$"OPEN ";Z$: PRINT D$"WRITE ";Z$: POKE 33,33: LIST 1,63999: PRINT D$"CLOSE": POKE 33,40: TEXT : END //go.sysin dd * if [ `wc -c < b2t` != 187 ]; then made=FALSE echo error transmitting b2t -- echo length should be 187, not `wc -c < b2t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 b2t echo -n ' '; ls -ld b2t fi echo Extracting blp sed 's/^X//' <<'//go.sysin dd *' >blp PRINT "A";PEEK(43634)+256*PEEK(43635);",L";PEEK(43616)+256*PEEK(43617) //go.sysin dd * if [ `wc -c < blp` != 72 ]; then made=FALSE echo error transmitting blp -- echo length should be 72, not `wc -c < blp` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 blp echo -n ' '; ls -ld blp fi echo Extracting dis-b-t sed 's/^X//' <<'//go.sysin dd *' >dis-b-t 95C7- A2 00 LDX #$00 95C9- A0 00 LDY #$00 95CB- B1 03 LDA ($03),Y 95CD- 84 06 STY $06 95CF- 20 DA FD JSR $FDDA 95D2- A4 06 LDY $06 95D4- C8 INY 95D5- C0 28 CPY #$28 95D7- 90 F2 BCC $95CB 95D9- 20 8E FD JSR $FD8E 95DC- A5 03 LDA $03 95DE- 18 CLC 95DF- 69 28 ADC #$28 95E1- 85 03 STA $03 95E3- A5 04 LDA $04 95E5- 69 00 ADC #$00 95E7- 85 04 STA $04 95E9- E8 INX 95EA- F0 08 BEQ $95F4 95EC- E0 FF CPX #$FF 95EE- F0 D9 BEQ $95C9 95F0- E4 02 CPX $02 95F2- 90 D5 BCC $95C9 95F4- A9 FF LDA #$FF 95F6- 85 02 STA $02 95F8- C6 01 DEC $01 95FA- D0 CB BNE $95C7 95FC- 60 RTS //go.sysin dd * if [ `wc -c < dis-b-t` != 843 ]; then made=FALSE echo error transmitting dis-b-t -- echo length should be 843, not `wc -c < dis-b-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 dis-b-t echo -n ' '; ls -ld dis-b-t fi echo Extracting dis-t-b sed 's/^X//' <<'//go.sysin dd *' >dis-t-b 95C7- A2 01 LDX #$01 95C9- 20 0C FD JSR $FD0C 95CC- C9 8D CMP #$8D 95CE- F0 F9 BEQ $95C9 95D0- C9 8A CMP #$8A 95D2- F0 F5 BEQ $95C9 95D4- C9 BA CMP #$BA 95D6- 10 1A BPL $95F2 95D8- 38 SEC 95D9- E9 B0 SBC #$B0 95DB- E0 00 CPX #$00 95DD- F0 0B BEQ $95EA 95DF- 0A ASL 95E0- 0A ASL 95E1- 0A ASL 95E2- 0A ASL 95E3- 8D C5 95 STA $95C5 95E6- CA DEX 95E7- 4C C9 95 JMP $95C9 95EA- 18 CLC 95EB- 6D C5 95 ADC $95C5 95EE- 8D C6 95 STA $95C6 95F1- 60 RTS 95F2- 38 SEC 95F3- E9 07 SBC #$07 95F5- 4C D8 95 JMP $95D8 //go.sysin dd * if [ `wc -c < dis-t-b` != 755 ]; then made=FALSE echo error transmitting dis-t-b -- echo length should be 755, not `wc -c < dis-t-b` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 dis-t-b echo -n ' '; ls -ld dis-t-b fi echo Extracting disk sed 's/^X//' <<'//go.sysin dd *' >disk *A 004 HELLO *T 002 GOKERM *T 002 GOKERMIL *A 002 FROGPROG *B 034 FROGPIX *A 070 KERMIT *B 026 KERMITA *T 084 KERMITA.S *B 005 SET40 T 002 KERMIT/SETSAVE *A 066 KERMSHELL *T 008 MIC.T *T 009 SUP.T *T 006 CCS.T *T 006 COM.T *T 009 NOV.T *T 002 B2T *T 002 EBITXT *A 012 BITXT *T 002 ETXBIN *A 009 TXBIN *B 002 B-T *B 002 T-B *A 005 TEXTTOPRINT *A 034 P/U-GO *A 020 P/U *B 002 PACK/UNPACK *B 002 BIN2TXT *B 002 TXT2BIN ----- *T XXX DIS //go.sysin dd * if [ `wc -c < disk` != 434 ]; then made=FALSE echo error transmitting disk -- echo length should be 434, not `wc -c < disk` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 disk echo -n ' '; ls -ld disk fi echo Extracting ebitxt sed 's/^X//' <<'//go.sysin dd *' >ebitxt XFP HIMEM: 38340 POKE 104,138 POKE 138*256,0 RUN BITXT //go.sysin dd * if [ `wc -c < ebitxt` != 55 ]; then made=FALSE echo error transmitting ebitxt -- echo length should be 55, not `wc -c < ebitxt` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 ebitxt echo -n ' '; ls -ld ebitxt fi echo Extracting gokermil sed 's/^X//' <<'//go.sysin dd *' >gokermil XFP RUN FROGPROG //go.sysin dd * if [ `wc -c < gokermil` != 17 ]; then made=FALSE echo error transmitting gokermil -- echo length should be 17, not `wc -c < gokermil` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 gokermil echo -n ' '; ls -ld gokermil fi echo Extracting kermita.s sed 's/^X//' <<'//go.sysin dd *' >kermita.s * KERMIT ASM AND 70 COL DISPLAY 7/16/84 T.WHITTAKER MSB OFF ORG $801 CHKCOM EQU $DEBE PTRGET EQU $DFE3 VARPNT EQU $83 TYPADD EQU $FA DATADD EQU $FC LEN EQU $FE PRBYTE EQU $FDDA * RCVSTA DFB $80 ; UART RECV DATA AVAIL BIT XXMTSTA DFB $01 ; UART XMT REG EMPTY BIT RCVREG DFB $C0 ; UART RECV REGISTER ADDR (LSB) XXMTREG DFB $C2 ; UART XMT REGISTER ADDR (LSB) STAREG DFB $C1 ; UART STATUS REGIS ADDR (LSB) TIMOUT DFB 15 ; TIMEOUT (SECS) SEQNUR DFB $00 ; RECV PACKET SEQUENCE NUMBER SEQNUM DFB $00 ; XMT PACKET SEQUENCE NUMBER QREPEAT DFB 0 ; REPEAT QUOTE CHARACTER (DISABLED) Q8BIT DFB 0 ; 8-BIT QUOTE CHARACTER (DISABLED) QCTRL DFB $23 ; CONTROL CHARACTER QUOTE MARK DFB $01 ; MARK CHARACTER (START-OF-PACKET) NUMPAD DFB 0 ; NUMBER OF PAD CHARACTERS PER PACKET PADCHR DFB 0 ; PAD CHARACTER EOLCHR DFB $0D ; END-OF-PACKET CHARACTER MAXLEN DFB 96 ; MAXIMUM PACKET LENGTH * * MAIN ENTRY POINT... KERMIT JMP SEND ; KER+0 SEND A PACKET JMP CONN ; KER+3 ENTER CONNECT MODE JMP READLN ; KER+6 FAST READ A LINE OF TEXT FROM DISK MASK DFB $7F ; KER+9 DATA MASKING BYTE DEBUG DFB 0 ; KER+10 SET = 1 FOR DEBUG ECHO DFB 0 ; KER+11 SET =1 FOR CONNECT ECHO DIRECT DFB 0 ; KER+12 SEND/RECV FLAG ALFD DFB 0 ; KER+13 AUTO LINE FEED TR7 DFB 0 ; KER+14 TRUNCATE LINE BKCOL DFB 0 ; KER+15 BACKGROUND CHR457 DFB $FF ; KER+16 0=70 COL, $FF=40 COL JMP KERXMT ; KER+17 SEND TEXT DIRECT JSR COMINT ; KER+20 INITIALIZE COMM & SCREEN JSR COMINS ; KER+23 SCREEN ONLY JMP COMXIT NOVADR DFB 0 ; KER+29 NOVATION RESET ADDR NOVARS DFB 0 ; KER+30 NOVATION RESET VALUE ESCCHR DFB 27 ;ESCAPE CHAR, KE+31 SEND JSR GTYPE ; GET TYPE LDY #0 LDA (TYPADD),Y STA TYPE LDA TYPE ; CHECK FOR "E" OR "D" CMP #'Z BEQ DOEOF CMP #'D BEQ DOD ZBUF LDA #0 STA BUFEND ; ZERO OUT XMT BUFFER LDA TYPE CMP #'0 BNE OTHER JSR RPKT ; GO READ A PACKET RTS OTHER JSR COPYP ; GET MESSAGE LDA TYPE CMP #'9 BNE OTHER9 LDA #'Y ; FORCE AN ACK PACKET OTHERX STA TYPE JSR SPKTA ; JUST SEND; DONT WAIT RTS OTHER9 CMP #'8 ; A BRK BNE OTHER8 LDA #'B BNE OTHERX OTHER8 CMP #'7 ; AN ERROR PACKET BNE OTHER1 LDA #'E BNE OTHERX OTHER1 CMP #'S BNE OTHER2 LDA #$00 STA SEQNUM ; INITIALIZE SEQUENCE # STA SEQNUR ; EXPECTED RETURN OTHER2 JSR SPKT ; SENT IT RTS DOEOF LDA BUFEND ; SEE IF ANY DATA LEFT BEQ NOLEFT LDA #'D ; DUMMY UP A "D" PACKET STA TYPE JSR SPKT ; SEND OFF PACKET LDA TYPE CMP #'Y BEQ DOEOF JMP SETYPE ;***** IF LAST PKT NAK'D NOLEFT LDA #'Z ; NOW A REAL "E" STA TYPE JSR COPYP JSR SPKT RTS ; ALL DONE * * DO A TYPE "D" PACKET DOD JSR COPYP ; COPYIT INPUT TO BUFFER DOD1 LDA LENMAX ;***** HANDLE #S > 127 CMP BUFEND BCC DOK LDA #'Y STA TYPE DODRTN JMP SETYPE ; RETURN A TYPE VALUE=Y DOK JSR SPKT ; SEND ONE LDA TYPE CMP #'Y BNE DODRTN LDA #'D STA TYPE BNE DOD1 * * SEND PACKET AND WAIT FOR ACK PKTCNT DFB 0 CHKSUM DFB 0 LENMAX DFB 90 REXMT DFB 0 XXMTBUF DS 128 SPKT JSR SPKTA LDA #0 STA REXMT SPKQ JSR RPKT LDA TYPE CMP #'N BEQ SPKDC CMP #'2 BNE SPKR SPKDC INC REXMT LDA REXMT CMP #10 BEQ SPKR JSR RESEND JMP SPKQ SPKR RTS * SPKTA LDA #0 STA PKTCNT STA BUFPT LDA MARK STA XMTBUF LDA TYPE CMP #'Y BEQ SPKTQ CMP #'N BNE SPKTNQ SPKTQ LDA SEQNUR ; RESEQUENCE STA SEQNUM SPKTNQ LDA SEQNUM CLC ADC #$20 ; CHAR FUNCTION STA XMTBUF+2 CLC ADC TYPE STA CHKSUM ; INITIALIZE CHKSUM VALUE LDA TYPE STA XMTBUF+3 SPKTL LDY BUFPT ; INPUT CHARACTER CPY BUFEND ; SEE IF PAST INPUT BUFFER BNE SPKTJ BCC SPKTJ JMP SPKTE ; DONE... SPKTJ INC BUFPT LDA TYPE ; CHECK FOR 'D' CMP #'D BEQ QETCS ; CHECK QUOTING, ETC LDA BUFFER,Y JMP NOCTRL ; OTHERWISE, DONT QETCS LDA #$00 STA RCTRL LDA BUFFER,Y AND #$80 ; CHECK FOR 8-TH BIT BEQ NO8BIT LDA #3 ; VERIFY ENOUGH ROOM TO SEND JSR SPKTV LDA Q8BIT ; 8-BIT QUOTING JSR SPKTS LDA BUFFER,Y AND #$7F STA BUFFER,Y NO8BIT LDA BUFFER,Y CMP QCTRL ; CHECK FOR QUOTE CHARS BEQ DOCTRL CMP Q8BIT BEQ DOCTRL CMP QREPEAT BEQ DOCTRL CMP #$20 ; CHECK FOR CTRL CHARS BCS NOCTRL LDA #$40 ; CONTROL IAS STA RCTRL DOCTRL LDA #2 JSR SPKTV ; VERIFY ENOUGH ROOM LDA QCTRL ; QUOTE JSR SPKTS ; INTO XMTBUF LDA BUFFER,Y ; GET REAL CHAR EOR RCTRL ; BIAS TO PRINTABLE NOCTRL JSR SPKTS ; PUT CHAR INTO XMT BUFFER JMP SPKTL * PUT CHARACTER INTO PACKET SPKTS LDX PKTCNT STA XMTBUF+4,X JSR SUMCHK INC PKTCNT LDA PKTCNT CMP LENMAX BEQ SPKTX RTS SPKTV CLC ADC PKTCNT ; PREDICT END OF PACKET CMP LENMAX BCS SPKTR ; WUD EXCEED...ABANDON RTS SPKTR DEC BUFPT ; WENT TOO FAR! SPKTX PLA ; POP STACK...DONE W/ BUFFER PLA SPKTE LDA PKTCNT CLC ADC #$23 ; CHAR FUNCTION STA XMTBUF+1 JSR SUMCHK JSR MAKCHK LDX PKTCNT STA XMTBUF+4,X ; STORE CHECKSUM LDA EOLCHR STA XMTBUF+5,X ; PUT A <CR> THERE JSR SEQINC ; TO INCREMENT SEQ # * RESET BUFFER FROM BUFPT=>BUFEND-1 BUFRES LDY #0 LDX BUFPT BUFRE1 CPX BUFEND BCS BUFRE9 LDA BUFFER,X STA BUFFER,Y INX INY BNE BUFRE1 BUFRE9 STY BUFEND CLC ; OKAY TO PROCESS MORE... * TRANSMIT THE BUFFER RESEND LDY #$00 SENDX LDA XMTBUF,Y JSR OUTCHR CMP EOLCHR BEQ SENDD INY BNE SENDX SENDD LDY NUMPAD SENDP BEQ SENDQ LDA PADCHR JSR OUTCHR DEY BNE SENDP SENDQ RTS * * SEND INPUT STRING ONLY! KERXMT JSR COMINT ; INITIALIZE IT JSR GTYPE1 ; GET PARAMETER=>LEN,DATADD LDY #0 KERXM1 LDA (DATADD),Y JSR OUTCHR INY DEC LEN ; CHECK END OF LIST BNE KERXM1 RTS ; ALL DONE * * INCREMENT SENDING SEQ # SEQINC INC SEQNUM LDA SEQNUM CMP #64 ; CHECK WRAP-AROUND BNE SEQRET LDA #$00 ; RESET STA SEQNUM SEQRET RTS * * COPYP TO COPY INPUT STRING COPYP LDA BUFEND ; **** PREVENT BUFFER OVFLOW CLC ADC #$02 ADC LEN BCC COPYP2 JSR SPKT LDA TYPE CMP #'Y BEQ COPYP1 JMP DODRTN COPYP1 LDA #'D STA TYPE COPYP2 LDX BUFEND LDY #0 LDA LEN BEQ COPYPD COPYPL LDA (DATADD),Y AND MASK ; GET RID OF BIT 8 STA BUFFER,X INX INY DEC LEN BNE COPYPL COPYPD LDA TYPE CMP #'D ; CHECK FOR DATA PACKET BNE COPYPE LDA #$0D CMP BUFFER-1,X ; SEE IF <CR> THERE BEQ COPYLF STA BUFFER,X INX COPYLF LDA #$0A STA BUFFER,X INX COPYPE STX BUFEND RTS * TYPE DFB 0 ; PACKET TYPE BUFEND DFB 0 ; POINTS TO NEXT AVAILABLE CHAR POSITION IN BUFFER BUFFER DS 256 ; XMIT BUFFER BUFPT DFB 0 TYPLOC DS 2 DATLOC DS 2 * * GET ADDRESS OF "TYPE" =>TYPADD GTYPE JSR CHKCOM ; REQUIRED COMMA JSR PTRGET ; GET ADDR OF PARAM 1 LDY #1 LDA (VARPNT),Y STA TYPADD INY LDA (VARPNT),Y STA TYPADD+1 LDA VARPNT STA TYPLOC LDA VARPNT+1 STA TYPLOC+1 ; NEED DESC ADDRS GTYPE1 JSR CHKCOM ; NEXT REQUIRED COMMA JSR PTRGET ; FETCH DATA POINTERS LDY #0 LDA (VARPNT),Y STA LEN INY LDA (VARPNT),Y STA DATADD INY LDA (VARPNT),Y STA DATADD+1 LDA VARPNT STA DATLOC LDA VARPNT+1 STA DATLOC+1 RTS * * CHECKSUM ROUTINES * SUMCHK CLC PHA ADC CHKSUM STA CHKSUM PLA ; RESTORE ACCUM RTS MAKCHK LDA CHKSUM ; MAKE CHECKSUM VALUE FROM SUMMED QUANTITY IN CHKSUM ROL A ROL A ROL A ; PUT BITS 6 & 7 INTO LSB AND #3 ; MASK OUT CLC ADC CHKSUM ; ADD IT BACK IN AND #$3F CLC ADC #$20 ; CHAR FUNCTION RTS * * RECEIVING SECTION RBUFPT DFB 0 RBUFF DS 256 RBUFFER DS 256 RCOUNT DFB 0 RCTRL DFB 0 R8BIT DFB 0 REPCNT DFB 0 SEQGOT DFB 0 PREVIOUS DFB 0 * RPKT JSR COMINU ; CLEAR UART RPKTQ JSR RCHAR CMP MARK BNE RPKTQ LDY #0 STY RBUFPT STY RCTRL STY R8BIT STY REPCNT ; INITIALIZE THESE RPKTL JSR RCHAR CMP EOLCHR BEQ RPKTA STA RBUFF,Y INY BNE RPKTL RPKTA STY RBUFPT LDA RBUFF ; GET COUNT STA CHKSUM ; INITIALIZE IT SEC SBC #$20 STA RCOUNT LDA RBUFF+1 ; GET SEQ # JSR SUMCHK SEC SBC #$20 STA SEQGOT LDA RBUFF+2 ; GET TYPE JSR SUMCHK STA TYPE LDY #2 ; PREPARE TO UNPACK LDX #$0 ; POINTS INTO RBUFFER JMP RPKTY RPKTB LDA RBUFF,Y JSR SUMCHK LDA TYPE ; CHECK FOR 'D' PACKET CMP #'D BEQ QETCR ; FOR QUOTING, ETC LDA RBUFF,Y JMP RPKTF ; OTHERWISE JUSTSTUFF IT QETCR LDA RCTRL BEQ RPKTG ; QUOTE CHAR NOT SET LDA RBUFF,Y ; GET CHAR AND #$40 ; SEE IF BIT 7 SET BNE RPKTE ; IT IS, SO QUOTE OK LDA RBUFF,Y JMP CKNULL ; JUST TAKE IT... RPKTG LDA RBUFF,Y CMP QREPEAT BNE RPKTC INY LDA RBUFF,Y JSR SUMCHK SEC SBC #$21 STA REPCNT BNE RPKTY RPKTC CMP Q8BIT BNE RPKTD LDA #$80 ; SET 8-BIT MASK STA R8BIT BNE RPKTY RPKTD CMP QCTRL BNE RPKTE LDA #$40 ; SET CTRL-BIAS STA RCTRL BNE RPKTY RPKTE LDA RBUFF,Y EOR RCTRL ; MASK BIT 7 ORA R8BIT ; BIT 8? CKNULL BEQ NONULL ; NOT ALLOWED! RPKTF STA RBUFFER,X CMP #$0A BNE NOCRLF LDA PREVIOUS CMP #$0D BEQ NONULL ; CHANGE CR/LF => CR ONLY NOCRLF INX BNE NOCRLF1 ;***** NOTE RBUFF OVFLOW LDA #'4 STA TYPE JMP RETPAR NOCRLF1 STA PREVIOUS NONULL LDA REPCNT BEQ RPKTZ DEC REPCNT LDA RBUFFER-1,X JMP RPKTF RPKTZ LDA #$00 STA RCTRL STA R8BIT RPKTY INY CPY RCOUNT BEQ RPKTW ; DONE JMP RPKTB ; GO DO ANOTHER ONE RPKTW JSR MAKCHK ; COMPUTE CHECKSUM CMP RBUFF,Y ; VERIFY BEQ RCHKOK LDA #'N ; PREPARE 'N' PACKET STA TYPE BIT DIRECT ; CHECK IF SEND MODE BPL RRETN ; YES, JUST RETURN N-TYPE JSR MAKPKT ; NAK FOR CHECKSUM ... DEC SEQNUR JMP RPKT RCHKOK LDA TYPE CMP #'S ; CHECK FOR 'S' PACKET BEQ RCHNOE ; JUST STUFF NEW SEQ # LDA SEQGOT SEC SBC SEQNUR ; CHECK INCREMENT BEQ RCHSSN ; IF SAME CMP #$01 BEQ RCHNOE ; IS OKAY CMP #$C1 ; = 0-3F BEQ RCHNOE ; IS STILL OKAY LDA #'3 STA TYPE ; RETURN ERROR CODE BNE RETPAR RCHSSN BIT DIRECT ; CHECK SEND MODE BMI RCHNOR ; IF RECV MODE LDA TYPE CMP #'Y BNE RCHSSN1 ;**** UMD NAK CHECK LDA SEQGOT BNE RCHSSN1 LDA XMTBUF+2 CMP #$20 BEQ RCHNOE RCHSSN1 LDA #'N STA TYPE RRETN RTS RCHNOR LDA TYPE ;***** IF REC'D ERROR PKT CMP #'E BEQ RETPAR LDA #'Y STA TYPE JSR MAKPKT ; JUST ACK IT AND THEN JMP RPKT ; GO GET ANOTHER ONE... RCHNOE LDA SEQGOT STA SEQNUR ; JUST STORE IT * SET TYPE PARAMETER * RETPAR STX RCOUNT LDA DATLOC STA VARPNT LDA DATLOC+1 STA VARPNT+1 LDA RCOUNT LDY #$0 STA (VARPNT),Y INY LDA #>RBUFFER STA (VARPNT),Y INY LDA #<RBUFFER STA (VARPNT),Y SETYPE LDY #2 LDA TYPLOC STA VARPNT LDA TYPLOC+1 STA VARPNT+1 LDA #<TYPE STA (VARPNT),Y DEY LDA #>TYPE STA (VARPNT),Y RTS * TO MAKE AND SEND A Y/N PACKET MAKPKT LDA MARK STA XMTBUF LDA #'# ; COUNT OF 43 STA XMTBUF+1 STA CHKSUM ; DO THIS TOO LDA SEQGOT ; WITH SAME SEQ NUMBER STA SEQNUR ; TO BE SURE STA SEQNUM ; RESET IT CLC ADC #$20 ; CHR FUNCTION STA XMTBUF+2 ; SEQUENCE JSR SUMCHK LDA TYPE STA XMTBUF+3 JSR SUMCHK JSR MAKCHK ; MAKE VALUE STA XMTBUF+4 LDA EOLCHR STA XMTBUF+5 ; FINALLY JSR RESEND ; SEND IT OFF JSR SEQINC ; FOR NEXT SEND... RTS * * GET AN INPUT CHARACTER * KBD EQU $C000 MSB ON KBDSTR EQU $C010 RESMSG ASC "PACKET RETRANSMITTED..." MSB OFF DFB $8D,0 TIME DS 3 RCHAR LDA TIMOUT STA TIME+2 LDA #$FF ; SET LOWER TIMOUT... STA TIME+1 STA TIME LSR TIME+2 ROR TIME+1 ROR TIME LSR TIME+2 ROR TIME+1 ROR TIME BIT KBDSTR ; CLEAR KEYBOARD FLAG RCHAR1 DEC TIME BNE RCHAR2 DEC TIME+1 BNE RCHAR2 DEC TIME+2 BNE RCHAR2 LDA #'2 BNE RCHERR RCHAR2 BIT KBD ; CHECK KEYBOARD BPL NOKEY LDA KBD CMP #$8D BNE RCHAR3 ; CHECK FOR <CR> BIT KBDSTR JSR RESEND ; RESEND LAST PACKET LDX #0 RCHMSG LDA RESMSG,X ; SCREEN MESSAGE BEQ NOKEY JSR PCHAR INX BNE RCHMSG BMI NOKEY RCHAR3 CMP ESCCHR ;ESC CHARACTER BNE NOKEY BIT KBDSTR LDA #'1 RCHERR STA TYPE PLA PLA JMP RETPAR ; GO BACK TO CALLER NOKEY JSR CHARIN BCC RCHAR1 LDA CHAR AND MASK ; GET RID OF BIT 8 IF NEEDED RTS * COMM OUTPUT ROUTINE CHAR DFB 0 OUTCHR STA CHAR OUTS LDA $C000 ; DITTO OUTCHA AND #$00 ; XMTSTA BEQ OUTS LDA CHAR OUTCHG STA $C000 ; XMTREG BIT DEBUG BPL OUTRET ORA #$80 JSR PCHAR LDA CHAR OUTRET RTS PTCHR DFB 0 GTCHR DFB 0 CHRBUF DS 256 INCHAR TXA PHA LDX PTCHR INCHR LDA $C000 ; STAREG INCHRA AND #$00 ; RVCSTA BEQ INCHRR LDA NOVARS BEQ INCHRG NOVRES STA $C000 INCHRG LDA $C000 ; RCVREG STA CHRBUF,X INX STX PTCHR INCHRR PLA TAX RTS * * TO FETCH CHARS FROM SERIAL INPUT * CHARIN JSR INCHAR TXA PHA LDX GTCHR CPX PTCHR BEQ CHARTN LDA CHRBUF,X STA CHAR INX STX GTCHR BIT DEBUG BPL CHARND JSR PCHAR CHARND PLA TAX LDA CHAR SEC RTS CHARTN PLA TAX CLC RTS * COMM CARD ADDRESS INITIALIZATION COMINT LDA STAREG STA OUTS+1 STA INCHR+1 LDA RCVSTA STA INCHRA+1 LDA XMTSTA STA OUTCHA+1 LDA RCVREG STA INCHRG+1 LDA XMTREG STA OUTCHG+1 LDA NOVADR STA NOVRES+1 SEC LDA MAXLEN SBC #$05 STA LENMAX ; FIX MAX BUFFER SIZE COMINS LDA ALFD STA AUTOLF LDA TR7 STA TRUNC7 LDA BKCOL STA BKCOLR AND #$F STA BKMASK LDA CHR457 LDY #0 LDX #70 CMP #$FF BNE COMIN7 LDX #40 LDA BKCOLR STA BKMASK LDY #3 COMIN7 STX COLMAX STY FONTAD BIT CONTRY BMI COMINR JSR DIS70 LDA #$FF STA CONTRY COMINR LDA #>CHOUT ; SET OUTPUT VECTORS STA $36 LDA #<CHOUT STA $37 JSR $3EA ; CONNECT DOS... COMINU JSR INCHAR LDA #0 STA PTCHR STA GTCHR RTS CONTRY DFB 0 * CONNECT -- KEYBOARD... CONN JSR COMINT CONNNA BIT KBD BPL CONNRC LDA KBD CMP ESCCHR BNE CONNNE COMXIT BIT KBDSTR LDA #$01 STA AUTOLF ; RESET AUTO LINE FEED RTS CONNNE BIT KBDSTR AND #$7F JSR OUTCHR BIT DEBUG BMI CONNRC BIT ECHO BPL CONNRC ORA #$80 BNE CONNPR CONNRC JSR CHARIN BCC CONNNA LDA CHAR BIT DEBUG BMI CONNRC CONNPR JSR PCHAR ; OUTPUT TO SCREEN JMP CONNRC * * READ A LINE.... READLN JSR CHKCOM ; REQUIRED , JSR PTRGET ; STRING POINTER=>VARPNT LDX #0 ; SET FOR INPUT LINE READNX JSR $FD0C STA $200,X INX AND #$7F CMP #$0D BNE READNX LDY #00 TXA STA (VARPNT),Y INY LDA #$00 STA (VARPNT),Y LDA #$02 INY STA (VARPNT),Y RTS * A1L EQU $3C A1H EQU $3D A2L EQU $3E A2H EQU $3F TXTBUF EQU $400 VALTK EQU $9C VALTK1 EQU $93 LOY EQU $94 HIY EQU $95 LOX EQU $96 HIX EQU $97 YTEK EQU $98 YTEKH EQU $99 XXTEKH EQU $9A XXTEKL EQU $9B HPLOT EQU $F457 HPOSN EQU $F411 ; H(X,Y) V(A) HLIN EQU $F53A HPOS EQU $26 HGR2 EQU $F3D8 TEKPLT STA HOLD STX XHOLD STY YHOLD LDA #$40 STA $E6 SET PG2 LDA $C055 LDA $C052 LDX #3 JSR HCOLOR NEWTEK JSR GETTKC JSR MAKTK LDX XTEKL LDY XTEKH SEC LDA #191 SBC YTEK JSR HPOSN TKVECT JSR GETTKC BCS TKEND JSR MAKTK SEC LDA #191 SBC YTEK TAY LDA XTEKL LDX XTEKH JSR HLIN JMP TKVECT TKEND TXA AND #$7F CMP #$1D BEQ NEWTEK JMP HRXIT MAKTK LDA LOY STA YTEK LDA HIY STA YTEKH ROL YTEK ROL YTEK ROL YTEK LSR YTEKH ROR YTEK LSR YTEKH ROR YTEK LSR YTEKH ROR YTEK LSR YTEKH ROR YTEK LDA LOX STA XTEKL LDA HIX STA XTEKH ROL XTEKL ROL XTEKL ROL XTEKL LSR XTEKH ROR XTEKL LSR XTEKH ROR XTEKL LSR XTEKH ROR XTEKL LSR XTEKH ROR XTEKL RTS GETTKC LDY #00 GETEK JSR CHARIN BCC GETEK TAX AND #$1F STA VALTK TXA AND #$60 CMP #$40 BNE NOLOX LDA VALTK STA LOX TYA BEQ NOHIX LDA VALTK1 STA HIX NOHIX CLC RTS NOLOX CMP #$20 BNE NOHI LDA VALTK STA VALTK1 INY BNE GETEK NOHI CMP #$60 BNE NOLOY LDA VALTK STA LOY TYA BEQ GETTKC LDA VALTK1 STA HIY JMP GETTKC NOLOY SEC RTS SWITCH DFB 0 HPLCOL DFB 0 LINUM DFB 0 HRINI STA HOLD STY YHOLD STX XHOLD LDA #$40 STA $E6 ; POINT TO PG 2 LDA $C055 ; DIS PG 2 LDA $C052 ; ALL GRAFX LDA #$00 TAX TAY STA LINUM STA HPLCOL STA SWITCH JSR HPOSN HRSKIP INC SWITCH LDA SWITCH CMP #$04 BEQ HPL JSR HRGET JMP HRSKIP HPL JSR HRGET LDY HPLCOL CPY #40 BPL NOPLOT STA (HPOS),Y NOPLOT INY STY HPLCOL CPY #44 BEQ NXTLN JMP HPL NXTLN INC LINUM LDA LINUM CMP #192 BNE HRNOL LDA #191 HRNOL LDX #0 LDY #0 STY HPLCOL JSR HPOSN JMP HPL HRGET JSR CHARIN BCC HRGET CMP #$FD BNE HRRTN PLA PLA HRXIT LDA $C054 LDA #$20 STA $E6 JMP EXIT HRRTN RTS * 70 COLUMN DISPLAY CHROW EQU $9D SHIFT EQU $9E MASK1 EQU $9F MASK2 EQU $A0 CHRBIT EQU $A1 WORD EQU $A3 DIS70 JSR INITCD JMP EXIT CHOUT STA HOLD PCHAR EQU CHOUT PCHLF EQU CHOUT STX XHOLD STY YHOLD AND #$7F STA CHARC CMP #$20 . CTRL CHARACTER? BPL NCTRL LDA #$FF STA CURSOR JSR CHROUT LDA #0 STA CURSOR LDA CHARC CMP #$0D . CR BNE NOCR LDA #00 STA COL LDA AUTOLF BEQ EXITC JSR LINEFD JMP EXITC NOCR CMP #$0A . LF BNE NOLF JSR LINEFD JMP EXITC NOLF CMP #8 . CTRL-H BNE NOCH DEC COL BMI ZCOL JMP EXITC ZCOL LDA #00 STA COL JMP EXITC NOCH CMP #16 . CTRL-P BNE NOCP LDA #00 STA ROW STA COL JSR BAKGND NOCP CMP #07 .BELL BNE EXITC LDY #$80 BELL LDA #$0C JSR $FCA8 JSR INCHAR LDA $C030 DEY BNE BELL JMP EXITC NCTRL JMP PRIT EXITC LDA #$FF STA CURSOR JSR CHROUT LDA #0 STA CURSOR EXIT LDA HOLD LDX XHOLD LDY YHOLD RTS PRIT LDA CHARC ORA CASMSK SEC SBC #32 STA CHARC LDA CASE STA CASMSK NOFEED JSR CHROUT INC COL LDA COL CMP COLMAX BMI EXITC LDA TRUNC7 BEQ NOTRUN LDX COLMAX DEX STX COL BNE EXITC NOTRUN JSR LINEFD LDA #00 STA COL JMP EXITC LINEFD LDA ROW . LINE FEED CLC ADC ROWINC STA ROW CMP #187 BCS SCROL JMP EXIT SCROL LDA SCRBEG STA A1L CLC ADC ROWINC TAX SCRA LDY A1L LDA TVL,Y STA PUT+1 LDA TVH,Y STA PUT+2 LDA TVL,X STA GET+1 LDA TVH,X STA GET+2 LDY #$27 GET LDA ROW,Y PUT STA ROW,Y DEY BPL GET JSR INCHAR INC A1L INX CPX #192 BNE SCRA LDX A1L STX ROW SCRB LDA TVL,X STA PUTT+1 LDA TVH,X STA PUTT+2 LDY #$27 LDA BKCOLR PUTT STA ROW,Y DEY BPL PUTT INX CPX #192 BNE SCRB JMP EXIT CHROUT LDY CHARC . POINT TO CHAR LDA CHRL,Y STA SHGET+1 . SET ADDR LDA CHRH,Y CLC ADC FONTAD STA SHGET+2 LDY COL LDA COLWD,Y STA WORD LDA COLREM,Y TAY LDA CSHIFT,Y STA SHIFT LDA MSK1,Y STA MASK1 LDA MSK2,Y STA MASK2 LDA #0 STA CHROW LNLP CLC TAX . FOR SHGET ADC ROW TAY LDA TVL,Y STA A1L LDA TVH,Y STA A1H SHGET LDA SHGET,X EOR BKMASK BIT CHR457 BMI DD40 D70 STA CHRBIT LDA #0 STA CHRBIT+1 LDY WORD BIT CURSOR BMI PUTCUR ASL CHRBIT LDX SHIFT BEQ SHDON SHLOOP ASL CHRBIT ROL CHRBIT+1 DEX BNE SHLOOP SHDON CLC ROR CHRBIT LDA (A1L),Y AND MASK1 ORA CHRBIT STA (A1L),Y INY LDA (A1L),Y AND MASK2 ORA CHRBIT+1 STA (A1L),Y NXLN INC CHROW LDA CHROW CMP #8 BNE LNLP RTS PUTCUR LDA MASK1 EOR #$FF EOR (A1L),Y STA (A1L),Y INY LDA MASK2 EOR #$FF EOR (A1L),Y STA (A1L),Y JMP NXLN DD40 LDY COL BIT CURSOR BPL D40 LDA (A1L),Y EOR #$FF D40 STA (A1L),Y JMP NXLN HGR EQU $F3E2 HCOLOR EQU $F6F0 BAKGND LDX SCRBEG BAKLOP LDA TVL,X STA BAKLP1+1 LDA TVH,X STA BAKLP1+2 LDY #$27 LDA BKCOLR BAKLP1 STA $0000,Y DEY BPL BAKLP1 INX CPX #192 BNE BAKLOP RTS INITCD LDA #0 STA ROW JSR HGR . SELECT PAGE LDA $C052 LDX #3 JSR HCOLOR DEFLIN LDA ROW LDX #00 LDY #00 JSR HPOSN LDA $26 LDY ROW STA TVL,Y LDA $27 STA TVH,Y INC ROW LDA ROW CMP #192 BNE DEFLIN LDA #00 STA COL STA WORD STA CHROW DEFCOL LDY COL LDA WORD STA COLWD,Y LDA CHROW . REM STA COLREM,Y INC COL LDA COL CMP #70 BEQ COLDON LDA CHROW CMP #6 BEQ RESREM INC CHROW LDA CHROW ROR A BCS DEFCOL INC WORD BNE DEFCOL RESREM LDA #0 STA CHROW INC WORD BNE DEFCOL COLDON LDA #00 STA ROW STA COL LDX #96 LDA #>CHRSET STA A1L LDA #<CHRSET STA A1H LDY #0 DEFCHR LDA A1L CLC ADC #8 STA A1L STA CHRL,Y LDA A1H ADC #0 STA A1H STA CHRH,Y INY DEX BNE DEFCHR JSR BAKGND RTS * DATA STORAGE ROW DFB 0 COL DFB 0 CHARC DFB 0 CASE DFB 0 CASMSK DFB 0 HOLD DFB 0 XXHOLD DFB 0 YHOLD DFB 0 AUTOLF DFB 1 TRUNC7 DFB 1 SCRBEG DFB 0 CURSOR DFB 0 ROWINC DFB 8 BKMASK DFB $00 BKCOLR DFB $00 COLMAX DFB $46 XFONTAD DFB 0 * ARRAYS MSK1 DFB $F0,$8F,$E1,$9F,$C3,$BF,$87 MSK2 DFB $FF,$FE,$FF,$FC,$FF,$F8,$FF CSHIFT DFB 0,4,1,5,2,6,3 TVL DS 192 TVH DS 192 CHRL DS 96 CHRH DS 96 COLWD DS 70 COLREM DS 70 CHRPAT DFB 0,0,0,0,0,0,0,0 DFB 2,2,2,2,2,0,2,0 DFB 5,5,5,0,0,0,0,0 DFB 2,2,7,2,7,2,2,0 DFB 2,7,3,2,6,7,2,0 DFB 0,1,4,2,2,1,4,0 DFB 0,2,5,2,3,5,7,4 DFB 2,2,2,0,0,0,0,0 DFB 4,2,1,1,1,2,4,0 DFB 1,2,4,4,4,2,1,0 DFB 0,5,2,7,2,5,0,0 DFB 0,2,2,7,2,2,0,0 DFB 0,0,0,0,0,2,2,1 DFB 0,0,0,7,0,0,0,0 DFB 0,0,0,0,0,0,2,0 DFB 4,4,2,2,2,1,1,0 DFB 2,5,5,5,5,5,2,0 DFB 2,3,2,2,2,2,7,0 DFB 2,5,4,4,2,1,7,0 DFB 3,4,4,3,4,4,3,0 DFB 4,6,5,7,4,4,4,0 DFB 7,1,3,4,4,4,3,0 DFB 2,5,1,3,5,5,2,0 DFB 7,4,4,2,2,1,1,0 DFB 2,5,5,2,5,5,2,0 DFB 2,5,5,6,4,5,2,0 DFB 0,0,2,0,2,0,0,0 DFB 0,0,2,0,2,2,1,0 DFB 0,4,2,1,2,4,0,0 DFB 0,0,7,0,7,0,0,0 DFB 0,1,2,4,2,1,0,0 DFB 2,5,4,2,2,0,2,0 DFB 0,7,7,7,1,5,6,0 DFB 2,5,5,7,5,5,5,0 DFB 3,5,5,3,5,5,3,0 DFB 2,5,1,1,1,5,2,0 DFB 3,5,5,5,5,5,3,0 DFB 7,1,1,7,1,1,7,0 DFB 7,1,1,7,1,1,1,0 DFB 2,5,1,7,5,5,6,0 DFB 5,5,5,7,5,5,5,0 DFB 7,2,2,2,2,2,7,0 DFB 4,4,4,4,4,5,2,0 DFB 5,5,3,3,3,5,5,0 DFB 1,1,1,1,1,1,7,0 DFB 5,7,7,7,5,5,5,0 DFB 5,5,7,7,7,5,5,0 DFB 7,5,5,5,5,5,7,0 DFB 3,5,5,3,1,1,1,0 DFB 2,5,5,5,5,2,4,0 DFB 3,5,5,3,5,5,5,0 DFB 2,5,1,2,4,5,2,0 DFB 7,2,2,2,2,2,2,0 DFB 5,5,5,5,5,5,6,0 DFB 5,5,5,5,5,2,2,0 DFB 5,5,5,7,7,7,5,0 DFB 5,5,2,2,2,5,5,0 DFB 5,5,5,2,2,2,2,0 DFB 7,4,4,2,1,1,7,0 DFB 7,1,1,1,1,1,7,0 DFB 1,1,2,2,2,4,4,0 DFB 7,4,4,4,4,4,7,0 DFB 0,2,5,0,0,0,0,0 DFB 0,0,0,0,0,0,0,7 DFB 1,2,4,0,0,0,0,0 DFB 0,0,2,4,6,5,6,0 DFB 1,1,3,5,5,5,3,0 DFB 0,0,6,1,1,1,6,0 DFB 4,4,6,5,5,5,6,0 DFB 0,0,2,5,7,1,6,0 DFB 2,5,1,3,1,1,1,0 DFB 0,0,6,5,5,6,4,3 DFB 1,1,3,5,5,5,5,0 DFB 0,2,0,3,2,2,7,0 DFB 0,4,0,4,4,4,5,2 DFB 1,1,5,3,1,3,5,0 DFB 3,2,2,2,2,2,7,0 DFB 0,0,5,7,7,5,5,0 DFB 0,0,3,5,5,5,5,0 DFB 0,0,2,5,5,5,2,0 DFB 0,0,3,5,5,3,1,1 DFB 0,0,6,5,5,6,4,4 DFB 0,0,2,5,1,1,1,0 DFB 0,0,6,1,2,4,3,0 DFB 0,2,7,2,2,2,4,0 DFB 0,0,5,5,5,5,6,0 DFB 0,0,5,5,5,5,2,0 DFB 0,0,5,5,7,7,5,0 DFB 0,0,5,5,2,5,5,0 DFB 0,0,5,5,5,6,4,3 DFB 0,0,7,4,2,1,7,0 DFB 6,2,2,1,2,2,6,0 DFB 2,2,2,2,2,2,2,0 DFB 3,2,2,4,2,2,3,0 DFB 6,3,0,0,0,0,0,0 DFB 0,0,0,0,0,0,0,0 CHRSET EQU CHRPAT-8 SET40 EQU * ; BLOAD 'SET40' AT THIS ADDRESS ENDZZZ EQU * //go.sysin dd * if [ `wc -c < kermita.s` != 21063 ]; then made=FALSE echo error transmitting kermita.s -- echo length should be 21063, not `wc -c < kermita.s` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 kermita.s echo -n ' '; ls -ld kermita.s fi echo Extracting t-b.s sed 's/^X//' <<'//go.sysin dd *' >t-b.s * SOURCE TO T-B BINARY FILE * REVERSE ENGINEERED BY ZBEN * SEPTEMBER 1986 * ORG $95C7 ; AS PER ORIG LF EQU $8A ; LINEFEED (NEWLINE) CR EQU $8D ; CARRIAGE RETURN TEMP EQU $95C5 ; TEMP STORE VALU EQU $95C6 ; VALUE RETURN RDKEY EQU $FD0C ; GET ROUTINE * TB000 LDX #1 ; DO TWO HEX DIGITS TB010 JSR RDKEY ; GET CHAR CMP #CR ; IF CR THEN BEQ TB010 ; IGNORE IT CMP #LF ; IF LF THEN BEQ TB010 ; IGNORE IT CMP #'9'+1 ; IF ABOVE '9' BPL TB040 ; GO FUDGE 'A'..'F' TB020 SEC ; SETUP FOR SUBTRACT SBC #'0' ; MAKE ABSOLUTE CPX #0 ; IF SECOND DIGIT BEQ TB030 ; GO OR IN ASL A ; FIRST DIGIT ASL A ; SHIFT LEFT ASL A ; FOUR BITS ASL A ; TO POSITION STA TEMP ; SAVE FOR NEXT PASS DEX ; DEC PASS COUNTER JMP TB010 ; DO NEXT PASS * TB030 CLC ; SETUP FOR ADD ADC TEMP ; ADD FIRST PASS DATA STA VALU ; STORE FOR RETURN RTS ; RETURN TO CALLER * TB040 SEC ; SETUP FOR SUBTRACT SBC #$07 ; 'A'-'0'-10 ??? JMP TB020 ; REENTER HEX LOOP * * END OF T-B.S ZBEN 9/86 //go.sysin dd * if [ `wc -c < t-b.s` != 958 ]; then made=FALSE echo error transmitting t-b.s -- echo length should be 958, not `wc -c < t-b.s` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 t-b.s echo -n ' '; ls -ld t-b.s fi echo Extracting x-bin2txt-t sed 's/^X//' <<'//go.sysin dd *' >x-bin2txt-t 768 40 A200A000B103840620DAFDA406C8C02890F2208EFDA5031869288503A50469008504E8E40290DB60 //go.sysin dd * if [ `wc -c < x-bin2txt-t` != 89 ]; then made=FALSE echo error transmitting x-bin2txt-t -- echo length should be 89, not `wc -c < x-bin2txt-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-bin2txt-t echo -n ' '; ls -ld x-bin2txt-t fi echo Extracting x-frogpix-t sed 's/^X//' <<'//go.sysin dd *' >x-frogpix-t 8192 8192 223E021C1C223E803E1C80223E1E221C3E803E3E8080808080808080808080808080808080808080 AA102040808080808080808080808080808080808080808080808080808080808080808080808080 02142850808080808080808080808080808080808080808080808080808080808080084408802204 06461A40099E12008080808080808080808080808080808080808080808080808080808080808080 8080808080808080081020D0828080808080803C6003808080808080808080808080808080808080 80808080808080800214281080808080808080808080808080808080808080808080808080808080 808028440A142244001800000000000080802080803E221C221C3E80223E8022221C023E801C8002 1C081E8022221C3E023E08808080808008D420D0828080800680800F80407F808080808080808080 80808080808080808080808080808080021428108080808080808080808080808080808080808080 8080808080808080804028540A15225400000000000000008080A881808080808080808080808080 80808080808080808080808080808080808080808080808008D420D082802E2080808080807C7F7F 80808080808080808080808080808080808080808080808002140810808080808080808080808080 80808080808080808080808080808080804028540A152A5400000000000000000880A88180808080 80808080808080808080808080808080808080808080808080808080808080800AD4204080808080 80808080807C407F7F80808080808080808080808080808080808080808080800204081080808080 808080808080808080808080808080808080808080808080804028540A152A540000000000000000 0880A881808080808080808080808080808080808080808080808080808080808080808080808080 0AD42040808080808080808080808078611F80808080808080808080808080808080808080808080 0204081080808080808080808080808080808080808080808080808080808080804028540A152A54 0000000000000000AA80A88180808080808080808080808080808080808080808080808080808080 80808080808080800A10205080808080808080808080808080808080808080808080808080808080 80808040808080808080808080552A552A0580808080808080808080808080808080808080808080 80802810021528540000000000000000AA1020408080808080808080808080808080808080808080 80808080808080808080808080808080021020508080808080808080808080808080808080808080 8080808080808080808008400880200480808080808080402A552A552A552A552A552A552A552A55 2A552A552A552A552A55028080808080000000000000000022020222223602800822801202223608 088030068080808080808080808080808080808080808080AA102040808080808080808080808080 80808080808080808080808080808080808080808080808002142810808080808080808080808080 80808080808080808080808080808080808008440804220400000000000000008080808080808080 8080808080808080808080808080808080808080808080808080808080808080081020D082808080 80808066300680808080808080808080808080808080808080808080808080800214281080808080 808080808080808080808080808080808080808080808080808028440A1422440000000000000000 80802080800222222222028036028022220802028008800222142280362222020202088080808080 08D420D0828080800380800780607F01808080808080808080808080808080808080808080808080 0214281080808080808080808080808080808080808080808080808080808080804028540A152254 00000000000000008080A88180808080808080808080808080808080808080808080808080808080 808080808080808008D420D082801C1280808080807C7F7F01808080808080808080808080808080 80808080808080800214081080808080808080808080808080808080808080808080808080808080 804028540A152A5400000000000000000880A8818080808080808080808080808080808080808080 808080808080808080808080808080800AD420408080808080808080807C407F7F01808080808080 80808080808080808080808080808080020408108080808080808080808080808080808080808080 8080808080808080804028540A152A5400000000000000000880A881808080808080808080808080 8080808080808080808080808080808080808080808080800AD42040808080808080808080808078 613F8080808080808080808080808080808080808080808002800810808080808080808080808080 80808080808080808080808080808080804028540A152A540000000000000000AA80A88180808080 80808080808080808080808080808080808080808080808080808080808080800A10205080808080 8080808080808080808080808080808080808080808080808080804080808080808080552A552A55 2A552A80808080808080808080808080808080808080808080800810021128500000000000000000 AA102040808080808080808080808080808080808080808080808080808080808080808080808080 02142050808080808080808080808080808080808080808080808080808080808080084408802004 D4AA8080808080542A552A552A552A552A552A552A552A552A552A552A552A552A552A80D0AAD582 000000000000000022020202222A02800822800A02222A0808803006808080808080808080808080 80808080808080800810204080808080808080808080808080808080808080808080808080808080 80808080808080800214281080808080808080808080808080808080808080808080808080808080 80800844080422040000000000000000808080808080808080808080808080808080808080808080 8080808080808080808080808080808008D420D08280808080808043190C80808080808080808080 80808080808080808080808080808080021428108080808080808080808080808080808080808080 8080808080808080804028440A14224400000000000000008080208080021402220202802A028022 2208020280088002222222802A140202020208808080808008D420D0828080800780800E80707F03 80808080808080808080808080808080808080808080808002140810808080808080808080808080 80808080808080808080808080808080804028540A15225400000000000000008080A88180808080 808080808080808080808080808080808080808080808080808080808080808008D420D082805810 80808080807C7F7F0380808080808080808080808080808080808080808080800204081080808080 808080808080808080808080808080808080808080808080804028540A152A540000000000000000 0880A881808080808080808080808080808080808080808080808080808080808080808080808080 0AD420408080808080808080807E017F7F0180808080808080808080808080808080808080808080 0204081080808080808080808080808080808080808080808080808080808080804028540A152A54 00000000000000000880A88180808080808080808080808080808080808080808080808080808080 80808080808080800A102040808080808080808080808070737F8080808080808080808080808080 80808040808080800280088080808080808080808080808080808080808080808080808080808080 804028540A152A540000000000000000AA80A8818080808080808080808080808080808080808080 808080808080808080808080808080800A1020508080808080808080808080808080808080808080 8080808080808080808080408080208080502A552A552A552A552A55808080808080808080808080 8080808080AAD5AAD58A0880021128500000000000000000AA102040808080808080808080808080 80808080808080808080808080808080808080808080808002142050808080808080808080808080 80808080808080808080808080808080808008440880200480808080808080542A552A552A552A55 2A552A552A552A552A552A552A552A552A552A808080808000000000000000002A1E0202222A1E80 082280061E1E2A08083E30068080808080808080808080808080808080808080081020D082808080 80808080808080808080808080808080808080808080808080808080808080800214281080808080 80808080808080808080808080808080808080808080808080800844080422040000000000000000 80802080808080808080808080808080808080808080808080808080808080808080808080808080 08D420D0828080808080804F7F0C8080808080808080808080808080808080808080808080808080 0214281080808080808080808080808080808080808080808080808080808080804028440A142244 000000000000000080802080801E0802221C1E802A1E802A3E08021E80088002222222802A081C1E 021E08808080808008D420D0828080807E7F7F7F7F787F0780808080808080808080808080808080 80808080808080800214081080808080808080808080808080808080808080808080808080808080 804028540A152A5400000000000000008080A8818080808080808080808080808080808080808080 8080808080808080808080808080808008D420408080302580808080807C7E7F0780808080808080 80808080808080808080808080808080020408108080808080808080808080808080808080808080 8080808080808080804028540A152A5400000000000000000880A881808080808080808080808080 8080808080808080808080808080808080808080808080800AD420408080808080808080805F037F 7E038080808080808080808080808080808080808080808002040810808080808080808080808080 80808080808080808080808080808080804028540A152A540000000000000000AA80A88180808080 80808080808080808080808080808080808080808080808080808080808080800A10204080808080 80808080808080707377808080808080808080808080808080808040808080800280088080808080 8080808080808080808080808080808080808080808080808040285402152A540000000000000000 AA802080808080808080808080808080808080808080808080808080808080808080808080808080 0A102050808080808080808080808080808080808080808080808080808080808080804080802080 80552A552A552A552A552A550A808080808080808080808080808080808080808080088002112810 0000000000000000AA10204080808080808080808080808080808080808080808080808080808080 80808080808080800214205080808080808080808080808080808080808080808080808080808080 808008440880220480808080808080402A552A552A552A552A552A552A552A552A552A552A552A55 2A5580808080808000000000000000002A020202222202800822800A020A22080880300680808080 80808080808080808080808080808080081020D08280808080808080808080808080808080808080 80808080808080808080808080808080021428108080808080808080808080808080808080808080 80808080808080808080284408042204000000000000000080802080808080808080808080808080 80808080808080808080808080808080808080808080808008D420D0828080808080807E7F7F0180 80808080808080808080808080808080808080808080808002142810808080808080808080808080 80808080808080808080808080808080804028440A14225400000000000000008080208080021402 222002802202802A2208020280088002223E228022082002020208808080808008D420D082808080 7C7F7F7F3F7C7F0F8080808080808080808080808080808080808080808080800214081080808080 808080808080808080808080808080808080808080808080804028540A152A540000000000000000 0880A881808080808080808080808080808080808080808080808080808080808080808080808080 08D420408080602280808080807C7C7F0F8080808080808080808080808080808080808080808080 0204081080808080808080808080808080808080808080808080808080808080804028540A152A54 00000000000000000880A88180808080808080808080808080808080808080808080808080808080 80808080808080800AD420408080808080808080801B017E7C038080808080808080808080808080 80808080808080800204081080808080808080808080808080808080808080808080808080808080 804028540A152A540000000000000000AA80A8818080808080808080808080808080808080808080 808080808080808080808080808080800A1020508080808080808080808080303327808080808080 80808080808080808080804080808080028008808080808080808080808080808080808080808080 80808080808080808040285402152A540000000000000000AA802080808080808080808080808080 8080808080808080808080808080808080808080808080800A102050808080808080808080808080 80808080808080808080808080808080808080408080208080802A552A552A552A552A0580808080 808080808080808080808080808080A0D5AAD5AA951020800000000000000000AA10204080808080 80808080808080808080808080808080808080808080808080808080808080800214285080808080 808080808080808080808080808080808080808080808080808008440880220480808080D4AA8580 20552A552A552A552A552A552A552A552A552A552A552A552A0180A8D58080800000000000000000 36020222222202800822801202122208088030068080808080808080808080808080808080808080 081020D0828080808080808080808080808080808080808080808080808080808080808080808080 02142810808080808080808080808080808080808080808080808080808080808080284408142204 00000000000000008080208080808080808080808080808080808080808080808080808080808080 808080808080808008D420D0828080808080807C7F7F078080808080808080808080808080808080 80808080808080800214281080808080808080808080808080808080808080808080808080808080 804028440A14225400000000000000008080A8818002222222220280220280362208020280088002 2222228022082202020280808080808008D420D08280808080808070807E7F1F8080808080808080 80808080808080808080808080808080021408108080808080808080808080808080808080808080 8080808080808080804028540A152A5400000000000000000880A881808080808080808080808080 8080808080808080808080808080808080808080808080800AD420408080401580808080807C787F 1F808080808080808080808080808080808080808080808002040810808080808080808080808080 80808080808080808080808080808080804028540A152A5400000000000000000880A88180808080 80808080808080808080808080808080808080808080808080808080808080800AD4204080808080 808080808018807E7807808080808080808080808080808080808080808080800204081080808080 808080808080808080808080808080808080808080808080804028540A152A540000000000000000 AA80A881808080808080808080808080808080808080808080808080808080808080808080808080 0A102050808080808080808080808030370680808080808080808080808080808080804080808080 02A0D5AAD5AA80808080808080808080808080808080808080808080808080808040285402152A54 0000000000000000AA80208080808080808080808080808080808080808080808080808080808080 80808080808080800210205080808080808080808080808080808080808080808080808080808080 8080084080802080808080542A552A552A158080808080542A552A552A552A552A552A0180808080 80808080801020800000000000000000AA1020408080808080808080808080808080808080808080 80808080808080808080808080808080021428508080808080808080808080808080808080808080 8080808080808080808008440880220480A0D5828080808080802A552A552A552A552A552A552A55 2A552A552A552A1580808080808080800000000000000000223E3E1C1C223E80081C80223E22221C 08803E3E8080808080808080808080808080808080808080081020D0828080808080808080808080 80808080808080808080808080808080808080808080808002142810808080808080808080808080 80808080808080808080808080808080808028440A14220400000000000000008080208080808080 808080808080808080808080808080808080808080808080808080808080808008D420D082808080 8080807C7F3F1F808080808080808080808080808080808080808080808080800214281080808080 808080808080808080808080808080808080808080808080804028440A1522540000000000000000 8080A881803E221C1C1C3E80223E8022221C3E3E801C803E1C221E8022081C3E3E02088080808080 08D420D082808080808080607F7F7F3F808080808080808080808080808080808080808080808080 0214081080808080808080808080808080808080808080808080808080808080804028540A152A54 00000000000000000880A88180808080808080808080808080808080808080808080808080808080 80808080808080800AD420408080808080808080807C707F3F808080808080808080808080808080 80808080808080800204081080808080808080808080808080808080808080808080808080808080 804028540A152A5400000000000000000880A8818080808080808080808080808080808080808080 808080808080808080808080808080800AD4204080808080808080808080807C7107808080808080 80808080808080808080808080808080020408108080808080808080808080808080808080808080 8080808080808080804028540A152A540000000000000000AA80A881808080808080808080808080 8080808080808080808080808080808080808080808080800A102050808080808080808080808030 07068080808080808080808080808080808080408080808002808080808080808080808080808080 8080808080808080808080808080808080402850021528540000000000000000AA10208080808080 80808080808080808080808080808080808080808080808080808080808080800210205080808080 80808080808080808080808080808080808080808080808080800840088020048080808080542A55 028080552A552A552A552A552A552A552A552A552A552A0180808080801020800000000000000000 AA102040808080808080808080808080808080808080808080808080808080808080808080808080 02142850808080808080808080808080808080808080808080808080808080808080084408802204 8080808080808080808080802A552A552A552A552A552A552A552A552A5502808080808080808080 00000000000000008080808080808080808080808080808080808080808080808080808080808080 8080808080808080081020D082808080808080808080808080808080808080808080808080808080 80808080808080800214281080808080808080808080808080808080808080808080808080808080 808028440A1422440000000000000000808020808080808080808080808080808080808080808080 8080808080808080808080808080808008D420D0828080808080807E7F1F3F808080808080808080 80808080808080808080808080808080021428108080808080808080808080808080808080808080 8080808080808080804028540A15225400000000000000008080A881808080808080808080808080 80808080808080808080808080808080808080808080808008D420D08280808080808080787F7F7F 80808080808080808080808080808080808080808080808002140810808080808080808080808080 80808080808080808080808080808080804028540A152A5400000000000000000880A88180808080 80808080808080808080808080808080808080808080808080808080808080800AD4204080808080 80808080807C607F7F80808080808080808080808080808080808080808080800204081080808080 808080808080808080808080808080808080808080808080804028540A152A540000000000000000 0880A881808080808080808080808080808080808080808080808080808080808080808080808080 0AD4204080808080808080808080807C610F80808080808080808080808080808080808080808080 0204081080808080808080808080808080808080808080808080808080808080804028540A152A54 0000000000000000AA80A88180808080808080808080808080808080808080808080808080808080 80808080808080800A10205080808080808080808080803006808080808080808080808080808080 80808040808080808080808080808080808080808080808080808080808080808080808080808080 80802850021528540000000000000000AA1020808080808080808080808080808080808080808080 80808080808080808080808080808080021020508080808080808080808080808080808080808080 80808080808080808080084008802004808080808080808080552A552A552A552A552A552A552A55 2A552A552A552A552A018080801080800000000000000000AA102040808080808080808080808080 80808080808080808080808080808080808080808080808002142850808080808080808080808080 808080808080808080808080808080808080084408802204D0AA8180C0AAD5AAD580808080802855 2A552A552A552A552A552A55808080A8D5AAD5AA8580D0AA0000000000000000FFFF0000FFFF0000 //go.sysin dd * if [ `wc -c < x-frogpix-t` != 16616 ]; then made=FALSE echo error transmitting x-frogpix-t -- echo length should be 16616, not `wc -c < x-frogpix-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-frogpix-t echo -n ' '; ls -ld x-frogpix-t fi echo Extracting x-pack-unpack-t sed 's/^X//' <<'//go.sysin dd *' >x-pack-unpack-t 24567 248 A5E609048506A2018604A000840284058408B100D018E600D002E601B1008508E600D002E601B100 8507A507C608A4029105E8E8E0C09012E602A402C0289008C6043015A0008402A604205A60A408D0 D9E600D0BDE601D0B9608A29C085054A4A050585058A85060A0A0A26060A26060A6605A506291F05 E6850660A00184048403888402A5E6090485068405B105D0020980A20186088507A402A603E8E8E0 C0900FC8C0289006C604301BA0008402A6048603205A60B105D0020980C507D006E608D0D4C60848 A000A608F00EE004B00AA50720EF60CAD0FAF00D9820EF608A20EF60A50720EF6068240410A56091 00E600D002E6016000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00 //go.sysin dd * if [ `wc -c < x-pack-unpack-t` != 578 ]; then made=FALSE echo error transmitting x-pack-unpack-t -- echo length should be 578, not `wc -c < x-pack-unpack-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-pack-unpack-t echo -n ' '; ls -ld x-pack-unpack-t fi echo Extracting x-set40-t sed 's/^X//' <<'//go.sysin dd *' >x-set40-t 20000 768 00000000000000000808080808000800141414000000000028947E14BF8A0A00083C0A1C281E0800 0626100804323000040A0A042A122C00080808000000000008040202020408000810202020100800 082A1C081C2A08000008083E0808000000000000008C88840000003E000000000000000000008C00 00201008040200008C92222222928C00080C080808081C001C22201084823E003E90101820221C00 101814123E1010003E021E2020221C001804821E22221C003E901088088404001C22221C22221C00 1C22223C90100C0000008C00008C000000008C00008C8884100804020408100000003E003E000000 04081020100804001C229088080008001C222A3A1A023C00088C14923E2222001E22221E22221E00 1C22020202221C001E22222222221E003E02021E02023E003E02021E020202003C02020232223C00 2222223E222222001C08080808081C002020202020221C0022120A060A1222000202020202023E00 22362A2A222222002222262A322222001C22222222221C001E22221E020202001C2222222A122C00 1E22221E0A1222001C22021C20221C003E080808080808002222222222221C0022222292148C0800 2222222A2A362200229214081492220022921408080808003E90100804823E003E06060606063E00 00020408102000003E30303030303E000000081422000000000000000000007F0408100000000000 00001C203C223C0002021E2222221E0000003C0202023C0020203C2222223C0000001C223E023C00 1824041E0404040000001C22223C201C02021E222222220008000C0808081C00100018101010120C 020222120E1222000C08080808081C000000362A2A2A220000001E222222220000001C2222221C00 00001E22221E020200003C22223C202000003A060202020000003C021C201E0004041E0404241800 0000222222322C0000002292148C0800000022222A2A3600000022140814220000002292148C0886 00003E1008043E00380C0C060C0C380008080808080808080E18183018180E002C1A000000000000 7F7F7F7F7F7F7F7FFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 //go.sysin dd * if [ `wc -c < x-set40-t` != 1631 ]; then made=FALSE echo error transmitting x-set40-t -- echo length should be 1631, not `wc -c < x-set40-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-set40-t echo -n ' '; ls -ld x-set40-t fi echo Extracting x-txt2bin-t sed 's/^X//' <<'//go.sysin dd *' >x-txt2bin-t 24761 49 A201200CFDC98DF0F9C98AF0F5C9BA101A38E9B0E000F00B0A0A0A0A8D3C03CA4C4003186D3C038D 3D036038E9074C4F03240410A5609100E600D002E60160223ABA22454E54455220274E4F4E452720 //go.sysin dd * if [ `wc -c < x-txt2bin-t` != 172 ]; then made=FALSE echo error transmitting x-txt2bin-t -- echo length should be 172, not `wc -c < x-txt2bin-t` else made=TRUE fi if [ $made = TRUE ]; then chmod 644 x-txt2bin-t echo -n ' '; ls -ld x-txt2bin-t fi ------------ ereh tuc ------------ -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"