home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / compuserve / Basic / DISPLA.YAT < prev    next >
Text File  |  2006-10-19  |  9KB  |  191 lines

  1. 100 GOTO 130 :: BLANKLINE,C,FLAG,I,K,L,R,S,EA$,H$,I$,M$,M1$,M2$,O$,TM$ :: CALL C
  2. LEAR :: CALL KEY :: CALL VCHAR
  3. 110 DEF C$(I)=CHR$(I)
  4. 120 !@P- REVISED 85/04/02
  5. 130 TM$=CHR$(128)&CHR$(135)&CHR$(128)&CHR$(162)&CHR$(135)&RPT$(CHR$(213),15)&CHR
  6. $(128)&CHR$(135)
  7. 140 DISPLAY AT(1,1)ERASE ALL:"DISPLAY/AT:  ""FAIRWARE""" :: DISPLAY AT(2,2):"by
  8. Barry Albert Traver"
  9. 150 DISPLAY AT(3,5):"Genial Computerware" :: DISPLAY AT(4,5):"835 Green Valley D
  10. rive"
  11. 160 DISPLAY AT(5,5):"Philadelphia, PA 19128" :: DISPLAY AT(7,5):"If this program
  12.  is worth"
  13. 170 DISPLAY AT(8,1):"it to you, please send $1 to" :: DISPLAY AT(9,1):"me and I
  14. will put you on my"
  15. 180 DISPLAY AT(10,1):"mailing list to receive news" :: DISPLAY AT(11,1):"of othe
  16. r programs and of any"
  17. 190 DISPLAY AT(12,1):"future upgrades of this one." :: DISPLAY AT(13,1):"Thank y
  18. ou."
  19. 200 DISPLAY AT(15,5):"Like ""Freeware,"" this is" :: DISPLAY AT(16,1):"an exampl
  20. e of User/Supported"
  21. 210 DISPLAY AT(17,1):"(""U/S"") software.  Feel free" :: DISPLAY AT(18,1):"to sh
  22. are it with others.  It"
  23. 220 DISPLAY AT(19,1):"is a free program, although" :: DISPLAY AT(20,1):"a donati
  24. on is encouraged and"
  25. 230 DISPLAY AT(21,1):"will encourage the author to" :: DISPLAY AT(22,1):"write m
  26. ore!"
  27. 240 DISPLAY AT(24,1):"(Press any key to continue.)"
  28. 250 CALL KEY(0,K,S):: IF S=0 THEN 250
  29. 260 DISPLAY AT(1,1)ERASE ALL:"DISPLAY/AT by B.A. Traver" :: DISPLAY AT(4,1):"Her
  30. e are the choices:"
  31. 270 DISPLAY AT(7,1):"1 Read instructions." :: DISPLAY AT(9,1):"2 Set up blank TI
  32. -Writer"
  33. 280 DISPLAY AT(11,5):"file." :: DISPLAY AT(13,1):"3 Convert prepared TI-Writer"
  34. 290 DISPLAY AT(15,5):"file to program in" :: DISPLAY AT(17,5):"MERGE format."
  35. 300 DISPLAY AT(19,1):"4 End program." :: DISPLAY AT(22,1):"What is your choice (
  36. 1, 2,"
  37. 310 DISPLAY AT(24,3):"3, or 4)?"
  38. 320 CALL KEY(0,K,S):: IF S=0 THEN 320 ELSE IF K<49 OR K>52 THEN 320
  39. 330 ON K-48 GOTO 340,710,930,1370
  40. 340 ! INSTRUCTIONS
  41. 350 DISPLAY AT(1,1)ERASE ALL:"DISPLAY/AT by B.A. Traver" :: DISPLAY AT(3,6):"Pro
  42. grammer:  Do you"
  43. 360 DISPLAY AT(4,1):"like to program in Extended" :: DISPLAY AT(5,1):"BASIC but
  44. hate to compute"
  45. 370 DISPLAY AT(6,1):"the DISPLAY AT statements?" :: DISPLAY AT(7,1):"Well, now y
  46. ou can use your"
  47. 380 DISPLAY AT(8,1):"TI-Writer to compose your" :: DISPLAY AT(9,1):"screen and l
  48. et this program"
  49. 390 DISPLAY AT(10,1):"write the Extended BASIC" :: DISPLAY AT(11,1):"program for
  50.  you (in MERGE"
  51. 400 DISPLAY AT(12,1):"format)!" :: DISPLAY AT(14,6):"The TI-Writer includes"
  52. 410 DISPLAY AT(15,1):"many convenient features," :: DISPLAY AT(16,1):"such as fu
  53. ll screen control"
  54. 420 DISPLAY AT(17,1):"of the cursor.  The screen" :: DISPLAY AT(18,1):"you are n
  55. ow viewing made use"
  56. 430 DISPLAY AT(19,1):"of those features in its" :: DISPLAY AT(20,1):"composition
  57. .  This program"
  58. 440 DISPLAY AT(21,1):"converted the TI-Writer file" :: DISPLAY AT(22,1):"to DISP
  59. LAY AT statements."
  60. 450 DISPLAY AT(24,1):"(Press any key to continue.)"
  61. 460 CALL KEY(0,K,S):: IF S=0 THEN 460
  62. 470 DISPLAY AT(1,1)ERASE ALL:"DISPLAY/AT by B.A. Traver" :: DISPLAY AT(3,6):"Aft
  63. er you have created"
  64. 480 DISPLAY AT(4,1):"a blank TI-Writer file to" :: DISPLAY AT(5,1):"work with (u
  65. sing option 2),"
  66. 490 DISPLAY AT(6,1):"load it into the TI-Writer" :: DISPLAY AT(7,1):"text editor
  67.  and prepare your"
  68. 500 DISPLAY AT(8,1):"program screen.  (Erase any" :: DISPLAY AT(9,1):"guidelines
  69.  that enter your"
  70. 510 DISPLAY AT(10,1):"workspace while editing in" :: DISPLAY AT(11,1):"fixed mod
  71. e; those outside"
  72. 520 DISPLAY AT(12,1):"won't hurt anything.)" :: DISPLAY AT(14,6):"When you have
  73. finished,"
  74. 530 DISPLAY AT(15,1):"save your screen to disk," :: DISPLAY AT(16,1):"using eith
  75. er the Save File"
  76. 540 DISPLAY AT(17,1):"(""SF"") or Print File (""PF"")" :: DISPLAY AT(18,1):"opti
  77. on.  (This program can"
  78. 550 DISPLAY AT(19,1):"handle either.)  If you use" :: DISPLAY AT(20,1):"a differ
  79. ent filename, your"
  80. 560 DISPLAY AT(21,1):"original blank file will be" :: DISPLAY AT(22,1):"availabl
  81. e again."
  82. 570 DISPLAY AT(24,1):"(Press any key to continue.)"
  83. 580 CALL KEY(0,K,S):: IF S=0 THEN 580
  84. 590 DISPLAY AT(1,1)ERASE ALL:"DISPLAY AT by B.A. Traver" :: DISPLAY AT(3,6):"Opt
  85. ion 3 will do your"
  86. 600 DISPLAY AT(4,1):"programming work for you," :: DISPLAY AT(5,1):"and you can
  87. observe on the"
  88. 610 DISPLAY AT(6,1):"screen the progress of the" :: DISPLAY AT(7,1):"program.  T
  89. he result will be"
  90. 620 DISPLAY AT(8,1):"a program on disk in MERGE" :: DISPLAY AT(9,1):"format, com
  91. plete with all"
  92. 630 DISPLAY AT(10,1):"those DISPLAY AT statements" :: DISPLAY AT(11,1):"you hate
  93.  to write."
  94. 640 DISPLAY AT(13,6):"After entering NEW, you" :: DISPLAY AT(14,1):"can merge th
  95. at new file into"
  96. 650 DISPLAY AT(15,1):"memory, RESequence it as you" :: DISPLAY AT(16,1):"think b
  97. est, and then save it"
  98. 660 DISPLAY AT(17,1):"to disk in MERGE format once" :: DISPLAY AT(18,1):"more fo
  99. r later use in your"
  100. 670 DISPLAY AT(19,1):"Extended BASIC program when" :: DISPLAY AT(20,1):"you want
  101.  to make use of it."
  102. 680 DISPLAY AT(22,6):"Enjoy!" :: DISPLAY AT(24,1):"(Press any key to continue.)"
  103. 690 CALL KEY(0,K,S):: IF S=0 THEN 690
  104. 700 GOTO 260
  105. 710 ! MAKE BLANK TI-WRITER FILE
  106. 720 DISPLAY AT(1,1)ERASE ALL:"DISPLAY AT by B.A. Traver" :: DISPLAY AT(3,6):"Thi
  107. s option creates a"
  108. 730 DISPLAY AT(4,1):"special blank TI-Writer file" :: DISPLAY AT(5,1):"for you,
  109. including special"
  110. 740 DISPLAY AT(6,1):"tab settings.  Here are your" :: DISPLAY AT(7,1):"choices:"
  111. 750 DISPLAY AT(9,1):"1 File With Guidelines (use" :: DISPLAY AT(10,4):"fixed mod
  112. e without word"
  113. 760 DISPLAY AT(11,4):"wrap with this file)." :: DISPLAY AT(13,1):"2 File Without
  114.  Guidelines"
  115. 770 DISPLAY AT(14,4):"(use standard word wrap" :: DISPLAY AT(15,4):"mode with th
  116. is file)."
  117. 780 DISPLAY AT(17,1):"What is your choice (1 or" :: DISPLAY AT(18,3):"2)?"
  118. 790 CALL KEY(0,K,S):: IF S=0 THEN 790 ELSE IF K<49 OR K>50 THEN 790
  119. 800 DISPLAY AT(18,7):CHR$(K)
  120. 810 DISPLAY AT(20,1):"What do you want to name" :: DISPLAY AT(21,3):"your file?"
  121. 820 DISPLAY AT(23,1):"DSK"
  122. 830 ACCEPT AT(23,4)SIZE(12):O$ :: O$="DSK"&O$ :: ON ERROR 1180 :: OPEN #1:O$,OUT
  123. PUT :: DISPLAY AT(22,1):"" :: ON ERROR STOP
  124. 840 ON K-48 GOTO 850,880
  125. 850 ! FILE WITH GUIDELINES
  126. 860 M$="USE FIXED MODE (CTRL-0)."
  127. 870 FOR I=1 TO 24 :: PRINT #1:"|"&RPT$(" ",28)&"| "&SEG$(M$,I,1):: NEXT I :: GOT
  128. O 900
  129. 880 ! FILE WITHOUT GUIDELINES
  130. 890 FOR I=1 TO 24 :: PRINT #1:RPT$(" ",29):: NEXT I
  131. 900 PRINT #1:TM$
  132. 910 CLOSE #1
  133. 920 GOTO 1340
  134. 930 ! MAKE MERGE FILE
  135. 940 DISPLAY AT(1,1)ERASE ALL:"DISPLAY/AT by B.A. Traver" :: DISPLAY AT(5,1):"Wha
  136. t is the name of the file"
  137. 950 DISPLAY AT(6,1):"you prepared by using the" :: DISPLAY AT(7,1):"TI-Writer?"
  138. :: DISPLAY AT(10,1):"DSK"
  139. 960 ACCEPT AT(10,4)SIZE(12):I$ :: I$="DSK"&I$ :: ON ERROR 1170 :: OPEN #1:I$,INP
  140. UT :: DISPLAY AT(9,1):"" :: ON ERROR STOP
  141. 970 DISPLAY AT(14,1):"What is the name of the file"
  142. 980 DISPLAY AT(15,1):"you want to create in MERGE" :: DISPLAY AT(16,1):"format?"
  143.  :: DISPLAY AT(19,1):"DSK"
  144. 990 ACCEPT AT(19,4)SIZE(12):O$ :: O$="DSK"&O$ :: ON ERROR 1190 :: OPEN #2:O$,VAR
  145. IABLE 163,OUTPUT :: DISPLAY AT(18,1):"" :: ON ERROR STOP
  146. 1000 DISPLAY AT(24,2):"Press <enter> to proceed."
  147. 1010 CALL KEY(0,K,S):: IF S=0 THEN 1010 ELSE IF K<>13 THEN 1010
  148. 1020 CALL CLEAR :: CALL VCHAR(1,3,95,672)
  149. 1030 L=10 :: FLAG=1
  150. 1040 FOR R=1 TO 24
  151. 1050 IF EOF(1)THEN DISPLAY AT(R,1):"" :: GOTO 1120
  152. 1060 LINPUT #1:M$
  153. 1070 IF M$=TM$ THEN DISPLAY AT(R,1):"" :: GOTO 1120
  154. 1080 GOSUB 1200
  155. 1090 IF BLANKLINE=1 THEN 1120
  156. 1100 GOSUB 1260
  157. 1110 GOSUB 1310
  158. 1120 NEXT R
  159. 1130 IF FLAG=2 THEN PRINT #2:M1$&C$(0)
  160. 1140 PRINT #2:C$(255)&C$(255)
  161. 1150 CLOSE #1 :: CLOSE #2
  162. 1160 GOTO 1340
  163. 1170 DISPLAY AT(9,1):"DISK ERROR - TRY AGAIN:" :: RETURN 960
  164. 1180 DISPLAY AT(22,1):"DISK ERROR - TRY AGAIN:" :: RETURN 830
  165. 1190 DISPLAY AT(18,1):"DISK ERROR - TRY AGAIN:" :: RETURN 990
  166. 1200 ! ANALYZE LINE
  167. 1210 M$=SEG$(M$,2,28):: DISPLAY AT(R,1):M$ :: IF M$="" OR M$=CHR$(13)OR M$=RPT$(
  168. " ",28)THEN BLANKLINE=1 :: RETURN ELSE BLANKLINE=0
  169. 1220 C=1
  170. 1230 IF SEG$(M$,1,1)=" " THEN M$=SEG$(M$,2,LEN(M$)-1):: C=C+1 :: GOTO 1230 ELSE
  171. 1240
  172. 1240 H$=SEG$(M$,LEN(M$),1):: IF H$=" " OR H$=CHR$(13)THEN M$=SEG$(M$,1,LEN(M$)-1
  173. ):: GOTO 1240 ELSE 1250
  174. 1250 RETURN
  175. 1260 ! COMPUTE LINE
  176. 1270 IF L=10 AND FLAG=1 THEN EA$=C$(239)&C$(236)ELSE EA$=""
  177. 1280 M$=C$(199)&C$(LEN(M$))&M$
  178. 1290 M$=C$(162)&C$(240)&C$(183)&C$(200)&C$(LEN(STR$(R)))&STR$(R)&C$(179)&C$(200)
  179. &C$(LEN(STR$(C)))&STR$(C)&C$(182)&EA$&C$(181)&M$
  180. 1300 RETURN
  181. 1310 ! PRINT LINE
  182. 1320 IF FLAG=1 THEN M1$=C$(0)&C$(L)&M$ :: FLAG=2 :: RETURN
  183. 1330 IF FLAG=2 THEN M2$=M$ :: PRINT #2:M1$&C$(130)&M2$&C$(0):: L=L+1 :: FLAG=1 :
  184. : RETURN
  185. 1340 DISPLAY AT(10,9)ERASE ALL:"A C T I O N" :: DISPLAY AT(12,6):"C O M P L E T
  186. E D"
  187. 1350 DISPLAY AT(24,1):"Press any key for main menu."
  188. 1360 CALL KEY(0,K,S):: IF S=0 THEN 1360 ELSE 260
  189. 1370 ! END PROGRAM
  190. 1380 CALL CLEAR :: END
  191.