home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib38b.dsk
/
RAM.DISK.LOADER.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
3KB
|
55 lines
10 REM ******************************
20 REM * RAM.DISK.LOADER *
30 REM * BY EDWARD D. OMICCIOLI, JR *
40 REM * COPYRIGHT(C) 1990 *
50 REM * MINDCRAFT PUBL. CORP. *
60 REM * CONCORD, MA 01742 *
70 REM ******************************
80 IF PEEK(104) < >64 THEN POKE 103,1: POKE 104,64: POKE 16384,0: PRINT CHR$(4)"RUN RAM.DISK.LOADER"
90 ONERR GOTO 440
100 HOME : HTAB 15: PRINT "RAMDisk 3.3": HTAB 8: PRINT "by Edward D. Omiccioli, Jr."
110 DR = 1:DA = PEEK(981) *256: REM BOTTOM OF DOS ($9D00)
120 DEF FN DV(A) = INT(A/256): DEF FN MD(A) = A -256 * FN DV(A)
130 POKE DA, FN MD(DA -45 -256): POKE DA +1, FN DV(DA -45 -256)
140 POKE 43607, PEEK(43697): CALL 42964
150 HOME : PRINT "Do you need to format the Ram Disk?"
160 PRINT : PRINT "==>";: GET A$: PRINT A$: IF A$ = "N" OR A$ = "n" THEN 190
170 VTAB 10: HTAB 13: FLASH : PRINT "LOADING RAMDISK": NORMAL
180 F$ = "RAMDISK": PRINT CHR$(4);"BRUN ";F$;",D";DR
190 F$ = "RAMPATCH": PRINT CHR$(4);"BLOAD ";F$;",D";DR
200 IF PEEK(48390) = 76 THEN POKE 39948,3: POKE 39949,182
210 POKE (48390),76: POKE (48391),0: POKE (48392),156: REM SET PATCH
220 POKE ( -22396),0: REM DISABLE INIT
230 HOME : PRINT "Do you wish to upload to ramdisk?"
240 PRINT : PRINT "==>";: GET A$: PRINT A$: IF A$ = "N" OR A$ = "n" THEN HOME : PRINT "Ramdisk enabled in slot 3": END
250 IF A$ < >"Y" AND A$ < >"y" THEN 230
260 F$ = "FID":DR = 1
270 PRINT CHR$(4)"BLOAD ";F$;",A2051,D";DR: POKE 216,0
280 FP = 0: IF PEEK(5039) = 205 THEN FP = 1
290 HOME : VTAB 6: HTAB 3: PRINT "Place disk to upload into drive 1": HTAB 11: PRINT "and press any key."
300 HTAB 2: VTAB 10: PRINT "==>";: GET A$: PRINT A$
310 PRINT CHR$(4);"OPEN UPLOAD,S3,D1"
320 PRINT CHR$(4);"WRITE UPLOAD"
330 PRINT "MON C,I,O"
340 PRINT "CALL 2051"
350 IF FP = 1 THEN 390
360 PRINT "1": PRINT "6": PRINT "1": PRINT "3": PRINT "1"
370 PRINT "=": PRINT "N": PRINT " ": PRINT " ": PRINT "9"
380 GOTO 400
390 PRINT "M6131*": PRINT "N Q"
400 PRINT "DELETE UPLOAD"
410 PRINT CHR$(4);"CLOSE UPLOAD"
420 PRINT CHR$(4);"EXEC UPLOAD,S3,D1"
430 END
440 PRINT : POKE 216,0:ERR = PEEK(222): IF ERR = 6 THEN GOTO 470
450 IF ERR = 8 THEN HOME : VTAB 4: HTAB (16 - LEN(F$))/2: PRINT "I/O error while reading ";F$: GOTO 480
460 PRINT "ERROR #"; PEEK(222);" AT "; PEEK(218) + PEEK(219) *256: END
470 HOME : VTAB 4: HTAB (25 - LEN(F$))/2: PRINT "File ";F$;" not found"
480 PRINT : PRINT "Insert the disk containing ";F$: PRINT "and press the drive number, (1 or 2)": PRINT : PRINT "OR": PRINT : PRINT "Press E to end."
490 VTAB 15: HTAB 2: PRINT "==>";: GET A$: PRINT A$: IF A$ = "E" OR A$ = "e" THEN END
500 IF A$ < >"1" AND A$ < >"2" THEN 490
510 ONERR GOTO 440
520 DR = VAL(A$): IF F$ = "FID" THEN 270
530 HOME : VTAB 10: HTAB 13: FLASH : PRINT "LOADING RAMDISK": NORMAL
540 IF F$ = "RAMDISK" THEN 180
550 IF F$ = "RAMPATCH" THEN 190