Meneer_Jansen

Appendix C. File management

Jul 3rd, 2020 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. .------------------------------------------------.
  2. ( A P E N D I X C : F I L E M A N A G E M E N T )
  3. `------------------------------------------------ยด
  4.  
  5.  
  6. o==========o
  7. | Contents |
  8. o==========o
  9.  
  10. general contents: https://pastebin.com/hmpJmurr
  11.  
  12. A. General
  13.  
  14. B. When channel is still open
  15.  
  16. X. References
  17.  
  18. -<>-<>-<>-<>-<>-<>-
  19.  
  20.  
  21.  
  22. o============o
  23. | A. General |
  24. o============o
  25.  
  26. I like using the 'The C64' clone [2]. It does not support 2 disk drives. So in that case, if one has to copy a file from one disk image to another, one can use disk swapping or a (virtual) RAM disk. Use the nice program 'DraCopy' for this (supports REU) [3].
  27.  
  28. I do not know if it is possible from the command line (i.e. BASIC) to copy files from one drive to another (RAM drive). If that's possible then one might use use the cartridge 'Super Snapshot'. It has a shortcut for opening and closing a channel to a floppy drive: the ">" character. It can also rearrange files.
  29.  
  30. Save
  31. ~~~~
  32. SAVE "program name",8
  33.  
  34. Rename
  35. ~~~~~~
  36. OPEN 1,8,15,"R0:new name=old name":CLOSE 1
  37.  
  38. Delete (scratch)
  39. ~~~~~~~~~~~~~~~~
  40. OPEN 1,8,15,"S0:file name":CLOSE 1
  41.  
  42. Validate
  43. ~~~~~~~~
  44. OPEN 1,8,15,"V0:":CLOSE 1
  45.  
  46. Overwrite
  47. ~~~~~~~~~
  48. This is the infamous save-with-replace command. Only use on a 1541-II drive or newer. This command may mess up a complete disk on a 1541 drive. SAVE "@0:MY PROGRAM",8
  49.  
  50.  
  51. o===============================o
  52. | B. When channel is still open |
  53. o===============================o
  54.  
  55. Open with:
  56.  
  57. OPEN 1,8,15
  58.  
  59. Delete (if 1 is what I call the "channel number", oficially it's "file number"):
  60.  
  61. PRINT# 1, "S0:file name"
  62.  
  63. Close with:
  64.  
  65. CLOSE 1
  66.  
  67. See [1] page 14.
  68.  
  69.  
  70. o===============o
  71. | X. References |
  72. o===============o
  73.  
  74. [1] "Commodore 1541 disk drive user's guide", Commodore Business Machines Electronics Ltd. (sept. 1982).
  75.  
  76. [2] The C64 Microcomputer (clone):
  77. https://retrogames.biz/thec64
  78.  
  79. [3] DraCopy version 1.0e:
  80. https://csdb.dk/release/?id=165305
Add Comment
Please, Sign In to add comment