*************************************** * Scripy Text processor * * for the R/S 100/102 computer * * Copyright (C) 1985 * * by * * Thomas L. Quindry * * * * CLUB 100 Public Domain Library * * 415/939-1246 BBS, 932-8856 VOICE * * 937-5039 NEWSLETTER * * * * Please use this software free of * * charge and give a copy to your * * friends. If you find it useful, a * * suggested donation of $15 would * * be much appreciated. * * * * You may send your donation to: * * * * Thomas L. Quindry * * TLQ Enterprises * * 6237 Windward Drive * * Burke, VA 22015 * * * * Please do not remove this notice. * * * *************************************** Scripy is a text processing enhancement to the Radio Shack Model 100/102 text editing program. All future references to the Model 100 also apply to the Model 102. Scripy is a machine language program that sends formatted printer output from Model 100 files. Scripy is not to be confused with a word processor. You do not write your text with Scripy, you only print it with Scripy. To write your text, use the built in TEXT program that comes with your Model 100 Though Scripy is considered a minimal function text processor, it does offer some powerful options. One of its most useful options is the ability to send the much needed linefeed with each carriage return to the printer. Minimal function means that word processing tasks can be accomplished using Scripy with the exception of exotic functions that would be nice but are not necessary to perform the basic task. After all, Scripy takes only 320 bytes of user memory. It was written to conserve precious memory for other useful programs that the user may want to keep in his Model 100. Most commercial text processing programs for the Model 100 use between two and three thousand bytes of valuable user memory. Scripy can be used by practically any parallel printer. Special printer functions can be attained by embedding control codes within text as explained in narrative that follows. The Scripy text processor is distributed as two BASIC programs. The main program is SCRIPY.BA. This is a BASIC file which POKES the machine language program into memory and then saves it as SCRIPY.CO. After SCRIPY.CO has been saved, SCRIPY.BA is no longer needed and can be killed. CFIG.BA is used to initially configure SCRIPY.CO. After SCRIPY.CO has been created and saved, run CFIG.BA and answer the questions concerning left margin, line length, etc. At your option, CFIG will then either save the new configuration within SCRIPY.CO or else run SCRIPY.CO with a one time configuration change. Unless you have changing text processing needs, CFIG.BA can be removed from your Model 100 as it will no longer be needed. The only file which you need is SCRIPY.CO. Listings 1 and 2 give the SCRIPY.BA and CFIG.BA programs. To transfer these programs from this documentation file to BASIC, you must first make sure that you have no program in free BASIC memory. Leave the TEXT mode, go to BASIC and clear free BASIC memory by entering the command, "NEW". Then return to this document file and position the cursor on line 10 of the SCRIPY.BA or CFIG.BA listing. Use the function key, F7, and select the entire program; then capture it into your Paste Buffer by pressing function key, F5. Now go back to BASIC and press the PASTE key. You will see the program being entered into BASIC. Save the program with its proper filename. In order to use SCRIPY, high memory must be protected by going into BASIC and setting the HIMEM pointer using the command, CLEAR 50,62640. SCRIPY.CO can then be loaded and run from the menu. Running the BASIC program to create SCRIPY.CO protects this high memory automatically so you don't have to repeat it unless you later change your HIMEM pointer. Scripy offers some powerful features. When running Scripy, you can exit from the program at any time by hitting the SHIFT-BREAK key combination. All default settings can be selected using CFIG.BA. Current default settings are: 1. Default skip over perforation of 12 lines. 2. Default setting of left margin of 10 spaces. 3. Default setting of maximum line length of 60 characters. 4. Within text selectable/changeable linefeeds (1, 2, or user defined with GRPH codes). Selectable default settings for linefeeds. 5. Optional linefeed with carriage return. 6. Within text embedding of control codes to enable Epson and other printer printing features. 7. Optional pause after formfeed. 8. Cold start default values can be changed by the user. The GRPH key on the Model 100 is used to send control codes to the printer from within text. Three codes are reserved for changing the number of linefeeds sent with each carriage return. The default linefeed when running Scripy can be changed within the text file by substituting a special graphic character for a space character. The code GRPH 1, GRPH 2, or GRPH 3 depending on whether 1, 2, or 3 linefeeds respectively is desired, is substituted for a space in the text. (The GRPH 3 code can be set to any desired linespacing by CFIG.BA.) Text printing starting with the next line after substitution will use the new linefeed specification. This instruction as well as other instructions to Scripy can be changed within text as many times as desired. If a linefeed default other than 1 is desired, a good way to change the default is to save the SCRIPY.CO file after printing a text file using the number of linefeeds desired for the default. The file can be saved using the command, SAVEM "SCRIPY.CO", 62640,62959,62662. An easier way is to use the small BASIC program called CFIG.BA to change Scripy default values and save the modified file. You can also use the POKE values found in CFIG.BA to change individual parameters. Scripy uses the keyboard input buffer to store the line of text to be LPRINTed next. This buffer is 254 bytes long. Since Scripy uses two of these bytes for a carriage return character and overhead, line lengths greater than 252 bytes are not recommended and may give unpredictable results. Once you have set the default values to you liking, CFIG.BA saves the modified Scripy file as described above or, at your option, runs Scripy with the changes being only temporary. Scripy can send any control from 0 to 127 to the printer. This is done using the GRPH key on the Model 100. Add 128 to any code you care to send. Consult your printer manual for the proper code and your Model 100 manual for the proper GRPH key code to embed it in your text. Scripy filters the seventh bit which allows you to send these codes. Do not substitute these codes for a space as you do with the linefeed control codes. Each control code is counted as a character and sent to the printer. The only other exception is the code to force a formfeed. GRPH ', is substituted for the symbol. Table 1. gives several examples of control codes you can send using the GRPH key on the Model 100. The descriptions of functions performed are Epson specific with the exception of the first three. Table 1. Examples for embedding control codes within text. Be sure the Caps Lock key is not depressed when entering codes requiring lower case letters. GRPH 1 - Sends one linefeed for each carriage return. (Replace space character) GRPH 2 - Sends two linefeeds for each carriage return. (Replace space character) GRPH 3 - Sends user specified number of linefeeds (via CFIG.BA) for each carriage return. (Replace space character) Control codes for Epson compatible printers. Subtract 128 from the GRPH character entered to get code. GRPH k - code 27 - Used as the ESC code and is the most used code. GRPH ' - code 12 - Forces formfeed (Replace ) GRPH m - code 1 - Turns on certain features. GRPH p - code 0 - Turns off certain features GRPH i - code 14 - Turns on double width mode GRPH e - code 15 - Turns on compressed mode GRPH ; - code 18 - Turns off compressed mode GRPH w - code 20 - Turns off double width mode Graphic codes similar to those given in Table 1. can be grouped to give any of the ESC code combinations used by you printer. With the Epson, for example, "GRPH k", "E" (Do not enter the quotes.) will turn on the emphasized mode. "GRPH k", "F" will turn it off. "GRPH k, "-", " GRPH m" will turn on underlining and "GRPH k, "-", " GRPH p" will turn it off. Note: The version of Scripy described is not intended to work with the Radio Shack Model 100 Disk Video Interface System. * Scripy has no affiliation with any version of the Scripsit word processor programs distributed by Radio Shack. Listing 1. SCRIPY.BA. A BASIC program that creates SCRIPY.CO 0 'SCRIPY.BA Thomas Quindry 1 'CLUB 100 Library 415/939-1246 bbs 10 CLS:CLEAR50,62640 20 PRINT:PRINTTAB(11)"Loading SCRIPY.CO" 40 PRINTTAB(19)"By" 50 PRINTTAB(11)"Thomas L. Quindry":PRINT 60 FORN=62640TO62959:READA:POKEN,A:CK=CK+A:NEXT 70 READA:IFCK<>ATHENPRINT" Checksum error, check DATA statements":END 80 PRINTTAB(8)"SCRIPY.CO has been saved" 90 PRINTTAB(8)"SCRIPY.BA can be killed" 100 PRINTTAB(4)"Himem must be protected to 62640" 110 SAVEM"SCRIPY.CO",62640,62959,62662 1000 DATA10, 9, 9, 69, 110, 116, 101, 114, 0, 33 1010 DATA176, 244, 205, 177, 39, 205, 62, 70, 218, 0 1020 DATA0, 201, 33, 192, 245, 195, 207, 244, 33, 229 1030 DATA245, 205, 188, 244, 33, 133, 246, 229, 14, 7 1040 DATA205, 232, 15, 183, 202, 234, 244, 119, 254, 46 1050 DATA202, 234, 244, 35, 13, 194, 216, 244, 6, 4 1060 DATA17, 236, 245, 205, 105, 52, 209, 62, 9, 205 1070 DATA171, 90, 202, 204, 244, 205, 227, 90, 229, 17 1080 DATA133, 246, 62, 66, 18, 19, 175, 18, 14, 62 1090 DATA225, 17, 135, 246, 13, 202, 66, 245, 126, 6 1100 DATA1, 254, 136, 202, 39, 245, 4, 254, 156, 202 1110 DATA39, 245, 6, 3, 254, 157, 194, 45, 245, 120 1120 DATA50, 147, 245, 62, 32, 18, 35, 19, 254, 140 1130 DATA202, 90, 245, 254, 26, 202, 89, 245, 254, 13 1140 DATA194, 14, 245, 195, 89, 245, 229, 213, 43, 27 1150 DATA126, 183, 194, 82, 245, 209, 225, 43, 27, 195 1160 DATA90, 245, 254, 32, 194, 68, 245, 193, 193, 35 1170 DATA229, 62, 13, 18, 14, 10, 62, 32, 205, 184 1180 DATA245, 13, 194, 96, 245, 33, 135, 246, 126, 254 1190 DATA140, 202, 131, 245, 254, 26, 202, 140, 245, 254 1200 DATA13, 202, 146, 245, 205, 184, 245, 35, 195, 108 1210 DATA245, 205, 160, 245, 205, 185, 244, 195, 255, 244 1220 DATA205, 160, 245, 195, 0, 0, 62, 1, 205, 163 1230 DATA245, 126, 254, 13, 218, 131, 245, 195, 8, 245 1240 DATA58, 133, 246, 245, 33, 133, 246, 53, 62, 13 1250 DATA205, 184, 245, 62, 10, 205, 184, 245, 241, 61 1260 DATA200, 195, 163, 245, 245, 230, 127, 205, 63, 109 1270 DATA241, 201, 10, 9, 9, 83, 99, 114, 105, 112 1280 DATA121, 10, 13, 10, 9, 32, 98, 121, 32, 84 1290 DATA104, 111, 109, 97, 115, 32, 76, 46, 32, 81 1300 DATA117, 105, 110, 100, 114, 121, 10, 10, 13, 9 1310 DATA9, 70, 105, 108, 101, 0, 46, 68, 79, 0, 42518 Listing 2. CFIG.BA. A BASIC program to provide initial configuration to SCRIPY.CO. 0 'CFIG.BA Thomas Quindry 1 'CLUB 100 library 415/939-1246 bbs 10 CLS:LOADM"SCRIPY" 20 PRINT,"Scripy Config":PRINT 30 A=10:INPUT"Left Margin (10)";A:POKE62815,A 40 A=60:INPUT"Line length (60)";A:A=A+2:POKE62729,A 50 A=1:INPUT"Default linefeeds (1)";A:POKE62867,A 60 A=3:INPUT"No. linefeeds for GRPH-3 (3)";A:POKE62753,A 70 A=12:INPUT"Skip over perforation (12)";A:A=A+1:POKE62873,A 80 A=66:INPUT"Page length (66)";A:POKE62723,A 90 PRINT"Pause after formfeed? ";:GOSUB1000:IFA=1THENPOKE62649,33ELSEPOKE62649,201 100 PRINT"Linefeed with carriage return? ";:GOSUB1000:IFA=1THENPOKE62896,184ELSEPOKE62896,191 110 PRINT"Save Configuration? ";:GOSUB1000:IFA=1THENPRINT"Saved":SAVEM"SCRIPY",62640,62959,62662ELSECLS:CALL62 662 999 END 1000 A=ASC(INPUT$(1))AND223:IFA=89THENA=1:PRINT"Yes":RETURNELSEIFA=78THENPRINT"No":RETURNELSEGOTO1000