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
/
MBUG090.ARC
/
COUNT.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
6KB
|
117 lines
COUNT - Version 1.5 - 3/29/84
=============================
by Robert Throckmorton
CP/Morrow Computer Group
Sacramento, CA
Permissioεá i≤ granteΣ t∩ cop∙ thi≤ prograφ anΣ thσá accompanyinτ ì
documentatioε fo≥ an∙ non-commercia∞ use.
Overview: COUN╘ read≤ ASCI╔ tex⌠ file≤ anΣ count≤ thσ numbe≥á oµ ì
áááááááááááword≤á containeΣ therein«á Non-alphabetiπ character≤ ì
áááááááááááarσá generall∙ treateΣ a≤ space≤ (therσ i≤ onσá mino≥ ì
áááááááááááexceptioε noteΣ below⌐ anΣ onl∙ word≤ witΦ tw∩ o≥ morσ ì
ááááááááááácharacter≤á arσ counted«á Fo≥ WordSta≥á users¼á thi≤ ì
áááááááááááVersioεá (1.5⌐ ignore≤ Do⌠ CommanΣ Line≤á (meaninτá i⌠ ì
ááááááááááádoesn'⌠ coun⌠ them⌐ anΣ sof⌠ hyphens.
Usage: COUN╘ i≤ intendeΣ fo≥ usσ b∙ students¼á writers¼ o≥ ì
áááááááááááanyonσá elsσ wh∩ care≤ ho≈ lonτ thei≥ tex⌠á file≤ ì
áááááááááááare«á (Somσá spellinτá checke≥ program≤ perforφá thi≤ ì
áááááááááááfunction«á Minσá doesn't--that'≤á wh∙ ╔á bothereΣá t∩ ì
áááááááááááwritσ it.⌐ A⌠ thσ CP/═ promp⌠ typσ COUN╘ followeΣá b∙ ì
áááááááááááthσ appropriatσ filename.
EXAMPLE║ A╛ COUN╘ B:REPORT.TXT
Specifics: WitΦ thσ exceptioε oµ thσ apostrophσ (27H)¼á al∞á non-ì
áááááááááááalphabetiπá character≤á arσ treateΣá a≤á spaces«á Thσ ì
áááááááááááreasoεá fo≥á thi≤á exceptioε i≤ t∩ ensurσá thσá prope≥ ì
ááááááááááácountinτá oµ contractions«á Sincσ COUN╘á onl∙á count≤ ì
áááááááááááword≤á witΦ tw∩ o≥ morσ characters¼á (seσ "Changesó t∩ ì
áááááááááááalte≥ thσ default⌐ notσ thσ following:
I am => COUNT sees only the 'am'.
I'm => COUNT sees one word (not zero).
You'll => COUNT sees one word (not two).
don't => COUNT sees one word.
Versioεá 1.╡á include≤á ß LOOKU╨ tablσ froφá 02A8╚á t∩ ì
ááááááááááá02B1H«á Thσ use≥ ma∙ patcΦ iε thσ hexadecima∞á value≤ ì
áááááááááááoµá ASCI╔á character≤ hσ o≥ shσ prefer≤ bσ treateΣá a≤ ì
áááááááááááalphabetiπ characters«á Thσ apostrophσ (27╚ a≤á noteΣ ì
áááááááááááabove⌐á i≤ currentl∙ thσ onl∙ characte≥ iε thσ 10-bytσ ì
ááááááááááátable«á Character≤ ma∙ bσ entereΣ iε an∙ order¼ bu⌠ ß ì
ááááááááááávaluσ oµ zer∩ mus⌠ terminatσ thσ tablσ anΣ ma∙ no⌠á bσ ì
ááááááááááápresen⌠ betweeε an∙ tw∩ characters«á Thσ tablσ ma∙ bσ ì
áááááááááááturneΣ ofµ completel∙ b∙ patchinτ locatioε 02A8╚ t∩ 0.
.cp 7èHyphens: Versioε 1.╡ als∩ include≤ ß subroutinσ t∩ overlooδ so-ì
ááááááááááácalleΣá "softóá hyphen≤ iεá WordSta≥á files«á Wheεá ß ì
ááááááááááá"softóá hypheεá (1EH⌐á i≤á encountered¼áá thσá prograφ ì
ááááááááááásearche≤á fo≥á thσ nex⌠ alphabetiπ characte≥á (thereb∙ ì
ááááááááááábypassinτá carriagσá returε anΣ linσá feeΣá sequences⌐ ì
ááááááááááábeforσá resuminτá counting«á Thi≤ subroutinσá ma∙á bσ ì
áááááááááááturneΣá ofµ b∙ patchinτ 0327╚ froφ ß valuσ oµá 23╚á t∩ ì
áááááááááááC9H«
NOTE║á D∩á no⌠ ente≥ 1E╚ iε thσ LOOKU╨ tablσ a≤á thi≤ ì
áááááááááááwil∞ confusσ thσ soft-hypheε subroutine.
╔á havσ choseε no⌠ t∩ trea⌠ regula≥ o≥ "hardóá hyphen≤ ì
áááááááááááiεá thσá samσ manne≥ a≤ apostrophe≤ becausσá the∙á arσ ì
áááááááááááuseΣá iε s∩ man∙ differen⌠ ways«á Peoplσá dra≈á line≤ ì
áááááááááááwitΦá them¼á makσ arrow≤ (--->⌐ anΣ al∞ othe≥ sort≤ oµ ì
áááááááááááthings«áá (Sometimes¼áá the∙áá arσá eveεáá useΣáá fo≥ ì
áááááááááááhyphenation!⌐á Therefore¼á assuminτ thσ hyphen≤ belo≈ ì
áááááááááááare as described, pleasσ note:
char-acter ("soft" hyphen) => COUNT sees one word.
multi-strike ("hard" hyphen) => COUNT sees two words
Dot
Commands: COUN╘á als∩á include≤á ß subroutinσá t∩á overlooδá do⌠ ì
ááááááááááácommanΣá lines«á A≤ COUN╘ work≤ througΦ you≥ filσá i⌠ ì
ááááááááááálook≤á fo≥ thσ sequencσ 'LF.º (L╞ ╜ Linσ FeeΣ ╜á 0AH)« ì
áááááááááááWheεá thi≤á sequencσá i≤á found¼áá thσá prograφá stop≤ ì
ááááááááááácountinτ unti∞ i⌠ encounter≤ ß C╥ terminatinτ thσá Do⌠ ì
áááááááááááCommanΣá line«á Thi≤ subroutinσ ma∙ bσ turneΣ ofµá b∙ ì
ááááááááááápatchinτ 030C╚ froφ ß valuσ oµ 2B╚ t∩ C9H.
Revision
Note: Thσá subroutinσ fo≥ handlinτ multiplσ read≤ fo≥á largσ ì
áááááááááááfile≤á ha≤ als∩ beeε rewritteε anΣ debuggeΣ iε Versioε ì
ááááááááááá1.╡ followinτ ß use≥ complaint«á Thσ erro≥ presen⌠ iε ì
ááááááááááápreviou≤ version≤ wa≤ not major.
COUN╘ read≤ ß filσ unti∞ al∞ availablσ memor∙ ha≤ beeε ì
áááááááááááuseΣá u≡ (actuall∙ overwritinτ thσ CCP⌐á theεá count≤ ì
áááááááááááthσ word≤ anΣ read≤ somσ more« Thσ filσ terminato≥ i≤ ì
áááááááááááassumeΣ t∩ bσ ß CTRL-┌ (1AH)«á COUN╘ shoulΣ worδ witΦ ì
ááááááááááámos⌠ computer≤ runninτ CP/═ 2.2«
.cp 15èChanges: Thσ use≥ ma∙ changσ thσ minimuφ worΣ lengtΦ (currentl∙ ì
ááááááááááá▓á characters⌐ b∙ patchinτ location≤ 02D2╚á anΣá 02FD╚ ì
áááááááááááfroφáá 02╚áá t∩á thσá ne≈á minimuφá worΣá lengtΦáá (iε ì
áááááááááááhexadecimal)« Thu≤ thσ use≥ coulΣ creatσ ß versioε oµ ì
áááááááááááCOUN╘ whicΦ woulΣ coun⌠ onl∙ word≤ iε exces≤ of¼á say¼ ì
ááááááááááá1░ character≤ b∙ patchinτ iε thσ valuσ 0BH.
Pleasσ addres≤ al∞ suggestions¼á revisions¼ bugs¼ complaints¼ anΣ ì
othe≥ sucΦ nonsensσ to:
Robert Throckmorton
7945 Kingswood Drive #240
Citrus Heights, CA 95610
Your comments will be genuinely appreciated.
.paè