10 ifdtheninput#1,a$,b$,c$,d$:db=val(a$):return 20 print"{clear}{text}{2down}Power-up device number changer for 1581 30 print"What is the current device number 40 print"of the 1581 that you are using 50 input"to create this autoloader";d 60 ifd<8ord>30thenprint"{down}It must be between 8 and 30.{down}":goto30 70 print"{down}With what device number should this 80 input"autoloader make a drive boot up";t 90 ift>=12andt<=30then180 100 ift<8ort>30thenprint"{down}It must be between 8 and 30.":goto70 110 print"{2down}If you want a 1581 to power up as 120 print"device 8, 9, 10, or 11 all the time, 130 print"it is better to use the DIP switches. 140 print"Make the autoloader anyway? (y/n) "; 150 gety$:ify$="n"ory$="N"thenprint"no":end 160 ify$<>"y"andy$<>"Y"then150 170 print"yes 180 open1,d,15,"i0":print#1,"/":gosub10:ifdb<20then220 190 close1:printa$","b$","c$","d$ 200 print"There is a problem getting to the 210 print"disk's root directory.{down}":end 220 open2,d,4,"0:copyright cbm 86,u,w":gosub10:ifdb<20then290 230 close2:ifdb<63ordb>64thenprinta$","b$","c$","d$:close1:end 240 print"This disk already has an autoload file. 250 print"Do you wish to replace it? (y/n) "; 260 gety$:ify$="n"ory$="N"thenprint"no":close1:end 270 ify$<>"y"andy$<>"Y"then260 280 print"yes":print#1,"s0:copyright cbm 86":gosub10:goto220 290 j$="":fori=1to15:readj:ifj<.thenj=t-j 300 j$=j$+chr$(j):next:print#2,j$;:close2:t$=mid$(str$(t),2) 310 print"{2down}The autoloader is written. If you turn 320 print"a 1581 on or reset it with that disk 330 print"inside, it starts as device #"t$ 340 print"regardless of its DIP switch settings. 350 print"{down}Reset the 1581 now? (y/n) "; 360 gety$:ify$="n"ory$="N"thenprint"no":close1:end 370 ify$<>"y"andy$<>"Y"then360 380 print"yes":print#1,"ui":close1:open3,t,15,"i0":close3 390 print"The 1581 is now device #"t$ 400 data 0,3,11,169,-32,133,119,73,96,133,120,76,90,255,-35