home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / sounds.zip / WSPATCH2.BAS < prev   
BASIC Source File  |  1985-04-08  |  11KB  |  181 lines

  1.  
  2.  
  3. 10 ' wspatch       PINSTALL
  4. 20 ' This program installs various printers for WordStar 3.02
  5. 30 ' MicroPro International Corporation, May 24, 1982
  6. 40 ' Revised for WordStar 3.2 - June 16, 1982
  7. 41   '----------------------------------------------------------------------------------------------------------------------------
  8. 45 ' Revised on  2-23-83 for super and sub scripting,condensed,italics,double width,emphasized, continuous underlining
  9. 46 ' By Judy Epstein,COMPTICS,3303 Dato Ave.,Highland Park, Ill.60035
  10. 47   '----------------------------------------------------------------------------------------------------------------------------
  11. 48 '         scripting:         ^PQ superscript on, ^PW subscript on, ^PR turns each off
  12. 49 '         double width:      ^PA turns on, ^PN turns off
  13. 50 '         condensed:         ^PY turns on, ^PY turns off
  14. 51 '         underline:         ^PT turns on, ^PT turns off
  15. 52 '   use ^PE for escape, followed by desired uppercase codes to printer as follows----
  16. 53 '         line spacing:      0 for 1/8",   1 for 7/72",   2 for 1/6" [default]
  17. 54 '         emphasized print:  E turns on,    F turns off
  18. 55 '         double strike:     G turns on,    H turns off
  19. 56 '         paper out:         8 ignores,     9 enables
  20. 57 '         italics:           4 turns on,    5 turns off
  21. 58 '
  22. 59   '----------------------------------------------------------------------------------------------------------------------------
  23. 1230 '
  24. 1231 '----------------------------------------------------------------------------------------------------------------------------
  25. 1240 ' Unconditional patch data.  These bytes will be patched no matter what
  26. 1250 ' printer is selected.
  27. 1260 '
  28. 1261 ' address,byte,# of bytes
  29. 1270 DATA &H7CD,&H90,2
  30. 1280 DATA &H7DD,&H90,8
  31. 1290 DATA &H2D4,&HFF,1
  32. 1300 DATA &H2D6,&HFF,1
  33. 1310 DATA &h81b,&h90,2
  34. 1320 DATA &h82d,&h90,5
  35. 1330 DATA &h83a,&h90,47
  36. 1331 'USR1 super ************************************************************  ^PQ
  37. 1332 DATA &H077F,3,1
  38. 1333 DATA &H0780,27,1
  39. 1334 DATA &H0781,83,1
  40. 1335 DATA &H0782,0 ,1
  41. 1336 'USR2 sub   ************************************************************  ^PW
  42. 1337 DATA &H0784, 3,1
  43. 1338 DATA &H0785,27,1
  44. 1339 DATA &H0786,83,1
  45. 1340 DATA &H0787, 1,1
  46. 1341 'USR3  escape **********************************************************  ^PE
  47. 1342 DATA &H0789,1 ,1
  48. 1343 DATA &H078a,27,1
  49. 1344 'USR4 off script, double strike,unidirectional *************************  ^PR
  50. 1345 DATA &H078e, 4,1
  51. 1346 DATA &H078f,27,1
  52. 1347 DATA &H0790,72,1
  53. 1348 DATA &H0791,27,1
  54. 1349 DATA &H0792,84,1
  55. 1350 'PALT  alternate pitch changed to double width on.**********************  ^PA
  56. 1351 DATA &H076b,3,1
  57. 1352 DATA &H076c,27,1
  58. 1353 DATA &H076d,87,1
  59. 1354 DATA &H076e, 1,1
  60. 1355 'PSTD standard pitch ***************************************************  ^PN
  61. 1356 DATA &H0770, 3,1
  62. 1357 DATA &H0771,27,1
  63. 1358 DATA &H0772,87,1
  64. 1359 DATA &H0773, 0,1
  65. 1360 'ROLUP turn continous underline on  ************************************  ^PT
  66. 1361 DATA &H0775, 3,1
  67. 1362 DATA &H0776,27,1
  68. 1363 DATA &H0777,45,1
  69. 1364 DATA &H0778,01,1
  70. 1365 'ROLDOW turn continous underline off ***********************************  ^PT
  71. 1366 DATA &H077a, 3,1
  72. 1367 DATA &H077b,27,1
  73. 1368 DATA &H077c,45,1
  74. 1369 DATA &H077d,00,1
  75. 1370 'SOCHR strike out character.  Is 2d for "-".  Put in 2f for "/" *********
  76. 1371 DATA &h07c1,&h2d,1
  77. 1372 'DEL4 Time delay   Put in 08 or 04 for shorter *************************
  78. 1373 DATA &H02d2,&h10,1
  79. 1376 DATA 0,0,0
  80. 1377 '----------------------------------------------------------------------------------------------------------------------------
  81. 1378 'PRINTER NAME DATA AREA
  82. 1379 '
  83. 1380 DATA "IBM Parallel Printer"
  84. 2360 ' RIBBON        this is toggled by ^Y. Use it for condensed on ************
  85. 2370 DATA 1,15,0,0,0
  86. 2380 '
  87. 2390 ' RIBOFF        this is toggled by ^Y. Use it for condensed off ***********
  88. 2400 DATA 1,18,0,0,0
  89. 2410 '
  90. 2420 ' PSINIT        To initialize printer.  First is # bytes, then bytes. Use <esc> "@"  ***************
  91. 2430 DATA 2,&h1b,&h40,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  92. 2440 '
  93. 2450 ' PSFINI        To conclude printing. First is # bytes, then bytes. Use <esc> "@" *****************
  94. 2460 DATA 2,&h1b,&h40,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  95. 2470 '
  96. 2810 ' DPHSPC   can I use this to print a special character 129 **********
  97. 2820 DATA 2,&h1b,&h81,0
  98. 2830 '
  99. 2840 ' DPHRUB   can I use this to print a special character 133 **********
  100. 2850 DATA 2,&h1b,&h85,0
  101. 2860 '
  102. 6000 '****************************************************************************************************************************
  103. 6001 '****************************************************************************************************************************
  104. 6005 ' Oct. 5, 1982
  105. 6010 'from manual, there are two user areas that can be modified.
  106. 6020 'in ws.com , user area 1 from line 1 to 861+
  107. 6030 '                        locations 0100 to 035EEFF
  108. 6035 ' these are for user subroutines
  109. 6040 'INISUB  02A4
  110. 6050 'UNISUB  O2A7
  111. 6060 'MORPAT  02E0
  112. 6070 'PBGMEN  035C
  113. 6080 'PRINT (:F4:USER1.LST) NOOJ XREF  PAGEWIDTH (132)
  114. 6090 '
  115. 6100 'in ws.com , user area 4 from line 1 to 722+
  116. 6110 'these are where the user printer funcitons come in
  117. 6120 '
  118. 6130 'USR1    077F     DB  # of bytes
  119. 6140 '        0780     DB  byte1,byte2,byte3,byte4
  120. 6150 'USR2    0784     DB  # of bytes
  121. 6160 '                 DB  BYTE1,BYTE2,BYTE3,BYTE4
  122. 6170 'USR3    0789     DB  # of bytes
  123. 6180 '                 DB  byte1,byte2,byte3,byte4
  124. 6190 'USR4    078E     DB  # of bytes
  125. 6200 '                 DB  byte1,byte2,byte3,byte4
  126. 6210 ' examples
  127. 6220 '                 DB '='
  128. 6230 '                 DB 9        ;THIS IS DECIMAL
  129. 6240 '                 DB 0AH      ;THIS IS HEX
  130. 6250 '                 DB 177Q     ;THIS IS OCTAL , OR 177O
  131. 6260 '                 DB 13       ;THIS IS CARRIAGE RETURN
  132. 6270 'How to use the codes I have selected for WS
  133. 6271 '----------------------------------------------------------------------------------------------------------------------------
  134. 6280 ' CODES FOR PRINTER all following are used with ^P first, when writing text
  135. 6290 ' SUPERSCRIPT                                   ^Q      CHR$(27);"S";CHR$(0)      hex 1B,53,0       dec  27,83,0
  136. 6300 ' SUBSCRIPT                                     ^W      CHR$(27);"S";CHR$(1)      hex 1B,53,1       dec  27,83,1
  137. 6310 ' SET UP ESCAPE CODE ,THEN GET REST OF CODE     ^E      CHR$(27)                  hex 1B            dec  27
  138. 6320 ' RESET SCRIPTING,DOUBLE STRIKE,UNIDIRECTIONAL  ^R      CHR$(27);"H";CHR$(27);"T" hex 1B,54,1B,48   dec 27,84,27,72
  139. 6321 ' see lines 1331-1349
  140. 6322 '----------------------------------------------------------------------------------------------------------------------------
  141. 6330 ' CONDENSED ON  (uses ribbon change toggle)     ^Y      CHR$(15)                  hex 0F            dec 15
  142. 6340 ' NORMAL                                        ^Y      CHR$(18)                  hex 12            dec 18
  143. 6360 ' ITALICS ON                                    ^E 4   CHR$(27);"4"               hex 1B,34         dec 27,52
  144. 6370 ' ITALICS OFF                                   ^E 5   CHR$(27);"5"               hex 1B,35         dec 27,53
  145. 6420 ' EMPHASIZED ON                                 ^E E   CHR$(27);"E"               hex 1B,45         dec 27,69
  146. 6430 ' EMPHASIZED OFF                                ^E F   CHR$(27);"F"               hex 1B,46         dec 27,70
  147. 6440 ' DOUBLE STRIKE ON                              ^E G   CHR$(27);"G"               hex 1B,47         dec 27,71
  148. 6450 ' DOUBLE STRIKE OFF                             ^E H   CHR$(27);"H"               hex 1B,48         dec 27,72
  149. 6451 ' IGNORE PAPER OUT                              ^E 8   CHR$(27);"8"               hex 1B,38         dec 27,56
  150. 6452 ' ENABLE PAPER OUT                              ^E 9   CHR$(27);"9"               hex 1B,39         dec 27,57
  151. 6453 ' UNIDIRECTIONAL LINE                           ^E <   CHR$(27);"<"               hex 1B,3C         dec 27,60
  152. 6454 ' LINE SPACING 1/8"                             ^E 0   CHR$(27);"0"               hex 1B,30         dec 27,48
  153. 6455 ' LINE SPACING 7/72"                            ^E 1   CHR$(27);"1"               hex 1B,31         dec 27,49
  154. 6456 ' LINE SPACING 1/6 " DEFAULT                    ^E 2   CHR$(27);"2"               hex 1B,32         dec 27,50
  155. 6460 ' DOUBLE WIDTH ON                               ^A     CHR$(27);"W";CHR$(1)       hex 1B,57,1       dec 27,87,1
  156. 6470 ' DOUBLE WIDTH OFF                              ^N     CHR$(27);"W";CHR$(0)       hex 1B,57,0       dec 27,87,0
  157. 6480 ' UNDERLINE ON  (uses superscript toggle)       ^T     CHR$(27);"-";CHR$(1)       hex 1B,2D,1       dec 27,45,1
  158. 6490 ' UNDERLINE OFF                                 ^T     CHR$(27);"-";CHR$(0)       hex 1B,2D,0       dec 27,45,0
  159. 6500 '----------------------------------------------------------------------------------------------------------------------------
  160. 6600 '----------------------------------------------------------------------------------------------------------------------------
  161. 6610 ' When using ^PE and then another character, as in emphasized,double strike,italics etc,make sure to insert spaces in text
  162. 6620 ' WS doesn't count ^P,^E as places in line, but does count the E,F,G,H,4,5,Since they don't print, the line gets smaller.
  163. 6630 ' If right justifying text, insert spaces for each one used.
  164. 6635 'Also be sure to use capital letters so the proper code is sent!
  165. 6640 'When combining many options, be sure to nest them in the proper order.  If not, they are not always shut off properly.
  166. 6700 '----------------------------------------------------------------------------------------------------------------------------
  167. 6710 '     OTHER USEFUL LOCATIONS
  168. 6720 ' 0746     POSMTH  FF              printer overstrike method
  169. 6730 '                                  = FF if overprint by CR without LF
  170. 6740 '                                  = 0 if overprint by BS and/or CR
  171. 6750 '                                  = 1 for daisy wheel
  172. 6760 ' 0747     BLDSTR  DB 2            # strikes for boldface. Set 3,4,5 for darker
  173. 6770 ' 0748     DBLSTR  DB 2            # strikes for double strike
  174. 6790 ' 07c1     SOCHR   DB '-'          character for strikeout
  175. 6800 ' 07c2     ULCHR   DB '_'          underscore character
  176. 6810 ' 02d8     NMOFUS  DB 1,1          # users on system
  177. 6840 ' 02dc     DEFDSK  DB 1            #  of default drive.  1=A,2=B,3=C,4=D
  178. 65399 '** DONE - PRESS ENTER TO RETURN TO MENU **
  179. 
  180.  
  181.