home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG050.ARC
/
MARKER.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
8KB
|
175 lines
MARKER PROGRAM FOR WORDBEE FILES:
Competition entry by Arthur Solomon, Millbrook, Victoria.
PURPOSE OF PROGRAM:
Thσá purposσ oµ thσ Marke≥ Prograφ i≤ t∩ enablσ individua∞ words¼ ì
phrase≤á o≥á block≤á oµ tex⌠ t∩ bσ highlighteΣ wheεá W'beeá tex⌠á i≤ ì
printeΣ ou⌠ - eithe≥ b∙ puttinτ tha⌠ par⌠ oµ thσ tex⌠ iεá ITALICS¼á o≥ ì
EMPHASIZE─ (BOLDFACE)¼ EXPANDE─ o≥ COMPRESSE─ PRINT.
HISTORY:
╔ wrotσ thσ origina∞ MARKE╥ prograφ iε 1983¼ basinτ i⌠ upoε aε articlσ ì
writteε b∙ Michae∞ Dunba≥ iε "Electronic≤ International"« Hi≤ ideß wa≤ ì
t∩á identif∙ word≤ o≥ phrase≤ iε W'beσ tex⌠ b∙ finger≤ (|)¼á g∩ t∩ thσ ì
Monito≥á anΣá t∩ locatσ thosσ finger≤ witΦ thσ ╙ commanΣá anΣá replacσ ì
theφ witΦ thσ appropriatσ printe≥ codes« AlthougΦ ß littlσ cumbersome¼ ì
i⌠á wa≤ ß lo⌠ easie≥ thaε thσ norma∞ method≤ useΣ t∩ highligh⌠ ßá par-ì
ticula≥á worΣ - i.e«á b∙ usσ oµ thσ .E╙ W'beσ commanΣ anΣ jugglinτá oµ ì
thσá text«á Hσá suggesteΣ tha⌠ ß machinσ languagσ coulΣ bσ writteεá t∩ ì
appl∙ hi≤ methoΣ automatically« ╔ wrotσ tha⌠ prograφ anΣ calleΣ i⌠ thσ ì
MARKE╥ PROGRAM« Iε 198│ i⌠ wa≤ writteε fo≥ ß RO═ baseΣ machine¼ bu⌠ iε ì
198╖ i⌠ wa≤ reviseΣ fo≥ thσ 64δ C.I.A.B« CP/═ Microbee.
PREPARATION OF THE MARKER FILE:
Froφ thσ Sourcσ code¼á preparσ aε objec⌠ codσ filσ anΣ storσ i⌠ oε thσ ì
samσá disδ tha⌠ contain≤ you≥ Wordbeσ files«á ╔ prepareΣ m∙ filσá witΦ ì
EDASM« ╔ nameΣ thσ objec⌠ languagσ filσ a≤ MARKER.EDT«
USE OF THE MARKER PROGRAM:
G∩á t∩ W'bee anΣ loaΣ ß filσ yo⌡ wan⌠ t∩ edi⌠ fo≥ thσ purposσ oµ in-ì
sertinτ emphase≤ sucΦ a≤ italic≤ int∩ thσ text¼á o≥ simpl∙ opeε ß ne≈ ì
filσ iµ tha⌠ i≤ you≥ intention« (Le⌠ u≤ assumσ yo⌡ havσ somσ sucΦ filσ ì
a≤ MARKER.ED╘ o≥ MARKER.OB╩ oε thσ disk.⌐ "Markó thσ word¼á phrase≤ o≥ ì
block≤á oµá tex⌠ b∙ precedinτ i⌠ anΣ closinτ i⌠ witΦá PAIR╙á oµá thesσ ì
"markers"«á Pair≤á oµ marker≤ mus⌠ bσ useΣ becausσ wσ mus⌠ allo≈á fo≥ ì
sendinτáthσáES├ácodσát∩ thσ printe≥ a≤ wel∞ a≤áthσáprinte≥ácodσ itself«á
Yo⌡á havσá t∩ decidσ wha⌠ yo⌡ wil∞ usσ a≤ marker≤ anΣ wha⌠á the∙á wil∞ ì
represent« ╔ chosσ a≤ marker≤ thσ symbol≤ |,^,\,`« ╔ useΣ thσ marker≤ ì
|ⁿá fo≥á ITALICS¼á `αá fo≥ COMPRESSED¼á \▄ fo≥á EXPANDE─á anΣá ^▐á fo≥ ì
EMPHASIZE─ (BOLDFACE⌐ PRINT«á Fo≥ example¼ supposσ iε thσ Wordbeσ tex⌠ ì
╔ wan⌠ t∩ writσ thσ phrasσ "Ne≈ Guineaó iε ITALICS« ╔ precedσ anΣ tai∞ ì
thσ phrasσ "Ne≈ Guineaó witΦ pair≤ oµ markers«á ╔ writσ i⌠ thu≤ "||Ne≈ ì
Guinea||"«á Iµ ╔ wan⌠ t∩ writσ thσ worΣ "NOTEó iε EMPHASIZE─ PRINT¼ ╔ ì
writσ i⌠ thu≤ "^^NOTE^^".
S∩ fa≥ wσ onl∙ havσ thi≤ phrasσ anΣ thi≤ worΣ pickeΣ ou⌠ b∙ "markers"« ì
Wσá no≈ havσ t∩ turε thesσ marker≤ int∩ printe≥ code≤ (Wσ canno⌠ d∩ i⌠ ì
directl∙á iε Wordbeσ becausσ Wordbeσ wil∞ no⌠ accep⌠ printe≥ code≤á iε ì
thσ bod∙ oµ text╗á thi≤ i≤ wh∙ wσ havσ t∩ bσ s∩ deviou≤ abou⌠ it!⌐.
T∩á turεá thesσ marker≤ int∩ printe≥ codes¼á wσ usσ thσá MARKER.ED╘á » ì
MARKER.OB╩ filσ thus║á Froφ W'bee¼ wσ usσ thσ ┼ commanΣ t∩ returε t∩ ì
CP/═ wherσ wσ pu⌠ thσ MARKE╥ filσ int∩ memor∙ a⌠ B000╚ b∙ usinτá thσ ì
commanΣá GE╘ B00░ MARKER.ED╘ (o≥ MARKER.OBJ)«á Froφ CP/═ wσ returεá t∩ ì
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φ ì
witΦ thσ printe≥ codes« Thσ prograφ wil∞ theε returε yo⌡ t∩ thσ file.
No≈ thi≤ procedurσ migh⌠ becomσ tediou≤ iµ wσ wen⌠ througΦ i⌠ fo≥ EAC╚ ì
worΣá o≥ phrasσ etc«á wσ wisheΣ t∩ highligh⌠ iε thσ Wordbeσ text¼á bu⌠ ì
sincσá MARKE╥ i≤ ß prograφ whicΦ caε swiftl∙ searcΦ thσ WHOL┼á oµá thσ ì
Wordbeσá file¼á therσ i≤ nothinτ t∩ preven⌠ u≤ froφ writinτ man∙ page≤ ì
oµá text¼á usinτá thσ "markersó a≤ wσ go¼á anΣ theε afte≥á ßá completσ ì
sessioε oµ writing¼ usinτ thσ MARKE╥ prograφ a⌠ thσ ver∙ enΣ t∩ changσ ì
al∞á thσ marke≥ usage≤ int∩ printe≥ codes«á Iε thi≤ wa∙ thσá procedurσ ì
outlineΣ abovσ become≤ ver∙ fas⌠ indeed.
FURTHER NOTES:-
1«á D∩á takσ gooΣ carσ tha⌠ yo⌡ usσ marke≥ pair≤ a⌠ thσ beginninτá AN─ ì
closσ oµ eacΦ word¼á phrasσ o≥ blocδ iε thσ W'beσ text¼á otherwisσ yo⌡ ì
wil∞ havσ somσ ver∙ odΣ results«á Iµ thi≤ doe≤ occur¼ yo⌡ wil∞ havσ t∩ ì
g∩ bacδ t∩ wherσ thσ troublσ start≤ anΣ erasσ al∞ thσ marker≤ witΦ thσ ì
Wordbeσá ^╟ commanΣ anΣ theε reinser⌠ them«á Doublσ checδ thσá marker≤ ì
BEFOR┼ yo⌡ cal∞ thσ MARKE╥ prograφ int∩ operation!
2«á Thσá prograφ wa≤ writteε fo≥ aε Epsom-typσ printe≥ whosσá printer-ì
code≤ D╧ NO╘ contaiε an∙ morσ thaε TW╧ terms«á E.G« thσ MB-10░ printe≥ ì
use≤á THRE┼ term≤ iε thσ printe≥ codσ fo≥ ITALICS¼á thu≤ thi≤á prograφ ì
woulΣ no⌠ worδ fo≥ italic≤ oε tha⌠ machine« ╔ havσ no⌠ beeε successfu∞ ì
iε adaptinτ thσ MARKE╥ prograφ fo≥ tha⌠ machine.
3«á Thσá prograφ i≤ writteε fo≥ thσ ordinar∙ WORDBE┼ prograφ fo≥á disδ ì
baseΣá Microbees«á I⌠á caε bσ adapteΣ quitσ simpl∙ fo≥ thσá RO═á baseΣ ì
machine≤ b∙ changinτ STAR╘ L─ HL,2500╚ t∩ STAR╘ L─ HL,900╚á anΣ ì
b∙ changinτ L─ DE,(221DH⌐ t∩ L─ DE,(051DH).
4« Thi≤ prograφ wil∞ no⌠ worδ a≤ i≤ witΦ GRAPHI├ W'bee« T∩ adap⌠ i⌠ t∩ ì
GRAPHI├ W'bee¼ yo⌡ mus⌠ changσ STAR╘ L─ HL,(2500h⌐ t∩
STAR╘ L─ HL,(2201H)¼ anΣ L─ DE,(221DH⌐ t∩ L─ DE,(1F1DH).
5«á Printer≤ var∙ ß littlσ witΦ thei≥ printinτ codes«á Checδ thσ code≤ ì
oµ you≥ printe≥ fo≥ italics¼á emphasizeΣ print¼á expandeΣ prin⌠ etc« ╔ ì
usσá ß BMC-8░ anΣ it≤ codσ fo≥ italic≤ i≤ ES├ 52/ES├ 53╗á fo≥ expandeΣ ì
prin⌠á ES├á 14/ES├ 20╗á fo≥ compresseΣ prin⌠ ES├ 15/ES├á 18¼á anΣá fo≥ ì
emphasizeΣ prin⌠ ES├ 69/ES├ 70« (Al∞ figure≤ arσ decimal).
MARKER.EDT (CP/M DISC SYSTEM)
;SETTING UP PROGRAMME AND TESTING FOR END OF WORDBEE FILE
ORG 0B000H ;A safe place for programme
LD B,00H ;Set counter no.1.
LD C,00H ;Set counter no.2.
LD D,00H ;Set counter no.3.
LD E,00H ;Set counter no.4.
START LD HL,2500H ;Initialise file pointer
COME PUSH DE ;Save contents of D and E
LD DE,(221DH) ;Find top of Wordbee file
LD A,L ;Test for file end,LSB
CP E
JP NZ,BEGIN ;Not end, go to main program
LD A,H ;Test for end of file, MSB
CP D
JP Z,100H ;File end, return to WdbeeèBEGIN POP DE ;Marker programme begins
LD A,(HL) ;Bring first byte from file
;
; ITALIC PRINT SUB-PROGRAMME
CONT CP 7CH ;Test for marker (|)
JR NZ,EMPHAS ;if none, to next section
LD (HL),01BH ;replace marker with code
INC B ;increment counter
INC HL ;increment pointer
BIT 0,B ;test if cycle odd/even
JR Z,ITALIC ;if even cycle then jump
LD (HL),034H ;replace marker with code
JR ADVAN1 ;jump over next instruction
ITALIC LD (HL),035H ;replace marker with code
ADVAN1 INC HL ;increment pointer
JR COME ;continue process
;
; EMPHASIZED PRINT SUB-PROGRAMME
EMPHAS CP 05EH ;test for marker ( )
JR NZ,EXPAND ;if not, to next section
LD (HL),01BH ;replace marker with code
INC C ;increment counter
INC HL ;increment pointer
BIT 0,C ;test if cycle odd/even
JR Z,EMPOFF ;if even cycle then jump
LD (HL),045H ;replace marker with code
JR ADVAN2 ;jump over next instruction
EMPOFF LD (HL),046H ;replace marker with code
ADVAN2 INC HL ;increment pointer
JR COME ;continue process
;
; EXPANDED PRINT SUB-PROGRAMME
EXPAND CP 05CH ;test for marker (\)
JR NZ,COMPRS ;if not, to next section
LD (HL),01BH ;replace marker with code
INC D ;increment counter
INC HL ;increment pointer
BIT 0,D ;test if cycle odd/even
JR Z,EXPOFF ;if cycle even, jump
LD (HL),0EH ;replace marker with code
JR ADVAN3 ;jump over next instruction
EXPOFF LD (HL),014H ;replace marker with code
ADVAN3 INC HL ;increment pointer
JR COME ;continue process
;
; COMPRESSED PRINT SUB-PROGRAMME
COMPRS CP 060H ;test for marker (`)
JR NZ,ADVAN4 ;if not, continue
LD (HL),01BH ;replace marker with code
INC E ;increment counter
INC HL ;increment pointer
BIT 0,E ;test if cycle odd/even
JR Z,COMPOF ;if cycle even, jump
LD (HL),0FH ;replace marker with code
JR ADVAN4 ;jump over next instruction
COMPOF LD (HL),012H ;replace marker with code
ADVAN4 INC HL ;increment pointer
JR COME ;back to base!
ENDè