home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug050.arc / MARKER.DOC < prev    next >
Text File  |  1979-12-31  |  8KB  |  175 lines

  1.                   MARKER PROGRAM FOR WORDBEE FILES:
  2.       Competition entry by Arthur Solomon, Millbrook, Victoria. 
  3.  
  4. PURPOSE OF PROGRAM:
  5.  
  6.      Thσá purposσ oµ thσ Marke≥ Prograφ i≤ t∩ enablσ individua∞ words¼ ì
  7. phrase≤á o≥á block≤á oµ tex⌠ t∩ bσ highlighteΣ wheεá W'beeá tex⌠á i≤ ì
  8. printeΣ ou⌠ - eithe≥ b∙ puttinτ tha⌠ par⌠ oµ thσ tex⌠ iεá ITALICS¼á o≥ ì
  9. EMPHASIZE─ (BOLDFACE)¼ EXPANDE─ o≥ COMPRESSE─ PRINT.
  10.  
  11. HISTORY:
  12.  
  13. ╔ wrotσ thσ origina∞ MARKE╥ prograφ iε 1983¼ basinτ i⌠ upoε aε articlσ ì
  14. writteε b∙ Michae∞ Dunba≥ iε "Electronic≤ International"« Hi≤ ideß wa≤ ì
  15. t∩á identif∙ word≤ o≥ phrase≤ iε W'beσ tex⌠ b∙ finger≤ (|)¼á g∩ t∩ thσ ì
  16. Monito≥á anΣá t∩ locatσ thosσ finger≤ witΦ thσ ╙ commanΣá anΣá replacσ ì
  17. theφ witΦ thσ appropriatσ printe≥ codes« AlthougΦ ß littlσ cumbersome¼ ì
  18. i⌠á wa≤ ß lo⌠ easie≥ thaε thσ norma∞ method≤ useΣ t∩ highligh⌠ ßá par-ì
  19. ticula≥á worΣ - i.e«á b∙ usσ oµ thσ .E╙ W'beσ commanΣ anΣ jugglinτá oµ ì
  20. thσá text«á Hσá suggesteΣ tha⌠ ß machinσ languagσ coulΣ bσ writteεá t∩ ì
  21. appl∙ hi≤ methoΣ automatically« ╔ wrotσ tha⌠ prograφ anΣ calleΣ i⌠ thσ ì
  22. MARKE╥ PROGRAM« Iε 198│ i⌠ wa≤ writteε fo≥ ß RO═ baseΣ machine¼ bu⌠ iε ì
  23. 198╖ i⌠ wa≤ reviseΣ fo≥ thσ 64δ C.I.A.B« CP/═ Microbee.
  24. 
  25. PREPARATION OF THE MARKER FILE:
  26.  
  27. Froφ thσ Sourcσ code¼á preparσ aε objec⌠ codσ filσ anΣ storσ i⌠ oε thσ ì
  28. samσá disδ tha⌠ contain≤ you≥ Wordbeσ files«á ╔ prepareΣ m∙ filσá witΦ ì
  29. EDASM«  ╔ nameΣ thσ objec⌠ languagσ filσ a≤ MARKER.EDT« 
  30. 
  31. USE OF THE MARKER PROGRAM:
  32. 
  33. G∩á t∩ W'bee anΣ loaΣ ß filσ yo⌡ wan⌠ t∩ edi⌠ fo≥ thσ purposσ oµ in-ì
  34. sertinτ emphase≤ sucΦ a≤ italic≤ int∩ thσ text¼á o≥ simpl∙  opeε ß ne≈ ì
  35. filσ iµ tha⌠ i≤ you≥ intention« (Le⌠ u≤ assumσ yo⌡ havσ somσ sucΦ filσ ì
  36. a≤ MARKER.ED╘ o≥ MARKER.OB╩ oε thσ disk.⌐ "Markó thσ word¼á phrase≤ o≥ ì
  37. block≤á oµá tex⌠ b∙ precedinτ i⌠ anΣ closinτ i⌠ witΦá PAIR╙á oµá thesσ ì
  38. "markers"«á  Pair≤á oµ marker≤ mus⌠ bσ useΣ becausσ wσ mus⌠ allo≈á fo≥ ì
  39. sendinτáthσáES├ácodσát∩ thσ printe≥ a≤ wel∞ a≤áthσáprinte≥ácodσ itself«á 
  40.  
  41. Yo⌡á havσá t∩ decidσ wha⌠ yo⌡ wil∞ usσ a≤ marker≤ anΣ wha⌠á the∙á wil∞ ì
  42. represent« ╔ chosσ a≤ marker≤ thσ symbol≤ |,^,\,`«  ╔ useΣ thσ marker≤ ì
  43. |ⁿá fo≥á ITALICS¼á `αá fo≥ COMPRESSED¼á \▄ fo≥á EXPANDE─á anΣá ^▐á fo≥ ì
  44. EMPHASIZE─ (BOLDFACE⌐ PRINT«á Fo≥ example¼ supposσ iε thσ Wordbeσ tex⌠ ì
  45. ╔ wan⌠ t∩ writσ thσ phrasσ "Ne≈ Guineaó iε ITALICS« ╔ precedσ anΣ tai∞ ì
  46. thσ phrasσ "Ne≈ Guineaó witΦ pair≤ oµ markers«á ╔ writσ i⌠ thu≤ "||Ne≈ ì
  47. Guinea||"«á  Iµ ╔ wan⌠ t∩ writσ thσ worΣ "NOTEó iε EMPHASIZE─ PRINT¼ ╔ ì
  48. writσ i⌠ thu≤ "^^NOTE^^".
  49.  
  50. S∩ fa≥ wσ onl∙ havσ thi≤ phrasσ anΣ thi≤ worΣ pickeΣ ou⌠ b∙ "markers"« ì
  51. Wσá no≈ havσ t∩ turε thesσ marker≤ int∩ printe≥ code≤ (Wσ canno⌠ d∩ i⌠ ì
  52. directl∙á iε Wordbeσ becausσ Wordbeσ wil∞ no⌠ accep⌠ printe≥ code≤á iε ì
  53. thσ bod∙ oµ text╗á thi≤ i≤ wh∙ wσ havσ t∩ bσ s∩ deviou≤ abou⌠ it!⌐.
  54.  
  55. T∩á turεá thesσ marker≤ int∩ printe≥ codes¼á wσ usσ thσá MARKER.ED╘á » ì
  56. MARKER.OB╩ filσ thus║á Froφ W'bee¼ wσ usσ thσ ┼ commanΣ t∩ returε t∩ ì
  57. CP/═ wherσ wσ pu⌠ thσ MARKE╥ filσ int∩ memor∙ a⌠  B000╚  b∙ usinτá thσ ì
  58. commanΣá GE╘ B00░ MARKER.ED╘ (o≥ MARKER.OBJ)«á Froφ CP/═ wσ returεá t∩ ì
  59. W'bee¼á g∩ t∩ Monito≥ again¼á anΣ wσ typσ ╟ B000« Thσ prograφ wil∞ no≈ ìèsearcΦ thσ W'beσ filσ fo≥ thσ "markersó anΣ automaticall∙ replacσ theφ ì
  60. witΦ thσ printe≥ codes« Thσ prograφ wil∞ theε returε yo⌡ t∩ thσ file.
  61.  
  62. No≈ thi≤ procedurσ migh⌠ becomσ tediou≤ iµ wσ wen⌠ througΦ i⌠ fo≥ EAC╚ ì
  63. worΣá o≥ phrasσ etc«á wσ wisheΣ t∩ highligh⌠ iε thσ Wordbeσ text¼á bu⌠ ì
  64. sincσá MARKE╥ i≤ ß prograφ whicΦ caε swiftl∙ searcΦ thσ WHOL┼á oµá thσ ì
  65. Wordbeσá file¼á therσ i≤ nothinτ t∩ preven⌠ u≤ froφ writinτ man∙ page≤ ì
  66. oµá text¼á usinτá thσ "markersó a≤ wσ go¼á anΣ theε afte≥á ßá completσ ì
  67. sessioε oµ writing¼ usinτ thσ MARKE╥ prograφ a⌠ thσ ver∙ enΣ t∩ changσ ì
  68. al∞á thσ marke≥ usage≤ int∩ printe≥ codes«á Iε thi≤ wa∙ thσá procedurσ ì
  69. outlineΣ abovσ become≤ ver∙ fas⌠ indeed.
  70. 
  71. FURTHER NOTES:-
  72. 
  73. 1«á D∩á takσ gooΣ carσ tha⌠ yo⌡ usσ marke≥ pair≤ a⌠ thσ beginninτá AN─ ì
  74. closσ oµ eacΦ word¼á phrasσ o≥ blocδ iε thσ W'beσ text¼á otherwisσ yo⌡ ì
  75. wil∞ havσ somσ ver∙ odΣ results«á Iµ thi≤ doe≤ occur¼ yo⌡ wil∞ havσ t∩ ì
  76. g∩ bacδ t∩ wherσ thσ troublσ start≤ anΣ erasσ al∞ thσ marker≤ witΦ thσ ì
  77. Wordbeσá ^╟ commanΣ anΣ theε reinser⌠ them«á Doublσ checδ thσá marker≤ ì
  78. BEFOR┼ yo⌡ cal∞ thσ MARKE╥ prograφ int∩ operation!
  79.  
  80. 2«á Thσá prograφ wa≤ writteε fo≥ aε Epsom-typσ printe≥ whosσá printer-ì
  81. code≤ D╧ NO╘ contaiε an∙ morσ thaε TW╧ terms«á E.G« thσ MB-10░ printe≥ ì
  82. use≤á THRE┼ term≤ iε thσ printe≥ codσ fo≥ ITALICS¼á thu≤ thi≤á prograφ ì
  83. woulΣ no⌠ worδ fo≥ italic≤ oε tha⌠ machine« ╔ havσ no⌠ beeε successfu∞ ì
  84. iε adaptinτ thσ MARKE╥ prograφ fo≥ tha⌠ machine.
  85.  
  86. 3«á Thσá prograφ i≤ writteε fo≥ thσ ordinar∙ WORDBE┼ prograφ fo≥á disδ ì
  87. baseΣá Microbees«á I⌠á caε bσ adapteΣ quitσ simpl∙ fo≥ thσá RO═á baseΣ ì
  88. machine≤ b∙ changinτ STAR╘  L─  HL,2500╚   t∩  STAR╘  L─  HL,900╚á anΣ ì
  89. b∙ changinτ  L─ DE,(221DH⌐  t∩  L─ DE,(051DH).
  90.  
  91. 4« Thi≤ prograφ wil∞ no⌠ worδ a≤ i≤ witΦ GRAPHI├ W'bee« T∩ adap⌠ i⌠ t∩ ì
  92. GRAPHI├ W'bee¼ yo⌡ mus⌠ changσ  STAR╘  L─  HL,(2500h⌐      t∩ 
  93. STAR╘  L─ HL,(2201H)¼    anΣ    L─  DE,(221DH⌐    t∩   L─  DE,(1F1DH).
  94.  
  95. 5«á Printer≤ var∙ ß littlσ witΦ thei≥ printinτ codes«á Checδ thσ code≤ ì
  96. oµ you≥ printe≥ fo≥ italics¼á emphasizeΣ print¼á expandeΣ prin⌠ etc« ╔ ì
  97. usσá ß BMC-8░ anΣ it≤ codσ fo≥ italic≤ i≤ ES├ 52/ES├ 53╗á fo≥ expandeΣ ì
  98. prin⌠á ES├á 14/ES├ 20╗á fo≥ compresseΣ prin⌠ ES├ 15/ES├á 18¼á anΣá fo≥ ì
  99. emphasizeΣ prin⌠ ES├ 69/ES├ 70« (Al∞ figure≤ arσ decimal).
  100.  
  101.                   MARKER.EDT      (CP/M DISC SYSTEM)
  102.  
  103. ;SETTING UP PROGRAMME AND TESTING FOR END OF WORDBEE FILE
  104.     ORG    0B000H        ;A safe place for programme
  105.     LD    B,00H        ;Set counter no.1.
  106.     LD    C,00H        ;Set counter no.2.
  107.     LD    D,00H        ;Set counter no.3.
  108.     LD    E,00H        ;Set counter no.4.
  109. START    LD    HL,2500H    ;Initialise file pointer      
  110. COME    PUSH    DE        ;Save contents of D and E
  111.     LD    DE,(221DH)    ;Find top of Wordbee file
  112.     LD    A,L        ;Test for file end,LSB
  113.     CP    E
  114.     JP    NZ,BEGIN    ;Not end, go to main program
  115.     LD    A,H        ;Test for end of file, MSB
  116.     CP    D
  117.     JP      Z,100H        ;File end, return to WdbeeèBEGIN    POP    DE        ;Marker programme begins
  118.     LD    A,(HL)        ;Bring first byte from file
  119. ;
  120. ;          ITALIC PRINT  SUB-PROGRAMME
  121. CONT    CP    7CH        ;Test for marker (|)
  122.     JR    NZ,EMPHAS    ;if none, to next section
  123.     LD    (HL),01BH    ;replace marker with code
  124.     INC    B        ;increment counter
  125.     INC    HL        ;increment pointer
  126.     BIT    0,B        ;test if cycle odd/even
  127.     JR    Z,ITALIC    ;if even cycle then jump
  128.     LD    (HL),034H    ;replace marker with code    
  129.     JR    ADVAN1        ;jump over next instruction
  130. ITALIC    LD    (HL),035H    ;replace marker with code
  131. ADVAN1    INC    HL        ;increment pointer
  132.     JR    COME        ;continue process   
  133. ;
  134. ;          EMPHASIZED PRINT SUB-PROGRAMME
  135. EMPHAS    CP    05EH        ;test for marker (  )
  136.     JR    NZ,EXPAND    ;if not, to next section
  137.     LD    (HL),01BH    ;replace marker with code
  138.     INC    C        ;increment counter
  139.     INC    HL        ;increment pointer
  140.     BIT    0,C        ;test if cycle odd/even 
  141.     JR    Z,EMPOFF    ;if even cycle then jump
  142.     LD    (HL),045H    ;replace marker with code
  143.     JR    ADVAN2        ;jump over next instruction
  144. EMPOFF    LD    (HL),046H    ;replace marker with code
  145. ADVAN2    INC    HL        ;increment pointer
  146.     JR    COME        ;continue process
  147. ;
  148. ;        EXPANDED PRINT SUB-PROGRAMME
  149. EXPAND    CP    05CH        ;test for marker (\)
  150.     JR    NZ,COMPRS    ;if not, to next section
  151.     LD    (HL),01BH    ;replace marker with code
  152.     INC    D        ;increment counter
  153.     INC    HL         ;increment pointer
  154.     BIT    0,D        ;test if cycle odd/even 
  155.     JR    Z,EXPOFF    ;if cycle even, jump
  156.     LD    (HL),0EH    ;replace marker with code
  157.     JR    ADVAN3        ;jump over next instruction
  158. EXPOFF    LD    (HL),014H    ;replace marker with code
  159. ADVAN3    INC    HL        ;increment pointer
  160.     JR    COME        ;continue process
  161. ;
  162. ;        COMPRESSED PRINT SUB-PROGRAMME
  163. COMPRS    CP    060H        ;test for marker (`)
  164.     JR    NZ,ADVAN4    ;if not, continue
  165.     LD    (HL),01BH      ;replace marker with code
  166.     INC    E        ;increment counter
  167.     INC    HL        ;increment pointer
  168.     BIT    0,E        ;test if cycle odd/even
  169.     JR    Z,COMPOF     ;if cycle even, jump
  170.     LD    (HL),0FH    ;replace marker with code
  171.     JR    ADVAN4        ;jump over next instruction
  172. COMPOF    LD    (HL),012H    ;replace marker with code
  173. ADVAN4    INC    HL        ;increment pointer
  174.     JR    COME        ;back to base!
  175.     ENDè