home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 166 / 166.d81 / b.ramboot (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  126 lines

  1. 1 rem autofile editor v1.1 (c)1991 c.m.d.
  2. 2 clr:poke51,0:poke55,0:poke52,80:poke56,80:xt=20480:rem 64 setup
  3. 10 poke53280,0:poke53281,0:print"[147]    [193] u t o f i l e   [195] r e a t o r"
  4. 20 print"[159][211]ave on which device?   [157][157]";:li=2:gosub630:d=val(w$)
  5. 30 ifd<8ord>29thenprint"[145][145][145]":goto20
  6. 40 print
  7. 50 print"[159][208]artition [206]umber?    [157][157][157]";:li=3:gosub630:p=val(w$)
  8. 60 ifp<0orp>254thenprint"[145][145][145]":goto50
  9. 70 print
  10. 80 print"[159][211]ubdir if any: ";:li=16:gosub630:s$=w$
  11. 90 print
  12. 100 print"[159][197]nter your name or your one liner below":li=39:gosub630:j$=w$
  13. 110 close15:open15,d,15
  14. 120 f$="@"+mid$(str$(p),2)+"//"+s$+":ramboot c000"
  15. 130 open1,d,1,f$+",p,w"
  16. 140 print:print:input#15,a$,b$,c$,d$:printa$","b$","c$","d$
  17. 150 print:print"[215]riting autofile to disk..."
  18. 160 gosub180:print#1,j$+chr$(0);:close1
  19. 170 input#15,a$,b$,c$,d$:printa$","b$","c$","d$
  20. 171 k$="1":k=1:n$=mid$(f$,2):lf=0:tf=0:dv=d:al=0:ah=192:tr=0:se=6:a=49152
  21. 172 xt=20480:ad=xt:goto1360
  22. 180 restore
  23. 190 ready:ify<>999thenprint#1,chr$(y);:x=x+1:goto 190
  24. 200 return
  25. 630 w$="":t=0:lw=0:ifli=0thenli=35
  26. 640 geta$:as=asc(a$+chr$(0)):ifti>15thengosub730
  27. 650 ifas=34then640
  28. 660 if(a$<" "ora$>"z")and(a$<"[193]"ora$>"[218]")andas<>13andas<>20then640
  29. 670 lw=len(w$):ifas=13thent=-1:gosub730:return
  30. 680 iflw=lithenifas<>20andas<>13then640
  31. 690 ifas=20theniflw=0then640
  32. 700 ifas=20thenw$=left$(w$,len(w$)-1):t=0:gosub730:gosub730:print"[146][157] [157]";:goto640
  33. 710 w$=w$+a$:lw=len(w$):poke212,0:print"[146]"a$;:gosub730
  34. 720 goto640
  35. 730 t=nott:poke199,-t:print" [157]";:ti$="000000":return
  36. 1360 gosub1570:pokead+((k-1)*128),abs(1-int(lf/128))*128:gosub1620
  37. 1370 pokead+((k-1)*128)+1,abs(1-int(tf/128))*128:gosub1620
  38. 1400 pokead+((k-1)*128)+3,int(a/256):pokead+((k-1)*128)+2,a-(int(a/256)*256)
  39. 1410 gosub1620
  40. 1430 pokead+((k-1)*128)+4,dv:gosub1620:
  41. 1540 fori=0tolen(n$)-1:pokead+((k-1)*128)+8+i,asc(mid$(n$,i+1,1)):next
  42. 1550 pokead+((k-1)*128)+8+len(n$),0:gosub1620:goto2000
  43. 1560 end
  44. 1570 rem read sector to buffer
  45. 1580 sys57513:poke56865,tr:poke56866,se:poke56867,ad-(int(ad/256)*256)
  46. 1590 poke56868,int(ad/256):poke56869,255:poke56864,128
  47. 1600 sys65057
  48. 1610 return
  49. 1620 rem write buffer to sector
  50. 1630 sys57513:poke56865,tr:poke56866,se:poke56867,ad-(int(ad/256)*256)
  51. 1640 poke56868,int(ad/256):poke56869,255:poke56864,144
  52. 1650 sys65057
  53. 1660 return
  54. 1670 fori=0to21:poke828+i,8+i:next
  55. 1680 ifdv<8ordv>29ordv=8then1700
  56. 1690 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  57. 1700 a$="presenter":gosub1710:a$="hello connect"
  58. 1710 forj=8to29:i=peek(828+j-8):ifi=14thennext
  59. 1720 close2:open2,i,2:close2:ifstthen1740
  60. 1730 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then1760
  61. 1740 next:ifa$="presenter"thenreturn
  62. 1750 print"[147]":poke53272,23:poke186,8:poke2048,0:poke44,8:poke43,1:end
  63. 1760 a$="hello connect":q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  64. 1770 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  65. 1780 print"p[207]53272,23:run:":poke631,13:poke632,13:poke198,2:end
  66. 2000 print:print"[196]one! [193]ny key for [204][207][193][196][211][212][193][210].
  67. 2010 [161]a$:[139]a$[178]""[167]2010
  68. 2020 [137]1670
  69. 4020 [131]0,192
  70. 4030 [131] 160,039,185,120,004,153,160
  71. 4040 [131] 004,169,032,153,120,004,185
  72. 4050 [131] 040,004,153,120,004,169,032
  73. 4060 [131] 153,040,004,169,003,153,120
  74. 4070 [131] 216,153,160,216,136,016,223
  75. 4080 [131] 160,000,185,128,193,240,003
  76. 4090 [131] 200,208,248,152,074,133,251
  77. 4100 [131] 169,020,056,229,251,168,162
  78. 4110 [131] 001,024,032,240,255,160,000
  79. 4120 [131] 185,128,193,240,006,032,210
  80. 4130 [131] 255,200,208,245,160,000,140
  81. 4140 [131] 033,208,140,032,208,162,005
  82. 4150 [131] 160,000,024,032,240,255,185
  83. 4160 [131] 239,192,201,255,240,006,153
  84. 4170 [131] 167,002,200,208,243,169,167
  85. 4180 [131] 133,176,169,002,133,177,169
  86. 4190 [131] 000,133,155,169,019,032,210
  87. 4200 [131] 255,160,160,169,007,145,243
  88. 4210 [131] 136,208,251,162,000,160,039
  89. 4220 [131] 177,209,009,128,145,209,189
  90. 4230 [131] 041,193,145,243,136,016,242
  91. 4240 [131] 169,013,032,210,255,232,224
  92. 4250 [131] 003,208,230,169,003,141,134
  93. 4260 [131] 002,160,000,185,044,193,240
  94. 4270 [131] 006,032,210,255,200,208,245
  95. 4280 [131] 160,024,185,217,000,009,128
  96. 4290 [131] 153,217,000,136,016,245,160
  97. 4300 [131] 000,032,208,192,160,012,032
  98. 4310 [131] 208,192,160,022,032,208,192
  99. 4320 [131] 160,030,076,208,192,169,001
  100. 4330 [131] 153,200,216,153,240,216,200
  101. 4340 [131] 153,200,216,153,240,216,160
  102. 4350 [131] 039,169,121,153,000,004,169
  103. 4360 [131] 120,153,080,004,136,016,243
  104. 4370 [131] 096,080,207,053,051,051,055
  105. 4380 [131] 048,044,048,013,000,064,036
  106. 4390 [131] 058,042,013,000,082,213,058
  107. 4400 [131] 013,000,076,201,058,013,000
  108. 4410 [131] 080,207,053,051,051,055,049
  109. 4420 [131] 044,048,013,000,064,084,013
  110. 4430 [131] 000,064,032,034,067,068,058
  111. 4440 [131] 013,000,064,032,032,034,083
  112. 4450 [131] 058,000,255,001,015,012,013
  113. 4460 [131] 013,070,049,058,032,078,079
  114. 4470 [131] 082,077,065,076,032,032,070
  115. 4480 [131] 051,058,032,068,073,082,032
  116. 4490 [131] 032,032,070,053,058,032,082
  117. 4500 [131] 085,078,032,070,055,058,032
  118. 4510 [131] 076,073,083,084,013,070,050
  119. 4520 [131] 058,032,084,085,082,066,079
  120. 4530 [131] 032,032,032,070,052,058,032
  121. 4540 [131] 084,089,080,069,032,032,070
  122. 4550 [131] 054,058,032,067,068,032,032
  123. 4560 [131] 070,056,058,032,083,058,070
  124. 4570 [131] 073,076,069,013,014,000
  125. 4590 [131] 999
  126.