home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / programs / list / prtcol10.lbr / PRTCOL.DZC / PRTCOL.DOC
Text File  |  1987-09-10  |  18KB  |  408 lines

  1. .he DOC: PRTCOL Multicolumn text-file formatter --CHR$(13)08JUL86 -#-
  2.  
  3. WHAT IT IS:
  4.  
  5.      Thi≤á i≤á PRTCO╠á v1.0¼áá inspireΣá b∙á Rober⌠á S«áá Stein'≤ ì
  6. PRT2COL.BAS¼á baseΣ iε turε oε RalpΦ Landry'≤ WSTWOCOL.BAS«á 
  7.  
  8.      PRTCO╠ i≤ writteε iε Zilog-dialec⌠ assembly« I⌠ use≤ thσ Z8░ ì
  9. extension≤á anΣ thu≤ require≤ ß Z80¼á aε NSC80░ o≥ aε HD6418░á t∩ ì
  10. run«á Sourcσ i≤ includeΣ iε thi≤ library¼ fo≥ thosσ witΦ thσ urgσ ì
  11. eithe≥áá t∩á tinke≥á witΦá i⌠á o≥á t∩á adap⌠á i⌠á t∩áá 8080-bounΣ ì
  12. microprocessor≤á (o≥ t∩ hacδ ou⌠ an∙ buτ tha⌠ ma∙ havσ escapeΣ m∙ ì
  13. testing).
  14.  
  15.      PRTCO╠á reformat≤á full-widtΦ tex⌠ file≤ int∩á tw∩á o≥á morσ ì
  16. paralle∞á columns«á Thσ program'≤ outpu⌠ caε bσ sen⌠ t∩ CON:¼á t∩ ì
  17. LST║ anΣ t∩ disk.
  18.      Unlikσ it≤ MBASI├ predecessors¼á PRTCO╠ doe≤ it≤ owεá columε ì
  19. formatting«á Thσá program'≤á formattinτá i≤á ragged-righ⌠á unles≤ ì
  20. certaiεáá procedure≤á arσá followeΣá (seσá below¼áá "WS-formatteΣ ì
  21. columns")¼á bu⌠á i⌠á doe≤á pacδ word≤ froφ an∙á forma⌠á int∩á it≤ ì
  22. columns, even from Apple-style "stream of words" files« 
  23.      PRTCO╠ activel∙ throw≤ awa∙ WordSta≥ soft-formatting¼ s∩ al∞ ì
  24. thosσá extrß spaces¼á sof⌠ hyphen≤  anΣ "sof⌠á carriagσá returnsó ì
  25. don'⌠ sho≈ u≡ iε thσ columnizeΣ text.
  26.  
  27.  
  28. FORMAT:
  29.  
  30.      A≤ released¼á PRTCO╠ format≤ it≤ outpu⌠ a≤ two-columε pages« ì
  31. EacΦ 55-linσ columε contain≤ u≡ t∩ 3╡ characters« Thσ tw∩ column≤ ì
  32. arσ separateΣ b∙ ß five-spacσ "gutter"«á Tw∩ line≤ abovσ thσ tex⌠ ì
  33. column≤ i≤ ß header╗á fou≥ line≤ belo≈ thσ tex⌠ i≤ ß footing« Al∞ ì
  34. tex⌠á i≤ offse⌠ froφ thσ printer'≤ lef⌠ margiε b∙á eigh⌠á spaces« ì
  35. Afte≥ eacΦ pagσ come≤ ß FormFeeΣ code« Thi≤ forma⌠ i≤ idea∞ fo≥ ß ì
  36. printe≥á se⌠á t∩ 12-pitcΦ (1▓ character≤ pe≥ inch)¼á ╢ line≤á pe≥ ì
  37. inch« 
  38.      Thσá pagσá parameter≤ arσ storeΣ variables¼á s∩ the∙ caεá bσ ì
  39. dynamicall∙á altered«á "Dynamicallyóá mean≤ jus⌠á that║á yo⌡á caε ì
  40. changσ thσ pagσ parameter≤ fo≥ onσ file¼á o≥ makσ you≥ change≤á ß ì
  41. permanen⌠áá par⌠á oµá thσá COMfile¼áá al∞á withiεá thσá program'≤ ì
  42. operation¼á prio≥á t∩á runninτ ß tex⌠ filσ througΦá thσá process¼ ì
  43. without resorting to the use of a debugger or disk editor.
  44.  
  45.  
  46. WHAT IT ISN'T:
  47.  
  48.      ╔ wrotσ PRTCO╠ t∩ bσ ß quicδ tool¼á rathe≥ thaε aε extensivσ ì
  49. one¼á s∩á there'≤á ßá lo⌠ tha⌠ i⌠ doesn'⌠ have«á (Iεá thσá hacke≥ ì
  50. spirit¼ I should add, in some cases, "yet".)
  51.  
  52. 1«á PRTCO╠á v1.░á ha≤ ßá somewha⌠á cryptic¼á somewha⌠á unfriendl∙ ì
  53. parameter-changσá interface«á I⌠ briefl∙ explain≤ thσ terms¼á bu⌠ ì
  54. thσá user-entr∙á mechanisφá leave≤á mσá profoundl∙á dissatisfied« ì
  55. V2.0'≤ change-interfacσ wil∞ bσ mucΦ morσ cooperative¼ ╔ promise« ì
  56. I'φ releasinτ v1.░ no≈ becausσ somσ oµ yo⌡ migh⌠ neeΣ thσ prograφ ìèlikσ ╔ do..« here'≤ ß whee∞ yo⌡ migh⌠ no⌠ havσ t∩ invent.
  57.  
  58. 2«á PRTCO╠ doe≤ n∩ right-justification«á ╔ wrotσ i⌠ t∩ prin⌠á ou⌠ ì
  59. sourcσ file≤ fo≥ ß proprietar∙ AL╒ wσ usσ wherσ ╔ work¼ wherσ thσ ì
  60. sourcσá line≤ seldoφ exceeΣ teε characters«á Whilσ ╔ wa≤ a⌠ i⌠á ╔ ì
  61. pu⌠ thσ WordStar-compatibilit∙ stufµ in¼á sincσ ╔ wa≤ usinτ ß WS-ì
  62. doπá tex⌠ filσ a≤ ß tethereΣ goa⌠ whilσ ╔ debuggeΣá thσá program« ì
  63. Perhap≤ ß late≥ versioε wil∞ perforφ WordStar-stylσ line-padding.
  64.  
  65. 3«á I'φá no⌠á happ∙á witΦ thσ "over-lonτá wordóá mechanism«á I'l∞ ì
  66. probabl∙á enΣ u≡ puttinτ iε severa∞ way≤ t∩ handlσá thσá problem¼ ì
  67. and a switch-variable for selecting one of them. Suggestions?
  68.  
  69. 4«á Morσá oµá thσá formattinτá shoulΣ bσá controlleΣá b∙á dynamiπ ì
  70. variables. Within limits, I'll get to it.
  71.  
  72. 5«áá I'vσá go⌠á workinτá wildcard-expande≥á anΣá SUBfile-followe≥ ì
  73. routine≤á (iε MORSETXT)╗á eventuall∙ ╔ wan⌠ t∩ pu⌠ thosσ iεá too¼ ì
  74. particularl∙á thσ wildcarΣ expander«á Sincσ al∞ thσá virtual-pagσ ì
  75. anΣ output-buffe≥ structure≤ arσ buil⌠ witΦ calculateΣ variables¼ ì
  76. the∙ caε bσ buil⌠ jus⌠ abovσ ß list-expansioε buffe≥ oµ uncertaiε ì
  77. length.
  78.  
  79.  
  80.      I'vσá maximizeΣá speeΣá b∙ restraininτ thσ usσá oµá relativσ ì
  81. jump≤á anΣá worΣá fetche≤ anΣ b∙ maximizinτ thσ usσá oµá registe≥ ì
  82. variables«á Eveεá witΦá that¼á thσ timσ i⌠ take≤ thσá prograφá t∩ ì
  83. forma⌠ ß virtua∞ pagσ i≤ quitσ noticeable« An∙ additiona∞ option≤ ì
  84. caεá onl∙ adΣ t∩ tha⌠ timσ overhead«á WitΦ ROF╞ ou⌠ therσ iεá thσ ì
  85. publiπ domain¼á ╔ seσ n∩ reasoε t∩ pu⌠ morσ thaε thσá comfortablσ ì
  86. minimuφ oµ proces≤ flexibilit∙ int∩ PRTCOL«á Iµ yo⌡ disagree¼ le⌠ ì
  87. mσá kno≈á wha⌠ yo⌡ conside≥ essentia∞ here..«á ╔ migh⌠á no⌠á havσ ì
  88. considereΣ it.
  89.  
  90.  
  91. HOW TO USE IT:
  92.  
  93.      PRTCOL'≤á defaul⌠ operatioε i≤ t∩ senΣ thσ outpu⌠ streaφá t∩ ì
  94. botΦá LST║á anΣ CON:«á Thσ strinτ SETUPñ i≤ sen⌠ t∩á LST║á beforσ ì
  95. processinτ begins╗á thσ strinτ PDONEñ i≤ sen⌠ t∩ LST║á afte≥ it'≤ ì
  96. done« 
  97.      Iε m∙ application¼á SETUPñ set≤ thσ printe≥ t∩ 17cpi¼ PDONEñ ì
  98. set≤á i⌠á bacδ t∩ 12cpi«á Iε thσ releasσá image¼á eacΦá oµá thesσ ì
  99. string≤ contain≤ onl∙ ß carriage-return« Wheε yo⌡ changσ thesσ t∩ ì
  100. sui⌠á you≥á application¼á don'⌠ typσ thσ bytecount¼á d∩ typσá thσ ì
  101. string≤ exactl∙ a≤ the∙ wil∞ bσ sent¼á hittinτ thσ ESCAP┼ ke∙á t∩ ì
  102. inser⌠á <escape╛á (1Bh⌐á iε thσ string«á 
  103.      Iµ you≥ strinτ ha≤ t∩ contaiε ß nul∞ (00h¼á ^@)¼ ß backspacσ ì
  104. (08h¼á ^H)¼á ß CA╬ (18h¼á ^X)¼ ß NA╦ (15h¼ ^U)¼ ß carriagσ returε ì
  105. (0Dh¼á ^M⌐á o≥á ß linefeeΣ (0Ah¼á ^J)¼á you'l∞ havσ t∩ tweaδá thσ ì
  106. strinτá witΦ ß debugge≥ o≥ ß disδ edito≥ (SUPERZA╨ i≤ superΓá fo≥ ì
  107. this)¼á becausσá thesσá arσ command≤ t∩ thσá BDOS-likσá line-edi⌠ ì
  108. routinσá tha⌠á accept≤ thσ ne≈ strinτ froφá thσá console...sorry« ì
  109. Don'⌠á forge⌠á t∩ changσ thσ bytecount¼á thσ firs⌠á bytσá iεá thσ ì
  110. string¼ t∩ sho≈ thσ numbe≥ oµ byte≤ tha⌠ follow« è     Iµá yo⌡ se⌠ ß string'≤ bytecoun⌠ t∩ zero¼á n∩ byte≤ wil∞á bσ ì
  111. sent« Again¼ you'l∞ havσ t∩ worδ oε thσ prograφ froφ outside╗ thσ ì
  112. parameter-changσá routinσ leave≤ thσ strinτ unchangeΣ iµ i⌠á get≤ ì
  113. an empty line.
  114.  
  115. Command-Line Syntax:
  116.  
  117. A0>prtcol [du:]infile[ du:][outfile][ v][ q][ ?]
  118.  
  119.      The " V" switch suppresses LST: output.
  120.      The " Q" switch suppresses CON: output.
  121.      Thσá ó ?ó switcΦ get≤ yo⌡ int∩ thσ parameter-changσ routine≤ ì
  122. afte≥á thσ prograφ sign≤ oε anΣ beforσ i⌠ start≤ t∩ reaΣá iεá it≤ ì
  123. file.
  124.  
  125.      OUTFIL┼á mus⌠ bσ specified«á That'≤ thσ onl∙ wa∙ PRTCO╠á caε ì
  126. tel∞á tha⌠á yo⌡ wan⌠ filσ output«á Yo⌡ caεá wildcarΣá thσá outpu⌠ ì
  127. filespec¼ though« Fo≥ example,--
  128.  
  129.      In             Out            Result
  130.  
  131.      tethered.got   mauled.*       output->MAULED.GOT
  132.      tethered.got   b3:*.*         output->B3:TETHERED.GOT
  133.      tethered.got   *.*            input is renamed TETHERED.BAK,
  134.                                     output->TETHERED.GOT
  135.                                    [TETHERED.$$$ until done]
  136.  
  137.  
  138. WitΦá onl∙ onσ oµ thesσ universa∞ "kerchunksó fo≥ ßá command-linσ ì
  139. argument--
  140.  
  141. A0>prtcol
  142. A0>prtcol ?
  143. A0>prtcol //
  144.  
  145.      PRTCOL shows a help screen and then goes home.
  146.  
  147.  
  148.  
  149. Parameter-Change Interface:
  150.  
  151.      Thσ v1.░ parameter-changσ interface¼á a≤ mentioneΣ above¼ i≤ ì
  152. ßá fe≈ gooΣ idea≤ tackeΣ ont∩ ß slightl∙ unpleasan⌠ driver«á 
  153.      Wheεá yo⌡ i⌠ ask≤ yo⌡ fo≥ ß label¼á typσ exactl∙á that¼á thσ ì
  154. labe∞ oµ thσ variablσ whosσ valuσ yo⌡ wisΦ t∩ change« Eithe≥ casσ ì
  155. wil∞ d∩ anΣ n∩ coloε i≤ desireΣ o≥ needed.
  156.      Iµá i⌠á ask≤á fo≥ ß hexadecima∞ value¼á i⌠ want≤á tw∩á ASCI╔ ì
  157. digits. For example, to specify <linefeed> (^J, 0Ah), type "0a".
  158.      Iµ i⌠ ask≤ fo≥ ß string¼ typσ thσ strinτ exactl∙ a≤ yo⌡ wan⌠ ì
  159. i⌠ stored«á Example║á t∩ se⌠ u≡ ß GeminΘ 15╪ fo≥ 17cpi¼á yo⌡ senΣ ì
  160. thσ string║á ESCapσ ┬ 3«á Here¼á that'≤ typeΣ iε a≤ <esc>,'B',^C« ì
  161. Don't type in a bytecount; the program does that part by itself. 
  162.  
  163. Thesσ arσ thσ variables«á Onl∙ thosσ witΦ an∙ meaninτ iε v1.░ arσ ì
  164. displayed for check and change...è
  165.      
  166. ;    -----MAGIC BYTES------
  167. ;
  168. TABSPC:    db    8        ;column count for tab expansion
  169. LOFSET:    db    8        ;left margin from print-head start
  170. COLPRT:    db    2        ;copy is split into this many columns
  171. GUTBYT:    db    5        ;inter-copy midpage margin (gutter)
  172. COLBYT:    db    35        ;width of each text column in characters
  173. ;
  174. ;The following variable is meaningless in v1.0:
  175. ;
  176. PAGLEN:    db    65        ;lines that will fit on a page
  177. ;
  178. LINES:    db    55        ;lines of copy per page
  179. HEDRUM:    db    2        ;header-to-copy margin in lines
  180. FUTRUM:    db    4        ;copy-to-footing margin in lines
  181. ;
  182. LFEED:    db    0FFh        ;0    = no perfskip.
  183.                 ;0FFh = use ^L for TOF.
  184.                 ;Else, = PERFSKIP in linefeeds
  185. BSCHAR:    db    8
  186. FFDMAP:    db    LF        ;^L is mapped to this char for CON:.
  187. ;
  188. SETUP$:    db    1,CR        ;byct, then chars
  189. ;
  190.     org    SETUP$+16
  191. ;
  192. PDONE$:    db    1,CR
  193. ;
  194.     org    PDONE$+16
  195. ;
  196. FLOPPY:    db    0FFh        ;true if floppy-based
  197. HOMDSK:    db    'B'-'A'
  198. HOMUSR:    db    0
  199. HOMNAM:    db    'PRTCOL  COM'
  200. ;
  201. ;These two aren't operative in v1.0:
  202. ;
  203. BUFENA:    db    0FFh        ;true if dot-buffers are enabled
  204. DOTENA:    db    0FFh        ;true if dot-commands are enabled
  205. ;
  206. ;Down here where they're patchable (if there's room)...
  207. ;ECHOSW may be patched to 'call' opcode for print-echo. 
  208. ;
  209. CONOUT:    ld    e,a
  210.     ld    c,2
  211. ECHOSW:    jp    BDOS
  212. ;
  213.     pop    af
  214.     push    af
  215. LSTOUT:    ld    e,a
  216.     ld    c,5
  217.     jp    BDOS
  218. ;èHOW IT WORKS:
  219.  
  220.      Thσá inpu⌠ streaφ i≤ reaΣ int∩ thσ defaul⌠ recorΣ buffe≥á a⌠ ì
  221. 80Φ anΣ fetcheΣ b∙ ß GETBYT┼ routine«á PRTCO╠ doe≤ it≤ formattinτ ì
  222. iε ß virtua∞ pagσ buffe≥ iε memory¼á jus⌠ abovσ it≤ owε codσá anΣ ì
  223. operatinτ variable≤ anΣ thσ heade≥ anΣ footinτ buffers« I⌠ use≤ ß ì
  224. pushbacδá stacδá (locateΣá jus⌠ unde≥ CCP⌐ t∩á holΣá thσá fetcheΣ ì
  225. beginninτá oµá an∙ worΣ tha⌠ won'⌠ entirel∙ fi⌠ int∩ thσá curren⌠ ì
  226. columεá line«á Al∞á memor∙ iε betweeε thosσ tw∩ arσá useΣá a≤á aε ì
  227. outpu⌠ buffe≥ wheε thσ outpu⌠ i≤ to be sen⌠ t∩ disk.
  228.  
  229.      Iµá you'vσ invokeΣ thσ parameter-changσ routine¼á tha⌠á get≤ ì
  230. ruε first«á Iµ yo⌡ changσ an∙ oµ thσ variables¼á PRTCO╠ wil∞á asδ ì
  231. whether you want those changes made permanent.
  232.      Iµ yo⌡ sa∙ yes¼ PRTCO╠ look≤ fo≥ thσ filσ nameΣ a⌠ HOMNA═ iε ì
  233. HOMUSR user area of HOMDSK drive.
  234.      Oncσ i⌠ find≤ sucΦ ß file¼á i⌠ read≤ iε thσ seconΣ recorΣ oµ ì
  235. tha⌠ filσ anΣ compare≤ i⌠ witΦ it≤ owε memor∙ areß 180h-1FFh«á Iµ ì
  236. thσá tw∩ record≤ arσ identical¼á i⌠ write≤ ou⌠ byte≤ 100h-17FΦ t∩ ì
  237. thσá firs⌠ filσ recorΣ anΣ put≤ thσ changeΣ filσá away«
  238.  
  239.      Theεá i⌠ calculate≤ addresse≤ fo≥ thσ virtua∞á pagσá buffer¼ ì
  240. baseΣá oε thσ paramete≥ variables«á Thσ columnateΣ tex⌠ goe≤ int∩ ì
  241. tha⌠ virtua∞ page╗á thσ heade≥ anΣ footinτ arσ reaΣ straigh⌠á ou⌠ ì
  242. oµ thei≥ owε buffers« There'≤ ß header-sidinτ buffe≥ too¼ useΣ t∩ ì
  243. hold a header found mid-page until the current page is sent out.
  244.  
  245.      PRTCOL'≤á heade≥á handlinτ currentl∙ differ≤á slightl∙á froφ ì
  246. tha⌠ oµ WordStar«á Iε WordStar¼ iµ ß .H┼ linσ occur≤ jus⌠ afte≥ ß ì
  247. pagσ break¼ i⌠ wil∞ bσ printeΣ a⌠ thσ to≡ oµ tha⌠ page« Iµ PRTCO╠ ì
  248. v1.░á find≤á sucΦá ß line¼á though¼á i⌠ put≤ i⌠ int∩á thσá heade≥ ì
  249. siding¼á wherσá i⌠ sit≤ unti∞ thσ curren⌠ pagσ i≤á completeΣá anΣ ì
  250. sen⌠á out«á Onl∙á theε i≤ thσ ne≈ heade≥ copieΣ int∩á thσá heade≥ ì
  251. buffer« Thi≤ wil∞ probabl∙ bσ changeΣ iε ß subsequen⌠ version¼ t∩ ì
  252. follo≈á thσá WordSta≥á style¼á eveεá thougΦá it'≤á unlikel∙á tha⌠ ì
  253. PRTCOL'≤ pagσ breaδ wil∞ occu≥ a⌠ thσ samσ placσ a≤ WordStar's.
  254.  
  255.      Startinτá witΦá thσ firs⌠ locatioε iε thσá leftmos⌠á column¼ ì
  256. PRTCO╠á write≤ thσ inpu⌠ streaφ character≤ int∩ eacΦ linσ iεá thσ ì
  257. firs⌠ column¼á afte≥ writinτ thσ Left-OFfSE╘ byte≤ int∩ place« Iµ ì
  258. ß partially-fetcheΣ worΣ won'⌠ fi⌠ int∩ thσ column¼á thσá prograφ ì
  259. move≤á backwards¼á shovinτ thσ character≤ ont∩ thσ pushbacδ stacδ ì
  260. anΣ replacinτ theφ witΦ spaces¼á unti∞ i⌠ find≤ ß space« Wheε thσ ì
  261. pushbacδ stacδ i≤ checkeΣ a⌠ thσ beginninτ oµ thσ nex⌠ line¼ tha⌠ ì
  262. partia∞á worΣ wil∞ bσ pulleΣ bacδ ofµ anΣ pluggeΣá in¼á theεá thσ ì
  263. prograφá wil∞á completσá thσá worΣ b∙ fetchinτ thσá res⌠á oµá thσ ì
  264. character≤ oε thσ inpu⌠ stream« 
  265.  
  266.      Wheεá thσ leftmos⌠ columε i≤ filleΣ in¼á thσ prograφá start≤ ì
  267. fillinτá iε thσ nex⌠ one«á EacΦ linσ oµ al∞ succeedinτ column≤ i≤ ì
  268. preceded by a GUTter BYTecount of spaces.
  269.  
  270.      An∙ <tab╛ character≤ (^I¼á 09h⌐ encountereΣ wil∞ bσ expandeΣ ì
  271. int∩á spaces«á Thσá release-versioεá imagσá ha≤á thσá controllinτ ì
  272. variablσ se⌠ t∩ columns-of-eigh⌠ (samσ a≤ BDO╙ doe≤ wheε i⌠ send≤ ìètex⌠á t∩ CON:)«á Tab-expansioε doe≤ no⌠ extenΣ beyonΣ thσ enΣá oµ ì
  273. the column line.
  274.  
  275.      Thσ las⌠ columε oµ eacΦ linσ i≤ filleΣ iε witΦ null≤á rathe≥ ì
  276. thaε spaces«á Thi≤ matter≤ becausσ null≤ aren'⌠ sen⌠ out¼á s∩ thσ ì
  277. las⌠ printablσ characte≥ oµ eacΦ multicolumε linσ oµ eacΦ pagσ i≤ ì
  278. followeΣ b∙ ß <crlf>¼á no⌠ ß streaφ oµ spaces¼á unles≤ thσ space≤ ì
  279. or a <tab> are there in the input stream« 
  280.      Oncσá thσá enΣá oµá thσ inpu⌠ filσá i≤á reacheΣá (eithe≥á b∙ ì
  281. fetchinτá aεá EOF¼á ß ^Z¼á o≥ b∙ ßá sequential-reaΣá error)¼á thσ ì
  282. remainde≥ oµ thσ las⌠ virtua∞ pagσ i≤ filleΣ iε witΦ nulls¼á witΦ ì
  283. thσ samσ resul⌠ a⌠ send-time.
  284.  
  285.      Thσá las⌠á pagσ oµ ß PRTCO╠ outpu⌠ imagσ wil∞ havσ ßá singlσ ì
  286. columεá closσ t∩ thσ lef⌠ margin¼á rathe≥ thaε (a≤ iε somσá othe≥ ì
  287. simila≥á programs⌐á tw∩ o≥ morσ shor⌠ column≤ a⌠ thσ to≡á oµá thσ ì
  288. page«á Choosσá anΣá usσ thσ too∞ tha⌠ fit≤ you≥á need≤á anΣá you≥ ì
  289. tastes; this method meets mine.
  290.  
  291.      Iεá thσá interes⌠ oµ universality¼á an∙ onσ oµ thesσ iεá thσ ì
  292. inpu⌠ streaφ i≤ considereΣ ß valiΣ End-Of-Line:
  293.  
  294.      <null>
  295.      <cr>           (found in Commodore listings)
  296.      <lf>           (found in UNIX/C listings)
  297.      <crlf>         (CP/M standard)
  298.  
  299.      ...the pushback stack makes this flexibility possible.
  300.  
  301.  
  302.  
  303. WordStar Documents and PRTCOL:
  304.      
  305. 1« Sof⌠ spaces¼ inserteΣ b∙ WordSta≥ fo≥ right-justification¼ arσ ì
  306. discarded. (Soft space = A0h = ' '+80h.) 
  307.  
  308. 2«áá Sof⌠á EOLs¼á inserteΣá b∙á WordSta≥á iεá word-wrapping¼á arσ ì
  309. discarded«á (Sof⌠ End-Of-Linσ ╜ 8Dh,0Ah╗á <cr>+80h¼ plu≤ ß norma∞ ì
  310. <lf>. Together, a "soft carriage-return".)
  311.  
  312. 3«á Sof⌠á hyphen≤ arσ discarded«á (1EΦ o≥ 1Fh╗á WordSta≥ display≤ ì
  313. botΦá a≤á half-intensit∙á hyphens.⌐á Thi≤ happen≤á iεá thσá inpu⌠ ì
  314. stream¼á s∩á thσ word≤ the∙ hyphenateΣ arσ slammeΣ bacδá togethe≥ ì
  315. and considered whole words.
  316.  
  317. 4. All print control codes (^B, etc) are discarded.
  318.  
  319. 5.   PRTCO╠á recognize≤ thσ .H┼ anΣ .F╧ dot-commands¼á respondinτ ì
  320. t∩á theφá almos⌠á a≤ doe≤ WordSta≥ b∙ puttinτá thei≥á line≤á int∩ ì
  321. heade≥ anΣ footinτ buffers« Thσ defaul⌠ heade≥ look≤ likσ tha⌠ oµ ì
  322. DISK7╗á thσá defaul⌠á footinτá i≤á WordStar'≤á linσá number«á An∙ ì
  323. encountereΣ heade≥ anΣ footinτ wil∞ displacσ them.
  324.      PRTCO╠á recognize≤á WordStar'≤á '#º symbo∞ iεá ßá heade≥á o≥ ì
  325. footing and replaces it with the current page number.
  326.      PRTCOL does NOT recognize WordStar's ^K code.è     An∙á othe≥á do⌠ command≤ encountereΣ arσá treateΣá likσá an∙ ì
  327. other text.
  328.  
  329.  
  330. Antidisestablishmentarianisms and other freight trains
  331.  
  332.      PRTCO╠á use≤ ß pushbacδ stack¼á witΦ I╪ a≤ it≤á pointer¼á t∩ ì
  333. holΣá an∙ portioε oµ ß worΣ tha⌠ won'⌠ fi⌠ iε ß columεá line«á I⌠ ì
  334. pull≤á tha⌠ word-beginninτ bacδ ofµ thσ stacδ t∩ begiεá thσá nex⌠ ì
  335. columεá line«á 
  336.      Iεá thi≤á program¼á ß worΣ i≤ ß characte≥ strinτ boundeΣá b∙ ì
  337. spaces¼á tabs¼ EOL≤ (<cr>¼ <lf>¼ <crlf╛ o≥ <null>⌐ o≥ EOF« PRTCO╠ ì
  338. doe≤á no⌠á havσ WordStar'≤ programmeΣ abilit∙ t∩ breaδá u≡á word≤ ì
  339. int∩ syllables¼ no≥ doe≤ i⌠ distinguisΦ betweeε alphanumeric≤ anΣ ì
  340. punctuation«á Tha⌠á mean≤ tha⌠ thσ followinτ file-sourcσá string¼ ì
  341. familia≥á t∩ anybod∙ who'≤ haΣ t∩ suffe≥ througΦ m∙ files¼á i≤á ß ì
  342. single very long word:
  343.  
  344.      BLADES/Ampro[lies.961]--CHR$(13)16FEB86
  345.  
  346.      Thσá firs⌠á versioε oµ PRTCO╠ shoveΣ mos⌠ oµ thi≤á ont∩á thσ ì
  347. pushbacδá stack¼á theε filleΣ pagσ afte≥ pagσ witΦá blanδá lines¼ ì
  348. vainl∙á lookinτ fo≥ ß linσ lonτ enougΦ t∩ holΣ it¼á neve≥á seeinτ ì
  349. thσ EO╞ (^Z⌐ tha⌠ wa≤ next in the input stream« 
  350.  
  351.      M∙á wa∙ ou⌠ oµ thi≤ i≤ ß kluge║á iµ PRTCO╠ v1.░ find≤ sucΦ ß ì
  352. lonτ word¼á i⌠ shove≤ i⌠ int∩ thσ footinτ buffer¼á plant≤ ß page-ì
  353. numbe≥á symbo∞á behinΣá it¼á theε continue≤á a≤á iµá nothinτá haΣ ì
  354. happened«á Iµ i⌠ find≤ anothe≥ one¼ i⌠ doe≤ i⌠ again¼ eveε iµ thσ ì
  355. firs⌠ onσ hasn'⌠ beeε printeΣ yet« 
  356.      Iεá m∙á case¼á that'≤á thσ las⌠ thinτ ╔ pu⌠ iεá ßá file¼á t∩ ì
  357. reassurσ mσ tha⌠ I'vσ go⌠ thσ las⌠ pagσ printeΣ ou⌠ anΣ t∩ reminΣ ì
  358. mσ oµ wha⌠ disδ oε wha⌠ machinσ ha≤ thσ filσ (anΣ wheε ╔á starteΣ ì
  359. thσá file)«á Iµá you'rσá fonΣ oµ lonτá words¼á though¼á o≥á ASCI╔ ì
  360. graphics¼á you'rσ eithe≥ goinτ t∩ makσ you≥ columε line≤ a⌠ leas⌠ ì
  361. as long as such or you're going to have a problem.
  362.  
  363.  
  364. WS-FORMATTED COLUMNS:
  365.  
  366. To preserve WordStar right-justification, follow these steps:
  367.  
  368. 1«á Reforma⌠ you≥ tex⌠ t∩ thσ exac⌠ columε widtΦ yo⌡ want¼á usinτ ì
  369. WordStar«
  370.           [^OR <right-margin column> <cr> ^QR ^QQB ]
  371.      Pu⌠á paragrapΦá break≤ anywherσ yo⌡ wan⌠á them«á Thσá resul⌠ ì
  372. shoulΣ bσ ß single¼ ver∙ lonτ column« 
  373.  
  374. 2«á Typσá iεá full-lengtΦá (80Φ max⌐ .H┼ anΣ .F╧á line≤á anywherσ ì
  375. they'rσá wanteΣ (keepinτ iε minΣ thσ differencσ iε thσá treatmen⌠ ì
  376. oµ .H┼ line≤ betweeε W╙ anΣ PRTCO╠ v1.0)« Thσ dot-command≤ d∩ NO╘ ì
  377. have to be capitalized to be recognized. 
  378.  
  379. 3. Savσ thσ result« 
  380. è4« Hardeε thσ formattinτ witΦ WSDOCON¼ TOPSTRIP¼ PIP¼ o≥ anythinτ ì
  381. elsσ tha⌠ reset≤ bi⌠ d╖ oµ ever∙ byte«á TOPSTRI╨ ha≤ thσá dubiou≤ ì
  382. advantage of not generating yet another *.BAK file.
  383.  
  384. 5«á Ruεá thσá filσ througΦ PRTCOL¼á settinτ COLBY╘ t∩á thσá exac⌠ ì
  385. column width.
  386.  
  387. PRTCO╠ wil∞ reaΣ iε thσ columε lines¼ plugginτ theφ int∩ placσ iε ì
  388. it≤á virtua∞á pagσá anΣ findinτ tha⌠ (surprise!⌐á ever∙á linσá i≤ ì
  389. cleanl∙ done«á It'l∞ handlσ heade≥ anΣ footinτ line≤ a≤ describeΣ ì
  390. above.
  391.  
  392. Onσá improvemen⌠á ╔ havσ iε minΣ i≤ ß switcΦ t∩ causσá PRTCO╠á t∩ ì
  393. stri≡ ofµ thσ to≡ bit≤ oµ sof⌠ space≤ anΣ theε usσá them¼á rathe≥ ì
  394. thaε jus⌠ throwinτ sof⌠ space≤ anΣ <cr>≤ away«á Fo≥ now¼á though¼ ì
  395. you'l∞ havσ t∩ flatteε thosσ bit≤ t∩ ge⌠ thσ W╙ formatting.
  396.  
  397.  
  398.  
  399.  
  400. Hope this helps.
  401.  
  402.  
  403. 73 & GH   --CHR$(13)WB1HKU/6
  404.  
  405.  
  406.  
  407. eof PRTCOL.DOC/Ampro[istuff.984]--CHR$(13)30JUN86
  408.