home *** CD-ROM | disk | FTP | other *** search
-
- PROCEDURE AND FUNCTION DESCRIPTION FOR PROBE.COM
-
- The following is an alphabetical listing of the procedures in PROBE, with
- a brief explanation of the function of each and some appropriate comments.
-
- AbortCommand
-
- This procedure is called whenever a key is pressed during a long process,
- to enable the user to interrupt it. If the user responds affimatively, the
- global variable Interrupted is set to true.
-
- Accent
-
- Used to accent or highlight a given text line when the graphics are
- turned on. When the "(" character is encountered, the highlighting is turned
- on, and it is turned off again when the ")" character is encountered.
-
- Allocated
-
- Receives a logical block number and returns the value true if the block
- is allocated (reserved as part of a file).
-
- ASCII
-
- This function receives a byte value and returns a character with the
- parity (high) bit set to zero. If the character is a control character, the
- function returns a period symbol.
-
- Binary
-
- A function used in the allocation map option to convert an 8-bit value to
- an 8-character string of 1's and 0's representing a binary number. See the
- MapDisk description.
-
- Block
-
- Calculates a CP/M logical block (or allocation group) number, given a
- track and sector.
-
- BlockToSector
-
- Calculates a track and sector given a logical block number. Essentially
- the opposite of what the function Block does.
-
- ChangeASCIIvalue
-
- See ChangeSector.
-
- ChangeHexValue
-
- See ChangeSector
-
- ChangeSector
-
- This is the procedure that allows editing of a displayed sector. It
- contains the local procedures MoveRight, MoveLeft, MoveUp, and MoveDown, which
- do exactly what their names imply, and ChangeASCIIvalue and ChangeHexValue.
- ChangeASCIIvalue allows the user to change a value in the ASCII field with
- automatic update of the Hex field, and ChangeHexValue does the opposite.
-
- ComputeSector
-
- Increments or decrements the current sector position, depending on the
- value of the boolean variable Direction. Takes into account whether to move
- one sector at a time or one block at a time, and wraps around at the first and
- last sectors.
-
- Copy
-
- This procedure copies a range of sectors from the indicated source
- location to some destination location. It is called by the procedure
- CopySectors.
-
- CopySectors
-
- Inputs information from the user to perform sector or block duplication
- from one area of the disk to another using the Copy procedure. The local
- procedure PrintWarning simply prints a warning about writing over data on the
- disk.
-
- DirectoryBlocks
-
- A function that counts the number of logical blocks reserved for the disk
- directory and returns the number. Used in the calculation of the disk size.
-
- DisplaySector
-
- Displays the hexadecimal and ASCII fields of the sector located at the
- requested track and sector.
-
- DrawBox
-
- Draws a box around the disk information at the top of the screen when the
- program is in the graphics mode.
-
- Enter
-
- A custom string input procedure that allows interruption without strange
- gyrations. Backspace and Delete may be used in editing, ^R will recall the
- current default for editing, Tab will allow the entry of a non-printing
- character, pressing Return without entering anything will cause the default
- string to be used, and Escape will interrupt the procedure without changing
- anything.
-
- FindBadSectors
-
- This is a fairly crude procedure to find bad sectors on a disk. It
- simply reads each sector that is within the specified range, and reports any
- read errors that occur. See the file PROBE.DOC for more info on this.
-
- FlushSector
-
- This procedure empties the internal sector buffer (in a rather crude
- fashion ) whenever an edited sector is written to disk, assuring that the
- changes are updated.
-
- FreeSpace
-
- This function returns the amount of disk space remaining in k, by reading
- the CP/M logical block allocation map in memory and counting the number of
- free blocks remaining.
-
- GetCursorAddress
-
- See PrintScreen.
-
- GetHelp
-
- This procedure reads the file PROBE.DOC in response to the user's
- selection, and prints the requested section to the screen.
-
- GetSector
-
- Uses the ReadInteger procedure to get a sector number from the user.
- Checks to make sure that the range maximum is correct if the sector is in the
- last logical block, since the last block usually contains an oddball number of
- sectors.
-
- Hex
-
- This function receives a byte value and returns a two character string
- representation of its corresponding hex number.
-
- InitializeVariables
-
- Initializes the values of the graphics oriented variables. Specifically,
- looks at the command line to determine if the user has typed "ON" or "OFF"
- after the program name, and sets the graphics variables according to the
- graphics mode.
-
- Matches
-
- Takes two file names and returns true if they match, taking wild cards
- like "*" and "?" into account.
-
- MainMenu
-
- Prints the vital information for the logged disk drive, followed by the
- opening menu, and then reads the menu selection from the user.
-
- MapDisk
-
- This procedure produces a "map" of the logged disk drive which shows
- which logical blocks are reserved and which are free to be used for saving
- information on the disk.
-
- MapFile
-
- This procedure will search the logged disk drive for an ambiguous or
- unambiguous file name and produce a listing of the vital information
- concerning the file, including the user area, the file name, the extent, the
- number of records (logical sectors) in the extent, the location of the
- directory entry, and the logical block numbers assigned to the file.
-
- MoveDown \
- MoveLeft \ See ChangeSector.
- MoveRight /
- MoveUp /
-
- Parse
-
- Parses a file name into the CP/M standard 11 character format. Also
- interprets the "*" symbol and inserts the "?" character in the appropriate
- places.
-
- Pause
-
- This procedure is used in screen paging, and can be interrupted if the
- value of EscapeAllowed is true.
-
- PrintChar
-
- This procedure receives a byte value and prints either a normal
- character, a highlighted character or a hexadecimal number, depending on the
- value of the byte.
-
- PrintScreen
-
- Includes local procedures GetCursorAddress and SetVideoUpdateRegisters.
- Prints the screen when initiated by the user typing ^@. Works for '83 Kaypro
- 10 machines, untested for '84 models, does not yet work on the pre-'84 Kaypro
- 2 or 4.
-
- ReadInteger
-
- Inputs an integer value with range and error checking. Prints the
- default value enclosed in square brackets on the left, followed by the prompt
- string, followed by the range of acceptable values enclosed in parentheses.
-
- ReadSector
-
- This procedure reads a sector and checks for a read error using CP/M BIOS
- calls, given a track and sector location.
-
- RememberLoggedDrive
-
- This procedure stores the currently logged disk drive number in the
- variable that is passed to it. It is used to "remember" in which drive the
- user began the program so that the program can log back onto it before
- exiting.
-
- SearchForText
-
- This procedure will search a range of tracks for a particular string of
- characters, as specified by the user. Any character may be entered, including
- standard characters, control characters and characters with a code value
- greater than 127. The latter two types may be entered as search parameters by
- pressing the Tab key to indicate the desire to enter a character code number.
-
- SelectDiskDrive
-
- A procedure to select the drive letter and then log onto the selected
- drive, using the procedure SelectDrive.
-
- SelectDrive
-
- A procedure that logs onto a selected drive and calculates various
- characteristics of the drive.
-
- SelectSector
-
- A procedure that uses ReadInteger and GetSector to get a sector number
- from the user.
-
- SetVideoUpdateRegisters
-
- See PrintScreen.
-
- Tab
-
- A simple horizontal tab procedure that does not need to know where the
- cursor is located in order to work properly.
-
- TranslateBlockNumber
-
- This procedure gets a logical block number from the user and calculates
- the first track and sector in the block.
-
- ViewSector
-
- This is the main procedure for Option 0, viewing and editing sectors. It
- prompts the user for a starting track and sector, displays the sector, and
- then allows relative and absolute movement, and editing.
-
- WriteSector
-
- Writes a sector to disk using CP/M BIOS calls and checks for write
- errors, given a track and sector location.
-
-
- BlockNumber
-
- This procedure gets a logical block number from the user and calculates
- the first track and sector in the block.
-
- ViewSector
-
- This is the main procedure for Option 0, viewing and editing sectors. It
- prompts the user for a starting track and sector, displays the sector