home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / commodore-scene-files / Coverdisks / CDU / V2D1.D64 / texted (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2019-04-13  |  19.7 KB  |  273 lines

  1. 5 REM*******************************
  2. 10 REM SET UP MACHINE CODE AND SPRITES
  3. 15 REM*******************************
  4. 20 SYS57812"TEXTEDS",8,1:SYS62631:SYS57812"CONTROL",8,1:SYS62631
  5. 25 POKE2040,225:POKE2041,226:POKE2042,227:POKE2043,230:POKE2044,229
  6. 30 POKE2045,228:POKE2046,231:POKE2047,232:V=53248:FORT=V+39TOV+46:POKET,7:NEXT
  7. 35 FORY=3TO15STEP2:POKEV+Y,230:NEXT:FORX=2TO14STEP2:G=G+30:POKEV+X,G:NEXT:POKEV+39,5:POKEV,30:POKEV+1,23
  8. 40 POKE49153,5:POKEV+21,255:SYS49152
  9. 42 OPEN15,8,15,"I":CLOSE15:OPEN14,8,15
  10. 45 REM********************************
  11. 50 REM INITIALISE
  12. 55 REM******************************
  13. 60 VO=15:POKE54296,15:POKE53280,0:POKE53281,0:PRINTCHR$(14),CHR$(8):POKE646,I
  14. 65 PRINT"[147]";:DIMTEXT$(500):LL=1:PL=1
  15. 70 TEXT$(0)="[158][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178]"
  16. 75 TEXT$(1)="[158][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][146]"
  17. 80 DEFFNA(P)=1024+20*40+P:DEFFNB(P2)=1024+40*P2:POKE54277,25:POKE54278,00
  18. 81 GOSUB260
  19. 90 REM******************************
  20. 95 REM EDIT LINE
  21. 100 REM******************************
  22. 105 A$=" ":SYS49152
  23. 110 P=0:PRINT"";A$
  24. 115 CH=PEEK(FNA(P)):POKE54272+FNA(P),5:POKEFNA(P),111
  25. 120 PRINT"COLUMN:";P;"[157] WORD COUNT:";WC;"[157] ";
  26. 125 PRINT"LENGTH:";LL:POKEFNA(P),CH:IFPEEK(56320)=111THENGOSUB690
  27. 130 GETT$:IFT$=""THENGOTO115
  28. 135 POKE54276,17:POKE54273,100:POKE54272,255
  29. 136 POKE54276,16
  30. 140 IFT$=CHR$(13)ORLEN(A$)=81THENGOSUB210:WC=WC+1:GOTO115
  31. 145 IFT$="^"THENGOSUB285:POKEFNB(PL-SS),62:GOTO110
  32. 150 IFT$=""THENGOSUB560
  33. 155 IFT$=""THENGOSUB260:GOTO90
  34. 160 IFT$="_"THENP=LEN(A$)-1:GOTO195
  35. 165 IFT$=CHR$(32)THENWC=WC+1
  36. 170 IFPEEK(56320)=111THENGOSUB690
  37. 175 IFT$="."THENWC=WC+1
  38. 180 IFT$="[147]"ORT$=""ORT$="[145]"THENGOTO195
  39. 185 IFP>0ANDT$=CHR$(20)THENA$=LEFT$(A$,P-1)+MID$(A$,P+1):P=P-1:GOTO195
  40. 190 IFT$<>""ANDT$<>"[157]"ANDT$<>""THENA$=LEFT$(A$,P)+T$+MID$(A$,P+1):P=P+1
  41. 195 PRINT"";A$:IFT$="[157]"ANDP>0THENP=P-1
  42. 200 IFT$=""ANDP<LEN(A$)-1THENP=P+1
  43. 205 GOTO115
  44. 210 REM******************************
  45. 215 REM INSERT LINE
  46. 220 REM******************************
  47. 225 X=0
  48. 230 IFLEN(A$)<41THENTT$(X)=LEFT$(A$,LEN(A$)-1):A$="":GOTO245
  49. 235 FORI=41TO1STEP-1:IFMID$(A$,I,1)<>" "THENNEXTI:I=41
  50. 240 TT$(X)=LEFT$(A$,I-1):A$=MID$(A$,I+1)
  51. 245 X=X+1:IFA$<>""ANDA$<>" "THENGOTO230
  52. 250 FORI=LL+XTOPL+XSTEP-1:TEXT$(I)=TEXT$(I-X):NEXTI:FORI=0TOX-1:TEXT$(PL+I)=TT$(I):NEXT
  53. 255 A$=" ":P=0:PRINT"[147]";:LL=LL+X:PL=PL+X
  54. 260 SS=PL-7:IFLL-PL<8THENSS=LL-15
  55. 265 PRINT"[147][154]";A$;"";:IFSS<0THENSS=0
  56. 270 FORI=SSTOSS+15:PRINT"[158]";TEXT$(I);:IFLEN(TEXT$(I))<40THENPRINT
  57. 275 IFI=PL-1THENPRINTCHR$(62)
  58. 280 NEXTI:PRINT"                                        ":RETURN
  59. 285 REM******************************
  60. 290 REM MOVE EDIT LINE
  61. 295 REM******************************
  62. 300 P2=PL-SS
  63. 305 GETT1$:IFT1$<>""THEN320
  64. 310 POKE54272+FNB(P2),1:POKEFNB(P2),62:FORIT=1TO20:NEXT:IFPEEK(56320)=111THENGOSUB690
  65. 315 POKEFNB(P2),32:GOTO305
  66. 320 PL=PL+(T1$="[145]")+10*(T1$="U"):IFPL<1THENPL=1
  67. 325 PL=PL-(T1$="")-10*(T1$="D"):IFPL>LLTHENPL=LL
  68. 330 IFT1$=CHR$(13)THENRETURN
  69. 335 IFPL=>LLORT1$<>CHR$(20)THEN345
  70. 340 LL=LL-1:FORI=PLTOLL:TEXT$(I)=TEXT$(I+1):NEXT:TEXT$(LL+1)=""
  71. 345 IFPL<LLANDT1$="C"THENA$=TEXT$(PL)+" ":RETURN
  72. 350 IFT1$="P"THENGOSUB435
  73. 355 IFT1$="D"THENGOSUB490
  74. 360 IFT1$="F"THENGOSUB370
  75. 361 IFT1$="S"THENGOSUB2000
  76. 365 GOSUB260:GOTO300
  77. 370 REM******************************
  78. 375 REM FORMAT LINE
  79. 380 REM******************************
  80. 385 FORI=1TOLL-2:IFTEXT$(I)=""ORTEXT$(I+1)=""THEN430
  81. 387 IFLEFT$(TEXT$(I),1)="*"THENGOTO430
  82. 388 IFLEFT$(TEXT$(I+1),1)="*"THENGOTO430
  83. 390 SP=40-LEN(TEXT$(I)):FORJ=1TOLEN(TEXT$(I+1))
  84. 395 IFMID$(TEXT$(I+1),J,1)<>" "THENNEXTJ:J=J-1
  85. 400 IFSP<JORJ=LEN(TEXT$(I+1))THEN415
  86. 405 TEXT$(I)=TEXT$(I)+" "+LEFT$(TEXT$(I+1),J-1)
  87. 410 TEXT$(I+1)=MID$(TEXT$(I+1),J+1):GOTO387
  88. 415 IFLEN(TEXT$(I+1))=>SPTHEN430
  89. 420 TEXT$(I)=TEXT$(I)+" "+TEXT$(I+1)
  90. 425 FORJ=I+1TOLL:TEXT$(J)=TEXT$(J+1):NEXTJ:LL=LL-1:PL=PL-1:GOTO387
  91. 430 NEXTI:GOSUB260:RETURN
  92. 435 REM******************************
  93. 440 REM OUTPUT TO PRINTER
  94. 445 REM******************************
  95. 450 OPEN1,4,7:X=1:PRINT#1,CHR$(27);CHR$(93);CHR$(48);CHR$(17);
  96. 455 IFX=LLTHEN485
  97. 460 IFLEFT$(TEXT$(X),1)="*"THENGOSUB1075
  98. 461 IFLEFT$(TEXT$(X),1)="*"THENX=X+1:GOTO455
  99. 465 IFTEXT$(X)=""THENPRINT#1,"":X=X+1:GOTO455
  100. 470 PRINT#1,TEXT$(X);" ";:IFX+1=LLTHEN485
  101. 471 IFLEFT$(TEXT$(X+1),1)="*"THENGOSUB1075
  102. 472 IFLEFT$(TEXT$(X+1),1)="*"THENX=X+1:GOTO455
  103. 475 PRINT#1,TEXT$(X+1):IFTEXT$(X+1)=""THENPRINT#1,""
  104. 480 X=X+2:GOTO455
  105. 485 PRINT#1,"":CLOSE1:RETURN
  106. 490 REM******************************
  107. 495 REM DISK OPERATIONS
  108. 500 REM******************************
  109. 502 POKE56334,0:POKE788,49:POKE789,234:POKEV+21,0:POKE56334,1
  110. 505 GOSUB750:PRINT"[147][196]ATA HANDLING."
  111. 510 PRINT"[208]OSITION CORRECT DISK,THEN RETURN[146]--":WAIT197,1
  112. 515 PRINT"[195]OMMANDS AVAILABLE:":PRINT"1)[211]AVE DATA":PRINT"2)[204]OAD DATA"
  113. 516 PRINT"3)[205]ERGE FILES":POKE198,0
  114. 520 INPUT"[150]WHICH DO YOU REQUIRE:";Q:ONQGOTO525,535,552:GOSUB260:RETURN
  115. 525 INPUT"[198]ILENAME";F$:OPEN1,8,2,F$+",S,W":PRINT#1,PL:PRINT#1,LL
  116. 530 FORI=0TOLL:FF$=TEXT$(I)+"@":PRINT#1,FF$:NEXTI:CLOSE1
  117. 531 SYS49152:POKEV+21,255:GOSUB260:RETURN
  118. 535 INPUT"[198]ILENAME";F$:OPEN1,8,0,F$+",S,R":INPUT#1,PL,LL
  119. 540 FORI=0TOLL:INPUT#1,TEXT$(I):NEXT:CLOSE1:FORI=0TOLL
  120. 545 IFTEXT$(I)<>"@"THENTEXT$(I)=LEFT$(TEXT$(I),LEN(TEXT$(I))-1)
  121. 550 IFTEXT$(I)="@"THENTEXT$(I)=""
  122. 551 NEXTI:GOSUB260:SYS49152:POKEV+21,255:RETURN
  123. 552 INPUT"[198]ILENAME";F$:OPEN1,8,0,F$+",S,R":CL=LL:INPUT#1,PL,LL
  124. 553 FORI=CLTOLL+CL:INPUT#1,TEXT$(I):NEXT:CLOSE1:FORI=CLTOLL+CL
  125. 554 IFTEXT$(I)<>"@"THENTEXT$(I)=LEFT$(TEXT$(I),LEN(TEXT$(I))-1)
  126. 555 IFTEXT$(I)="@"THENTEXT$(I)=""
  127. 556 NEXTI:TEXT$(CL)=" "
  128. 557 PL=PL+CL:LL=LL+CL:PRINT"[145]";:GOSUB260:SYS49152:POKEV+21,255:RETURN
  129. 560 REM******************************
  130. 565 REM HELP SCREENS
  131. 570 REM******************************
  132. 575 PRINT"[147]          [200][197][204][208]          ":PRINT"                        "
  133. 580 PRINT"[212]EXT ENTRY MODE:        ":PRINT"[210][197][212][213][210][206] PLACES IN TEXT   "
  134. 585 PRINT"_ MOVES CURSOR TO END   ":PRINT"^ CALLS UP EDIT MODULE  "
  135. 590 PRINT"[195][210][211][210] KEYS MOVE OVER TEXT":PRINT"                        "
  136. 595 GETW$:IFPEEK(56320)<>111ANDW$=""THEN595
  137. 600 PRINT"[158]        [200][197][204][208] 2           "
  138. 605 PRINTTAB(10)"                         ":PRINTTAB(10)"[205]AIN EDIT MODE:          "
  139. 610 PRINTTAB(10)"[210][197][212][213][210][206] EXITS EDIT MODULE ":PRINTTAB(10)"[196][197][204][197][212][197] REMOVES LINE      "
  140. 615 PRINTTAB(10)"[195] COPIES LINE            ":PRINTTAB(10)"[208] PRINTS TEXT ON PRINTER "
  141. 620 PRINTTAB(10)"[196] SAVES AND LOADS TEXT   "
  142. 622 PRINTTAB(10)"[198] COMPACTS TEXT          "
  143. 625 PRINTTAB(10)"[195][210][211][210] KEYS MOVE OVER TEXT ":PRINTTAB(10)"                         "
  144. 630 GETW$:IFPEEK(56320)<>111ANDW$=""THEN630
  145. 635 PRINT"";:PRINT"       [200][197][204][208] 3      "
  146. 640 PRINT"DISK STATUS:       ":PRINT"                   ":INPUT#14,RR$,TR$
  147. 645 PRINT"[145]";TR$:PRINT"                   ":PRINT"";
  148. 650 GETW$:IFPEEK(56320)<>111ANDW$=""THEN650
  149. 655 PRINTTAB(16)"[145][158]      [200][197][204][208] 4      ":PRINTTAB(16)"[195][204][210] RESTARTS PROG "
  150. 660 PRINTTAB(16)"[210][213][206]/[211][212][207][208] FOR HELP ":PRINTTAB(16)"                  "
  151. 665 GETW$:IFPEEK(56320)<>111ANDW$=""THEN665
  152. 666 SYS49152:POKEV+21,255
  153. 670 GOSUB260:RETURN
  154. 675 REM*******************************
  155. 680 REM ICON RECOGNITION
  156. 685 REM*******************************
  157. 690 XP=PEEK(V):V=53248:IFXP>25ANDXP<55THENPOKEV+40,1:FORT=0TO500:NEXT:POKEV+40,7:GOSUB440:RETURN
  158. 695 IFXP>55ANDXP<85THENPOKEV+41,1:FORT=0TO500:NEXT:POKEV+41,7:GOSUB570:RETURN
  159. 700 IFXP>85ANDXP<115THENPOKEV+42,1:FORT=0TO500:NEXT:POKEV+42,7:GOSUB385:RETURN
  160. 705 IFXP>115ANDXP<145THENPOKEV+43,1:FORT=0TO500:NEXT:POKEV+43,7:GOSUB730:RETURN
  161. 710 IFXP>145ANDXP<175THENPOKEV+44,1:FORT=0TO500:NEXT:POKEV+44,7:GOSUB490:RETURN
  162. 715 IFXP>175ANDXP<205THENPOKEV+45,1:FORT=0TO500:NEXT:POKEV+45,7:GOSUB285:RETURN
  163. 720 IFXP>205ANDXP<235THENPOKEV+46,1:FORT=0TO500:NEXT:POKEV+46,7:GOTO110
  164. 725 RETURN:RETURN
  165. 730 IFVO=15THENPOKE54296,0:VO=0:RETURN
  166. 735 IFVO=0THENPOKE54296,15:VO=15:RETURN
  167. 740 RETURN
  168. 745 REM*******************************
  169. 750 REM DISK OPERATIONS
  170. 755 REM*******************************
  171. 760 OPEN15,8,15,"I":CLOSE15
  172. 765 PRINT"[147][196][201][211][203][160][207][208][197][210][193][212][201][207][206][211].":PRINT"1) [198]ORMAT [196]ISK"
  173. 770 PRINT"2) [210]EAD [197]RROR [195]HANNEL":PRINT"3) [201]NITIALIZE [196]RIVE"
  174. 775 PRINT"4) [214]ALIDATE [196]ISK":PRINT"5) [210]EAD [196]IRECTORY"
  175. 780 PRINT"6) [210]ENAME [198]ILE":PRINT"7) [211]AVE OR [204]OAD [196]ATA":POKE198,0
  176. 781 PRINT"8) [210]ETURN TO [212]EXT [197]NTRY [205]ODE"
  177. 785 INPUT"[215]HICH DO YOU REQUIRE";SK:IFSK<1ORSK>8THEN765
  178. 790 ONSKGOTO815,850,875,910,945,975,795,796:GOTO765
  179. 795 RETURN
  180. 796 SYS49152:POKEV+21,255:GOSUB260:GOTO90
  181. 800 REM*******************************
  182. 805 REM FORMAT DISK
  183. 810 REM*******************************
  184. 815 PRINT"[147][156][198]ORMAT ([206]EW)[146]"
  185. 820 PRINT"GIVE REQUIRED NAME AND ID":INPUTNAME$:INPUTID$
  186. 825 OPEN1,8,15:PRINT#1,"M-W"CHR$(81)CHR$(0)CHR$(1)CHR$(255):CLOSE1
  187. 830 OPEN15,8,15:PRINT#15,"NEW:"+NAME$+","+ID$:GOTO765
  188. 835 REM*******************************
  189. 840 REM READ ERROR CHANNEL
  190. 845 REM*******************************
  191. 850 PRINT"[147][197]RRORS";:PRINT"";:INPUT#14,A$,B$,C$,D$:PRINTA$,B$,C$,D$
  192. 855 POKE198,0:WAIT198,1:GOTO765
  193. 860 REM*******************************
  194. 865 REM INITIALIZE DISK
  195. 870 REM*******************************
  196. 875 PRINT"[147][156][201]NITIALIZE DISK[146]"
  197. 880 PRINT"[155][208]LACE A DISK IN DRIVE AND CLOSE THE DOOR"
  198. 885 POKE198,0:WAIT198,1:OPEN15,8,15,"INITIALIZE":CLOSE15
  199. 890 PRINT"[144][196]ONE":FORX=0TO1500:NEXT:GOTO765
  200. 895 REM*******************************
  201. 900 REM VALIDATE DISK
  202. 905 REM*******************************
  203. 910 PRINT"[147][156][214]ALIDATE [196]ISK[146]":CLOSE15
  204. 915 PRINT"[144][208]LACE DISK IN DRIVE AND CLOSE DOOR.":POKE198,0:WAIT198,1
  205. 920 OPEN15,8,15,"VALIDATE":PRINT"[196]O NOT REMOVE DISK TILL LIGHT IS OUT"
  206. 925 REM*******************************
  207. 930 REM READ DIRECTORY
  208. 935 REM*******************************
  209. 940 CLOSE15:PRINT"[144][196]ONE":FORT=0TO1500:NEXT:GOTO765
  210. 945 PRINT"[147][156][210]EAD [196]IRECTORY.[146]"
  211. 950 PRINT"PLACE DISK TO BE READ IN DRIVE AND CLOSEDOOR"
  212. 955 POKE198,0:WAIT198,1:PRINT"[147][196][201][211][203] [196][201][210][197][195][212][207][210][217].[146]":GOTO1010
  213. 960 REM*******************************
  214. 965 REM RENAME FILE
  215. 970 REM*******************************
  216. 975 PRINT"[147][156][210]ENAME [198]ILE[146]"
  217. 980 INPUT"[206]AME OF FILE TO BE RENAMED";PR$:INPUT"[206]AME TO CALL NEW FILE";PP$
  218. 985 PRINT"[207][203]?":GETA$:IFA$="N"THENGOTO975
  219. 990 OPEN1,8,15,"RENAME:"+PP$+"="+PR$:CLOSE1:PRINT"[144][196]ONE":POKE198,0:WAIT198,1:GOTO765
  220. 995 REM*******************************
  221. 1000 REM DIRECTORY READ SUBROUTINE
  222. 1005 REM*******************************
  223. 1010 OPEN1,8,0,"$0":GET#1,AW$,BW$
  224. 1015 GET#1,AW$,BW$:GET#1,AW$,BW$:C=0:IFAW$<>""THENC=ASC(AW$)
  225. 1020 IFBW$<>""THENC=C+ASC(BW$)*256
  226. 1025 PRINT""MID$(STR$(C),2);TAB(2);"[146]";
  227. 1030 GET#1,BW$:IFST<>0THEN1070
  228. 1035 IFBW$<>CHR$(34)THEN1030
  229. 1040 GET#1,BW$:IFBW$<>CHR$(34)THENPRINTBW$;:GOTO1040
  230. 1045 GET#1,BW$:IFBW$=CHR$(32)THEN1045
  231. 1050 PRINTTAB(18);:C$=""
  232. 1055 C$=C$+BW$:GET#1,BW$:IFBW$<>""THEN1055
  233. 1060 PRINT""LEFT$(C$,3):IFPEEK(1024)<>32THENPOKE198,0:WAIT198,1
  234. 1065 IFST=0THEN1015
  235. 1070 PRINT" BLOCKS FREE":CLOSE1:POKE198,0:WAIT198,1:GOTO765
  236. 1075 REM*******************************
  237. 1080 REM OUTPUT PRINTER CONTROL CODES
  238. 1085 REM*******************************
  239. 1087 CM$=TEXT$(X)
  240. 1090 IFLEFT$(CM$,7)="*COLOUR"THENPRINT#1,CHR$(27);CHR$(114);CHR$((RIGHT$(CM$,2))
  241. 1095 IFLEFT$(CM$,4)="*NLQ"THENPRINT#1,CHR$(27);CHR$(120);CHR$(49);
  242. 1100 IFLEFT$(CM$,6)="*DRAFT"THENPRINT#1,CHR$(27);CHR$(120);CHR$(48);
  243. 1105 IFLEFT$(CM$,7)="*ITALIC"THENPRINT#1,CHR$(27);CHR$(52);
  244. 1110 IFLEFT$(CM$,11)="*ITALIC OFF"THENPRINT#1,CHR$(27);CHR$(53);
  245. 1115 IFLEFT$(CM$,11)="*EMPHASIZED"THENPRINT#1,CHR$(27);CHR$(69);
  246. 1120 IFLEFT$(CM$,15)="*EMPHASIZED OFF"THENPRINT#1,CHR$(27);CHR$(70);
  247. 1125 IFLEFT$(CM$,13)="*DOUBLESTRIKE"THENPRINT#1,CHR$(27);CHR$(71);
  248. 1130 IFLEFT$(CM$,17)="*DOUBLESTRIKE OFF"THENPRINT#1,CHR$(27);CHR$(72);
  249. 1135 IFLEFT$(CM$,8)="*REVERSE"THENPRINT#1,CHR$(18);
  250. 1140 IFLEFT$(CM$,12)="*REVERSE OFF"THENPRINT#1,CHR$(146);
  251. 1145 IFLEFT$(CM$,10)="*UNDERLINE"THENPRINT#1,CHR$(27);CHR$(45);CHR$(49);
  252. 1150 IFLEFT$(CM$,14)="*UNDERLINE OFF"THENPRINT#1,CHR$(27);CHR$(45);CHR$(48);
  253. 1155 IFLEFT$(CM$,12)="*SUPERSCRIPT"THENPRINT#1,CHR$(27);CHR$(83);CHR$(48);
  254. 1160 IFLEFT$(CM$,10)="*SUBSCRIPT"THENPRINT#1,CHR$(27);CHR$(83);CHR$(49);
  255. 1165 IFLEFT$(CM$,11)="*SCRIPT OFF"THENPRINT#1,CHR$(27);CHR$(84);
  256. 1170 IFLEFT$(CM$,9)="*EXPANDED"THENPRINT#1,CHR$(14);
  257. 1175 IFLEFT$(CM$,13)="*EXPANDED OFF"THENPRINT#1,CHR$(15);
  258. 1180 IFLEFT$(CM$,5)="*PICA"THENPRINT#1,CHR$(27);CHR$(80);
  259. 1185 IFLEFT$(CM$,6)="*ELITE"THENPRINT#1,CHR$(27);CHR$(77);
  260. 1190 IFLEFT$(CM$,13)="*PROPORTIONAL"THENPRINT#1,CHR$(27);CHR$(112);CHR$(49);
  261. 1195 IFLEFT$(CM$,14)="*PROPORTIONAL OFF"THENPRINT#1,CHR$(27);CHR$(112);CHR$(48);
  262. 1200 IFLEFT$(CM$,8)="*DOUBLE "THENPRINT#1,CHR$(27);CHR$(119);CHR$(49);
  263. 1205 IFLEFT$(CM$,7)="*NORMAL"THENPRINT#1,CHR$(27);CHR$(119);CHR$(48);
  264. 1210 IFLEFT$(CM$,14)="*BOTTOM MARGIN"THENPRINT#1,CHR$(147);
  265. 1215 IFLEFT$(CM$,10)="*FORM FEED"THENPRINT#1,CHR$(12);
  266. 1220 IFLEFT$(CM$,12)="*LEFT MARGIN"THENPRINT#1,CHR$(27);CHR$(108);CHR$(RIGHT$(CM$,2));
  267. 1225 IFLEFT$(CM$,13)="*RIGHT MARGIN"THENPRINT#1,CHR$(27);CHR$(81);CHR$(RIGHT$(CM$,1));
  268. 1230 IFLEFT$(CM$,13)="*LEFT JUSTIFY"THENPRINT#1,CHR$(27);CHR$(97);CHR$(0);
  269. 1235 IFLEFT$(CM$,14)="*RIGHT JUSTIFY"THENPRINT#1,CHR$(27);CHR$(97);CHR$(2);
  270. 1240 IFLEFT$(CM$,7)="*CENTER"THENPRINT#1,CHR$(27);CHR$(97);CHR$(1);
  271. 1245 IFLEFT$(CM$,6)="*RESET"THENPRINT#1,CHR$(27);CHR$(64);
  272. 1250 RETURN
  273.