home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / probe12.lbr / PROBE2.DZC / PROBE2.DOC
Encoding:
Text File  |  1993-10-25  |  9.0 KB  |  280 lines

  1.  
  2. PROCEDURE AND FUNCTION DESCRIPTION FOR PROBE.COM
  3.  
  4.      The following is an alphabetical listing of the procedures in PROBE, with 
  5. a brief explanation of the function of each and some appropriate comments.
  6.  
  7. AbortCommand
  8.  
  9.      This procedure is called whenever a key is pressed during a long process, 
  10. to enable the user to interrupt it.  If the user responds affimatively, the 
  11. global variable Interrupted is set to true.
  12.   
  13. Accent
  14.  
  15.      Used to accent or highlight a given text line when the graphics are 
  16. turned on. When the "(" character is encountered, the highlighting is turned 
  17. on, and it is turned off again when the ")" character is encountered.
  18.   
  19. Allocated
  20.  
  21.      Receives a logical block number and returns the value true if the block 
  22. is allocated (reserved as part of a file).
  23.  
  24. ASCII
  25.  
  26.      This function receives a byte value and returns a character with the 
  27. parity (high) bit set to zero.  If the character is a control character, the 
  28. function returns a period symbol.
  29.  
  30. Binary
  31.  
  32.      A function used in the allocation map option to convert an 8-bit value to 
  33. an 8-character string of 1's and 0's representing a binary number.  See the 
  34. MapDisk description.
  35.  
  36. Block
  37.  
  38.      Calculates a CP/M logical block (or allocation group) number, given a 
  39. track and sector.
  40.  
  41. BlockToSector
  42.  
  43.      Calculates a track and sector given a logical block number.  Essentially 
  44. the opposite of what the function Block does.
  45.  
  46. ChangeASCIIvalue
  47.  
  48.      See ChangeSector.
  49.  
  50. ChangeHexValue
  51.  
  52.      See ChangeSector
  53.  
  54. ChangeSector
  55.  
  56.      This is the procedure that allows editing of a displayed sector.  It 
  57. contains the local procedures MoveRight, MoveLeft, MoveUp, and MoveDown, which 
  58. do exactly what their names imply, and ChangeASCIIvalue and ChangeHexValue. 
  59. ChangeASCIIvalue allows the user to change a value in the ASCII field with 
  60. automatic update of the Hex field, and ChangeHexValue does the opposite.
  61.  
  62. ComputeSector
  63.  
  64.      Increments or decrements the current sector position, depending on the 
  65. value of the boolean variable Direction.  Takes into account whether to move 
  66. one sector at a time or one block at a time, and wraps around at the first and 
  67. last sectors.
  68.  
  69. Copy
  70.  
  71.      This procedure copies a range of sectors from the indicated source 
  72. location to some destination location.  It is called by the procedure 
  73. CopySectors.
  74.  
  75. CopySectors
  76.  
  77.      Inputs information from the user to perform sector or block duplication 
  78. from one area of the disk to another using the Copy procedure.  The local 
  79. procedure PrintWarning simply prints a warning about writing over data on the 
  80. disk.
  81.  
  82. DirectoryBlocks
  83.  
  84.      A function that counts the number of logical blocks reserved for the disk 
  85. directory and returns the number.  Used in the calculation of the disk size.
  86.  
  87. DisplaySector
  88.  
  89.      Displays the hexadecimal and ASCII fields of the sector located at the 
  90. requested track and sector.
  91.  
  92. DrawBox
  93.  
  94.      Draws a box around the disk information at the top of the screen when the 
  95. program is in the graphics mode.
  96.  
  97. Enter
  98.  
  99.      A custom string input procedure that allows interruption without strange 
  100. gyrations.  Backspace and Delete may be used in editing, ^R will recall the 
  101. current default for editing, Tab will allow the entry of a non-printing 
  102. character, pressing Return without entering anything will cause the default 
  103. string to be used, and Escape will interrupt the procedure without changing 
  104. anything.
  105.  
  106. FindBadSectors
  107.  
  108.      This is a fairly crude procedure to find bad sectors on a disk.  It 
  109. simply reads each sector that is within the specified range, and reports any 
  110. read errors that occur.  See the file PROBE.DOC for more info on this.
  111.  
  112. FlushSector
  113.  
  114.      This procedure empties the internal sector buffer (in a rather crude 
  115. fashion ) whenever an edited sector is written to disk, assuring that the 
  116. changes are updated.
  117.  
  118. FreeSpace
  119.  
  120.      This function returns the amount of disk space remaining in k, by reading 
  121. the CP/M logical block allocation map in memory and counting the number of 
  122. free blocks remaining.
  123.  
  124. GetCursorAddress
  125.  
  126.      See PrintScreen.
  127.  
  128. GetHelp
  129.  
  130.      This procedure reads the file PROBE.DOC in response to the user's 
  131. selection, and prints the requested section to the screen.
  132.  
  133. GetSector
  134.  
  135.      Uses the ReadInteger procedure to get a sector number from the user. 
  136. Checks to make sure that the range maximum is correct if the sector is in the 
  137. last logical block, since the last block usually contains an oddball number of 
  138. sectors.
  139.  
  140. Hex
  141.  
  142.      This function receives a byte value and returns a two character string 
  143. representation of its corresponding hex number.
  144.  
  145. InitializeVariables
  146.  
  147.      Initializes the values of the graphics oriented variables.  Specifically, 
  148. looks at the command line to determine if the user has typed "ON" or "OFF" 
  149. after the program name, and sets the graphics variables according to the 
  150. graphics mode.
  151.  
  152. Matches
  153.  
  154.      Takes two file names and returns true if they match, taking wild cards 
  155. like "*" and "?" into account.
  156.  
  157. MainMenu
  158.  
  159.      Prints the vital information for the logged disk drive, followed by the 
  160. opening menu, and then reads the menu selection from the user.
  161.  
  162. MapDisk
  163.  
  164.      This procedure produces a "map" of the logged disk drive which shows 
  165. which logical blocks are reserved and which are free to be used for saving 
  166. information on the disk.
  167.  
  168. MapFile
  169.  
  170.      This procedure will search the logged disk drive for an ambiguous or 
  171. unambiguous file name and produce a listing of the vital information 
  172. concerning the file, including the user area, the file name, the extent, the 
  173. number of records (logical sectors) in the extent, the location of the 
  174. directory entry, and the logical block numbers assigned to the file.
  175.  
  176. MoveDown   \
  177. MoveLeft    \   See ChangeSector.
  178. MoveRight   /
  179. MoveUp     /
  180.  
  181. Parse
  182.  
  183.      Parses a file name into the CP/M standard 11 character format.  Also 
  184. interprets the "*" symbol and inserts the "?" character in the appropriate 
  185. places.
  186.  
  187. Pause
  188.  
  189.      This procedure is used in screen paging, and can be interrupted if the 
  190. value of EscapeAllowed is true.
  191.  
  192. PrintChar
  193.  
  194.      This procedure receives a byte value and prints either a normal 
  195. character, a highlighted character or a hexadecimal number, depending on the 
  196. value of the byte.
  197.  
  198. PrintScreen
  199.  
  200.      Includes local procedures GetCursorAddress and SetVideoUpdateRegisters. 
  201. Prints the screen when initiated by the user typing ^@.  Works for '83 Kaypro 
  202. 10 machines, untested for '84 models, does not yet work on the pre-'84 Kaypro 
  203. 2 or 4.
  204.  
  205. ReadInteger
  206.  
  207.      Inputs an integer value with range and error checking.  Prints the 
  208. default value enclosed in square brackets on the left, followed by the prompt 
  209. string, followed by the range of acceptable values enclosed in parentheses.
  210.  
  211. ReadSector
  212.  
  213.      This procedure reads a sector and checks for a read error using CP/M BIOS 
  214. calls, given a track and sector location.
  215.  
  216. RememberLoggedDrive
  217.  
  218.      This procedure stores the currently logged disk drive number in the 
  219. variable that is passed to it.  It is used to "remember" in which drive the 
  220. user began the program so that the program can log back onto it before 
  221. exiting.
  222.  
  223. SearchForText
  224.  
  225.      This procedure will search a range of tracks for a particular string of 
  226. characters, as specified by the user.  Any character may be entered, including 
  227. standard characters, control characters and characters with a code value 
  228. greater than 127.  The latter two types may be entered as search parameters by 
  229. pressing the Tab key to indicate the desire to enter a character code number.
  230.  
  231. SelectDiskDrive
  232.  
  233.      A procedure to select the drive letter and then log onto the selected 
  234. drive, using the procedure SelectDrive.
  235.  
  236. SelectDrive
  237.  
  238.      A procedure that logs onto a selected drive and calculates various 
  239. characteristics of the drive.
  240.  
  241. SelectSector
  242.  
  243.      A procedure that uses ReadInteger and GetSector to get a sector number 
  244. from the user.
  245.  
  246. SetVideoUpdateRegisters
  247.  
  248.      See PrintScreen.
  249.  
  250. Tab
  251.  
  252.      A simple horizontal tab procedure that does not need to know where the 
  253. cursor is located in order to work properly.
  254.  
  255. TranslateBlockNumber
  256.  
  257.      This procedure gets a logical block number from the user and calculates 
  258. the first track and sector in the block.
  259.  
  260. ViewSector
  261.  
  262.      This is the main procedure for Option 0, viewing and editing sectors.  It 
  263. prompts the user for a starting track and sector, displays the sector, and 
  264. then allows relative and absolute movement, and editing.
  265.  
  266. WriteSector
  267.  
  268.      Writes a sector to disk using CP/M BIOS calls and checks for write 
  269. errors, given a track and sector location.
  270.  
  271.  
  272. BlockNumber
  273.  
  274.      This procedure gets a logical block number from the user and calculates 
  275. the first track and sector in the block.
  276.  
  277. ViewSector
  278.  
  279.      This is the main procedure for Option 0, viewing and editing sectors.  It 
  280. prompts the user for a starting track and sector, displays the sector