home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 July / 1993-07.d64 / type (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  46 lines

  1. 10 rem copyright 1993 compute publications intl ltd - all rights reserved
  2. 20 rem typewriter simulator
  3. 30 poke53281,0:poke53280,0:open1,4:print"[147]"spc(8)"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
  4. 40 print"        [194][129]typewriter simulator[194]":printspc(8)"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
  5. 50 print"[159]          menu of operations:"
  6. 60 print"       [158]1[146] set up form in printer"
  7. 70 print"       [158]2[146] set up l-r pointer"
  8. 80 print"       [158]3[146] input typing routine"
  9. 90 print"       [158]4[146] extra line feeds"
  10. 100 print"       [158]5[146] quit program"
  11. 110 gosub440:onval(a$)goto120,190,250,410,430:goto110
  12. 120 print"to align the form, enter the horizontal"
  13. 130 print"column where a repeated [129]x can be printed"
  14. 140 print"use space to repeat the [129]x and return to exit";
  15. 150 print".  enter column number:";:inputn
  16. 160 print#1,spc(n)"x":print#1,chr$(27);chr$(106);chr$(0):print#1,chr$(27);"@";
  17. 170 gosub440:ifa$=chr$(32)then160
  18. 180 ifa$=chr$(13)then50
  19. 190 print"enter an [158]l if you are planning to"
  20. 200 print"orient your entries to the left":print
  21. 210 print"enter an [158]r if you are planning to"
  22. 220 print"orient ypur entries to the right":print"l/r?  ";:gosub440:m$=a$
  23. 230 printm$:ifm$<>"l"andm$<>"r"then190
  24. 240 goto50
  25. 250 printchr$(14)
  26. 260 ifm$<>"l"andm$<>"r"thenprint"[129]    l or r locator ?":printchr$(142):goto190
  27. 270 print"[147]     [197]nter an up arrow ([158]^) to quit"
  28. 280 lo$="[204][197][198][212]":ifm$="r"thenlo$="[210][201][199][200][212]"
  29. 290 a$="":print" [197]nter the print position for your ";lo$;:input" margin";a$
  30. 300 ifa$=chr$(94)thenprint"[147]"chr$(142):goto50
  31. 310 ifval(a$)>80ora$=""then250
  32. 320 p=val(a$):a$="":print"     [197]nter phrase to be printed":inputa$
  33. 330 ifa$=chr$(94)thenprint"[147]"chr$(142):goto50
  34. 340 ifm$="l"thenn=p:ifn+len(a$)>80thenprint"[206][207][160][210][207][207][205][160][212][207][160][208][210][201][206][212]":goto290
  35. 350 ifm$="r"thenn=p-len(a$)+1:ifn<0thenprint"[206][207][160][210][207][207][205][160][212][207][160][208][210][201][206][212]":goto290
  36. 360 print#1,spc(n);a$:print#1,chr$(27);chr$(106);chr$(0):print#1,chr$(27);"@";
  37. 370 print"     [204]ine feed? [217]/[206]   ";:gosub440:printa$
  38. 380 ifa$=chr$(94)thenprint"[147]"chr$(142):goto50
  39. 390 ifa$="y"thenprint#1,"":goto250
  40. 400 goto250
  41. 410 print"     enter number of line feeds";:inputa$:ifval(a$)=0then50
  42. 420 fori=1toval(a$):print#1:next:goto50
  43. 430 close1:end
  44. 440 a$="":geta$:ifa$=""then440
  45. 450 return
  46.