LnSOS BOOT 7.0 SOS.KERNEL SOS KRNLI/O ERRORFILE 'SOS.KERNEL' NOT FOUND%INVALID KERNEL FILE: xةw,@  ȱlmi8#)!) 9000 d main menu iœ2000Dnmenu=7:menu$(1)="General Instructions":menu$(2)="Disk Routines"9xmenu$(3)="Array Routines":menu$(4)="Utility Routines"Jmenu$(5)="Print Manual":menu$(6)="Demos":menu$(7)="Quit to Menu.Maker"':=4:=28:7+UTILITY.DOC:S>>%SEG.T jŸ/ DISKNAME.DAT%c TEST.FILE.7TEST.FILE.8TEST.FILE.9TEST.FILE2!8!9-SEARARRAY.DOC >>)SORT.DEMO '(STANDARD")TITLE.DOC> +UPSHIFT.DOC>>)MWNUM.DOCq fܢܢ)MWSTR.DOC ܢܢ+PRINTER.DOCTT*RCHAR.DEMO 'REBOOT.DOC@>>)RESET.DOC>+>>.SEARARRAY.DEMO >>*MENU.MAKER 8 }>*MMULTI.DOC >>)MOPEN.DOCj >>(MOVE.DOCR+>>+MSETPOS.DOCX>>-FILECOPY.DEMO i'!.FONT.EDIT.DEMO ')FTYPE.DOC >>'GEN.DOC/   *MATRW.DEMO \'!;)MATRW.DOC >>)MENDF.DOC~ N>>)DEMOS.DOC>(DISK.DOC+A>>-DISKCOPY.DEMO '*ERRORS.DOC>>.EXTENSION.MENU  'III.BSB.20DEMO1ut ' &)ARRAY.DOC:>>'BIT.DOCL=>>*BLOCK.DEMO  '")BLOCK.DOC >>$BYTE"!'CON.DOCB >dLԡm#i㰼m#iЕOLԡȱfg hi !dLԡ憦  Ljmkm l y`2 Lԡ8(Je稽)ʈ@L"Basic Extension, V1.1"N=19:=10::" Use the Up/Down arrows to select, then press RETURN ";:=6:=28:6000&i161,162,163,164,165,166,167,168doc$="gen":1000:100doc$="disk":1000:300doc$="array":1000:200doc$="utility":  =255 ::$" Error #";;" in line ";*" Press any key to continue" a$:100p do menu uj=:k=%zi=1menu:=j:i;" ";menu$(i):i=o&=j:=k+i-o:i;" ";::menu$(i):,a$:u=a$):u=13:ۻu=2720:#1;a$:a$:iK=21::" Press RETURN to continue, ESCAPE to skip ";:4a$:a$=27):::ۻa$<>13)1040:ۮ:1020 .:œ200018=21::" Press RETURN to continue ";:Ba$:a$<>13)1090:ۿ on errs come hereenu$(3);M+R=19:=36::ssmenu$(5);:menu$(4);W\=6:=28:6000"fi500,880,882,884,886,100,100 psp=1:840 rsp=0:840 tss=0:840 vss=1:840! print doc routine goes here œ1070#1,doc$+".doc" ž#11070i=1o for print *menu=6:T4menu$(2)="Serial Printer":menu$(3)="Silentype Printer":menu$(1)="Begin Printing"Q>menu$(4)="Continous Paper":menu$(5)="Single Sheet Paper":menu$(6)="Main Menu"KH=17:=15:29);"Currently set for: ";::spmenu$(2);:mt, then press RETURN"=6:=28:6000&i661,662,663,664,665,666,300,100doc$="Mopen":1000:600doc$="mwnum":1000:600doc$="mwstr":1000:600doc$="msetpos":1000:600doc$="mendf":1000:600doc$="mmulti":1000:600  get infu "bmenu=7:menu$(1)="Mopen/Mclose"1lmenu$(2)="Mwnum/Mrnum":menu$(3)="Mwstr/Mrstr"'vmenu$(4)="Msetpos":menu$(5)="Mendf".{menu$(6)="Dimensions":menu$(7)="Disk Menu"%:=4:=28:"Matrw Routines Menu"G=19:=10:"Use the Up/Down arrows to selec to begin printing, ESCAPE to quit";:a$:a$=13)531:ۻa$=27):100:ۺ530#=6:=10:"Printing ...";50);#2:#2:#2 u=160#1;a$:#2;a$.!u:#2:page=page+1:#2;39);page:#2:530&i::œ1000100X Mat Routines Men00doc$="upshift":1000:400 print manual œ2000 page=0,n:sp#2,".printer":ۈ#2,".silentype" i=1n file$:#1,file$+".doc"?ž#1:u=u60:#2::#2:page=page+1:#2;39);page:#2:550t:ss=6:=10:"Press RETURN:=28:"Utility Routines Menu"G=19:=10:"Use the Up/Down arrows to select, then press RETURN"=6:=28:6000"i461,462,463,464,465,100,100doc$="con":1000:400doc$="reboot":1000:400doc$="reset":1000:400doc$="bit":1000:4:1000:300kdoc$="ftype":1000:300ldoc$="errors":1000:300 Utility Routines Menu menu=6:menu$(1)="Console"5menu$(2)="Reboot":menu$(3)="Disable/Enable Reset"/menu$(4)="Binary AND/OR":menu$(5)="Upshift"menu$(6)="Main Menu"':=4et/Set File Type":menu$(4)="Errors":menu$(5)="Main Menu"$T:=4:=28:"Disk Routines Menu"IV=19:=10:" Use the Up/Down arrows to select, then press RETURN "^=6:=28:6000hi361,362,363,364,100,100idoc$="matrw":1000:600jdoc$="block" Up/Down arrows to select, then press RETURN ":=6:=28:6000i261,262,100,100doc$="Move":1000:200doc$="seararray":1000:200, Disk Routines Menu C6menu=5:menu$(1)="Matrix Read/Write":menu$(2)="Block Read/Write"G@menu$(3)="G1000:400doc$="printer":1000:800doc$="demos":1000:100:".D1/MENU.MAKER"100 Array Routines Menu /menu=3:menu$(1)="Move":menu$(2)="Seararray"menu$(3)="Main Menu"%:=4:=28:"Array Routines Menu"M=19:=10::" Use thei=menu+1:: =j:=k+i-o:i;" ";menu$(i)*u=10i=menui=o:6030:i=i+o:6030*u=11i=oi=menu:6030:i=i-o:6030u<49u>48+menu6030i=u-48:6030(# set up constants 2#o=1 <#œ2000# set up screen #ss=1:sp=17#15);1);6);16);2);17);21);13);28)#1,180,4;#=1:=25:"B A S I C E X T E N S I O N";:=68:"1982"*#=1:"V 1.1";:=64:"Foxware Products"3#=2:=22:"THIS DISK COPYRIGHT 1991; WAP, LTD."V#"_____________________________________ Line 30 puts the length of the array to be saved into the varaible 'len%'. The length is in bytes. We are saving 1,000 elements. Each element is 2 bytes long. Line 40 writes the array to disk. The variable to be used. Line 20 opens the file. The file name is specified in file$. Num% returns a reference number that is used by the other procedures. perform mopen(@file$,@num%) 30 len%=1000*2 40 perform mwnum(@a%(1),@len%,@num%) 50 perform mclose(@num%) Line 10 sets up the name of the file to write to. The file name must be stored in a string be 3,000 bytes long while the one created by Matrw.inv would be only 2,000 bytes long. Here is an example of how Matrw would be used to save a 1,000 element integer array: 10 file$="data" 20 1,000 times. With Matrw you could specify the beginning element and the length of the array. It would then be saved in only one operation. In addition, the file created by the basic routine above would stored on disk, you would use a routine like this: 10 open#1,".d1/datafile" 20 for i=1 to 1000 30 write#1;a%(i) 40 next i 50 close Basic would execute lines 20, 30, and 40 trw supports both sequential and random access. In addition, it has a unique function which allows an existing file to be shortened. Using basic, if you had a 1,000 element integer array that was to be  for 'Matrix Read Write Invokable'. The speed of the procedures, frequently up to 10 times faster than basic, is achieved by reading and writing an entire array of information at one time. Ma MATRW.INV Matrw.inv is a group of procedures which provide high speed disk access, and can reduce disk storage usage by more than 30%. The name 'Matrw.inv' standsn to print it is added only as a convenience. It is assumed that your printer is a 'Silentype' or is connected to the Apple's built in serial port and operating at 1200 baud. If this is not the cas This section will print the entire documentation for Basic Extension. The information that will be printed is identical to the information tht is available in the Basic Extension Demo. The optio__________________________________________"#1,580,24# 23,title,gen,disk,matrw,mopen,mwnum,mwstr,msetpos,mendf,mmulti,block,ftype,errors,array,move,seararray,utility,con,reboot,reset,bit,upshift,demos,end ''=menu+1:: =j:=k+first element written is 'a%(1)'. There will be 'len%' bytes written. 'Num%' determines which file to write to. Line 50 closes the file referenced by 'num%'. Matrw creates and uses files of type 'Binary'. These files can not be read with either the basic READ or INPUT statements. They can only be read using the Matrw procedures provided. SUMMERY OF PROCEDURES MWSTR (@source$,@len%,@num%) Mat Write String Writes a string array into the file whose reference number is 'num%'. 'Num%' is the reference number returned by the Mopen procedure. Tadvantage when rewriting a file, as opposed to creating a new one. 4) Strings provide far less of a speed advantage than numbers do. 2) Number of dimensions. There is more speed advantage when working with multi-dimensional arrays. This is because basic requires additional FOR-NEXT loops to handle them. 3) Rewriting an existing file. There is a greater is, in general, much greater than that of basic. Here are some factors that influence how much speed advantage it has. 1) Array size. The larger the array used for a single read/write the greater the speed advantage. 5 4 25% Long Integer 9 8 12.5% String variable variable 0% ACCESS SPEED The access speed of Matrw Bytes per element Array type Basic Matrw % difference =========================================================== Integer 3 2 50% Real ree pool. DISK SPACE USAGE Matrw can provide significant savings in disk storage space. Here is a table of how it compares to basic. mation in the file after the current position will be removed from the file and associated disk space will be returned to the f where the next read/write operation will take place. Mendf(@num%) Sets the end of file to the current read/write position. Any infor- @pos&) Sets the position within a file that the next read/write operation will take place. Mgetpos(@num%,@pos&) Gets the position within a file ric array from a disk file. Mwstr(@source$,@len%,@num%) Writes a string array to disk. Mrstr(@num%,@len%,@destination$) Reads a string array from a disk file. Msetpos(@num%,oses the file. Mwnum(@source,@len%,@num%) Writes a numeric array to a disk file that was previously opened using 'Mopen'. Mrnum(@num%,@len%,@destination) Reads a nume Matrw.inv if composed of nine procedures: Mopen(@file$,@num%) Opens the binary file for future read/write operations. Mclose(@num%) Clhe array to be written and the length of the array is specified by the variables 'source$', and 'len'. 'Source$' is the first element of the array to be written. 'Len%' is the number of elements to be written. !"#$%&'( probably be generated, and the system could lock up. It is the programmers responsibility to keep track of the types and lengths of arrays stored in a disk file, and to insure that the routines used to ding at the beginning of the file. Mrstr does not check if the information being read is actually string data. If Mrstr is used to read an array from disk into an array of a numeric type, an error will preceded by a '@' sign when used in the perform statement. Mrstr starts reading information at the position in the file where the last read or write ended. If the file is newly opened, mrnum will start rea the length of the read in elements. Destination$ is where the information will be placed. Num% and Len% must be variables of type integer. Destination$ must be of type string. All three must be Mat Read String Reads a string array from disk. The variables 'len%', and 'num%' perform the same functions as with Mwstr. Num% is the reference number of a file that was opened using Mopen. Len% is specify is valid. If you specify 'len%' to be 100 elements when your array is only 50 elements long, Mwnum probably generate an error, and could lock up the system. MRSTR (@num%,@len%,@destination$) umeric data. Doing so will most likely result in an error, and could lock up the system. Mwstr does not check if what you are writing is actually an array, nor does it check if the 'len%' you 'account%'. The array dollar$ will start at byte 200. The amount of disk space that dollar$ will take is variable since the lengths of the strings in it is variable. Do not attempt to use Mwstr to write n 140 len%=100 150 perform mwstr(@dollar$(0),@len%,@num%) 160 perform mclose(@num%) The preceding example will produce a file where bytes 0-199 are the first 100 elements of the integer array newly opened, Mwstr will start writing at the beginning of the file. Here is an example: 100 file$="data" 110 perform Mopen(@file$,@num%) 120 len%=100*2 130 perform mwnum(@account%(0),@len%,@num%) 0 because we are writing 100 elements (don't forget to count element 0). Mwstr will start writing information at the position in the file where the last read or write ended. If the file is dimensional array named 'accountnum$' use statements like: 200 len%=100 210 perform mwstr(@accountnum$(0),@len%,@num%) 'Accountnum$(0)' to 'accountnum$(99) would be written to disk. 'Len%' equals 10 Len% and Num% must always be of type integer. Source must always be of type string. All three must be preceded by @ when used in a perform statement. For example: To write the first 100 elements of a one access them are correct. Any attempt to read beyond the end of a file will result in an Out of Data Error. Whenever an Out of Data Error is produced, the value of 'len%' will be modified. After the error, it will contain the number of elements that were successfully read before the error occured. Example of a read routine: 10 dim acc$(99) 20 file$="accounts" 30 perform mopen(@.01234567of existing ones. The routines are designed to be added into your programs, allowing you to write more efficient programs, and to write them in less time. It is assumed throughtout this documentation that t GENERAL INSTRUCTIONS "Basic Extension" is a group of routines that act as an extension to "Business Basic". They perform functions that are not normally avalible, and improve the efficiency ternal Routines' section in your 'Business Basic' manual. executing another 'invoke' statement. Remember: When an 'invoke' statement is executed, any routine not in its list will become inactive and, cannot be used unless invoked again. Be sure to read the 'Exroutine at a time with a statement like this: 110 INVOKE ".d1/warray.inv","Ftype.inv","Block.inv" An 'Invoke' statement makes each of the routines in its list active. Once active they may be used any number of times without used. Use an invoke statement in your program like: 110 INVOKE ".d1/matrw" Once a routine is 'invoked' it will remain active until another 'invoke' statement is executed. You may invoke more than one *,-ould move the routines that you will be using to the same diskette that your program resides on. Use the 'SOS Utilities' to do this. Like all invokable moduals the Disk Routines must be 'invoked' before they can be DISK ROUTINES There are three Disk Routines: Matrw.inv, Block.inv, and Ftype.inv. Each is a machine language routine in the form of an invokable modual. For convenience, you shVOLUME NAME (/DISKNAME) OR DEVICE NAME (.Dx)"P12);::"80C";a$;:Zb$="CHANGING DISKS"$d=23:=0::"80C";b$;::12).n=12:=20:"MAKE A NEW MENU FOR DISK: ";N$xN$)<2110=N$ :210 I=1L(A$(I),A$))200B$0 WAP /// SIG MENU.MAKER PROGRAM (v. 6.2) =".D1"210: Coldstart (320: Warmstart &*X=11000: TEXT SLOW-DOWN LOOP ,X.1 CHANGE DISK SUBROUTINE23œ202:2200<RFa$=" YOU MAY SELECT YOUR DISK BY file$,@num%) 40 len%=100 50 perform mrstr(@num%,@len%,@acc$(0)) 60 perform mclose(@num%) The above routine will read 100 strings from the file 'accounts$' and store them into 'acc$'. he reader has a working knowledge of Business Basic. Since much of the information presented here deals with arrays and disk files, familiarity in those areas is particularly helpful. There are three ty was placed into the public domain by Foxware, Inc. in May, 1988. Foxware no longer supports this or any other of its Apple /// products and can no longer answer questions about them. This disk is copyright 1991 by Washington At forget to make backup copies of your work. Remember, it is the programmers responsibility to insure that these routines are used properly. **************** N O T I C E **************** "Basic Extention" These routines are not intended to be used by the novice programmer. The improper use of some of these routines can cause your program to 'hang', return erroneous results, and erase or distroy disk files. Don' control-reset functions. Bit provides bitwise OR, and bitwise AND functions. Upshift converts all of the lower case letters in a string to upper case. ********** C A U T I O N ********** ahead buffer. It also contains an extended 'GET' statement to take full advantage of the Apple ///'s keyboard. Reboot clears memory and displays a reboot message. Reset allows you to disable and enable the reset and se differences between the individual characters. UTILITY ROUTINES Con - Reboot - Reset - Bit - Upshift Con (console) enables you to clear or set the length of the typenother. Seararray (search array) is similar to the basic command INSTR but provides expanded functions. It searches an entire string array for any occurence of a specified string and will optionally ignore cautines included, making practical manipulations that would otherwise be too slow. Move will allow you to quickly insert and delete elements within an array, move sections of arrays, and transfer information from one array to a ARRAY ROUTINES There are two array routines: Move and Seararray. Move is two routines that provide the capability for high speed manipulation of numeric and string arrays. It is one of the most useful ro of a disk. It can be used for very high speed disk access outside of the normal SOS file structure. Ftype (file type) allows you to read or change the type of a file (basic, text, data, system, etc.). s. In addition, Matrw uses less disk storage space. Information stored by basic will frequently require a file 20%-30% larger than the same information stored by Matrw. Block (block read/write) allows access directly to any part Block, and Ftype. Matrw (matrix read/write) is a group of procedures that provide high speed disk read/write capabilites. Access speeds can be as much as ten times faster than those achieved by conventional basic routine Business Basic 'Perform' and 'Exfn' commands. You will find them stored in files with the ending '.inv'. DISK ROUTINES The Disk Routines consist of three invokable modules: Matrw, pes of routines included in Basic Extension: Disk, Array, and Utility. All of the routines are written in machine language and can not be modified by the user. They are 'invokable modules' and are used in conjunction with the pple Pi, Ltd. for the way in which it is put together. As a Public Domain disk, you may use these Invokable modules in other programs as you wish. )nable 20 perform reset(@a%) PRO.INV Pro.inv contains the routines from both Reset.inv and Reboot.inv. In Pro.inv, the names of the routines have been changed to names that =?and RESET together will have no effect. To disable resets use: 10 a%=1 :rem set to disable 20 perform reset(@a%) To enable resets use: 10 a%=0 :rem set to e RESET.INV Reset.inv is an invokable modual that provides the ability to enable and disable the RESET and CONTROL-RESET functions. If the resets are disabled, pressing the RESET or CONTROL to read the 'External Routines' section in your 'Business Basic' manual. mber of times without executing another 'invoke' statement. Remember, when an 'invoke' statement is executed, any routine not in its list will become inactive and cannot be used unless invoked again. Be sure y invoke more than one routine at a time with a statement like this: 110 INVOKE ".d1/Reset.inv","Con.inv","Reboot.inv" An 'Invoke' statement makes each of the routines in its list active. Once active they may be used any nuinvoked' before they can be used. Use an invoke statement in your program like: 110 INVOKE ".d1/Con.inv" Once a routine is 'invoked', it will remain active until another 'invoke' statement is executed. You ma9;< For convinience, you should move the routines that you will be using to the same diskette that your program resides on. Use the 'SOS Utilities' to do this. Like all invokable moduals the Disk Routines must be ' UTILITY ROUTINES There are five Utility Routines: Con.inv, Reboot.inv, Reset.inv, Bit.inv, and Upshift. Each is a machine language routine in the form of an invokable modual. are not related to their functions. This is done because these routines will frequently be used for software protection. With the names changed, their purpose within a program will not be obvious. Normal name REBOOT.INV Reboot zeros all memory, clears the screen, displays "INSERT SYSTEM DISKETTE & REBOOT" in 40 column black and white, and hangs. Hold down the CONTROL key and press reset to reboot. bits of b% in the form: Bit 0 1 2 3 4 5 6 7 value 1 2 4 8 16 32 64 128 | | | | | | | | | | | | | | | ely type of command to follow a Rchar. The code that is returned in a%, and the code of the letter returned from a GET command are identical. The additional information about the key stroke is stored in the first 8 dditional information about the key stroke is returned in b%. A% can be converted to a string with the command: 20 a$=chr$(a%) A% is returned as number because it facilitates program branching, the most likA. And a RETURN is different from a ENTER, to name a few. The syntax of rchar is: 10 perform rchar(@a%,@b%) Rchar will wait for a key to be pressed, and return with the code for the key stroke in a%. A, SPACE BAR, ARROW, or any key on the number pad. Using Rchar no two key strokes will return the same code. A '1' on the main key board is different from a '1' on the number pad. A SHIFT-A is different from a ALPHA LOCK-ition Rchar returns other information about each key stroke. It returns the position of the CONTROL, SHIFT, ALPHA LOCK, CLOSED APPLE, and OPEN APPLE keys. It also returns whether the key pressed was a 'special key'; an ESCAPE, TABar type ahead buffer 'Rchar' is the second routine that is included in the invokable module 'Con.inv'. It is similar to the basic command GET. It returns from the keyboard a single character. In addcuted under program control. Examples: 10 a%=0 20 perform buff(@a%) :rem set length to 0 10 a%=127 20 perform buff(@a%) :rem set length to 127 10 a%=128 20 perform buff(@a%) :clebe set to that length. If the value of a% is between 128 and 255, the type ahead buffer will be cleared of all unprocessed characters. This is the same as typing a CONTROL-6 on the number pad, except that it can be exeACDEFGHIJ Set the size of the type ahead buffer to any length between 0 and 127 characters. The format for Buff is: 10 perform buff(@a%) If the value of a% is between 0 and 127, the size of the type ahead buffer will CON.INV One of the two routines included in Con is 'Buff'. It provides the ability to: 1. Clear the type ahead buffer of all characters that have not yet been processed. 2. To perform a reboot use: 10 perform reboot(@a%) The value of the variable used in the perform statement does not matter. However, it must be of type Integer, and must be preceded by @. Special Key | | | | | | Key Board On | | | | | Closed Apple down | | | | Open Apple down | | | Alpha Lock down | | Control down | Shift down Any key pressed If the letter 'a' was pressed with no other keys down, the code in a% would be 97, the code for a lower case 'A'. The code in b% would be a%,%b%) The variables a% and b% can be of any numeric type as long as their values are in the range permissible for an integer number. They may also be simple numbers. They must, however, always be preceded by a '%' sign ===================================================================== Result 0 0 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1263 Band and Bor have the following syntax Q%=exfn%.band(%a%,%b%) Q%=exfn%.bor(% 0 0 0 0 1 0 194 1222 Bor 235 = 1263 0 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1222 Bor 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 235 0 0 1 0 0 1 1 0 0 0 1 1 0 1222 Band 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 235 ===================================================================== Result 0 0 0 0 0 0 0 0 1 1t material. Band and Bor work on all 16 bits of the integer numbers passed to them. Here is an example: 1222 Band 235 = 194 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 value 0 0 0KMNOPfrom the basic commands AND and OR which are logical operators. The basics of binary arithmetic is beyond the scope of this manual. If that is an area in which you are unfimiliar please consult a text which covers tha BIT.INV Bit.inv consists of two routines: 'Band' and 'Bor'. Band performs a Binary AND of two integer numbers. Bor provides a Binary OR. Band and Bor are binary operators, different nique to detect a SHIFT, OPEN APPLE, CLOSED APPLE, or CONTROL key down. a special key":else print "is a special key" To test if the Appha lock key is down: 40 q%=exfn%.band(%b%,%8) 50 if q%=0 then print "Aplha lock up":else print "Alpha lock down" Use the same tech The easist way to use Rchar is in conjunction with 'Band'. To test if a key stroke is a special key use statements like this: 10 perform rchar(@a%,@b%) 20 q%=exfn%.band(%b%,%128) 30 if q%=0 then print "not GET command, and return the same code in a%. They can be distiguished by their b%. When a RETURN is pressed, b%=65 (any key + keyboard on). When an ENTER is pressed, b%=193 (any key + keyboard on + special key). 65 (any key pressed + keyboard on). If the closed apple key was held down and the 'a' pressed the code in b% would be 97, (any key + Closed apple down + keyboard on). The RETURN key and the ENTER key return the same code with a . The following are all legal examples: Q%=exfn%.band(%numbera,%128) Q%=exfn%.bor(%r%,%p&) q%=exfn%.band(%1,%124) The following are incorrect examples: a%=exfn%.band(%123,a%) :rem '%' sign missing befor a%. z%=exfn%.band(%t$,%p) :rem strings not allowed. es. In the above example using 'account&', len% would be 50*8. We are moving 50 elements at 8 bytes per element. Len% must always be of type integer, and must always be preceded by a '@' when used in a perform statement. tes. The value of length can be calculated by multiplying the number of elements to be moved times the number of bytes per element. Integer arrays are 2 bytes per element, real arrays are 4 bytes, and long integers, 8 byt Source can be of any numeric type: integer, real, or long integer. It should always be an array element and should always be preceded by a @ when used in the perform statement. 'Len%' is the length of the move in by that it begins a 'destination'. 'Source' is the first array element in the range of elements that are to be moved. If we want to move elements 50-99 in an array called 'account&' Source would be 'account&(50)'. to move sections of numeric arrays. The general syntax for Movenum is: 10 perform movenum(@source,@len%,@destination) The portion of the array that starts at 'source' and is 'len%' bytes long will be moved soment 700 would be erased. The overall result is simply to shift elements 100-699 down one position. Movenum (@source,@len%,@destination) Movenum is one of the two routines in the file Move.inv. Its function is 20 perform movenum(@a%(100),@len%,@a%(101)) The result of this code would be to move element 100 into 101, 101 into 102 ... 699 into 700. The value stored in element 100 would remain the same, and the value stored in eles a simple example: Assume we are using an integer array named 'a%', which contains 1000 elements. We wish to insert an element at position 100, elements 100-699 need to be moved into elements 101-700. 10 len%=500*2 into another. Their main advantage is speed. They can make practical array manipulations that would otherwise be too slow. Here iQSTUVWXYZ[\]^_`abcdefgn numeric arrays while Movestr works on string arrays. Their purpose is to move portions of arrays. They can insert or delete elements or groups of elements within an array, or move a section of one array MOVE.INV Move contains two routines: Movenum (Move numeric) and Movestr (Move string). They both perform similar functions. Move works o'Destination' is the first array element where the range of elements (specified by 'source' and 'len%') will be moved to. In the above example using 'account&', if we wanted to move elements 50-99 to elements 10-59 'destination' would be 'account&(10)'. Destination can be of any numeric type: integer, real, or long integer. It should always be an array element and should always be preceded by a @ when used in the perform statement. Together, 'sour 'Source$' is the first array element in the range of elements that are to be moved. To move elements 50-99 in an array called 'acc$' Source$ would be 'acc$(50)'. Source$ should always be an array element and s is the value of 'len%' that is used. With Movenum, 'len%' is expressed in bytes. Movestr expresses 'len%' in elements. The general syntax for movestr is: perform movestr(@source$,@len%,@destination$) @len%,@destination$) Movestr is one of the two routines included in the file 'Move.inv'. Its function is to move sections of string arrays. Movestr works almost identically to Movenum. The main difference array. This will overwrite whatever happens to be in memory after a%(99). The results can be catastrophic. Do not use 'move' on arrays of type string. It is designed for numeric arrays only. Movestr (@source$, 10 dim a%(99) 100 len%=50*2 :rem INCORRECT setting of len% 110 perform movenum(@a%(50),@len%,@a%(51)) The above example is incorrect because it would result in a%(99) being moved outside of theOTE: The inproper use of the 'move' command can easily lock up the system, making it necessary to reboot. Be sure that the destination range does not extend beyond the length of the array. Here is an example of what not to do: f a<0 or a>last+1 then 10 30 if a=last+1 then last=last+1 :list(last)=new.item :return 40 len%=(last-a+1)*4 50 perform movenum(@list(a),@len%,@list(a+1)) 60 last=last+1: 70 list(a)=new.item 80 return Na+2)*4 50 perform movenum(@list(a+1),@len%,@list(a)) 60 last=last-1:return A routine to insert new entries into the same list would go like this: 10 input "Where to insert new item";a 20 i value in it. We could delete elements right out of the middle of list with a subroutine like this: 10 input "Which item to delete";a 20 if a<0 or a>last then 10 30 if last =0 then last=-1:return 40 len%=(last-cripts in source, destination, and to calculate len%. Example: We have an array named 'list' which can hold a maximum of 100 elements, 0-99. Also, we are using a variable named 'last' which is the last element that has aers%' into elements 30-40 of an array called 'accounts%'. 10 len%=11*2 :rem 11 elements, 2 bytes ea. 20 perform movenum(@numbers%(0),@len%,@accounts%(30)) 3. We can also use variables to represent array subsype real we want to move elements 2-28 into elements 0-26. 10 len%=4*(28-2+1) :rem move 27 elements, 4 bytes ea. 20 perform movenum(@cost(2),@len%,@cost(0)) 2. We want to move elements 0-10 of an array called 'numb the source. The source and destination ranges may even be in different arrays. However, if they are in different arrays, the arrays must be of the same type. Examples: 1. In an array called 'cost' of tce' and 'len%' form the 'source range', while 'destination' and 'len%' form the 'destination range'. The source range and the destination range may be overlapping, with the destination range being either higher or lower thanhould always be preceded by a '@' when used in the perform statement. 'Len%' is the length of the move in elements. To move five elements, len% should be 5. In the above example using 'acc$', len% would be 50. Len% must always be of type integer, and must always be preceded by a @ when used in a perform statement. 'Destination$' is the first array element where the range of elements (specified by 'source$' and 'len%') will be moved. In th),@len%,@quarterly&(0,24)) To calculate len%, we used employees to be moved (72-23+1) times 4 elements per employee, times 8 bytes per element. If quarterly was a string array, the routine would look like this: tion in elements 0-72, but wanted to make room for a new employee at position 23 we could use statements like this: 10 dim quarterly&(3,99) . . . 100 len%=(72-23+1)*4*8 110 perform movenum(@quarterly&(0,23nd delete quarters. Generally, place the most significant item at the extreme right in the dimeminsion statement. In this case employees should go to the right. As an example: If we had employee informa (1,0), (2,0), (3,0), (0,1), (1,1), (2,1), (3,1), (0,2), and so forth. In this situation line 20 would be better. It would allow us to use Movenum to insert and delete employees. Line 10 would allow us to insert a internal storage would be: pay for quarters 0, 1, 2, and 3 for employee 0, followed by the quarterly pay for employee 2, followed by the pay for employees 3-99. The subscripts would be stored in the following order: (0,0), followed by the second quarter pay, and then the third and fourth. The subscripts would be in the following order: (0,0), (1,0), (2,0), ... (98,0), (99,0), (0,1), (1,1), (2,1), and so forth. Using line 20 the 0 dim quarterly&(3,99) Arrays are always stored internally with the right most subscript ascending slowest. When diminsioned as in line 10, the internal storage would be; the first quarter pay of all 100 employees,ments are stored internally. If we were using an array called 'quarterly&' to hold the quarterly pay records of 100 employees we could dimension it two different ways: 10 dim quarterly&(99,3) or 2 been with one dimensional arrays. Movenum and Movestr will work equally well with arrays of any dimension. However, when working with multi-dimensional arrays it is very important to keep in mind the order in which the eler as well as Movenum. When using Movstr the value for len% will be different than what is shown in these examples. For Movestr len% should be only the number of elements to be moved. So far the examples given haven% to the number of elements to move. With movenum, set length to the number of bytes to move (elements X bytes/elements). USE WITH MULTI-DIMINSIONED ARRAYS This section applies to Movesther or lower than the source. The source and destination ranges may even be in different arrays. Movestr is nearly identical to movenum. The main difference is the value to use for len%. With movestr, set le Together 'source$' and 'len%' form the 'source range', while 'destination$' and 'len%' form the 'destination range'. The source range and the destination range may be overlapping, with the destination range being either hige above example using 'acc$', to move elements 50-99 to elements 10-59, 'destination$' would be 'acc$(10)'. Destination$ should always be an array element and be preceded by a @ when used in the perform statement. 10 dim quarterly$(3,99) . . . 100 len%=72-23+1 110 perform movestr(@quarterly(0,23),@len%,@quarterly(0,24)) Len% equals (72-23+1) employees times 4 elements per employee. SEARARRAY.INV Seararray searches a string array for a specified group of characters. It is similar in function to INSTR, but acts on a entire array instead of only one string. Also it has the opt5000: doc7a%(3,7,1,7):array$="a%": row, char, lev, page d commands i=2:=10=n" R)ead W)rite E)dit H)elp Q)uit ";xa$:i="RrWwEeHhQq",a$)4i3000,3000,4000,4000,6000,6000,150,150,190,190100en. You must use Mclose for this. Be carful not to lose track of your reference numbers, without them there is no way to close the associated files. n example of a routine that would close the files opened in the previous example is: 100 perform Mclose(@num%) 110 perform Mclose(@ref%) The basic command CLOSE will not close files opened by Mop files must be closed to insure that all of the information written to that file is actually stored on disk. Once a file is closed, any further use of its reference number will result in an error. Aariable can be used in their place, as long as the correct type of variable is used in the proper place. MCLOSE (@num%) Mat Close Closes the file whose reference number is 'num%'. All he reference number for "Firstfile" would be stored in 'Num%'. The reference number for "Secondfile" would be stored in 'Ref%'. Note that the variables 'File$' and 'Num%' need not be used. Any string or integer ve of a routine which allows two files open at the same time: 10 file$="firstfile" 20 perform Mopen(@file$,@num%) 30 anotherfile$=".d2/secondfile" 40 perform Mopen(@anotherfile$,@ref%) T given different reference numbers. The reference numbers used by Mopen are not related to the reference numbers used by the basic command OPEN, though they do serve the save functions. An exampl that will contain a reference number after the execution of Mopen. The reference number is used by other procedures to indicate which file to act on. If more than one file is opened, they will beiklmnle that must contain the name of the file to be opened prior to the execution of the Mopen procedure. See your Apple Basic manuals for a discussion of legal file names. 'Num%' is an integer variable MOPEN (@file$,@num%) Mat Open Opens a file for read/write operations. The file must be of type 'Binary'. If the file does not exist, one will be created. 'File$' is a string variabion of ignoring differences between upper and lower case letters during the search. The syntax for Seararray is: 10 perform seach(@start$,@end$,@searchfor$,@ignorecase%, @linefound%,@pos%) 5000::100:".D1/MENU.MAKER"1 display character, input char, lev, page j= i=03%h%=a%(i,char,lev,page)),2))%l%=a%(i,char,lev,page)),2)) "|"; u=06q%=band(%h%,%(2^u)) q%:" ";::" ";q% MWNUM (@source,@len%,@num%) Mat Write Numeric Writes a numeric array into the file whose reference number is 'num%'. 'Num%' is the reference number returned by the Mopen procedure. Thoes it check that the 'len%' you specify is valid. If you specify 'len%' to be 100 when your array is only 50 bytes long, Mwnum will write 100 bytes, 50 bytes of the array followed by 50 bytes of gar Mwnum to write string data. Everything will appear to work correctly, but the information saved will be meaningless. Mwnum does not check if what you are writing is actually an array, nor des long. Bytes 0-199 will be the first 100 elements of the integer array 'account%'. Bytes 200-999 will be the first 100 elements of the long integer array 'dollar&'. Do not attempt to use 130 perform mwnum(@account%(0),@len%,@num%) 140 len%=100*8 150 perform mwnum(@dollar&(0),@len%,@num%) 160 perform mclose(@num%) The preceding example will produce a file that is 1,000 bytst read or write ended. If the file is newly opened, Mwnum will begin writing at the beginning of the file. Here is an example: 100 file$="data" 110 perform Mopen(@file$,@num%) 120 len%=100*2: al, integer, or long integer, and is usually an array element. 'len%' and 'num%' must always be integer variables. Mwnum will start writing information at the position in the file where the la Reals 4 bytes per element Integers 2 bytes per element Long Integers 8 bytes per element Note that the type of the variable 'source' may be either re elements. Each element of a long integer array is 8 bytes long. 'Len%' can always be calculated by multiplying the number of elements to be written by the number of bytes per element. write elements 100 to 199 of a long integer array named 'dollar&', use statements like: 200 len%=100*8 210 perform mwnum(@dollar&(100),@len%,@num%) Here 'len%' equals 100*8 because we are writing 100 the above routine, 'accountnum%(0)' to 'accountnum%(99)' would be written to disk. 'Len%' equals 100*2 because we are writing 100 elements and each element of an integer array is 2 bytes long. To example: To write the first 100 elements of a one dimensional integer array named 'accountnum%' use statements like: 200 len%=100*2 210 perform mwnum(@accountnum%(0),@len%,@num%) Using prstuvwxyz{e array to be written and the length of the array is specified by the variables 'source', and 'len%'. 'Source' is the first element of the array to be written. 'Len%' is the length of the array in bytes. Forbage. MRNUM (@num%,@len%,@destination) Mat Read Numeric Reads a numeric array from disk. The variables 'len%', and 'num%' perform the same functions as with Mwnum. Num% is the reference number of a file that was opened using Mopen. Len% is the length of the read in bytes. Destination is where the information will be placed. Num% and Len% must be variables of type. Any disk space that is no longer used would be returned to the free pool. This routine is provided to avoid the usual procedure for shortening a file, which is to delete it and then rewrite it. } were no longer needed, we could use statements like these to shorten the file. 10 pos&=600 20 perform msetpos(@num%,@pos&) 30 perform mendf(@num%) The file would then be 600 bytes long MENDF (@num%) Mat End File Shortens a file by removing all information after the current read/write position. For example: If we had a file that was 1,000 bytes long, but the last 400 bytes'Pos&' is the position within the file where the next read/write will start. 'Pos&' may be any value from 0 to the length of the file. If 'pos&' is greater than the length of the file a MSETPOS (@num%,@pos&) Mat Set Position Sets the position within a file where the next read/write operation will take place. 'Num%' is a reference number that was obtained using Mopen. (800) bytes, from the file 'accounts' and store it into the array named 'acc&'. 10 dim acc&(99) 20 file$="accounts" 30 perform mopen(@file$,@num%) 40 len%=100*8 50 perform mrnum(@num%,@len%,@acc&(0)) 60 perform mclose(@num%) The above example will read 100 elements,in a 'Out of Data' error. Whenever an 'Out of Data' error is produced the value of 'len%' will be modified. After the error, it will contain the number of bytes that were successfully read. Example: will appear meaningless. It is the programmers responsibility to keep track of the types and lengths of arrays stored in a disk file. Any attempt to read beyond the end of a file will result rresponds to the type of array it is being read into. For example: If an array of type 'real' is read from disk into an array of type 'integer', the read will proceed without error, but the information read sition in the file where the last read or write ended. If the file is newly opened, mrnum will start reading at the beginning of the file. Mrnum does not check if the information being read co integer. Destination can be of any numeric type: integer, long integer, or real. All three must be preceded by '@' when used in the perform statement. Mrnum starts reading information at the po|uting another 'invoke' statement. Remember: When an 'invoke' statement is executed, any routine not in its list will become inactive and cannot be used unless invoked again. Be sure to read the 'External tine at a time with a statement like this: 110 INVOKE ".d1/Reset.inv","Con.inv","Reboot.inv" An 'Invoke' statement makes each of the routines in its list active. Once active they may be used any number of times without exec. Use an invoke statement in your program like: 110 INVOKE ".d1/Con.inv" Once a routine is 'invoked' it will remain active until another 'invoke' statement is executed. You may invoke more than one rou move the routines that you will be using onto the same diskette that your program resides on. Use the 'SOS Utilities' to do this. Like all invokable moduals, the Array routines must be 'invoked' before they can be used ARRAY ROUTINES There are two array routines: Move.inv, and Seararray.inv. Each is a machine language routine in the form of an invokable modual. For convenient use, you shouldt contains the position where the next read/write operation will take place. '. 'Pos&' must be of type 'Long Integer'. 'Num%' is a reference number obtained by Mopen. 10 perform mgetpos(@num%,@pos&) The above example will modify the value stored in pos& so that i This is the same as the APPEND command in basic. 'Pos&' must be of type 'Long Integer'. MGETPOS (@num%,@pos&) Mat Get Position Returns the current read/write position in 'pos& Will cause the next read/write operation to begin at byte 100. 10 pos&=-1 20 perform msetpos(@num%,@pos&) Will cause the next read/write operation to begin at the end of the file. 'File too Long' error will result. Setting 'Pos&' to any negative number will cause the next read/write operation to begin at the end of the existing file. 10 pos&=100 20 perform msetpos(@num%,@pos&) Routines' section in your 'Business Basic' manual. FTYPE.INV Ftype consists of two routines: Gftype (get file type) and Cftype (change file type). Their purpose is to allow your program to inspect the type of a file and/or change it. test #4", upshift would convert it to "THIS IS TEST #4". Example: 10 t$="This is test #4" 20 perform upshift(@t$) :rem t$ is now converted Upshift only functions on string variables. The name of the str UPSHIFT.INV Upshift is a routine that changes all of the lower case letters in a string to upper case. Only letters are affected. Numbers and symbols are not changed. If t$="This is 'Basic' in t% 10 file$="hello" 20 tp%=6 30 perform cftype(@file$,@tp%) :rem change 'hello' to type binary 12 SOS System file 13-14 reserved 15 SOS directory Examples: 10 file$=".d1/basic" 20 perform gftype(@file$,@t%) :rem put the type of the file text or Pascal ASCII 5 Pascal data 6 binary 7 font 8 screen file 9 Basic program 10 Basic data 11 reserved ds to the fillowing file types. VALUE FILE TYPE 0 unknown 1 bad (a file containing bad blocks) 2 Pascal code 3 Pascal text 4 Basicchanges the file specified in file% to the type stored in type%. File$ must be of type string, and type% must be of type integer. Both must be preceded by a @ when used in a procedure. The value of type% correspon 10 perform gftype(@file$,@type%) 10 perform cftype(@file$,@type%) 'File$' is a string containing the name of the file to be acted on. Gftype places the type of the file specified by file$ into type%. Cftype k the validity of the information it is reading, any file can be read into a numeric array. Once in the array it can be inspected or modified, and if desired rewritten using Mwnum. The syntax for the two procedures are: red in it. WRITE and PRINT statements record their information in different ways. Ftype is useful mainly in conjunction with Matrw. Any file that is changed to type BINARY can be read by Mrnum. Since Mrnum does not chec Ftype does not alter the information inside the file in any way. If a DATA file was created using basic WRITE statements and the type then changed to TEXT, basic INPUT statements would still be unable to access the information stoing must be preceded by a @ when used in a perform statement. 10 perform upshift(@"This is a test") :rem this is NOT legal mbers 0-279. When using Block, you must specify which 'blocks' you would like to read or write to. You can not specify a file. The main area which Block is useful is in theBlock is the fastest means of disk access available, but it has limitations which restrict its use. A 'block' is a piece of information on a disk drive that is 512 bytes long. A 140K floppy disk drive is divided into 280 blocks, nu BLOCK.INV Block.inv consists of two routines: Wblock (write block) and Rblock (read block). Their purpose is to allow reading and writing of 'blocks' of information from disk drives. ILE NOT OPEN - A procedure was used with a reference number that does not correspond to an open file. STRING TOO LONG - Mrstr was used to read information that was not written by Mwstr. file. FILES BUSY - An attempt was made to open a file that was already open. FILE TOO LARGE - The value of 'pos&' in the Msetpos procedure is larger than the file length. F "perform Mpoen(@file$)", num% is missing. UNDEFINED FUNCTION - The correct module has not been invoked or the name of a procedure is misspelled. OUT OF DATA - A read operation tried to read past the end of a common errors and their causes. TYPE MISMATCH - Using Mpoen on a file other than of type 'Binary'. The number of arguments passed to a procedure does not match what the procedure expected. Example: ERRORS Any of the disk routines may generate a basic error. An error can be handled using an ON ERR statement as if it was generated from a basic routine. Here is a list of some storage of information that does not use the SOS file system. It can also be used for bulk copy routines and peeking at any location on a diskette. The syntax of Block is: 10 perform Wblock(@device$,@Startblock%,@numblock%,@destination) 10 perform Rblock(@device$,@Startblock%,@numblock%,@destination) Device$ is a string variable that contains the name of the device to read or write to. The names of the floppy disk drives are '.D1', '.D2', eyond start$, the value would be 1, and so on. Linefound% must be of type integer and must be preceded by a '@' sign. Pos% performs two functions. Its first function is to tell seararray Linefound% returns the array element searchfor$ was found in. The value of linefound$ is relative to start$. If searchfor$ was found in start$, the value of linefound% would be 0. If it was found one array element bdetermines whether or not to consider all letters to be of the same case. If Ignorecase% = 1 then two letters of different cases will still be considered a match. If it = 0 then letters with case differences will not match. eceded by a '@' sign. Searchfor$ is a string containing the group of characters to be searched for. It must be of type string and must be preceded by a '@' sign. Ignorecase% is an integer variable whose value Start$ is the first string to search. It must be an array element of type string, and must be preceded by a '@' sign. End$ is the last string to search. It must be an array element of type string, and must be prhcking for the validity of information. Information read in this manner will be meaningless unless it was previously written in a known format. , 2 per element 20 b%=20 30 nb%=4 40 dev$=".d1" 50 perform rblock(@dev$,@b%,@nb%,@a%(0)) The above routine will read blocks 20, 21, 22, and 23 from drive 1 and place them into a%. Block does no chef blocks to be read or written. Array can be of any numeric type, but must be preceded by a @. EXAMPLE: 10 dim a%(1024) :rem 2048 bytes totalong. Numblock% must be of type integer and must be preceded by a @. Destination is the numeric array where the information is either read from or written to. Array must be dimensioned large enough to contain the number o integer and must be preceded by a '@' sign. Numblock% is then number of blocks to read or write. It controls the length of the read/write. Each block is 512 bytes long. A 4 block read, for example, would be 2048 bytes l'.D3', and '.D4'. Device must be of type string and must be preceded by a '@' sign. Startblock% is the number of the first block to read or write. Block on a floppy disk range from 0-279. Startblock% must be of typeat what position in start$ to begin the search. If pos% = 0 or 1 then the search fill start at the beginning of start$. If it is between 2 and 255, the search will begin with that character. The second function is to return the position where searchfor$ was found. If on return pos%=0 then searchfor$ was not found. If it equals 1-255, searchfor$ was wound starting at that position. Remember, you must use both linefound% and pos% to - :3000:a$=27):".D1/MENU.MAKER":ۮE =10:=21:"Press any Key to Read CONTROL-SHIFT-@ to exit"; a%=1:105drchar(@a%,@b%)iq%=band(%b%,%16)Un=33:=7:q%"Open Apple is: DOWN";:"Open Apple is: UP ";sedits a 'font' file (allows modification or redesign of character sets), uses Matrw.inv, Ftype.inv, and Bit.inv. Diskcopy.demo is a disk copy routine that can be included in a basic program, uses Block.inly tested. Demonstration programs include: Block.demo reads, writes, or modifies any block on a block device, uses Block.inv. Sort.demo is a simple insertion sort using Move.inv. Font.edit.demo reads, writes, or iques. Rather, most are simplistic and are intended only to show how to use the baisc functions of the routines. Some of the programs perform useful functions. These too are intended only as a demonstration and are not thorough The demonstration programs are intended only to demonstrate how to use some of the discussed routines. They are not intended to be examples of advanced programming technxamine the demonstration programs all you have to do is select "Quit to Menu.Maker" from the Basic Extension menu. Menu.Maker will list the demo programs for you. Then, using the cursor, highlight your selection and hit . There are programs stored on this diskette which are intended as demonstrations of invokable moduals included in this package. These programs are stored on this diskette in files that end in '.demo'. To eand pos% will equal 1. If line 40 were changed so that ic%=0 then the first occurances of "this" would be in a$(2) at position 5. On return, line% would equal 1, and pos would equal 5. e%,@pos%) The above example will search a$(1) to a$(3) for the word "this". It will also ignore any case differences in the letters. The word "this" will be found in a$(1) at position 1. On return, line% will equal 0 more text" 30 a$(3)="and a little more." :rem some text to search in 40 ic%=1 :pos%=1 :rem ignore case and start at position 1 50 for$="this" :rem look for the work 'this' 60 perform search(@a$(1),@a$(3),@for$,@ic%,@lin determine the exact position in which searchfor$ was found. Linefound% tells you the array element, and pos% tells you the position within the element. EXAMPLE: 10 a$(1)="This is some text," 20 a$(2)="and this is q%=band(%b%,%2)Vx=33:=9:q%"Shift is: DOWN";:"Shift is: UP ";}q%=band(%b%,%4)V=33:=11:q%"Control is: DOWN";:"Control is: UP ";q%=band(%b%,%8)V=33:=13:q%"Alpha ============================== B A S I C E X T E N S I O N ============================== Foxware Products 1982 files, 'test1' will be written by a conventional basic routine,"5$" while 'test2' will be written by 'Matrw'.".T8" Please note that the longer the array the greater the time savings."UB" Additional savings are also achieved wA6a$:"Nn",a$):".D1/MENU.MAKER":ۻ"Yy",a$):7:ۺ310  doc P" This program is to demonstrate the speed and disk space savings"N" achieved by using 'Matrw.inv'. It will save an integer array into"O" twoTest2 ..."sf$=".d1/test2"xmopen(@f$,@n%):"Writing Array ..." l%=b%*2mwnum(@a%(1),@l%,@n%):"Closing Test2 ..."mclose(@n%)1:"Done ... file is ";2*b%;" bytes long"1,:=5:"Do you want to try it again? Y or N""2#1,".d1/test1"<:"Writing Array ..."Fi=1b%:#1;a%(i):P:"Closing Test1 ..."7U:"Done ... file is aprox. ";3*b%;" bytes long"WZ,d:=26::" Using 'Matrw' routine ";::#i:"Press any key to begin":a$n:"Opening 1000: display docJ:=5:"How many elements should I use in the Array? 1,000-10,000 ";& b$:b%=b$):b%<1000b%>100008 a%(b%):*:=26::" Using Basic routine ";::#(:"Press any key to begin":a$-:"Opening Test1 ...the CONTROL, SHIFT,"M " OPEN APPLE, CLOSED APPLE, or ALPHA LOCK. The key you pressed and"L " the position of the 'modifier' keys will be displayed. The term"J " 'special key' refers to any key on the number pad, the ESCAPE,"& " this program is to demonstrate Rchar, one of"J " the routines in Con.inv. Rchar has the ability to distinguish"N " many different key strokes than does GET. Once the demonstration"O " begins simply press any key in combination with s: UP ";1=10:=4:"Code is ";::"####";a%;:" ";: =30:=4:"Character is ";:Da%<32"10r";"Control "+a%+64);:" ":"10r";a%);:" "$a%=0:".D1/MENU.MAKER":ۺ100 doc  :L " The purpose of Lock is: DOWN";:"Alpha Lock is: UP ";q%=band(%b%,%32)V=33:=15:q%"Closed Apple is: DOWN";:"Closed Apple is: UP ";q%=band(%b%,%128)V=33:=17:q%"Special Key is: DOWN";:"Special Key i Placed into the Public Domain, May 1988 Washington Apple Pi, Ltd. /// SIG C O N T E N T S General Instructions ............................ 3 Disk Routines .........................hen using multi-dimensional arrays,"1G" and when working with existing files."LQV[H`" Insert a scratch diskette and press RETURN to continue,"e,j" or"o6t" press ESCAPE to quit";a$:a$=27):".D1/MENU.MAKER":ۻa$<>13)1200:ۿ::ۻa$<>13)1200:ۿcopy another? (Y/N) ";#ra$:"YyNn",a$)20,20,390,390|370".D1/MENU.MAKER" on errs come here =4=200l%=0300:ۺ210,=150=27"Source write protected";%>150<300cftype(@f1$,@t1%) =30:"File not fou@t1%)cftype(@f1$,@t%)mopen(@f1$,@n1%)mopen(@f2$,@n2%)mrnum(@n1%,@l%,@a%(0))mwnum(@a%(0),@l%,@n2%)l%=32000200,cftype(@f1$,@t1%)6cftype(@f2$,@t1%)@mclose(@n1%)Jmclose(@n2%)^h"Copy completed,";!m:" a%(16000)2000: display doc:l%=32000:t%=62(" F I L E C O P Y"2d"Copy from: ";f1$if1$="":365nx"Copy to: ";f2$yf2$="":365 zœ129{f2$~f2$ œ1000gftype(@f1$,thin the program.":;" Press RETURN to continue, ESCAPE to quit"+a$:a$=27)::ۻa$=13):ۺ2020demonstration of 'Block.inv' used to do a disk"M" copy. Note that the actual copy routine is only four lines long,"L" line 100-140. This routine could easily be included in another "J" program to provide backup capabilites from wiYyNn",a$)30,30,170,170150:".D1/MENU.MAKER" errors come here :"ERROR #";4:"Press RETURN to continue, ESCAPE to quit";<a$:a$=13)30:ۻa$=27):".D1/MENU.MAKER":ۺ1030  doc :I" This is a Insert Source Diskette and press any key ":a$$nrblock(@dev1$,@i%,@num%,@a%(0))Fsq:" Insert Destination Diskette and press any key ":a$$xwblock(@dev2$,@i%,@num%,@a%(0))i%-:"Copy completed, Copy another? (Y/N)"#a$:"t(@dev1$)(2:"Copy to (default: .D2): ";dev2$,7dev2$=""dev2$=".D2":ەupshift(@dev2$)F<:"Insert disketts and press RETURN to begin, ESCAPE to quit"'Fa$:a$=27)140:ۻa$<>13)70Pdev1$=dev2$q=1di%=021070Aiq:" œ=28:ۺ1000 disk copy-a%(256*70): enough room for 70 blocks 2000: display doc: :" D I S K C O P Y": #num%=70*(:"Copy from (default: .D1): ";dev1$,-dev1$=""dev1$=".D1":ەupshifnd "; œ1033mclose(@n1%) œ1036 mclose(@n2%) œ1000>"ERROR while copying, press any key to continue":a$:365  doc :N" This is a demonstration of 'Matrw.inv' used to do simple file"L" copy. 'Ftype.inv' is also used in this program. It changes the"M" type of the file to be copied to 'binary' so 'Matrw.inv' can read"J" it, and then changes it back again after the copy is completed"R " This technique could also be used to gai;Bz%=a%(i+u)),2))Lz%>31z%);:".";Vu`jpot read block 2"Reading from device ";dev$;" Block ";block%*rblock(@dev$,@block%,@nblock%,@a%(0)) write block 0 "Writing to device ";dev$;" Block ";bl000,4000,4000,6000,6000,7000,7000,8000,8000,5000,5000100 display : ::p=031:i=p*8i*2);": "; u=07-a%(i+u)),2);" ";a%(i+u)),2);" "; $u:" ";!.u=07:z%=a%(i+u)),2))8z%>31z%);:"." a%(1000)nblock%=1:dev$=".d1"#(œ=28::"ERROR #";:10028000: display docd commands Mn"R)ead W)rite L)ist C)hange b)lock D)evice H)elp Q)uit"xa$m"RrWwLlCcBbDdHhQq",a$)2000,2000,3000,3000,1000,1 the array the greater the time savings. Additional savings are also"9" achieved when using multi-dimentional arrays."a$@"Nn",a$):".D1/MENU.MAKER":ۻ"Yy",a$)::5:ۺ6020 X doc Ub:::" This is a demonstration of a simple 'insertion sort' that uses"Rl" either a Basic routine or 'movenum.inv'. Please note that the longer"Pv" )*w:movenum(@i%(i),@a%,@i%(i+o)):#z=boti-o:i%(z+o)=i%(z)::  sort 5temp%=i%(bot+o):3000:4000:i%(i)=temp%:bot=bot+oboto3020G temp%bot m40302a%=(bot-i+ot+2)::" Creating list of ";limit;" random numbers" i=1limit i%(i)=1)*1000)/::"Done, press RETURN to begin sort"a$:a$<>13)16B::"One dot will be printed for each number sorted"::".."; o=1:w=2bot=1:t7000: display docE::" Which do you want to use, 1)Basic 2)Movenum"&a$:a$="1"m=1:ۻa$="2"m=0:ۺ7q ::=7:"How many numbers would you like to sort? 160-1,000 ";:a$:limit=a$):limit<160limit>100010E i%(limin access to files of any type."P" In order for this routine to work, both the source and destina-"<" tion files can not be locked or write protected.":A " Please use a scratch diskette with this program.":ock%* wblock(@dev$,@block%,@nblock%,@a%(0))  change 3"Change what address? (0-1FF) ";a$:a$=a$))10);11);a$;": ";a$)>=512:Ka$)/2)=a$)/2a%(a$)/2))),2);:a%(a$)/2))),2);" ";:j=:k=:"?";K4200:=j:=k:i$=" "" ";:4070:ۻi$=""::i$=i$)),2):i$;qa$)/2)=a$)/2a%(a$)/2))=i$+a%(a$)/2))),2)):a%(a$)/2))=a%(a$)/2))),2)+i$)a$=a$)+1)5a$,1)="0"a$,1)="8":4020:" ";:B$(I);v:520: 500THPOS=4:I/2=I/2)I=I-1I=IBOTM THPOS=44:I/2<>I/2)I=I+1I2=-1:I=I-2:IBOTM<30THPOS=44I=IBOTM/2)*2:=+IBOTM/2)-1:CA)"PRINT.ALL": OA+P 3HA=(81+UCA)A=(81+LCA):::: OA+Q Quits 3IA=(83+LCA)A=(83+UCA)"PRINT.SHOW": OA+S 2JA=(68+LCA)A=(68+UCA)/Screen.Savers/HELLON=THPOS:B$(I);XA<8A>11540bA-7640,660,690,720l:=THPOS:ٺ1600 =Q:WW=0A=:A=21A=9&oldprefix$=40A=31410: Control C "aborts" program to Basic(:A=13770: Return Selects a file *DA=27:50: Escape to change disks/FA=324000: back out one directory level 3GA=(80+UCA)A=(80+L"BASIC 0":150A$="TEXT 0":150A$="CAT 0":150A$="FONT 0":150A$="FOTO 0":150A$(L),"BLOCKS")510*=27:=19:"FREE MEMORY AVAILABLE: ";=7:=20:"80C";A$(L);$:=5:THPOS=4:I=1:IBOTM=J-1:620Q=:=26:=21:sic; +Q Quits."r12);::"80C";a$;:+w#9,"DISKNAME.DAT":#9;DISKNAME$:#9|d$=DISKNAME$$=23:=0::"80C";d$;::12)201M=3:=14:"This /// SIG Disk is \^ 19";Р,2)", Washington Apple `, Ltd."=4:B$(1)="":B$(2)=""A$=16,B) THEN 240 #1, d$="":=10:"80C";d$ ž#1300I=0"I=I+1:#1;A$(I):290,#1 6L=I-1@j=1:same=0 J:SEG=0 Tœ2030^CT<1CT=1cCT>13000Zha$="{,|,~,}; selects; to new disk; J/2)=4:=+1:ۙ=44B$(J);:J=J+1I:1,180,22:2,280,21:2,2380,23:8A$(1000),B$(1000),C%(511),C$(20),name$(20):=10:=0UCA=128:LCA=UCA+32CT=15 IF PREFIX$= PREFIX$+MID$(B$(I), 'Value CR' = change value, 'CR' = done changing,"4" 'Space bar' = skip to next value" a$::pecified by 'device' and 'block'."M"L)ist Lists out the contents of the last block read. Press any"," key to stop the listing."O"C)hange Changes the contents of a block that has already been read."E" Usually it will be '.D1', '.D2', etc."fRh"B)lock Sets the block number for the next read/write. Usually 0-279."pIr"R)ead Reads in the block specified by 'device' and 'block'."zJ|"W)rite Writes to the block st carefully, since making the wrong change on a diskette can"MX"render it unreadable. For demonstration purposes we suggest you use a"Z"scratch diskette."\M^"D)evice Set the device where the next read/write will take place.":`" NU.MAKER"p change block z"Block number ";a$a$<>""block%=a$)X change device b"Device ";a$la$<>""dev$=a$v @ help RT" This program allows you to change the contents of any block on a block"QV"device. Use i4030 hi$=""'rq$:q$=13):ۻq$=" "i$=" ":Y|q$=8)i$)=04210:ۻi$)=1i$="":8);" ";8);:i$=i$,1):8);" ";8);-("0123456789ABCDEFabcdef",q$))4210i$)=24210q$;:i$=i$+q$:4210  end :".D1/ME0=+IBOTM/2-.5):I=IBOTM:I/2=I/2)I=I-1 œ2120B=B$(I),16)," ")-1 B$(I),"BASIC 0")850B$(I),"TEXT 0")890 B$(I),"CAT 0")1140*B$(I),"FONT 0")18504B$(I),"FOTO 0")1930>B$(I),"PASTX66$""""">> >G%tRq  .     > >>@ ? ??? >>>>~B@x????????t%=6:type%=74=2:=0:79);:=10:"Save to what file ";file$file$="" œ4032gftype(@file$,@type%)Rtype%<>7=2:=0:79);:=5:"Not a Font file, press any key";:a$:3010cftype(@file$,@t%) len%=1024mopen(@file%)R type%<>7=2:=0:79);:=5:"Not a Font file, press any key";:a$:3010 cftype(@file$,@t%) len%=1024 mopen(@file$,@num%)$ mrnum(@num%,@len%,@a%(0,0,0,0)) mclose(@num%) cftype(@file$,@type%)  save fount file w page, input page 0-7  lev=0char=07=3:=char*9+1 1000: lev=1char=07=13:=(char*9)+1 1000:: load fount file  t%=61 =2:=0:79);:=10:"Read what file ";file$ file$="" gftype(@file$,@typ=band(%h%,%(2^u))q%".";:=j:"|"; u=06!q%=band(%l%,%(2^u))$q%:" ";::" ";)+q%=band(%l%,%(2^u)).q%"."; 3:=j 8:=j<q=(page*16)+(lev*8)+char=" ";q;" ";Bq<32q+128);:q);G! draoeset ...................................... 40 Bit ........................................ 41 Upshift .................................... 42 Utility Routines ................................ 35 Con ........................................ 36 Reboot ..................................... 39 R............ 25 Array Routines .................................. 26 Move ....................................... 27 Seararray .................................. 33 .......... 6 Matrw ...................................... 7 Block ...................................... 21 Ftype ...................................... 23 Errors .........................?!%%;??!###?!##??!#?!!###????!9##?!!?!### 001! ##??IIIKKK')))++3?!!!##??!!??!!)+/?!!?##??00?? !!!###?!!##"AAIIKK! !!!!!? ?? @< <6c~I" Enter the page desired. It will be drawn on the screen "K" in two rows of 8 characters each. There will be a flashing 'X'"H" in the top left character. Hold down the OPEN APPLE key and"K" press an ARROW key to move characters pages 0 and 1"3" Symbols page 2"3" Numbers page 3"9" Upper case letters pages 4 and 5"9" Lower case letters pages 6 and 7"y key to continue";:a$:J" To edit the characters, use the 'E)dit' command. It will"N" ask you 'Page? 0-7'. The available 128 characters are divided"." into 8 pages of 16 characters each.9" Controling your own character sets.L" Before you can edit a font file, it must first be read into"I" memory with the 'R)ead' command. After the edit is completed"0" use the 'W)rite' command to save it."1:" press anownload' utility supplied on your Business Basic diskette"L" There are two 'font' files included on this diskette. They"J" are named 'standard' and 'byte'. Use them for experimentation"G" or as a starting point for creats been "K" edited, you may resave it into the same file or into a new one."N" Changing the character set stored in a 'font' file does not change"N" the character set the Apple /// is currently using. For this, use"K" the 'de$,@num%)$mwnum(@a%(0,0,0,0),@len%,@num%)mclose(@num%)cftype(@file$,@type%)  doc :N" This program uses Matrw, Ftype, and Bit to edit the character"K" set stored in a 'font' file. After the character set ha <"<"""<< <"""<"><$""< """"  "" 6***""""""""""<""< :< $"""2,"""""**6"""""< >>8  80,>!"*:<"">""""""""""""">>><2"<""">""" ""  ">"6**"""""&*2""""""""""""*,"" "" ">""""""""""""""**6"""""""> >>> >00000>">>< (&20 *, **>> "2*&" " >>  ">> "8""> """"""< >> " )((8*,;((*,((+)((9/(p((>3  =9 :9 .(+( 8#8# %3(8 ((,+)(%.4$)?((,(103  7  3  5   > >">>""">>> >""">>">><>""> >>""""  IIII>"""">""">>"">>""> >">> >><$$$$<"""AIII"""""> >>>  00`00** the 'X' between characters. Use the"J" Arrow keys alone to move the 'X' within a character. Use the"J " space bar to invert the color of a square. A '.' at the right"J" side of a character signals that row of the character to fl USE WITH MULTI-DIMINSIONED ARRAYS So far, the examples given have been with one dimensional arrays. Matrw will work equally well with arrays of any dimension. However, when working with multi-dployees 130 perform mwnum(@quarterly&(0,0),@len%,@num%) 140 perform mclose(@num%) What information is being written to 'payfile'? We may be trying to write the pay information for the first 5 employees, but we are Consider the following example: 10 dim quarterly&(99,3) . . 100 file$="payfile" 110 perform mopen(@file$,@nuM%) 120 len=8*4*5 :rem 8 bytes per element * 4 elements * 5 em have to read the entire file to get the records for any single employee. Generally, place the most significant item at the extreme right in the dimension statement. In this case employees should go to the right. he file to get records for a single employee or group of employees. Also, additional emloyees could be added to the end of the file without rewriting the entire file. If we used the dimension statement in line 10, we would . The subscripts would be stored in the following order: (0,0), (1,0), (2,0), (3,0), (0,1), (1,1), (2,1), (3,1), (0,2), and so forth. In this situation line 20 would be better. It would allow us to do a partial read of t0), (0,1), (1,1), (2,1), and so forth. Using line 20 the internal storage would be: pay for quarters 0, 1, 2, and 3 for employee 0, followed by the quarterly pay for employee 2, followed by the pay for employees 3-99nternal storage would be: the first quarter pay of all 100 employees, followed by the second quarter pay, and then the third and fourth. The subscripts would be in the following order: (0,0), (1,0), (2,0), ... (98,0), (99, two different ways: 10 dim quarterly&(99,3) or 20 dim quarterly&(3,99) Arrays are always stored internally with the right most subscript ascending slowest. When dimensioned as in line 10, the it understood it is possible to read or write information that is different than what was intended. If we were using an array called 'quarterly&' to hold the quarterly pay records of 100 employees we could dimension itThis is taken care of when booting from Basic Extension. If you wish to use any of the demo programs without first booting Basic Extension, you must insure that the necessary routines are invoked. You may wish tov. Filecopy.demo is a file copy routine that can be included in a basic program, uses Matrw.inv, and Ftype.inv. All of the demo programs assume that the necessary invokable modules are already active. imensional arrays, it is very important to keep in mind the order in which the elements are stored internally. Matrw reads and writes arrays in the same order that they are stored internally. If this order is noactually writing the first quarter pay for the first twenty employees. Changing line 10 to correct this, it would read: 10 dim quarterly&(3,99) modify the programs to do this automatically by inserting an INVOKE statement at the beginning of the programs. ar=char+1:row=0:hi=1:cul=0v=char*9+2:lev=13:ۚ=3 :6100  up lev=0:6100lev=lev-1:row=0:hi=1:cul=0=char*9+2:lev=13:ۚ=3 :6100  down *lev=1:61004lev=lev+1:row=0:hi=1:cul=0>=char*9+2:lev=13:ۚ=3row=row-1 T:6100 down arrow row=3hi=0:6100 =+1hi=1hi=0:hi=1:row=row+1 :6100  left char=0:6100 char=char-1:row=0:hi=1:cul=0=char*9+2:lev=13:ۚ=3 :6100 X right bchar=7:6100 lchchar,lev,page)=a% :6100 goto main menu :100d left arrow ,ncul=0:6100:cul=cul-1:=-1::6100 right arrow ,cul=7:6100:cul=cul+1:=+1::6100, up arrow 6row=0hi=1:6100 @=-1Jhi=0hi=1:hi=0::6100 space bar Qhiq%=a%(row,char,lev,page)),2)):q%=a%(row,char,lev,page)),2))%a%q%=q%-(2^cul):q%=q%+(2^cul)ghia%=q%),2)+a%(row,char,lev,page)),2)):a%=a%(row,char,lev,page)),2)+q%),2))a%(row,";8);i=1400:"X";8); i=1400: 6130(8 keystroke processor for edit char B=326300L=276400V=86500`=216600j=116700t=106800y=1366900~=1497000=1397100=1387200 ar,lev,page)),2))):q%=a%(row,char,lev,page)),2)))a%=band(%q%,%(2^cul))g:cul=7a%".";8);:6200:" ";8);:6200:ۻa%:" ";::8);:6200:" ";8);:6200Lcul=7a%".";8);:" ";8);:ۻa%:" ";17);8);:" ash"<" when the character is displayed in INVERSE mode."1 :" press any key to continue";:a$o p edit z"page? 0-7 ";pagepage<0page>76010 2000)char=0:lev=0:hi=1:row=0:cul=0:=2:=3Whiq%=a%(row,che, modifications to the file 'SOS.DRIVER' on the Basic Extension diskette will be necessary. Use the Apple /// Utilities System Configuration Program for this. the INVOKE and PERFORM statements. Name in Pro.inv Reboot (@a%) init (@a%) reset (@a%) setup (@a%) The way that the routines are used is not changed. The only things that have changed is the names to use in H:6100;" Press RETURN to continue, ESCAPE to quit"+a$:a$=27)::ۻa$=13):ۺ2020BASIC EXTENSION UTILITIES BY FOXWARE 79C";"PRESS ANY KEY TO HALT LISTING"::202 1020#2,B$(I),16,B)ž#242:::1160Z=1#2;A$:"78A";A$Z=Z+1:Z>1842:::Z=1980*:=23:=0::"79C";"CONTINUE...?":1C$:C$<>"Y"C$<>"y"C$<>"N"C$<>"n"10 MENU.MAKER TEXT MODULESEG=0"MENU.MAKER"890&*X=11000: TEXT SLOW-DOWN LOOP ,X.1,180,22:2,280,21:2,2380,23:z:A$="LISTING "+B$(I),16,B)$=01:=0::"80C";A$;::12)>=23:=0::"a$,1)="/"5060:s=s-1 5030=a$240 MENU.MAKER 6.2 * Thanks to C.M.Davidson for his help!el; G$:::320H: Error Routine 202:U=11:"79C";"BAD PATH ERROR (NO DISK IN DISK DRIVE OR DESIRED FILE NOT FOUND.)"X=11000:X:::210Z a$="{,|,~,}; selects; back 1 lev 1600 &:WW=1:0 :SEG=1;".D1/S EG.F" SEG=1".D1/SEG.G"diskname$=3802  CATCH PASCAL TEXT FILES 202 :F*=08:"78C";"SORRY BUT MENU.MAKER CAN'T READ PASCAL TEXT FILES."04=10:"M$="NOVEMBER":1750M$="DECEMBER":1750826);"-";M$;" ";Ѡ,2));", ";"19";Р,2);" ";/П,2))=>13П,2))-12;џ,6);:1780$П,2))=0"12";џ,6);:ٟ;$П,2))=>12" PM-":" AM-" 1830WW=1530 =26:=211660,1670,1680,1690,1700,1710,1720,1730,1740^M$="JANUARY":1750hM$="FEBRUARY":1750rM$="MARCH":1750|M$="APRIL":1750M$="MAY":1750M$="JUNE":1750M$="JULY":1750M$="AUGUST":1750M$="SEPTEMBER":1750M$="OCTOBER":1750T 0")2070H540R\A$="RUNNING "+B$(I),16,B)f"79C";A$;:=0pB$(I),16,B) z::SEG=1".D1/SEG.T"t=+B$(I),16,B) yCT=CT+1~240:=24:=0:"@ ..... "DATE.TIME.LINE" ....JM=Ҡ,4,2))BTM1630,1640,1650,30C$="N"C$="n"1160;:=23:=0::"79C";"PRESS ANY KEY TO HALT LISTING": $1020.202 8::Z=1B::=23:=0::"79C";"WOULD YOU LIKE A PRINTED COPY?":1C$:C$<>"Y"C$<>"y"C$<>"N"C$<>"n"1170*C$="N"C$="n"nsion invokables. -: MATRW.DEMO :Demonstration of MATRW.inv. -: MENDF.DOC :Information about this routine that can shorten files -: after the current read/write position. -: MMULTI.DOC :Inforam for Basic Extension. -: FILECOPY.DEMO :Demonstration of the file copy routine. -: FONT.EDIT.DEMO :Demonstration of the font editing routine. -: FTYPE.DOC :Information about FTYPE.Inv. -: GEN.DOC :General information about the Basic Exteions on this disk side. -: DISK.DOC :Information about the disk routines in Basic Extension. -: DISKCOPY.DEMO :Demonstration of the disk copy routine. -: ERRORS.DOC :Information about errors you might encounter. -: EXTENSION.MENU :Menu progrion about Bit.Inv. -: BLOCK.DEMO :Basic program demonstrating Block.Inv. -: BLOCK.DOC :Information about Block.Inv. -: BYTE :BYTE Font -: CON.DOC :Information about Con.Inv. -: DEMOS.DOC :Information about the demonstrat letters in a string to upper case. Only letters are -: affected. Numbers and symbols are not changed. DESCRIPTION: Side Two: -: ARRAY.DOC :Information about Array routines in Basic Extension. -: BIT.DOC :Informat TAB, ARROWS, or SPACE BAR."= ::" Press RETURN to continue, ESCAPE to quit"& a$:a$<>13)a$<>27)3095:ۿ of only one string. Also -: it has the option of ignoring differences between upper -: and lower case letters during the search. -: UPSHIFT.INV : Upshift is a routine that changes all of the lower -: or CONTROL and RESET together will have no effect. -: SEARARRAY.INV : Seararray searches a string array for a specified group -: of characters. It is similar in function to INSTR, but -: acts on a entire array insteadto reboot. -: RESET.INV : Reset.inv is an invokable modual that provides the ability -: to enable and disable the RESET and CONTROL-RESET -: functions. If the resets are disabled, pressing the RESET rrays. -: REBOOT.INV : Reboot zeros all memory, clears the screen, displays -: "INSERT SYSTEM DISKETTE & REBOOT"in 40 column black and -: white, and hangs. Hold down the CONTROL key and press reset -: EAD PASCAL TEXT FILES."04=10:"78C";"ANY KEY RETURNS TO THE MENU."!>G$:::".D1/MENU.MAKER",320R",220(204::"79A";""; 2D=1:F=1 <#4;a$ FD=D+1 P#5;a$ZD=60#5;12)dD=60D=1nF=F+1::d$;::Y=1100:Y x13402  CATCH PASCAL TEXT FILES 202 :F*=08:"78C";"SORRY BUT MENU.MAKER CAN'T R".D1/MENU.MAKER",220 d$="" A$="PRINTING "+B$(I),16,B)=01:=0::"80C";A$;:#3,B$(I),16,B)Z=1#3;b$:"78A";b$Z=Z+1:Z=18:1290 1260 #4,B$(I),16,B)#5,".PRINTER"+ž#4#5;12):::".D1/MENU.MAKEmation on using Basic Extenion with multi-dimed Arrays. -: MOPEN.DOC :Information on Mat Open (opens Binary files). -: MOVE.DOC :Information about Move.Inv. -: MSETPOS.DOC :Info on MSETPOS, whic sets cursor at next read/write position. -: MWNUM.DOC :Writes a numeric array into the file with ref. # is "%NUM". -: MWSTR.DOC :Writes a string array into the file with ref. # "%NUM". -: PRINTER.DOC :Information on printing)}"Ss",c$)(so)SO=o:"S";:5230)"aA",c$)(na)NA=o:"A";:5230C$<>RT$5230sbH=TW:I=O:H=J+OF:I=L*CF$;TW$;::st$;"Searching"st$;:5800%H=ZE:"Done ";p$;e$;:ۺ5260C$:C$=ES$:ۺ5258(so)5270:۾529G_:"Replace with :";:C$=REPLACE$:7900:REPLACE$=C$:REPLACE$=ES$Vi:"B=start beginning A=without asking I=ignore case S=search only ESCAPE ";nC$:C$=ES$)s"Bb",C$)(SB)SB=O:"B";:5230)x"Ii",C$)(IC)ic=o:"I";:52305190C$)>ZEI=C$):5180" Are you sure?";yn$; I$:I$<>"Y"I$<>"y"4100 œ5180#C$::4100<I='F::Cn$;"Delete, ";:5900:4100PNA=ZE:SO=ZE:SB=ZE:IC=ZEES$5288L=I:K=n:J=H:.nw$;:i<10=i:ۻll-i<14=ll-i+o:ۚ=101l=i:HOF+SELP=H:150:ۙ=H- 4a (C) COPYRIGHT WILLIAM A WUNDERLICH 1981$C$=ES$:SA$=rt$:ۻa$)=136c$)=ze7910:ہi=oc$):la$;s$;la$;::c$="":7910^A$=la$C$)>Ola$;s$;la$;:C$=C$,C$)-O):7910:ۻC$)=Ola$;s$;la$;:C$="":7910A$)>126A$)<327910C$=C$+A$:A$;:7910` nd press RETURN ";:ۺ7530+`C$:C$=ES$4100:ۻC$=RT$7530:ۺ7520 jœ7580tPROGRAM$+I$7=25=26:Cn$;"Read this diskette";tr$;:75207=30=31=32:Cn$;"find program";tr$;:7520:I=:5900:4100C$;CL$;CO$;A$:A$=ES40I=CCI=41:I=26 ER$(I);", ";;"<>75926:" Please Wait, ";:u=zell:te$(u)="":$$<1910t$(lu)="":lu=lu-o:5924&p$;e$;tc$;"*C$:C$<>ES$5930:buf$=ds$:bLDRIVE$=PROGRAM$"Insert the program disk in drive ";program$;" aREPLACE$)-SEARCH$):t$(i),156-x)>sp$k=ze:5ST$(I)=T$(I),H-O)+REPLACE$+T$(I),H+SEARCH$))bh=h+REPLACE$):k=o:i%=ic:p%=h:i>lulu=i0search(@t$(i),@t$(lu),@search$,@i%,@l%,@p%)h=p%:h=zei=ze: i=i+l%: buf$="":I>="":t$(u)=t$(u),t$(u))-o)"H#1;T$(U),TW):#1;T$(U)-t$(u),o)=s$t$(u)=t$(u),t$(u))-o)+H#1;T$(U),TW,M-O):#1;T$(U),M):I=:œ5384 :Cn$;"Save, ";:5900:QDREPLACE$)>SEARCH$)X=(n)=t$(n),t$(n))-o)`QZ=NH#1;T-TW);T$(N),T,M-T+O):5335:#1;T$(N),O);T-TW);T$(N),T,M-T+O):5335AH#1;T-TW);T$(N),T):#1;T$(N),O);T-TW);T$(N),T)QZ-N=O5333U=N+OQZ-ODt$(u),o)=s$t$(u))=ot$(u)V2.0IW":#1;t$(ze):#1;lm:#1;rm:#1;lu:#1;ls:#1;rj:#1;ss:#1;ind:#1;spage:#1;epage:#1;startnum:#1;beginum:i=zeo:#1;page(i,0):#1;page(i,o):F#1;startcom:i=ze2:#1;com$(i,ze):#1;com$(i,o):#1;com$(i,2):9t$(n),o)=s$t$(n))>ot$OF:1400Ft$;"Save? ";:4600"C$)>ZEI=C$):5386:I=ZEC$=""I=ZE:5386,C$,O)="$"C$=C$,C$)-O):H=O:H=ZE œ5313C$ œ53808i=luo-o:t$(i)