--- title: "RAM-Disk Backup/Restore Utility" type: "article" slug: "ram-disk-backup-restore-utility" url: "http://localhost/article/ram-disk-backup-restore-utility/" markdown_url: "http://localhost/article/ram-disk-backup-restore-utility.md" published_at: "2026-11-25T23:10:18+00:00" modified_at: "2026-11-27T10:36:06+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Some time ago I purchased a Larken RAM-DISK but only just recently got around to getting any RAM for it. I started with 128K. The first thing I discovered was that of the six different disk/file copy programs I have, none of them would make a backup copy of the RAM-DISK! The catalog area of…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "LARKEN Electronics" slug: "larken-electronics" taxonomy: "post_tag" url: "http://localhost/tag/larken-electronics/" - name: "LKDOS" slug: "lkdos" taxonomy: "post_tag" url: "http://localhost/tag/lkdos/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Richard Hurd" slug: "richard-hurd" taxonomy: "indiv" url: "http://localhost/indiv/richard-hurd/" publication_r: id: 21216 title: "The Plotter" type: "periodical" url: "http://localhost/periodical/the-plotter/" authors: "Richard Hurd" volume: "6" issue: "12" issues_articles: - id: 39464 title: "The Plotter v6 n12" type: "issue" url: "http://localhost/issue/the-plotter-v6-n12/" pages: "3-5" pubdate: "December 1988" archive_link: false --- # RAM-Disk Backup/Restore Utility Some time ago I purchased a [Larken RAM-DISK](http://localhost/product/ramdisk/) but only just recently got around to getting any RAM for it. I started with 128K. The first thing I discovered was that of the six different disk/file copy programs I have, none of them would make a backup copy of the RAM-DISK! The catalog area of the directory track (block 0) on the RAM-DISK does not start at the same address as the catalog area of a directory track on a formatted disk. This is fine according to the rules of LKDOS programming, which is highly flexible. Anyway, I wrote a little program to do it. It, like the other LKDOS copy programs, does not follow the rules. It is written especially for backing up and restoring the RAM-DISK! The RAM-DISK Backup/Restore Utility 1 double-sided disk drive. It can be either double or quad density. It copies ALL FORMATTED tracks of the RAM-DISK. It could be re-written for a single-sided drive, but the 48 tracks/blocks of a 256K RAM-DISK would not fit on a 42 track disk! I don’t want to totally dedicate the RAM-DISK to any one application. Keep your options open. Using the RAM-DISK BACKUP/RESTORE UTILITY makes it a snap to use the RAM-DISK for any other application that you might want. And, of course, you never know when those batteries might give out! ``` 10 REM *********************** 20 REM RAMDISK BACKUP & RESTORE UTILITY 30 REM (C)1988 by Richard Hurd for the public domain 40 REM REQUIRES 1 40 (DD) OR 1 80 (QD) FLOPPY DRIVE. 50 REM 1 FORMATTED DISK FOR THE DRIVE. FORMATTED EITHER WITH THE DISK FORMAT PROG. OR THE EXT. BASIC COMMAND: FORMAT "n", WHERE N=NUMBER OF RAM CHIPS. 100 REM *********************** 110 LET read=40001: LET write=40021: LET trak=40000: LET mem=40075 120 PRINT TAB 13;"LKDOS";AT 2,1;"RAMDISK BACKUP/RESTORE UTILITY" 125 PRINT AT 6,3;"1) Backup RAM-DISK"''TAB 3;"2) Restore RAM-DISK"'''TAB 7;"Choose 1 Or 2" 130 IF INKEY$="" THEN GO TO 130 135 IF INKEY$<"1" OR INKEY$>"2" THEN BEEP .2,0: GO TO 130 140 IF INKEY$="1" THEN LET sourc=4: INPUT "BackUp "; FLASH 1;" TO "; FLASH 0;" Which Drive? ";dest 145 IF INKEY$="1" THEN IF dest<0 OR dest>3 THEN BEEP .2,0: GO TO 140 150 IF INKEY$="2" THEN LET dest=4: INPUT "Restore "; FLASH 1;" FROM "; FLASH 0;" Which Drive? ";sourc 155 IF INKEY$="2" THEN IF sourc<0 OR dest>3 THEN BEEP .2,0: GO TO 150 160 CLS : IF sourc=4 THEN PRINT ''"Insert Backup Disk In Drive #";dest;"." 165 IF dest=4 THEN PRINT ''"Insert Source Disk In Drive #";sourc;"." 170 IF dest<>4 THEN PRINT ''''''''TAB 4;"Press SpaceBar To Backup" 175 IF sourc<>4 THEN PRINT ''''''''TAB 4;"Press SpaceBar To Restore" 180 PRINT 'TAB 8;"*** RAMDISK ***" 183 IF INKEY$<>"" THEN GO TO 183 185 IF INKEY$="" THEN GO TO 185 190 IF dest<>4 THEN PRINT '''TAB 6;"Backing Up RAM-DISK" 195 IF dest=4 THEN PRINT '''TAB 7;"Restoring RAM-DISK" 200 PRINT #4: GO TO sourc 205 POKE trak,0: RANDOMIZE USR read 210 LET stks=PEEK (mem+20)*PEEK (mem+21) 220 PRINT #4: GO TO dest 230 RANDOMIZE USR write 240 FOR f=1 TO (stks-1) 250 PRINT #4: GO TO sourc 260 POKE trak,f: RANDOMIZE USR read 270 PRINT #4: GO TO dest 280 RANDOMIZE USR write 290 NEXT f 300 CLS : PRINT #4: CAT "", 310 STOP 9000 REM cartridge access/move code subroutines 9010 RESTORE 9100 9020 FOR f=40001 TO 40074 9030 READ code 9040 POKE f,code 9050 NEXT f 9060 RUN 9100 DATA 205,105,156,58,64,156 9110 DATA 50,29,32,205,126,0 9120 DATA 205,123,0,205,115,156 9130 DATA 24,25,205,105,156,58 9140 DATA 64,156,50,29,32,205 9150 DATA 126,0,205,127,156,205 9160 DATA 120,0,24,5,243,205 9170 DATA 98,0,201,58,100,0 9180 DATA 251,201,33,112,32,17 9190 DATA 139,156,1,0,20,237 9200 DATA 176,201,33,139,156,17 9210 DATA 112,32,1,0,20,237 9220 DATA 176,201 9995 PAPER 7: INK 9: BORDER 7: CLEAR 39999: RANDOMIZE USR 100: OPEN #4,"dd" 9996 GO TO 9000 9999 PRINT #4: SAVE "RDBKUP.B1" LINE 9995 ```