home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #7
/
Commodore_Disk_User_Vol.3_7_1990_-.d64
/
prob1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
34 lines
1 rem *********************************
2 rem * *
3 rem * (c) commodore disk user 1990 *
4 rem * *
5 rem * techno info - problem one *
6 rem * *
7 rem *********************************
8 :
9 :
10 poke53280,14:poke53281,6:print"[147][142]this program creates and saves a small"
15 print"chunk of machine code that will","automatically load and run a basic"
20 print"program with a flashing border. now, to load your program you should type:
25 [153]," load"[199](34)"loader"[199](34)",8,1
30 print"please supply the name of the basic","program to be loaded by the code"
35 print":";:open1,0:input#1,a$:close1:l=len(a$):ifl>16thenrun
40 print:print"ok. please insert disk onto which loaderis to be saved (device 8)"
45 fori=0to113:reada:poke49152+i,a:next:b$="[198][147]"+chr$(34)+"loader"+chr$(34)
50 b$=b$+",8,1":fori=0to12:b$=b$+chr$(0):next:poke49210,l
55 fori=1tol:poke49265+i,asc(mid$(a$,i,1)):next:print"then press any key"
60 poke198,0:wait198,1:poke198,0:open15,8,15,"i":input#15,z:close15
65 ifz<>0thenprint"[147]disk error. press a key":poke198,0:wait198,1:poke198,0:run
67 print"[145]saving loader... please wait"
70 open2,8,1,"@:loader,p,w":print#2,"";:fori=1to46
75 print#2,mid$(b$,i,1);:next:fori=0to129:print#2,chr$(peek(49152+i));:next
80 fori=0to82:print#2,"";:next:print#2,"l.";:close2:open15,8,15:input#15,z
85 close15:ifz<>0thenprint"[147]disk error. press a key":poke198,0:wait198,1:poke198,0:run
90 print"[147]loader successfully saved to disk...":end
95 data162,0,169,32,157,0,4,157,0,5,157,0,6,157,232,6,232,208,241,169,0,32,144
100 data255,162,6,142,33,208,189,153,1,157,166,2,202,208,247,162,167,160,2,142
105 data40,3,140,41,3,169,8,162,8,160,1,32,186,255,169,,162,160,160,1,32,189
110 data255,169,,162,255,160,255,32,213,255,134,45,132,46,169,192,32,144,255
115 data162,237,160,246,142,40,3,140,41,3,232,142,32,208,32,94,166,32,142,166
120 data32,174,167,96,238,32,208,76,237,246