home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 70 / 070.d81 / input.bas (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  1KB  |  34 lines

  1. 9000 t=-1:cp=0:x=peek(211):y=peek(214):l=peek(648)*256+y*40+x:ifli=0thenli=39
  2. 9010 in=0:ifpeek(l)=32orpeek(l)=96orpeek(l)=160orpeek(l)=224thenw$=""
  3. 9020 fori=l+54272tol+54272+li:pokei,peek(646):next
  4. 9030 geta$:on-(ti>15)gosub9170:ifa$=""then9030
  5. 9040 on-(a$="")-2*(a$="[157]")-3*(a$=chr$(13))-4*(a$="")goto9120,9140,9310,9180
  6. 9050 on-(a$=chr$(20))-2*(a$=chr$(148))-3*(a$="")goto9190,9210,9280
  7. 9060 if(a$<" "ora$>"_")thenifa$<"[193]"ora$>"[218]"then9030
  8. 9070 iflen(w$)>=lithen9030
  9. 9080 on-(cp<len(w$))-2*(cp>=len(w$))goto9090,9110
  10. 9090 w$=left$(w$,cp)+a$+mid$(w$,cp+1-in):gosub9160:cp=cp+1:gosub9290:gosub9300
  11. 9100 goto9030
  12. 9110 w$=w$+a$:gosub9160:cp=cp+1:printa$;:goto9030
  13. 9120 iflen(w$)thenifcp<len(w$)thengosub9160:cp=cp+1:gosub9170:poke212,0:print"";
  14. 9130 goto9030
  15. 9140 iflen(w$)thenifcp>0thengosub9160:cp=cp-1:poke212,0:print"[157]";:gosub9170
  16. 9145 ifni=1thenin=-1:ni=0
  17. 9150 goto9030
  18. 9160 iftthenreturn
  19. 9170 pokel+cp,peek(l+cp)+128and255:ti$="000000":t=nott:return
  20. 9180 in=notin:goto9030
  21. 9190 on-(cp=0)-2*(cp<len(w$)andcp>0)-3*(cp>=len(w$))goto9030,9230,9270
  22. 9200 goto9030
  23. 9210 iflen(w$)<lithenpoke631,32:poke632,157:poke198,2:ifin=-1thenni=1:in=0
  24. 9220 goto9030
  25. 9230 ifcp>1then9250
  26. 9240 gosub9160:w$=mid$(w$,cp+1):gosub9290:goto9260
  27. 9250 gosub9160:w$=left$(w$,cp-1)+mid$(w$,cp+1):gosub9290
  28. 9260 poke211,x+cp:poke214,y:sys58732:cp=cp-1:goto9030
  29. 9270 gosub9160:w$=left$(w$,len(w$)-1):gosub9290:print"[157]";:cp=cp-1:goto9030
  30. 9280 gosub9160:cp=0:gosub9170:goto9030
  31. 9290 poke211,x:poke214,y:sys58732:printw$" ";:return
  32. 9300 poke211,cp+x:poke214,y:sys58732
  33. 9310 gosub9160:return
  34.