home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1992 July & August / rerun-1992-07-08-side-a.d64 / Profile.txt < prev    next >
Text File  |  2022-09-20  |  10KB  |  72 lines

  1. Profile 80 
  2. by Jane M. Voskamp
  3.  
  4. Have you ever needed to create an autobooting disk and been unable to find that routine you know was somewhere amongst all the utility programs you've been collecting ?  If you have, then you need "Profile 80".
  5.  
  6. Profile 80 is a professional file utility program for 80-column mode on the C128 using a 1571 dsk drive. But Profile 80 offers more than just creating autoboot sectors for your own Disks and/or programs. With Profile 80 you can also create a Protect file, which allocates track 1, Sector 0 on the Block Allocation Map (BAM) on your disk, so the boot sector cannot be overwritten while you are placing files on your disk.
  7.  
  8. One other trouble you may have found with autobooting disks is that you cannot collect, or validate the disk afterwards. Profile 80 gets around this problem by disabling the autoboot code first, collecting the disk, then re-enabling the autoboot code before exiting the collect routine. Profile 80 also offers disk routines such as viewing the directory, renaming and scratching files, and formatting disks, plus three methods to exit the program.
  9.  
  10. How  it works
  11.  
  12. Before the Title screen is displayed, the start of Basic memory is relocated. At the Title Screen prompt, the machine language routine is loaded with a keypress. The routine is "C-128 Custom Windows" by Frederick Goddard, published in RUN Magazine May 1987.
  13.  
  14. The ML remains in control of the windows' borders, their numbers, and their 3-D shadow effect, and results in a polished look. Each window has a number (1-3) displayed in the upper-left corner, indicating the sequence in which they have been accessed, and the reverse order in which they are closed.
  15.  
  16. The Main Menu
  17.  
  18. The options available are displayed, and remain on screen during all accesses.
  19.  
  20. F1 - Directory    F2 - Collect Boot Disk
  21. F3 - Rename File  F4 - Scratch File
  22. F5 - Protect Boot F6 - Make autoboot
  23. F7 - Format Disk  F8 - Exit Profile 80
  24.  
  25. Status Report
  26.  
  27. After an option has finished, or you've exited the routine, a Status Report window is displayed. If no operation has been performed, or the status is 'OK', the window disappears with a beep. If there has been an error, or any problems during the routine selected, the Error Message and disk status are shown. You are prompted to check your disk, then press a key to display a new status and exit to the menu. The routines contain extensive error checking for possible problems.
  28.  
  29. All the options are easy to use, and most have self-contained instructions, options or Exits to the Menu. But some need further information.
  30.  
  31. F2 - Collect Boot Disk. On accessing this option, a warning is displayed in the window. It is best to avoid collecting, or validating a disk with GEOS files on it, or the files might be destroyed.  A Y/N prompt to continue is given. On N, the window is closed and the Status Report window and Menu is displayed. On Y, the program checks for an autoboot on track 1, sector 0. If none is found, a normal collect, or validation is performed and when done, the window closes and the Menu reappears.
  32.  
  33. If an error occurs, the collect abort, and DOS Status is displayed. If the disk contains an autoboot track, the boot sequence is disabled, then re-enabled after the validation process. The window is then closed and the program displays the Status Report window and the Menu.
  34.  
  35. The standard Collect, or validation function does not have this capability, and due to the nature of the boot sequence, the program might not return from trying to collect a boot disk. The reason is due to the characters written to disk at the beginning of the boot sequence. All normal sectors begin with Bytes 0 and 1 pointing to the next track and sector for a particular file, or with $00 in byte 0 to indicate no more sectors.
  36.  
  37. However, on a boot sector, bytes 0 and 1 contain $43 (67) and $42 (66), and represent ASCII characters 'CB', (part of 'CBM'), indicating that it is a boot sequence. Consequently, the standard DOS collect tries to read track 67, sector 66, but as this sector doesn't exist on CBM disks. Instead, the drive continues to spin and it never returns to update the BAM with the number of used blocks on the disk.
  38.  
  39. One possible problem that could occur during the collect, is that after disabling the autoboot sequence, the collect encounters corrupted sectors on the disk and aborts the collect without continuing through the re-enable autoboot sequence. The window will close and the Status Report window will be displayed with error messages. In that case your disk will no longer autoboot.
  40.  
  41. If this should happen, and you are familiar with the program that is autobooting, one solution is to use F6 -  Make Autoboot option to re-write the autoboot sector. If you don't know the program, but you want to resurrect the sector, reboot with a sector editor and examine track 1 sector 0. Reinstate bytes 0 and 1 to $43 and $42 respectively.
  42.  
  43. An alternative is to get a new disk and  press F7 to format, then use F5 - Protect Boot, and F6 - Make Autoboot, then exit Profile 80.  Then using a file copy program, transfer the autobooting file to the new disk, and as many uncorrupted files from the old disk as possible, and then format the corrupted disk. Don't use your old disk if it has corrupted files on it.
  44.  
  45. F3 - Rename File. Enter the file to be renamed (up to 16 characters), and press return. Then enter the new name for the file (up to 16 characters), and press return. Next, at the Y/N prompt enter Y to continue, or N to exit. When the rename is completed, the directory is automatically displayed on screen. Press any key to continue to the Status Report window and Menu. If an error is detected during renaming, the program aborts, closes the window and displays the Status Report window, the Error message and DOS Status.
  46.  
  47. F4 - Scratch File. At the '?' prompt, enter "$" to view the directory, or return to exit to the Status Report window and Menu. Otherwise, enter the filename to be scratched. If you enter a filename exactly 16 characters long, you will receive a 'name too long' message. That's because the return keypress is counted as a character.
  48. When you really have to scratch a 16 character filename, enter the first 14 characters, then an asterisk, then press return.  An alternative is to use F3 - to rename the file, and then scratch it. At the Y/N prompt to continue, enter Y to scratch the file from disk, or N to exit to the Status Report window and the Menu.
  49.  
  50. When a scratch is completed, the directory is automatically displayed on screen. Press any key to continue to the Status Report window and Menu. If an error is detected during scratching, the program aborts, closes the window and displays the Status Report window, the Error message and DOS Status.
  51.  
  52. F5 - Protect Boot. This option protects the autoboot sector by creating a User (USR) file called Protect, and allocating track 1 sector 0  to it on the BAM. You should use this option only after formatting a new disk, and before adding any files to the disk, and before using  F6 - Make Autoboot option (the program will know if you have done this in a different order).
  53.  
  54. At the Y/N prompt to continue, enter N to exit to the Status Report window and the Menu. On Y, insert the disk to be protected at the prompt, and press any key to have the USR file written to disk. If the Protect file is not the first file on the directory, the routine will abort to the Status Report window and the Menu.
  55.  
  56. However, when the USR file is written and allocated to track 1 sector 0, the collect routine is called, which will check for an autoboot sector before commencing. When completed, the directory is automatically displayed on screen. If an error is detected during the Protect, the program aborts, closes the window and displays the Status Report window, the Error message and DOS Status.
  57.  
  58. F6 - Make Autoboot. This option should only be used on a newly formatted disk after using F5 - Protect boot option. Any data stored on track 1 sector 0 will be over-written and lost during this process. You can make autoboots for Machine Language programs or for Basic programs. In the case of ML programs the command 'BOOT' is written in the boot