[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving binary files to /RAM



"Simon Williams" <email@DELETE_THIS.luddite.no-ip.com> wrote in message 
news:1gr5fun.1pixfg1vgp896N%email@DELETE_THIS.luddite.no-ip.com...
> Laine Houghton <laine@intergate.com> wrote:
>
>> "Simon Williams" <email@DELETE_THIS.luddite.no-ip.com> wrote in message
>> news:1gr4l27.10w3ygd1bycnoyN%email@DELETE_THIS.luddite.no-ip.com...
>> > Is there a [hopefully simple] way to load BIN files from disk and then
>> > save them to /RAM in Applesoft?
>> >
>>
>> By SAVE I assume you mean move.
>>
>> 10 D$=CHR$(4)
>> 20 PRINT D$; "BLOAD  /DISK/BIN"
>> 30 PRINT D$;"BSAVE  /RAM/BIN, A$XXXX, L$XXXX"
>
> <snip>
>
> Thanks Laine, I was trying to do this without specifying the start
> address and length, which just gives a PATH NOT FOUND error.
>
> As a follow-up question, is there a way to first delete any existing
> files from /RAM in Applesoft?

Do you remember this program?
http://tinyurl.com/6lq6a
You could modifiy it to delete /Ram files and load all bin files from /disk 
to /Ram

 210 D$ = CHR$ (4) : DIM KILL$ (50)
 220 PN$ ="/RAM"
 280 PRINT D$;"OPEN";PN$;",TDIR"
 290 PRINT D$;"READ";PN$
 292 FOR X=1 TO 3
 295 INPUT DIR$ : REM SKIP HEADER
 297 NEXT : X=0
 300 INPUT DIR$
 320 IF DIR$  = "" GOTO 360 : REM BLANK LINE
 330 KILL$ (X) = MID$ (DIR$,2, 16)
 340 X = X + 1
 350 GOTO 300
 360 PRINT D$;"CLOSE" : X = X-1
 370 FOR LOOP =0 TO X
 380 PRINT D$ ;  "DELETE /RAM/"; KILL$(LOOP)
 390 NEXT : END