home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore 64 Scene Diskmags Assortment
/
Vision_02_19xx_Vision_Side_C.d64
/
ldfile.b
(
.txt
)
next >
Wrap
Commodore BASIC
|
2023-02-26
|
877b
|
49 lines
0 rem mozart sat11dec93
1 rem load a file in basic
2 :
4 il%=10:a$="":a=0:lo=0
5 dv=peek(186):ze$=chr$(0):fi$=""
6 en=0:em$="":et=0:es=0
9 :
10 close15:open15,dv,15:close15
11 if st=0 then20
12 print"[150][196]evice not present"
13 goto90
19 :
20 open15,dv,15:rem command channel
29 :
30 input"[159][198]ilename to load[158]";fi$
31 if len(fi$)<1 then30
32 fi$=fi$+",p"
39 :
40 open il%,dv,0,fi$:rem input channel
41 gosub1000:rem check drive channel
42 if en>19 and en<>73 then90
43 :
44 print"[159][204]oading file ... [158]";fi$;"[159]"
49 :
50 gosub1100:rem input a byte
51 lo=a:rem lo byte header address
52 gosub1100
53 lo=lo+(256*a):rem hi byte
59 :
60 gosub1100
61 poke lo,a:rem process byte first
62 lo=lo+1
63 if st=0 then60:rem test later
69 :
90 print"[159]":close il%:close 15
91 clr:end:rem exit
99 :
1000 rem drive channel i/o check
1010 input#15,en,em$,et,es
1020 if en<20 or en=73 then return
1030 print"[150]";en;em$;et;es
1040 return
1099 :
1100 rem input a byte
1110 get#il%,a$
1120 a=asc(a$+ze$)
1130 return
1199 :