home *** CD-ROM | disk | FTP | other *** search
/ Rockford Magazine / Rockford_Magazine_038_19xx_-_de_Side_A.d64 / msdos64.doc < prev    next >
Text File  |  2023-02-26  |  8KB  |  50 lines

  1. =======================================
  2. ROCKFORD-FD DISK    038 V1    ANLEITUNG
  3. =======================================
  4.  MSDOS64 -  The MS-DOS/C-64 Connection
  5.  
  6.        By Miklos Garamszeghy
  7.  
  8.            RUN it right: 
  9.     C-64; 1571 or 1581 disk drive
  10.  
  11.      We're now at the final installment in the three-part series on exchanging text and data files between MS-DOS and Commodore computers. Part 1, in the April issue of RUN, presented a program that lets a C-128 read from and write to MS-DOS disks. Last month, Part 2 added a program for formatting MS-DOS disks with either a C-128 or C-64. This month, I complete the picture with a program that enables a C-64 to read and write MS-DOS disks, providing a quick and easy way to transfer files between machines.
  12.      Although primarily intended for use with 3 1/2-inch, 720K MS-DOS disks in a 1581 drive, the program also works with 5 1/4-inch MS-DOS disks in a 1571 drive. Note that you cannot use the program with a 1541 drive, due to that drive's different method of recording data.
  13.       You can move files of up to about 30K (120 disk blocks) in size in either of two modes: Translation mode, which converts the file from PETSCII (Commodore ASCII) to true (standard) ASCII, or Binary mode, which creates a straight byte-for-byte copy. Commodore files can be sequential (SEQ), program (PRG) or user (USR); relative (REL) files and GEOS user-type files won't work. Menus and screen prompts make the MS-DOS/C-64 Connection easy to use.
  14.      In this article and the program, the terms "source" and "target" refer to disks being copied from and to, respectively. "MS-DOS" means any IBM-PC-type disk operating system, and "Commodore DOS" means the normal operating system in Commodore disk drives, including the 1571 and 1581.
  15.  
  16. THE SOURCE
  17.  
  18.      The opening menu asks for information about your source disk, starting with its type -- MS-DOS or Commodore. Enter 1 or 2 accordingly, or 3 to quit the program.
  19.      Press the return key after making your selection, then choose the device number, 1--8, of the source drive. A number outside that range will be rejected, and you'll be returned to the source-disk prompt.
  20.       Having entered a proper device number, insert the source disk into the source drive and press return to proceed. Any other key will take you back to the opening menu, should you want to change your choices.
  21.      Assuming that you press return, MS-DOS/C-64 will read the directory of the source disk. In the case of an MS-DOS disk, it will also automatically determine the disk's type (number of sides, number of sectors per track, and so forth) and decode its file allocation table (FAT), which is similar in function to the Commodore BAM (block allocation map).  Watch the screen to keep track of what's happening. This process may take a couple of minutes, mostly due to the slow speed of the serial data transfer.
  22.      On the screen, the directory takes the form of a ten-entry menu.  MS-DOS subdirectories are identified by <dir> under the file-size field, while 1581 partitions are identified by the filetype CBM.
  23.      At the top of the directory screen, you'll see the disk's name and ID (Commodore DOS) or volume label (MS-DOS), along with the number of files in the directory and the total number of bytes used by these files.  Note that the file sizes are expressed in bytes, not in the blocks to which Commodore users are accustomed.  As a result, the sizes indicated for Commodore files are only approximate (block count times 254), while the sizes of MS-DOS files, taken right from the directory entries, are exact.
  24.      As I mentioned earlier, the program won't work with relative files or GEOS-type user files, However, these files will still be listed in a Commodore DOS directory.
  25.        To select a file to read or a subdirectory to view, press the corresponding number and then the return key.  To see the next group of ten entries, press either N and return, or just return.  If you want to go back to the previous group of ten, press P and return.  To quit and go back to the opening menu without making a choice, press Q and return.
  26.        The file you select need not be in the group currently on the screen. For example, if the menu is showing files 11--20, you can still choose number 6, as long as you remember that's the one selected. Only numbers in the range from 1 to the number of files in the directory are valid.
  27.      Don't remove the source disk from the drive until you're prompted to insert another disk.  Otherwise, your file may be copied incorrectly or files on the disk you insert may get damaged.  MS-DOS/C-64 won't prompt you to insert a disk before it starts to read a file appearing on the on-screen directory, because it will assume that you haven't removed the disk containing the file.
  28.      After selecting the file to transfer, you must specify either Binary or Translation mode.  As I mentioned, Binary creates a new file that's identical to the original.  In Translation mode, the conversion between PETSCII and ASCII occurs while the file is being read into memory.
  29.  
  30. THE TARGET
  31.  
  32.      Once the file has been read into the memory buffer, it's time to specify the target disk characteristics.  At the prompt for filetype, press 1 for MS-DOS, 2 for Commodore DOS or 3 to return to the directory menu.
  33.      Assuming you want to proceed with the transfer, next select the target drive. This can be the same as the source drive or different.
  34.      Now enter a filename for your target file. For an MS-DOS file, it must take the form FILENAME.TYP, where the main name, containing up to eight characters, is followed by a period and then a 0--3-character filename extension or type. Commodore filenames can have up to 16 characters.
  35.      When writing to a Commodore disk, you must also choose the Binary or Translation transfer mode and the file type -- SEQ, PRG or USR. Most text-file transfers use sequential files.
  36.      Now insert the target disk in the drive and press return to write the file to it.
  37.      With an MS-DOS target, because a real MS-DOS operating system is not present, the program must perform several housekeeping tasks during the write operation. These include reading the MS-DOS directory and decoding the FAT, writing the file, and updating the directory and FAT on the target disk.  With a Commodore target, all this is done by the Commodore operating system automatically.
  38.      After it has written the file, the program rereads the source directory and redisplays the directory menu.  If your source and target disks were in the same drive, you'll be prompted to reinsert the source disk before the directory read.
  39.  
  40. SUBDIRECTORIES
  41.  
  42.      MS-DOS/C-64 lets you transfer files from any MS-DOS subdirectory or 1581 directory partition.  When you select an MS-DOS entry marked <dir> or a Commodore 1581 CBM file from the directory menu, the new directory is read and displayed on the screen. You can get back to the previous directory level in MS-DOS by selecting the first entry in the new directory. That entry should be <parent> <dir>.  With a 1581, you can't go back through a directory chain; you must return to the root directory, then follow the chain forward again.  All files that you write, to either an MS-DOS or Commodore disk, will appear in the root directory only; subdirectories are not supported in file writes.
  43.      The program recovers unused and scratched directory and data space on MS-DOS disks, but the Commodore DOS does this job automatically when writing to sequential or program files.
  44.  
  45. OTHER TYPES OF TRANSFERS
  46.  
  47.      While MS-DOS/C-64 is designed primarily for transferring files between MS-DOS machines and the C-64, it can be used for other purposes. One is transferring normal Commodore SEQ, PRG and USR files between a 1581 and a 1571, 1541, C-64-compatible hard drive or even an IEEE-bus type drive.
  48.       In addition to doing transfers, the program is handy for converting text files between true ASCII and PETSCII using any Commodore-compatible drive. For ASCII to PETSCII, read the file in Binary mode, then write it in Translation mode. For PETSCII to ASCII, read the file in Translation mode, then write it in Binary mode.
  49. =======================================
  50.