home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64-128Toolkit / Q-TILITY-DOCS < prev    next >
Encoding:
Text File  |  2019-04-13  |  13.4 KB  |  227 lines

  1. Q-TILITY DOC
  2. COPYRIGHT (C) 1986 BY CHARLES SHELTON
  3.  
  4. NOTE: THIS PROGRAM IS BEING DISTRIBUTED UNDER THE "SHAREWARE" CONCEPT. IT MAY
  5. BE COPIED AND SHARED WITH OTHERS, AND A VOLUNTARY CONTRIBUTION OF $10.00 IS
  6. REQUESTED FROM THOSE USERS WHO FIND IT USEFUL. IT MAY NOT BE DISTRIBUTED
  7. COMMERCIALLY BY ANYONE WITHOUT WRITTEN PERMISSION FROM THE AUTHOR.
  8.  
  9.  
  10.     The following is a brief description of Q-Tility and it's functions.  More
  11. complete documentation is in the process of being written.
  12.  
  13.     Q-Tility is a utility program for the Commodore 64 written entirely in
  14. machine language.  It incorporates a form of 'transparent technology' whereby
  15. any of the functions of the utility can be accessed at any time, even while
  16. another program is currently running in the computer (similar to 'SIDEKICK' on
  17. the IBM-PC).  When the user presses the 'CTRL' key at the same time as the CRSR
  18. UP/DOWN key on the keyboard, the currently-running program, whether BASIC or
  19. Machine Language, is interrupted in its execution and the utility menu appears
  20. on the screen.  To load and activate Q-Tility, simply enter load "Q-Tility
  21. 1.1",8 (as with a normal basic program) and enter RUN when the ready prompt
  22. returns.  The program will then relocate itself to the proper area of memory
  23. and also activate itself.  The program can be de-activated by either pressing
  24. RUN-STOP and restore in combination, or entering SYS 49175, and it can be
  25. re-activated again with SYS 49152.  The program presently includes the
  26. following functions:
  27.  
  28.        1> Calculator
  29.        2> Disk Command Sender
  30.        3> Disk Directory Reader
  31.        4> Disk Error Channel Reader
  32.        5> Sequential File Reader/Printer
  33.        6> Free Basic RAM Reporter
  34.        7> Screen & Character Color Changer
  35.        8> Low Resolution Screen Dump to Printer
  36.        9> Notepad
  37.  
  38. The user chooses which function he/she wants to use, executes the function
  39. chosen, and is then given the option of exiting the utility program or
  40. continuing to use the functions.  If the user presses the CTRL key along with
  41. the CRSR RIGHT-LEFT key, Q-Tility 'hides' itself away again and the interrupted
  42. program reappears on the screen and resumes execution at exactly the point at
  43. which it was interrupted.  Some of the functions in Q-Tility, as well as some
  44. of the functions yet to be added, are available in similar forms as Public
  45. Domain Programs and in other commercial programs, but Q-Tility offers the real
  46. convenience of making these functions transparent and constantly accessable
  47. without having to exit any current program and load the utility into the
  48. computer.  A brief description of each of the current functions follows.
  49.  
  50.  
  51.     'Q-Calc' is the calculator function within Q-Tility.  It uses various
  52. techniques to enable it to evaluate complex math formulas and expressions.  The
  53. user can enter a math expression of up to 80 characters in length, using the
  54. standard math operators +,-,/, and *, as well as any of the math functions
  55. available in CBM basic (SIN, COS, SQR, ^, the PI symbol, etc.).  Parentheses
  56. can also be used wherever needed in expressions, as well as any
  57. currently-declared (e.g., by the interrupted basic program) numeric variables,
  58. both single and array (single or multi-demensioned).  Other than lacking a
  59. memory-store function, Q-CALC therefore simulates a full-function scientific
  60. calculator, with the added convenience of being able to handle variables.
  61.     Q-CALC also has a custom error-handling routine, whereby if a user makes a
  62. syntax mistake in his expression entry the normal basic error report routine
  63. (which would cause both Q-Tility and the interrupted program to stop execution)
  64. is bypassed, the error is reported, and the user is returned to the expression
  65. input prompt to re-enter the expression.  This routine also works to trap math
  66. overflow errors.
  67.      An interesting and convenient extra resulting from Q-Calc's ability to
  68. handle variables is the fact that the user can interrupt a basic program at any
  69. point and find out the value of any of the program's numeric variables by
  70. simply entering the variable label at Q-CALC's input prompt.  For example, the
  71. user can find out how many times so far a program has completed a for-next loop
  72. by entering the loop-counter variable at the prompt.  If the loop uses J as the
  73. counter variable, for example, and J is entered at the Q-CALC prompt, the
  74. present value for J will be returned.  This added extra can come in handy when
  75. debugging a program or following its progress.
  76.     Because of the fact that Q-CALC uses routines already in the basic ROM to
  77. evaluate expressions, the entry of the basic FRE(0) function at Q-CALC's prompt
  78. could normally cause an interrupted basic program to crash upon resumption of
  79. execution, due to the fact that FRE(0) forces garbage collection, which changes
  80. important basic variable pointers.  The program avoids this potential problem
  81. by reporting entry of the FRE function as an error and disallowing it.
  82.  
  83.  
  84.     The Disk Drive Command Sender avoids the need to have a seperate command
  85. 'wedge' installed in order to send commands to the drive without having to open
  86. and close the command channel.  If the user wishes to scratch a file from the
  87. disk all he has to do is enter at the prompt: 'S:Filename' and the command will
  88. be sent directly to the drive.  Normal 1541 syntax is used for all of the drive
  89. commands.  If the user changes his mind about sending a command after receiving
  90. the 'command:' prompt, he simply presses the return key with no input on the
  91. line and the function aborts back to the main menu.  The only things the
  92. 'sender' is lacking that many wedges have is a non-destructive directory reader
  93. and an error-channel reader.  That's why I wrote the following two routines.
  94.  
  95.  
  96.     The Disk Directory Reader is a non-destructive (simply prints the directory
  97. to the screen) reader that is executed immediately upon choosing #3 from the
  98. Main Menu.  While the directory is printing to the screen, output can be paused
  99. by pressing any key and thereafter resumed by pressing any key again.
  100.  
  101.  
  102.     Choosing #4 from the Main Menu immediately causes the drive error channel
  103. to be read and the result printed to the screen.  This routine is also
  104. automatically executed upon completion of any of Q-Tility's other disk
  105. functions (they jump through this routine back to the Main Menu).
  106.  
  107.  
  108.     The Sequential File Reader (#5 on the Menu) will accept a filename from the
  109. user to read and then give the option of printing the file either to the screen
  110. or a printer.  At any time during the printing of the file the output can be
  111. paused by pressing any key.  Once paused, the user can abort the reader and
  112. return to the main menu by pressing the 'x' key, and continue reading the file
  113. by pressing any other key.  If the user has chosen the option of sending output
  114. to the printer, there is often some delay before output is paused when a key is
  115. pressed, as the text is output a full line at a time and the size of the
  116. printer buffer affects how many lines are printed before the pause takes
  117. effect.  This function automatically switches to lower case on both the screen
  118. and the printer (and back again when finished if the computer was originally in
  119. upper case mode), as most text files are in such a mode.  The function can also
  120. be used to read or print any notes written with the NOTEPAD function.
  121.  
  122.  
  123.     Choosing #6 from the Menu will cause the program to report current free RAM
  124. available within the basic program area.  This routine can be handy when a
  125. basic program is currently running.  Just interrupt the program at any point to
  126. see how much RAM has been used so far.
  127.  
  128.  
  129.     This function gives the user the option of changing the current colors for
  130. the characters, screen background, and the border.  Thus, if a program in
  131. current execution uses colors that are not to your liking, simply interrupt its
  132. execution and use this function.  All subsequent execution of the program will
  133. be in your chosen colors.
  134.  
  135.  
  136.     This function will dump the current screen (but not hi-res screens) of the
  137. interrupted program to the printer on the serial bus.  Any reversed characters
  138. on the screen will be printed as non-reversed.  The function also checks what
  139. mode the computer is currently in, whether upper case/graphics or upper/lower
  140. case, and dumps to the printer in that form, so always 'what you see is what
  141. you get.'  The routine is very useful for dumping important data on the screen,
  142. menus, etc. for later perusal.  I've also used it successfully with
  143. non-printing machine language monitors for dumping disassemblies to the
  144. printer.
  145.  
  146.  
  147.     Let's say you are currently using another program, with 'Q-Tility' active
  148. in the background, and you wish to write yourself a short note or memo and save
  149. it to disk.  Just choose the notepad function from the Q-Tility menu.  The
  150. screen will clear and the program will put you into input mode for the note.
  151.  You are limited to 20 lines for your note.  You can compose your note on the
  152. screen, with the cursor keys and insert & delete keys active.  BUT NOTE: Do not
  153. use the <return> key until you have finished composing your note.  To signal a
  154. place on the line at which to add a carriage return, type the left-arrow key
  155. (in the upper left corner of the keyboard), and to jump to the beginning of the
  156. next line you can press the shift and return keys at the same time.  When you
  157. have finished your note, type the up-arrow key (^) to signal the end of the
  158. note, and then press <return>, which signals the program that you're ready to
  159. send the note to disk.  You will then receive a 'send note to disk?' prompt, at
  160. which you press 'y' to do so, or 'n' to abort the function.  If you press 'y',
  161. you are then prompted for the file name, which must be no more than 16
  162. characters long.  The file is then written to disk, the error channel is read
  163. to check on how the file-write went, and you receive the return-to-menu prompt.
  164.  The note, as mentioned before, can then be read or sent to the printer with
  165. the file reader function.
  166.  
  167.     Q-Tility currently loads into ram at $C000 (49152) and is activated by SYS
  168. 49152.  It stores the screen and color ram, as well as important
  169. interrupted-program data, in RAM underneath the ROM in the $A000 area.  This is
  170. only temporary, for purposes of further development.  Eventually, most of the
  171. program will reside underneath the $A000 ROM and the screen/data storage area
  172. will be either underneath rom in the high-$B000 area or the KERNAL ROM above
  173. $D000, depending on how much RAM Q-Tility needs in the $A-$B000 area.  Thus, in
  174. the next version, Q-Tility will leave almost all of basic memory free (1/2k or
  175. so for the calculator can't sit underneath rom because the calculator uses some
  176. of the ROM routines and rom has to be switched off in order to access ram in
  177. that area).  The RAM above $C000 will also be completely free, as well as the
  178. cassette buffer RAM, so other routines that normally install in these areas can
  179. still be used.
  180.  
  181.     I'm currently working on a couple other functions to add to Q-Tility,
  182. including a mini-terminal emulator, a disk sector editor, a routine to list a
  183. basic program from disk to the screen, and a memory dump in hexadecimal.  But I
  184. will probably be upgrading and improving on the original idea for some time to
  185. come (a good hack is never really finished), and I can't wait forever to get
  186. something marketable completed.  I may also write seperate utility programs
  187. (such as a "Hacker's" Utility) with some of these and other functions for
  188. seperate marketing, using the same basic driver.
  189.  
  190.     I'm also working on a couple of routines to make the program compatible
  191. with as many other commercial programs as possible, and M.L. programs that
  192. wedge into the basic interpreter.  Currently, Q-Tility can be disabled by
  193. pressing the RUN-STOP/RESTORE combination of keys, and re-enabled again with
  194. SYS 49152.  I did not want to disallow the RUN-STOP/RESTORE combination, as the
  195. user could possibly need it for disabling some other program he is using.  The
  196. only other way i can think of right now to make Q-Tility 'unstoppable' is to
  197. put it on cartridge, which would add to its expense and the difficulty of
  198. offering upgrades and fixing any previously-undiscovered bugs.
  199.  
  200.     As an example of Q-Tility's potential, I have tested it with machine
  201. language monitors such as SUPERMON and MICROMON in current execution, and it
  202. works well with them, adding Q-Tility's functions to those already available
  203. within the monitors.  There aren't any monitors I have seen that have a
  204. full-function calculator with the complexity of Q-CALC available, nor have I
  205. seen one with a sequential file printer.  I have also used the program with the
  206. Oracle Database Program by Batteries Included, as well as other commercial
  207. programs and, as mentioned above, am working on compatibility with an even
  208. wider range of programs.
  209.  
  210.     Registered users of Q-Tility (those who send $10 to the address below) will
  211. be allowed to receive the next version, the one that will reside under basic
  212. ROM, at cost for disk, postage, and handling (disk & copy costs) - $3.00.  New
  213. programs, with different functions but using the same technique as Q-Tility
  214. (such as the future "Hacker's" Toolkit) will also be made available to such
  215. users at substantial discount.  I am a firm believer in the idea that useful
  216. programs do not have to cost a fortune, and that copy-protection is not
  217. necessary when a program is offered for a reasonable price.  I am counting on
  218. you, the user, to prove me right.  I welcome any comments, criticisms,
  219. questions, or suggestions that you might have.
  220.  
  221. CHARLES SHELTON
  222. 2626 FEDERAL ST.
  223. EL PASO, TEXAS 79930
  224. (915) 566-5369
  225.  
  226.  
  227.