home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 32 / 032.d81 / approximator (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  1KB  |  38 lines

  1. 10 ifpeek(52821)<>32orpeek(52822)<>243thenload"approximator.ml",8,1
  2. 20 dim g$(60):bk$="[164]"
  3. 30 poke53280,.:poke53281,.:print"[147]              [193][208][208][210][207][216][201][205][193][212][207][210]"
  4. 35 printtab(9)"[153][212]ype [211][204][193][211][200] ([158]/[153]) to quit."
  5. 40 a$="":b$="":print"[155][197]nter [211]tring 1:[159]"bk$;:mo=190:nc=60:gosub60500:a$=z8$
  6. 45 ifa$="/"then60000
  7. 50 print"[155][197]nter [211]tring 2:[159]"bk$;:mo=190:nc=60:gosub60500:b$=z8$
  8. 55 ifb$="/"then60000
  9. 60 sys52821,a$,b$:print "[208]ercent correct:[150]"pc%"[144]":goto35
  10. 100 :
  11. 110 :
  12. 120 :
  13. 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  14. 60001 print"[147]";:ifer<>63thenend
  15. 60002 load"hello connect",8
  16. 60500 forz8=1tonc
  17. 60502 getz8$:ifz8$=""then60502
  18. 60503 ifz8$="[147]"orz8$=""orz8$="[148]"orz8$="[145]"orz8$="[157]"orz8$=""orz8$=""then60502
  19. 60504 ifz8$=chr$(13)orz8$=chr$(141)thenprint"[157] ":goto60544
  20. 60506 ifz8$=" "orz8$="[160]"then60540
  21. 60508 ifz8$=chr$(20)andz8=1then60502
  22. 60510 ifz8$=chr$(20)thenz8=z8-1:print"[157][157]  [157][157]";bk$;:goto60502
  23. 60520 ifz8$>"/"andz8$<":"and(moand2)then60540:numbers
  24. 60522 ifz8$>" "andz8$<"*"and(moand4)then60540:shift numbers
  25. 60524 ifz8$>"[192]"andz8$<"[219]"and(moand8)then60540:uppercase characters
  26. 60526 ifz8$>"@"andz8$<"["and(moand16)then60540:lowercase characters
  27. 60528 ifz8$>chr$(160)andz8$<chr$(192)and(moand32)then60540:commodore characters
  28. 60530 ifz8$>=chr$(0)andz8$<""and(moand64)then60540:ctrl characters
  29. 60532 ifz8$>")"andz8$<"0"and(moand128)then60540:misc characters group 1
  30. 60534 ifz8$>"9"andz8$<"a"and(moand128)then60540:misc characters group 2
  31. 60536 ifz8$>"z"andz8$<"[129]"and(moand128)then60540:misc characters group 3
  32. 60538 goto60502
  33. 60540 print"[157]";z8$;:poke212,.:printbk$;
  34. 60542 g$(z8)=z8$:next
  35. 60544 print"[157][146] "
  36. 60546 z8$="":fora=1toz8-1:z8$=z8$+g$(a):next:ifz8=1thenz8$=""
  37. 60548 return
  38.