home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
c128
/
utilities
/
ramdosii.sfx
/
ramdos.bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1990-02-12
|
2KB
|
70 lines
5 d=peek(186)
6 poke53280,6:poke53281,6
10 rem f$="ramdos.bas":open1,d,15,"s0:"+f$:close1:savef$,d
15 if p then 320
20 print"[147]";
30 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
40 print"[221] [158]ramdisk ][ [159]installation - [153]version 1[221]"
50 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":print
60 :
100 gosub9000:if a=0 then 350
110 u=9:print"install ram disk as unit 10[157][157][157][157]";:inputu
120 : u=int(u): if u<4 or u>30 then 110
125 if f=0 then p=207: l=6: ml=25344: re=780: f$="ramdos64.bin*"
126 if f=1 then p=14: l=5: ml=8960: re=6: f$="ramdos128.bin*"
130 print "ram disk interface page is ";p;left$("[157][157][157][157][157][157]",l);:input p
140 : if f=0 and (p<2 or p>207) then 125
145 : if f=1 and (p<2 or p>32) then 125
150 a$="n": input "initialize ram disk n[157][157][157]";a$
160 : m=3: if left$(a$,1)="y" then m=0
170 :
180 if (f=0 and p=207) or (f=1 and p=14) then 280
190 : a$="n": input "check interface page: are you sure n[157][157][157]";a$
200 : if left$(a$,1)<>"y" then 20
210 :
215 rem c128 c64 what it do
220 rem $2300 $6300 --> install ram disk
230 rem 3 3 --> re-install ram disk
240 rem 6 6 --> install ram disk w/ arg: unit=.a page=.x
250 rem 9 9 --> re-install ram disk w/ arg: unit=.a page=.x
260 rem c c --> display copyright notice
270 :
280 a$="y":input"restore i/o vectors y[157][157][157]";a$
281 ifa$="n"then285
282 print " * restoring system vectors": sys 65418
285 : if f=0 then 300
290 print " * allocating graphic area for ram disk": (NULL)1,1
295 : if peek((NULL)("d7"))=0 then (NULL)0
300 print " * loading ramdisk driver"
305 : if f=0 then load f$,d,1
306 : if f=1 then (NULL) (f$)
310 :
320 sys ml+12 :rem print embedded copyright notice
325 poke re,u: poke re+1,p :rem lda unit: ldx page
330 sys ml+6+m :rem (re)install ramdisk, using unit# & page
340 :
350 print: end
360 end
370 end
380 end :rem goodbye
390 :
9000 rem verify presence of ram card
9005 :
9010 r=57088: a=1
9020 fori=2to5:poker+i,i:next
9030 fori=2to5:ifpeek(r+i)<>ithen9050
9040 next: goto9080
9050 a=0: print " ram expander not present ": return
9060 :
9070 rem determine if c64 or c128
9075 :
9080 f=abs(peek(65533)=255) :rem f=0 if c64, f=1 if c128
9090 if f then (NULL) 15 :rem select 128 system bank
9100 return
9110 :
9995 rem f.bowen 08/07/87 copyright 1987 commodore business machines, inc.
9996 :
9997 rem 2mb patches 01/03/91
9998 rem by andrew e. mileski
9999 rem alias 'recursion'