home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 41 / q41.d81 / t.lrr270 < prev    next >
Text File  |  2022-08-28  |  26KB  |  484 lines

  1.  
  2.  
  3.             LITTLE RED READER  Version 2.70  [February 16, 1998]
  4.  
  5.          MS-DOS file reader/writer for the C128 and 1571/81/FD drives.
  6.  
  7.                       by Craig Bruce  (csbruce@pobox.com)
  8.  
  9.     Little Red Reader (LRR) is a program for the C128 that will read and
  10. write files to and from MS-DOS floppy disks using a 1571, 1581, CMD FD-
  11. 2000, or CMD FD-4000 disk drive. With the FD drives, you can use High
  12. Density (HD) MS-DOS disks. The program copies files from drive to drive (no
  13. internal buffering), so you need a second disk drive (either real or
  14. virtual) to copy files to. You can use RAMDOS for the second drive if you
  15. have an REU and you execute a GRAPHIC CLR after starting it up. The menu-
  16. driven full-screen user interface is written in BASIC so it is mildly
  17. sluggish, but the actual file copying is written in machine language and
  18. operates as fast as the disk drives will go.
  19.  
  20.  
  21.  1. INTRODUCTION
  22.  
  23.     This document presents a program that reads and writes MS-DOS files and
  24. the root directory of MS-DOS disks. The program copies only from drive to
  25. drive without buffering file data internally. This is simpler and imposes
  26. no limits on the size of the files transferred, although it requires the
  27. use of two disk drives (or a logical drive). The user-interface code is
  28. written in BASIC and presents a full-screen file selection menu. The grunt-
  29. work code is written in assembly language and operates at maximum
  30. velocity.
  31.  
  32.     The program also allows MS-DOS files to be deleted and to allows the
  33. copying of Commodore-DOS files between CBM-DOS disks (this makes it more
  34. convenient to use the program with a temporary logical drive like RAMDOS).
  35. Also, since I have a CMD FD-4000 floppy disk drive, I know that this
  36. program works with MS-DOS disks with this drive (for both the 720K and
  37. 1.44M MS-DOS formats). The FD disk drives are logically referred to below
  38. as being the 1581.
  39.  
  40.     The Burst Command Instruction Set of the 1571/81 is used to read the
  41. MS-DOS disk blocks and the standard kernel routines are used for outputting
  42. the data. (I am an operating systems specialist, so I call it a kernEl!)
  43. Thus, the MS-DOS files must be read from a 1571 or 1581 disk drive, but the
  44. output device may be any disk drive type, the screen or a printer, or a
  45. virtual drive type such as RAMLink, RAMDrive, or RAMDOS (for the REU). It
  46. is interesting to note that the data can be read in from an MS-DOS disk
  47. faster than it can be written out to a 1571, 1581, or even a RAMDOS file. A
  48. RAMLink can swallow the data only slightly faster than it can be read.
  49.  
  50.     Little Red Reader (LRR) supports double density 3.5" disks formatted
  51. with 80 tracks, 9 sectors per track, and 2 sides with a 1581 and 5.25"
  52. double density disks formatted with 40 tracks, 9 sectors per track, and 2
  53. sides with a 1571, and more recently, high density 3.5" disks formatted
  54. with 80 tracks, 18 sectors per track, 2 sides, and a "12-bit FAT". A limit
  55. of 224 directory entries and 9 File Allocation Table (FAT) sectors is
  56. imposed. There must be 2 copies of the FAT and the cluster size may be 1 or
  57. 2 sectors. The sector size must be 512 bytes.
  58.  
  59.     The program runs on either the 40 or 80-column screens, but you will
  60. get much better performance from the BASIC portion of the program by being
  61. in 80-column mode and FAST mode. A modification that someone might want to
  62. make would be to spread-out the display for the 80-column screen and add
  63. color to the rather bland display.
  64.  
  65.     Oh, about the name. It is a play on the name of another MS-DOS file
  66. copier available for the C-128. "Little" means that it is smaller in scope
  67. than the other program, and "Red" is a different primary color to avoid any
  68. legal complications. It is also the non-white color of the flag of the
  69. country of origin of this program (no, I am not Japanese). Also, this
  70. program is Public Domain Software, as is all software I develop for 8-bit
  71. Commodore Computers. Feel free to E-mail me if you have questions or
  72. comments about this article.
  73.  
  74.  
  75.  2. USER GUIDE
  76.  
  77.     LOAD and RUN the "lrr270" BASIC program file. When the program is first
  78. run, it will display an "initializing" message and will load in the binary
  79. machine language package from the "current" Commodore DOS drive (the
  80. current drive is obtained from PEEK(186) - the last device accessed). The
  81. binary package is loaded only on the first run and is not reloaded on
  82. subsequent runs if the package ID field is in place.
  83.  
  84.     The system is designed to have two file selection menus: one for the
  85. MS-DOS disk drive, and one for the Commodore-DOS disk drive (which may be a
  86. logical disk drive). The idea for copying is that you select the files in
  87. one of these menus, and then program knows to copy them to the disk for the
  88. other menu.
  89.  
  90.  
  91.  2.1. MS-DOS MENU
  92.  
  93.     The main screen of the program is then displayed. The main screen of
  94. the program will look something vaguely like this:
  95.  
  96.    MS-DEV=9    MS-TYPE=1581    CBM-DEV=8
  97.  
  98.    NUM  S  TRN  TYP  FILENAME  EXT  LENGTH
  99.    ---  -  ---  ---  --------  ---  ------
  100.      1  *  ASC  SEQ  HACK4     TXT  120732
  101.      2     BIN  PRG  RAMDOS    SFX   34923
  102.  
  103.    D=DIRECTORY  M=MS-DEV  F=CBM-DEV Q=QUIT
  104.    T=TOGGLE-COLUMN, C=COPY-FILES, +/- PAGE
  105.  
  106.  except that immediately after starting up, "<directory not loaded>" will
  107. be displayed rather than filenames. The "MS-DEV" and "MS-TYPE" fields give
  108. the device number and type of the drive containing the MS-DOS disk to copy
  109. from, and the "CBM-DEV" gives the device number of the drive/virtual
  110. drive/character device to copy file data to. The number of bytes free on
  111. the drive are also displayed (which is useful to know when writing files)
  112. and there are some more commands.
  113.  
  114.     Information about all MS-DOS files in the root directory of the MS-DOS
  115. disk is displayed in columns below the drive information. "NUM" gives the
  116. number of the MS-DOS file in the directory listing, and "S" indicates
  117. whether the file is "selected" or not. If the file is selected, an asterisk
  118. (*) is displayed; otherwise, a blank is displayed. When you later enter
  119. Copy Mode, only the files that have been "selected" are copied.
  120.  
  121.     The "TRN" field indicates the character translation scheme to be used
  122. when the file is copied. A value of "BIN" (binary) means no translation and
  123. a value of "ASC" (ascii) means the file characters are to be translated
  124. from MS-DOS ASCII (or "ASCII-CrLf") to PETSCII. The "TYP" field indicates
  125. the type of Commodore-DOS file to create for writing the MS-DOS file
  126. contents into. The possible values are "SEQ" (sequential) and "PRG"
  127. (program). The values of the TRN and TYP fileds are set independently, so
  128. you can copy binary data to SEQ files and ascii data to PRG files if you
  129. wish.
  130.  
  131.     The "FILENAME" and "EXT" fields give the filename and extension type of
  132. the MS-DOS files and "LENGTH" gives the exact length of the files in bytes.
  133. Note that if you perform "ASC" translation on a file, its PETSCII version
  134. will have a shorter length.
  135.  
  136.  
  137.  2.2. USER COMMANDS
  138.  
  139.     The bottom of the screen gives the command summary. After starting the
  140. program, you will want to setup the MS-DOS and CBM-DOS drives with the "M"
  141. and "F" commands. Simply press the (letter) key corresponding to the
  142. command name to activate the command. Pressing M will prompt you for the
  143. MS-DOS Drive Number and the MS-DOS Drive Type. In both cases, type the
  144. number and press RETURN. (Sorry for insulting all non-novices out there,
  145. but I want to be complete). The MS-DOS drive number cannot be the same as
  146. the CBM-DOS drive number (since the program copies from drive-to-drive
  147. without internal buffering). For the drive type, enter an "8", "81", or
  148. "1581" for a 1581 drive or FD-series drive, or a "7", "71", or "1571" for a
  149. 1571 drive.
  150.  
  151.     Pressing F will prompt you for the CBM-DOS device number. You may enter
  152. a number from 0 to 30, except that it must not be the MS-DOS drive number.
  153. Enter a "1" for Cassette Drive (God forbid!), a "3" for the screen, a "4"
  154. for the printer (with an automatic secondary address of 7 (lowercase)), any
  155. number above 7 for a Commodore disk drive or special virtual drive, or a
  156. value of "0" for the special "null" drive. A CBM-DEV value of 0 will case
  157. the program to read MS-DOS files and do nothing with t