IMD 1.16: 29/05/2007 19:02:45 FOGCPM.087 --FOGCPM087ENSOFT3 COMK ENSOFT3 DOC% ENSOFT3 PASFILTER COM(FILTER DOCV !"#$FILTER ASM%&'()*+,-./01234FILTER ASM56789:;<=>?@ABCDFILTER ASMEFG-07-00 86 -CPM087 DOC"FILTER11COMHFILTER11DOCIFILTER11ASM'JKLMNFILTER61COM*OPQRSTFORM3 COMUVWXFORM3 DOC9YZ[\]^_`FORM3 INFabcMAGE31 COMdeMAGE31 ASMLfghijklmnoPWWS COMpWSPW COMqPWWS DOCrPW2WS COM@stuvwxyzPW2WS C {|}~RESQ13 COMGRESQ13 DOCSAVE-WS2COMSAVE20 DOC=SOFTCR BAS)SOFTCR DOC'STRIP COMSTRIP DOCSTRIP ASM!WSDOCON COM WSDOCON DOCThis is the disk name. ͫCopyright (C) 1984 BORLAND IncAADM 3Aine 1500I20/92P=7 vERT~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxua}.; OJ , ; !U >,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!>u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .(C = ~> x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w# w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8 J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(M|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s x(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!`&Ͳ "1!*1 =!z5!N}23*3&cŔ- ENSOFT3.COM͐bR! ͐bŔ= (C) Copywrite 1986, DRAGON DATASYSTEMS, Inc.͐bR! ͐bŔLThis program reads a text file character by character and checks for control͐bŔIcharacters, all control characters are deleted except the carriage return͐bŔL(13 decimal, 0D hex) and line feed (10 decimal, 0A hex), all cr-lf pairs are͐bŔJreplaced by WordStar (TM) style "soft" returns, the high bit of the last ͐bŔMcharacter of each word is also set to make the file compatible with WordStar.͐bŔ5The text is then written to a designated output file.͐bR! ͐bŔEnter the file to be read: b!M+._b!M!NEʗ#Ŕ2That file does not exist: check the drive and name͐bŔ!and reenter the file to be read: b!M+._b!ME#Ŕ&Enter the file to be used for output: b!>+._b!Y}2;!>!NEʭ$Ŕ,WARNING: That file exists, any contents of b!> R!qbŔ will be destroyed.bR! ͐bŔ!Do you wish to proceed? (Y or N) b!;+bR! ͐b*;&!NaE$! !M <b! b!\!> <b!\bŔ1Please wait this takes a few minutes. Thank you.͐b!"4! 8!=b*=&"8*8!tEk%*8!R"8*8! ͯEʂ%!W}2:*8! NEʙ%!L}2:*8! NEʰ%!R}2:*:&!WNE%5%*4"6*8"4*4! NE%*6!"6*6! N*4! N}oE&!"6*6}2+._b!Y}2;!>!NEʭ$Ŕ,WARNING: That file exists, any contents of b!> R!qbŔ will be destroyed.bR! ͐bŔ!Do you wish to proceed? (Y or N) b!;+bR! ͐b*;&!NaE$! !M <b! b!\!> <b!\bŔ1Please wENSOFT Version 3.0 documentation p. 1 (C) Copywrite 1986, DRAGON DATASYSTEMS, Inc., no commercial use may be made of ENSOFT3 or this documentation without written permission of DRAGON DATASYSTEMS, Inc., 4508 4th St. N.W., Albuquerque, NM 87107, (505)345-8459. This copy is given to FOG and may be used by its members who are hereby licensed to make copies for their own personal use and upload copies to non- commercial bulletin boards. Ralph C. Binford, president. ENSOFT converts "hard formatted" text files to Wordstar's "document" format. Version 1.0 was written by Gordon Brandly of Fort Saskatchewan, Alberta, Canada for Ron Cain's Small-C compiler. It did the job, but handled errors by exiting to CP/M. Version 2.0 was a complete rewrite for Walt Bilofsky's C/80 (Ver. 3.0) C compiler by Harvey G. Lord, and is highly error resistant. Version 3.0 is another complete rewrite for Borland's Turbo Pascal and was written as a result of trying to deal with the format used by WestLaw in their database. Purpose: Ever downloaded a file from a bulletin board and wanted to re- format it? Ever printed a Wordstar file to disk, stripped off the high bits, then lost the original? ENSOFT3 converts a "regular" ASCII text file, one with "hard" spaces and "hard" carriage returns to Wordstar's "document" mode. This allows reforming the text to different column widths. Operation: If you've specified both files correctly the program proceeds to change the "hard" formatted input file into a "softened" output file. Input and output is completely prompted and each filename is checked to make sure it exists, if an input file, or if an output file exists, you wish to erase it and rewrite. Execute the program by entering the program's name on the command line: ENSOFT3 It then asks you for the name of the input file, e.g. G:HARDFILE.TXT, and output file, e.g. A:SOFTFILE.TXT. The program only accepts a maximum of fourteen characters for a file name, any extra characters are ignored. ENSOFT Version 3.0 documentation p. 2 After getting the input and output names, ENSOFT3 first strips the high bits then discards all control characters except for line feeds (ASCII 10 dec, 0A hex) and carriage returns (ASCII 13 dec, 0D hex). ENSOFT3 then looks for spaces (ASCII 32 dec, 20 hex) if it finds a space the high bit is set on the preceeding character, the WordStar mark for end of words and soft spaces. The final process is to look for carriage return-line feed pairs, upon finding such a pair the high bit is set on the carriage return, the Wordstar mark for a soft return. When editing the output file you must insert the "hard" returns manually as they will depend on the context. NOTES: Since ENSOFT3 is written in pascal it runs a good deal slower than ENSOFT2 (written in c) so I left out the extensive error trapping you have in ENSOFT2. I hope to rewrite the program in c (ENSOFT31 ?) soon and will put in the error trapping, however, I needed a quick and dirty solution to a pressing problem. If you want to go the other way (document file to text file), an easy way is to use the program UNSOFT.COM. On some CP/M systems (DEC Rainbow 100 for one), the output file's drive designator, name, and type must be in upper case. Those systems' CCP doesn't read beyond the ">" and, therefore, can't convert the characters into upper case. Another way to strip off WordStar's high bits is with PIP: PIP d:output.fil=d:input.fil[z] Unless you want to lose your input file, never give input and output files the same names. Fo furthe informatio se th documentatio fo ENSOFT2 a thi progra i intende t supplemen rathe tha replac ENSOFT2 I shoul b note tha ENSOFT use differen algorith fro ENSOFT an produce significantl differen results Fo example o m versio o WordSta (3.0 sof space ar create b settin th hig bi o al bu th las space ENSOFT set th hig bi o th las spac an leave th preceedin space (a 3 dec 2 hex) thi wa on o th problem whic cause m t writ thi progra i th firs place. Please address any comments, corrections, curses to: Ralph C. Binford DRAGON DATASYSTEMS, Inc. 4508 4th St. N.W. Albuquerque, NM 87107 (505)345-8459 to upper case. Another way to strip off WordStar's high bits is with PIP: PIP d:output.fil=d:input.fil[z] Unless you want to lose your input file, never give input and output files the same names. Fo furthe informatio se th documentatio fo ENSOFT2 a thi progra i intende t supplemen rathe tha replac ENSOFT2 I shoul b noprogram WSMOD2; (* (C) COPYWRITE 1986, DRAGON DATASYSTEMS, Inc. *) LABEL GETCHAR; LABEL QUIT; Var infile: Text; outfile: Text; sfile: string[14]; ofile: string[14]; inchar: Char; outchar: Char; c: Char; Class: Char; numchar: Integer; numchar1: Integer; numchar2: Integer; {V-} type Name = string[14]; function Exist(Var FileName: Name): boolean; Var Fil: file; begin Assign(Fil, FileName); {$I-} Reset(Fil); {$I+} Exist := (IOresult = 0) end; begin ClrScr; Writeln(' ENSOFT3.COM'); Writeln(' '); Writeln(' (C) Copywrite 1986, DRAGON DATASYSTEMS, Inc.'); Writeln(' '); Writeln('This program reads a text file character by character and checks for control'); Writeln('characters, all control characters are deleted except the carriage return'); Writeln('(13 decimal, 0D hex) and line feed (10 decimal, 0A hex), all cr-lf pairs are'); Writeln('replaced by WordStar (TM) style "soft" returns, the high bit of the last '); Writeln('character of each word is also set to make the file compatible with WordStar.'); Writeln('The text is then written to a designated output file.'); Writeln(' '); Write('Enter the file to be read: '); Readln(sfile); if Exist(sfile) = False then repeat Writeln('That file does not exist: check the drive and name'); Write('and reenter the file to be read: '); Readln(sfile); until Exist(sfile); Write('Enter the file to be used for output: '); Readln(ofile); c := 'Y'; if Exist(ofile) = True then begin Write('WARNING: That file exists, any contents of '); Write(ofile); Write(' will be destroyed.'); Writeln(' '); Write('Do you wish to proceed? (Y or N) '); Read(c); Writeln(' '); end; if c <> 'N' then  Assign(infile,sfile); Reset(infile); Assign(outfile,ofile); Rewrite(outfile); Writeln('Please wait this takes a few minutes. Thank you.'); numchar2 := 0; REPEAT; GETCHAR: Read(infile,inchar); numchar := Ord(inchar); if (numchar >= 128) then numchar := numchar - 128; if (numchar < 32) then Class := 'W'; if (numchar = 10) then Class := 'L'; if (numchar = 13) then Class := 'R'; if Class = 'W' then goto GETCHAR; numchar1 := numchar2; numchar2 := numchar; if numchar2 = 32 then numchar1 := numchar1 + 128; if (numchar1 = 13) AND (numchar2 = 10) then numchar1 := 141; outchar := Chr(numchar1); Write(outfile,outchar); UNTIL EOF(infile); QUIT: close(outfile); close(infile); Writeln('Finished'); END.1d͕ FILTER Version 3.4 Copyright 1983 by Claude Ostyn P.O. Box 2035 Sitka, Alaska 99835 (Enter ESC to exit)  =_ ͕ Can't find that file. Try again. Ý { w ͕ Choose one letter: Mwxa2͕ :LyCʗW3P3S}RʝQxA>2͕ ͕ Does the file contain lower case characters (Y/N)? aY>2͕Removing all extra spaces and carriage returns... >22:WMA^Mͼ͕ Removing all inbedded(w͕Enter print control characters you want to remove from the file (use CTRL key), and press when done: ͑ͼ͕ Removing all selected͕ print control codes:ʐ͕ and WordStar formatting codes:͕, including dot commands͕... ͕Removing rubout characters only... !6!>"!>">*|}w~#"2#2ʚ:A:Ÿ:A: O:ʯŸ:212:*w#"l2v|v}̕ɯ2g2!">2!>"͕Ÿ͕ File copied okay. :=͕ One or more ambiguous hyphen was found and replaced by a "#-" pair of characters in the output file. You will need to use your editor to do the necessary correction(s). =͕Copy stopped... Do you want to save what has been copied so far? aYʯN͕ Terminated at operator's request - file not copied! ͕ Copy another file? aYN{{ Y͕ Y͕ ...Program terminated. ͕ Write error on output file... {::2!6:R:̅:L :f{ <:f:C#<P.{ <W9{ <́ ::f:h͔ !~f:h6:2:x:2:2:.£: ʘ>2>2 ¼:>22>2 :C: : !: 6> 26{ !~:+ : O   >2:-ʓ   : x O x x (Z Ͷ` Z : d >22:2> 2xO:> 2xO::2:-:- >#2xO:>-2>22>2x :x : G!cKx :GKx : :!6>2:x :x = x :x x :.:?!x :x : x :x : x > 26!,Ä !B:GK!x !:ʵ x ʻ ʯ > 2>-2: x ͕ Name of file to copy from: g̀ :gL2g͕ Name of file to copy to: ̀ :L2͕͝ Input and output files cannot be the same!  i ? ͕ Output file already exists... OK to overwrite (Y/N)? aY N ͕ Use another name for output file (Y/N)? aY h  { ͕ Deleting old output file... ͕ No room on this disk...͕ Try another disk (Y/N)? aYʖ >:gʦ >2ë >2͕ This may not work if the new disk does not contain the CP/M system tracks...  Insert disk for copy in drive :@͕͆: and press any key, or ESC to exit { >ɯg "e!6+6 !~^#6*e!: : !:͡A B @~ . ͡#x *e  #~ ͡ ͕ Bad file name, try again (or just RETURN to exit): Ä ͕ On which drive? a@x͕ That drive does not exist! L!g ·#§>>͕ Should the copy retain the WordStar formatting codes, such as soft spaces, soft returns and soft hyphens? aYA!6͕ Do you want to retain any dot commands found in the copy? aY>2!DW!,~#­^zw@_x#ÖÖxxʖ+6$>͆͆> ͆͆>͆͆Ö  , >.͆:<23H>2> ͆3> ͆9> ͆ɯ^x[#K>>dG x͡GĆx_㯆#͆ÕGͶ³x_xGxaxƅ>>GxAxƥ>> ͕)͕(!g6#|}!h !6! > w#x  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.:?!%|>]*_1234567890L - Remove line feeds, and pad blank lines with a space. $C - Remove extra carriage returns and spaces (leave only paragraph breaks, "unjustify") $W - Change a WordStar file into an ASCII file $P - Remove all imbedded print commands $S - Remove selected imbedded print commands $R - Remove any "rubout" characters (7fh) only (done automatically by other options above) $Q - Quit $Option selected: $ge a WordStar file into an ASCII file $P - Remove all imbedded pr characters (7fh) only (done automatically by other options above) $Q - Quit $Option selected: $ge a WordStar file into an ASCII file $P - Remove all imbedded pr Copyright 1983 by Claude Ostyn..9/27/83 for filter.asm and filter.com version 3.3 .fm1 .mt3 .mb4 .foFILTER.DOC 9/27/83 PAGE # FILTER by Claude Ostyn. FILTER.CO i a assembl languag progra whic filter ou unwante character o allow reformattin o tex files I i usefu whe ASCI tex file mus b transferre betwee differen type o computers o receive tex ha t b edited Sinc th filterin operatio i don whil copyin th file th origina tex fil i no altered. Wit al options an "RUBOUT characte foun (7Fh wil b filtere out Unles th outpu fil i i WordSta format th hig bi wil b zeroe o al copie characters. Th FILTE option are: C - Remove extr carriag returns space an contro code fro justifie o hard-formatte text thu allowin reformattin wit th WordSta Control- comman. Sof hyphen a th en o lin ar remove an th hyphenate word ar rejoined Har hyphen a th en o lin ar considere ambiguou an marke i th tex wit fla characte (ther wil b scree messag i thi happens) Doubl hyphen use a das ar no altered. An WordSta code encountere ar remove o replace b thei standar ASCI equivalent Do command ar retained. W - Convert WordSta fil t standar ASCI file Optionall remove do commands Al prin contro character an WordSta formattin code suc a sof spaces sof returns sof hyphens non-brea space an do command ar remove o ar replace b thei "hard equivalent Th resul i "pure ASCI tex file P - Remove al prin contro command imbedde i tex b WordStar S - I th sam a optio "P above excep tha th use select whic prin contro command ar t b removed Thi ca b usefu whe th tex wil b sen t printe whic doe no suppor som o th command imbedde i th text. - Remov "RUBOUT" character only. L - Filter ou al lin feeds an pad empt line wit space Thi forma i use fo uploadin t time- sharin syste which supplies its own line feeds. .pa OPERATION. At the CP/M prompt, type A FILTE ( stand fo Carriag Return or RETURN) Th progra wil sig o wit it nam an th versio number I immediatel ask for th nam o th fil yo wan t cop fro (Fig. 1a) Ente th name usin th standar CP/ format Anythin yo typ i lowercas wil b converte t uppercas internally I yo ar runnin FILTE fro insid WordSta wit a Osborne us Control- instea o th bac arro i yo nee t backspace I yo d no specif driv wit th fil name yo wil b aske fo driv nam ( o B) I th fil i no foun o th disk yo wil b aske t re-ente th name. Ente when done: : : : : (example) ^A^N^T^Y^D : : : -------------------------------------------------------- I yo chos optio "P o optio "S" yo wil furthe hav t answe questio abou whethe yo wan t preserv an WordSta formattin codes jus pres "Y o "N" Pressin "N will result in a file containing only standard ASCII characters. Some options give you the choice of discarding dot commands. Afte th fil i successfull copie an processed yo wil ge messag t tha effect an yo wil b aske i yo wan t cop anothe file Typin "N a thi poin wil retur yo t CP/M. ERRORS I ther i a erro i dis operation suc a n roo fo th destinatio file yo wil ge messag o th .cp2 scree an th progra wil clos th files terminat an exi t CP/M. T exi fro th program pres ES a an prompt excep a th prin cod selectio wher ES i use t signa tha you selectio i complete I th promp wa fo fil name yo wil als hav t pres RETURN. SPECIAL NOTES ON THE "C" OPTION Al carriag return ar remove an replace b space excep thos tha follo certai character suc a periods colons questio mark o exclamatio points thes ar assume t b markin paragrap break Carriag return wil als b kep i the follo number o a uppercas characte i mixe upper- an lowercas text o i the ar followe b capitalize word i thes cases the ar assume t b markin th en o heading titl o address Th "C optio wil no wor wel wit tables progra listings o  i ta character (09h ar presen i th text Th progra ma als ge confuse whe non-standar punctuatio i used o whe capitalize word ar use i th bod o th text I al cases us you tex edito t revie th outpu fil an mak th fe correction whic ma b necessary Th outpu fil generate b th "C optio i pur ASCI file wit n contro characters extr spaces etc Thi mean thi optio ma b use t prepar fil fo th tramsmissio o ra tex t typesettin computer. Becaus i ma creat "line" o severa hundre o mor characters yo shoul no attemp t prin th outpu fil fro optio "C withou firs reformattin i wit you tex edito o formatte (WordSta Control- function). NOTES ON ASSEMBLY FOR FILTER.ASM FILTER.AS ca b assemble usin th Digita Researc ASM.CO program befor doin this yo ma wan t chang coupl o equat statement a th beginnin o th AS fil (value i parentheses) osborn eq (tru o false ;se t tru i usin a Osborn ech eq (tru o false ;i false n ech o scree linele eq (scree width-1 ;normall 79 o 5 fo Osborn 1 clearscreen equ (character to clear screen on your computer, 1ah for Osborne) inter eq (tru o false ;i true allo stoppin th copy with ESC key (c) Copyright 1983 Claude Ostyn P.O. Box 2035 Sitka, AK 99835 (907) 747-5372 Permissio fo non-profi us o thi progra i grante t al CP/ users. , AK 99835 ta Control- function). NOTES ON ASSEMBLY FOR FILTER.ASM FILTER.AS ca b assemble usin th Digita Researc ASM.CO program befor doin this yo ma wan t chang coupl o equat statement a th beginnin o; ;======================================================== ; FILTER.ASM V 3.4 : ; Copyright by Claude Ostyn 9/26/83 : ; To allow for filtering of line feeds and all kinds : ; of WordStar print commands and other non-printable : ; characters; also to allow reformatting of existing : ; ascii files by WordStar. : ; License for non-commercial use is granted to all : ; CP/M microcomputer users. : ;======================================================== ; EQUATES true equ 1 false equ not true echo equ true ;if true, echo the copy, else don't osborne equ true ; if false, no special video controls linelen equ 51 ;length of screen line (change to 51 for ; Osborne 1, irrelevant if echo false) clearscreen equ 1ah ;clear screen and home cursor chr interr equ true ;if true, allow interruption of copy ; in progress by ESC key boot equ 0000h ;standard cp/m boot vector bdos equ boot+5 ;disk operating system vector tpa equ boot+100h ;beginning of transient program area ;bdos functions conin equ 1 ;console input conout equ 2 ;console output condir equ 6 ;direct console input printf equ 9 ;print buffer function readbf equ 10 ;read console buffer function initdsk equ 13 ;reset disk openf equ 15 ;open file function closef equ 16 ;close file function findf equ 17 ;search for file function delete equ 19 ;delete file function readf equ 20 ;sequential file read writef equ 21 ;sequential file write makef equ 22 ;create file function dma equ 26 ;set dma address ;ascii and special character codes eof equ 1ah ;cp/m end of file marker cr equ 0dh ;carriage return lf equ 0ah ;line feed bel equ 07h backspace equ 08h tab equ 09h escape equ 1bh ;escape space equ 20h period equ 2eh colon equ ':' mhyphen equ 1eh ;soft hyphen not at line break shyphen equ 1fh ;soft hyphen at line break hhyphen equ 2dh ;hard hyphen nbkspace equ 0fh ;WordStar non-break space rubout equ 7fh ;rubout chr ; flag values nope equ 0 error equ 0ffh quit equ 1bh org tpa ;standard load address start: lxi sp,stack ;make up a local stack signon: call dim call showmsg db clearscreen,lf,lf,9 db ' FILTER Version 3.4',cr,lf,9 db 'Copyright 1983 by Claude Ostyn',cr,lf,9 db ' P.O. Box 2035',cr,lf,9 db ' Sitka, Alaska 99835',cr,lf,lf,lf,9 db ' (Enter ESC to exit)',cr,lf,lf,0 call bright ;get input file name from user inname: call infilnam ;enter and check input file name cpi quit jz exittwo ;open input file call opninfil ;open input file cpi error jnz outname ;if found, get busy with output file call showmsg db cr,lf,'Can',39,'t find that file. Try again.',cr,lf,0 jmp inname ;get another input file name ;get output file name outname: call outfilnm ;enter and check output file name cpi quit jz exit ;check if output file already exists call checkout ;check for conflicts, until file name ok cpi quit   jz exit ;exit if quit code returned call opnoutfil ;open the output file menu: call bright call showmsg db clearscreen,cr,lf db 'Choose one letter:',cr,lf,lf,lf,0 lxi d,menuc call printit lxi d,menuw call printit lxi d,menup call printit lxi d,menus call printit lxi d,menur call printit lxi d,menul call printit lxi d,menuq call printit call coninone ;get chr from console sta choice ;put choice in "choice" buffer call dim lxi d,showopt call showmsg db clearscreen,cr,lf,lf,0 ;move down a couple of lines lda choice cpi 'L' jz optionlf cpi 'C' jz optionform cpi 'W' jz optionprint cpi 'P' jz optionprint cpi 'S' jz optionselect cpi 'R' jz optionrubout cpi 'Q' jz delexit ;delete file just created and exit cpi quit jz delexit jmp menu ;no valid input, try again ;option L = remove all line feeds and zero eight bits optionlf: call printit lxi d,menul call printit call bright call deldot ;inquire whether to delete dot commands mvi a,nope sta wsformat ;delete WS codes call showmsg db cr,lf,lf,0 jmp readinputfil ;option C = reform: remove all carriage returns (except after period) and ;all extra spaces (except after period or colon). Also remove ;soft hyphens created by WordStar optionform: call printit lxi d,menuc call printit call bright call showmsg db lf,lf,'Does the file contain lower case' db ' characters (Y/N)? ',0 call coninone cpi quit jz menu cpi 'Y' jnz forming mvi a,true sta lowcase forming: call showmsg db clearscreen db 'Removing all extra spaces and carriage returns...' db cr,lf,lf,0 mvi a,nope sta wsformat ;make sure ws codes will be removed sta zapdot ;but not dot commands jmp readinputfil ;option p = remove print control chrs and zero high bit optionprint: call printit lda choice cpi 'W' jnz notwopt lxi d,menuw call printit call bright call deldot jmp wopt notwopt: lxi d,menup call printit call bright call wsfile ;ask if copy must be WordStar format cpi quit jz menu wopt: call showmsg db cr,lf,lf,'Removing all inbedded',0 jmp endshowp ;option s = remove selected print control chrs optionselect: ;enter the chrs to be removed call printit lxi d,menus call printit call bright call showmsg db 'Enter print control characters you want to',lf,cr db 'remove from the file (use CTRL key), and',lf,cr db 'press when done:',cr,lf,lf,0 call selectch cpi 0 jz menu ;nothing selected, try again call wsfile ;ask if copy must be WordStar format cpi quit jz menu call showmsg db cr,lf,lf,'Removing all selected',0 endshowp: call showmsg db ' print control codes',0 lda wsformat cpi true jz optionsout call showmsg db cr,lf,'and WordStar formatting codes',0 lda zapdot cpi true jnz optionsout call showmsg db ',',cr,lf,'including dot commands',0 optionsout call showmsg db '...',cr,lf,lf,0 jmp readinputfil optionrubout: call bright call showmsg db 'Removing rubout characters only...',cr,lf,lf,0 ; file is open, start the process readinputfil: lxi h,oldchar mvi m,error ;initialize "old" chr location lxi h,inend ;point past end of inbuf shld inpos ;to force load, and save it lxi h,outbuf ;point to beginning of outbuf shld outpos ;and save it loop: lxi d,inend ;pointer to end of buffer lhld inpos ;find out where we are mov a,h ;test high byte for end of buffer cmp d ;if zero, they're equal jnz gcbuf ;not zero, get chr from buffer mov a,l ;now compare low byte cmp e cz load ;if zero, we've hit the end ;so load another buffer gcbuf: mov a,m ;get next chr from buffer inx h ;bump pointer shld inpos ;store it sta newchar ;store chr cpi eof ;end of file? jz okthen ;if end of file, skip screening gotit: sta newchar ;store while processing preceding chr ; screening begins here cpi error ;reject delete chr jz loop cpi rubout ;...and reject rubout chr jz loop ;cancel the whole process if esc key is pressed if interr mvi e,0ffh mvi c,condir ;read console call bdos cpi escape jz copystop endif checkold: lda oldchar cpi error ;no older chr, so just treat as a reject jz copynew call sieve lda errfl cpi 0 ;check for disk error jnz wrerr ;if error, go to message okthen: lda keep cpi true jnz copynew ;if rejected, do not copy to buffer lda oldchar ;get chr back ;echo chr to console if echo call echochar endif ;end of screening, go on with the copy endscreen: call copyout lda errfl ;check error flag cpi eof jz wrap ;if eof, wrap this up cpi 0 jnz wrerr ;if anything else but 0, write error copynew: lda newchar sta oldchar cpi eof ;end of file? jz endscreen ;then finish up jmp loop ;otherwise read a new one into b ;copy one character into output buffer copyout: xra a sta errfl ;clear error flag lda oldchar lxi d,outend ;end of output buffer lhld outpos ; point to next char in outbuf mov m,a ;store the chr inx h ;increment pointer shld outpos ;store the buffer pointer cpi eof ;end of file chr? jnz copymore sta errfl ;yes, set error flag jmp copydone ;and exit copymore: mov a,h ;check top byte for end of buffer cmp d jnz copydone ;not equal, skip ahead mov a,l ;now check the low byte cmp e cz store ;call subroutine to write ;buffer to file ;else do again copydone: ret ;(from copyout) ; read a buffer full into input buffer load: xra a sta errfl ;zero error flag lxi d,inbuf ;reset the dma address for reads mvi c,dma call bdos lxi d,infcb ;load d with input fcb mvi c,readf ;and c with bdos read call bdos sta errfl lxi h,inbuf ;reset the input pointer shld inpos ;store the pointer ret ;(from load) ; write the output buffer to the file store: lxi d,outbuf mvi c,dma ;set the dma address for write call bdos lxi d,outfcb mvi c,writef ;write to the file call bdos sta errfl ;update error flag lxi h,outbuf ;reset the output pointer shld outpos ;store it ret ;(from store) ;close this mess up, we're done wrap: call store ;flush the output buffer cpi 0 jnz wrerr lxi d,outfcb ;close the output file mvi c,closef call bdos call showmsg db clearscreen,cr,lf,'File copied okay.',cr,lf,0 lda ambighyph ;check if flag was used for cpi true ; ambiguous hyphen jnz exittwo call showmsg db cr,lf,lf db 'One or more ambiguous hyphen was found and',cr,lf db 'replaced by a "#-" pair of characters in the',cr,lf db 'output file. You will need to use your editor',cr,lf db 'to do the necessary correction(s).',cr,lf,lf,0 jmp exittwo ;exit after message copystop: call showmsg db clearscreen,bel,'Copy stopped...',cr,lf,lf db 'Do you want to save what has been copied so far? ',0 stoptwo: call coninone cpi 'Y' jz wrap ;if yes, close file cpi 'N' jz delexit cpi quit jnz stoptwo delexit: ;if exit from menu; delete created file first lxi d,outfcb mvi c,delete call bdos exit: call bright call showmsg db clearscreen db cr,lf,lf,'Terminated at operator',39 db 's request - file not copied!',cr,lf,0 ;exit, unless... exittwo: call showmsg db cr,lf,lf,9,'Copy another file? ',0 exitthree: call coninone cpi 'Y' jz start cpi 'N' jz exitzap cpi quit jz exitzap sui 32 jm exitthree call showmsg db 7,8,space,8,0 jmp exitthree exitzap: call showmsg db cr,lf,lf,9,'...Program terminated.',cr,lf,lf,0 jmp boot wrerr: lxi d,outfcb mvi c,closef call bdos call showmsg db cr,lf,lf,7,'Write error on output file... ',7,0 jmp exitzap ;and quit ; *** sieve subroutines *** ; chr by chr screening is done here sieve: lda wsformat ;check wordstar format flag cpi true jz nolopoff lda oldchar ani 7fh ;zero high bit sta oldchar ;if not WordStar format nolopoff: lxi h,keep mvi m,true ;assume we keep chr lda choice cpi 'R' rz lda zapdot ;do we remove dot commands? cpi true cz dotcheck ;process dot commands if necessary lda choice cpi 'L' jnz notl call filterlf ;filter out line feeds, pad empty lines lda keep cpi true jnz discard call pfilter ;if "L", filter out control characters jmp done notl: lda keep cpi true jnz discard lda choice cpi 'C' jnz notc call reformat jmp done notc: cpi 'P' jnz notp call pfilter jmp done notp: cpi 'W' jnz notw call pfilter jmp done notw: call sfilter done: lda errfl cpi 0 ;if disk error detected, return rnz ;(from sieve) lda keep cpi true jnz discard lda wsformat ;if keeping WS format, skip next step cpi true jz donagain call wscheck ;remove WS formatting codes ;check if we should delete dot command lxi h,keep mov a,m cpi true jnz discard ;no point in checking if not a keeper lda dotcomfl ;check the dot command flag cpi true jnz donagain ;if it's on, discard chr discard: mvi m,nope donagain: lda oldchar sta lastread ;update last read (not necessarily copied) lda keep cpi true rnz ;(from sieve) endsieve: ;at this point, update last and penultimate copied chrs call update ret ;(from sieve) update: lda lastchar ;get last previous chr sta penultimate ;store in buffer for the one before lda oldchar ;get the chr back sta lastchar ;put chr in last previous ; chr buffer ret dotcheck: ;dot command lines are flagged here, except with 'L' option lda oldchar cpi period jnz endofdot ;not a period, maybe a cr? lda lastread ;it's a period; does it cpi lf ;follow a lf? jz dotcom ;yes, must be a dot command cpi 0 ;if not, is it the first chr in file? rnz ;no: keep the period and return dotcom: ;yes, definitely a dot command mvi a,true sta dotcomfl ;set the dot command flag! junk: mvi a,nope ;and start junking chrs... sta keep ret ;(from dotcheck) endofdot: cpi cr ;is it a cr?  jnz lfmaybe ;no, maybe lf? lda dotcomfl ;is the dot command flag on? cpi true rnz ;(from dotcheck) dotend: mvi a,nope ;dot flag was on, reset it sta dotcomfl ; to off... sta keep ;and discard the cr mvi a,0 ;force a 0 in lastread, sta oldchar ; in case another dot command follows ret ;(from dotcheck) lfmaybe: cpi lf rnz ;no, ignore lda choice cpi 'C' rz ;if reformatting, skip this step lda lastchar cpi cr jnz junk ;discard lf if does not follow a cr ret ;take out line feeds, and pad blank lines with a space filterlf: lda oldchar cpi lf rnz lxi h,keep lda newchar ;check next chr cpi cr ;if a cr, means a blank line jz pad mvi m,nope ;trash lf ret pad: mvi a,space ;yes, make this lf into a space sta oldchar mvi m,true ret ;reformat by removing extra spaces and cr reformat: call pfilter ;kill if print control code lxi h,keep mov a,m cpi true rnz ;return if it was control code lda crflag cpi true ;if a cr was just discarded, jz crflset ;go check if we need to restore it lda oldchar cpi cr jz checkcr cpi lf jz checklf cpi space jz checkspace cpi tab jz checkspace mvi a,nope ;not cr, lf or space sta joinfl ;turn off rejoin flag (if ON) lda oldchar cpi hhyphen jz hhyphnck cpi mhyphen jz rejoinw cpi shyphen jz rejoinw ret ;no further processing ;a cr was just discarded... crflset: lda oldchar cpi cr jz trashit ;throw out cr, space, tab cpi lf jz checklf ; ...and process lf cpi space jz trashit cpi tab jz trashit cpi '(' jz clearcrfl call islowcs ;is it lower case cpi true cz setlowc jz clearcrfl lda lastchar cpi lf ;if last chr copied was not a lf, cnz addacr ; restore cr and lf clearcrfl: mvi a,nope sta crflag ;reset crflag ret ;(from reformat, and keep the chr) ;set lowercase flag, just in case it was not set already setlowc: sta lowcase ret ;add a cr and lf before current chr addacr: lda oldchar sta spare mvi a,cr sta oldchar call update call copyout lda errfl ;check error flag cpi 0 rnz ;if anything but 0, write error mvi a,lf sta oldchar call update call copyout lda errfl ;check error flag cpi 0 rnz ;if anything but 0, write error lda spare sta oldchar ret hhyphnck: ;checking if we have a hard hyphen in middle of line ; (in that case, we want to keep it) lda lastchar cpi hhyphen ;if last chr was a hyphen, it's rz ;a dash --keep it lda newchar ;check the next chr cpi hhyphen ;if hyphen, it's a dash - keep it rz cpi cr rnz ;hard hyphen at end of line (ambiguous) ambigu: mvi a,'#' ;replace hyphen with sta oldchar ;flag character call update call copyout ;and copy it lda errfl ;check error flag cpi 0 rnz ;if anything but 0, write error mvi a,hhyphen sta oldchar ;now copy hyphen mvi a,true sta ambighyph ;set warning flag sta joinfl ;set join flag to discard cr,lf and spaces ret ;soft hyphen at end of line; set flag to discard all cr, lf and spaces rejoinw: mvi a,true sta joinfl jmp trashit ;check for cr and keep it if paragraph break checkcr: lda joinfl ;if rejoining, discard cpi true jz trashit lda lastchar ;check last character cpi lf ;was it a lf? jz killcr mov b,a lxi h,crtable call isitin cpi true ;found? rz mov a,b ;get chr back cpi space ;if last one was a space, jnz morchk lda penultimate ; check penultimate chr mov b,a call isitin cpi true rz mov a,b ;check penultimate again cpi lf jz killcr morchk: lda lowcase ;if lower case in text, cpi true ;do next check, jnz killcr ;otherwise kill lda lastchar call isupcse ;check if upper case cpi true rz killcr: lxi h,keep mvi m,nope mvi a,true sta crflag ;set 'discarded cr flag' ret ;from crcheck ;check for cases where this is a space checkspace: lda joinfl cpi true jz trashit lda lastchar ;check previous char cpi 0 ;first chr in file? jz trashit cpi space ;was it a space? jz twaspace ;yes, further checking cpi lf ;was it a lf? jz trashit lda lastread ;was last read chr a soft hyphen? cpi shyphen ;was it a soft hyphen? jz trashit ;yes, discard this space cpi mhyphen ;or the other kind of soft hyphen? jz trashit ret ;no, copy the space ;the last retained and copied character was a space twaspace: lda penultimate ;check the character before last cpi period ;was it a period? rz ;yes, copy this space cpi colon ;was it a colon then? rz ;yes, copy this space cpi '?' rz cpi '!' rz jmp trashit ;check for lf, and replace with a space, except if the preceding ;carriage return has been retained, or if there was a soft hyphen ;at the end of the line: in that case, ignore the hyphen and the lf checklf: lda joinfl cpi true jz trashit lda lastchar cpi cr ;was the last copied chr a cr? rz ;if yes, just copy this lf as is cpi lf ;was it a lf? jz trashit lda crflag cpi true jnz trashit ;if crflag off lda lastchar cpi space ;or if last chr was a space jz trashit ; discard the lf mvi a,space ;otherwise replace it with a space sta oldchar ret ;reset keep flag to discard trashit: mvi m,nope ret ;filter out print control characters pfilter: lxi h,ptable jmp zapcode sfilter: lxi h,stable zapcode: lda oldchar mov b,a call isitin cpi true ;if character was found, rnz lxi h,keep jmp trashit ;additional checking if wordstar format file output wscheck: lxi h,keep lda oldchar cpi shyphen ;soft hyphen at end of line jz mkhyphen cpi mhyphen ;soft hyphen imbedded in line jz trashit cpi lf jz afterdot cpi nbkspace ;non-break space jz nbksp ret nbksp: mvi a,space ;make it into a regular space sta oldchar ;and store it back ret ;(from wscheck) ;make soft hyphens into hard hyphens mkhyphen: mvi a,hhyphen sta oldchar ret ;suppress lf after erased dot command afterdot: lda lastchar cpi cr jnz trashit ret ; ** utility subroutine area ** ;enter input file name infilnam: call initstor ;initialize file name storage call showmsg db cr,lf,'Name of file to copy from: ',0 lxi d,infcb ;point to fcb for input file call cinbuff ;get the name and put in fcb cpi quit rz lda infcb ;check first byte in fcb cpi 0 ;if it is zero, no drive was specified rnz ; call getdrive ;no drive specified, get one cpi quit rz sta infcb ;and put designator in fcb ret ;user enters output file name here outfilnm: call inittwo ;initialize file name storage call showmsg db cr,lf,lf,' Name of file to copy to: ',0 lxi d,outfcb ;point to fcb for output file call cinbuff ;get the line and put in fcb cpi quit rz lda outfcb ;check first byte in fcb cpi 0 ;if it is zero, no drive was specified cz getdrive ;no drive specified, get one cpi quit rz sta outfcb ;and put designator in fcb call samename ;check if not trying to overwrite itself cpi error rnz call showmsg db cr,lf,lf,'Input and output files' db ' cannot be the same!',cr,lf,0 jmp outfilnm ;get another output file name ;check if output file already exists checkout: call findoutfil cpi error ;if error, file does not exist yet jz creatfil ;good, go create it ;if no error, file already exists ;overwrite existing file? exists: call showmsg db cr,lf,lf,'Output file already exists...',cr,lf db 'OK to overwrite (Y/N)? ',0 overw: call coninone ;query for overwrite, and kill if okay cpi 'Y' ;yes? jz delandcreat ;yes, overwrite cpi 'N' jnz overw call showmsg ;no... db cr,lf,'Use another name for output file (Y/N)? ',0 call coninone cpi 'Y' jz othernam jmp otherdisk ;try another disk? othernam: call outfilnm ;get new name cpi quit rz ;(from checkout) jmp checkout ;and try again ;create new file delandcreat: call showmsg db cr,lf,lf,'Deleting old output file...',cr,lf,lf,0 lxi d,outfcb ;destination fcb mvi c,delete ;delete before create call bdos creatfil: lxi d,outfcb ;destination fcb mvi c,makef ;try to create the file call bdos cpi error rnz ;no error, return (from checkout) call showmsg db cr,lf,lf,'No room on this disk...',0 otherdisk: call showmsg db cr,lf,9,9,'Try another disk (Y/N)? ',0 call coninone cpi 'Y' jz whichdrive mvi a,quit ret ;(from checkout) ;determine drive for copy whichdrive: lda infcb ;check drive designator for input file cpi 1 ;is it 1 (drive a) jz newinb ;yes, new disk will go in drive b mvi a,1 ;no, new disk in drive a sta outfcb ;put designator in outfcb jmp newinnow ;and prompt for disk newinb: mvi a,2 ;designator for drive b sta outfcb ;in outfcb newinnow: call showmsg db cr,lf,lf,'This may not work if the new disk does not' db cr,lf,'contain the CP/M system tracks...',cr,lf,lf db 'Insert disk for copy in drive ',0 lda outfcb ;get designator back adi 40h ;make it into a letter call cout ;and show it call showmsg db ':',cr,lf,'and press any key, or ESC to exit ',0 mvi c,conin ;wait for a key to be pressed call bdos cpi quit jnz checkout ;back to beginning of subroutine mvi a,quit ret ;(from checkout) ;open input file opninfil: xra a lxi d,infcb ;load input fcb pointer mvi c,openf call bdos ;open the input file ret ;find destination file findoutfil: mvi c,initdsk ;reset disk, just in case call bdos lxi d,outfcb ;destination fcb mvi c,findf ;try to find the file call bdos ret ;open destination file opnoutfil: lxi d,outfcb ;destination fcb mvi c,openf ;open file call bdos ret ;read a file name from console and put it into fcb cinbuff: xchg ;(de was infcb or outfcb, now hl) shld curfcb ;store current fcb address at curfcb buffin: lxi h,inbuf+1 ;zero chr counter mvi m,0 dcx h ;set maximum length mvi m,20 xchg ;put inbuf pointer into de register mvi c,readbf ;read input buffer function call bdos lxi h,inbuf+1 ;get chr counter mov a,m ;check length adi quit cpi quit ;if zero, put "quit" in a and exit rz mov e,m ;length into lsb of de register pair mvi d,0 ;zero msb dad d ;add length to start inx h ;plus one points to end mvi m,0 ;put zero as end marker ;now move the file name lhld curfcb ;get current fcb address again xchg ;and put it in de mvi b,8 ;counter for file name chrs mvi c,3 ;counter for type chrs lxi h,inbuf+2 ;point hl to first chr in buffer lda inbuf+3 ;read second char. in buffer cpi 0 ;is it end marker? jz nodrive ;if yes, no drive was selected cpi ':' ;is it a colon? jnz nodrive ;no, no drive was selected lxi h,inbuf+4 ;yes, point hl to file name lda inbuf+2 ;read drive chr call ucase ;make upper case cpi 'A' ;drive A? jz setdriven ;yes, set it into fcb cpi 'B' ;drive B? jnz badname ;not an acceptable name setdriven: sbi 64 ;subtract 64 stax d ;and put drive select byte in fcb nodrive: inx d ;point to fcb+1 mov a,m ;read chr of name cpi quit rz ;return if "quit" cpi 0 ;end marker? jz donebuff ;if yes, done cpi '.' ;is it a period? jz settype ;yes, go to type area in fcb call ucase ;make it upper case stax d ;no, store in fcb inx h ;point to next chr dcr b ;decrement counter mov a,b ;and check it cpi 0 ;8 chrs read? jz settype ;yes, go to type area jmp nodrive ;no, read another one settype: push h lhld curfcb ;get current fcb address again xchg ;and put it in de pop h mvi b,9 ;put a count of 9 in b increm: inx d ;point to next fcb byte dcr b ;and do it nine times jnz increm movtyp: inx h ;read next chr mov a,m cpi 0 ;end marker? jz donebuff ;if yes, done call ucase ;convert to upper case stax d ;store it in fcb inx d ;and point to next fcb location dcr c ;decrement counter jnz movtyp ;not done, next chr  donebuff: ;yes, return ret ;(from cinbuff) badname: call showmsg db cr,lf,7,'Bad file name, try again',cr,lf db ' (or just RETURN to exit): ',0 jmp buffin ;get drive designator, in case it was not specified with file name getdrive: call showmsg db cr,lf,' On which drive? ',0 call coninone ;get one chr from console cpi quit rz sui 40h ;set A=1, B=2, etc. jm drerror ;can't be negative cpi 1 rz ;if A, return cpi 2 rz ;if B, return drerror: call showmsg db cr,lf,'That drive does not exist!',cr,lf,0 jmp getdrive ;check that names are not the same samename: push h push d lxi h,infcb lxi d,outfcb mvi b,12 nextfcb: ldax d ;read byte from outfcb cmp m ;compare with infcb jnz notsame inx d inx h dcr b jnz nextfcb mvi a,error ;error found pop d pop h ret ;(from samename) notsame: mvi a,nope ;no error pop d pop h ret ;(from samename) ;ask if copy must keep soft space markers and soft carriage returns wsfile: call showmsg db cr,lf,lf db 'Should the copy retain the WordStar formatting',cr,lf db 'codes, such as soft spaces, soft returns',cr,lf db 'and soft hyphens? ',cr,lf,lf,0 call coninone ;get answer cpi 'Y' jnz deldot lxi h,wsformat ;point to ws format flag mvi m,true ;turn it on ret deldot: call showmsg db cr,lf,lf db 'Do you want to retain any dot commands found',cr,lf db 'in the copy?',cr,lf,lf,0 call coninone cpi 'Y' rz ;return if keep, mvi a,true ;otherwise signal to zap sta zapdot ret ;enter chrs to be filtered out selectch: lxi h,stable+2 ;point to selection buffer mvi b,0 ;chr count selectagain: push b push h mvi e,0ffh mvi c,condir call bdos ;direct input from console for no echo cpi escape ;is it an escape chr? jz endselect ;if escape, selection complete cpi backspace jz backone mov d,a ;store the chr lxi h,ptable ;point to table of print control chrs valtest: mov a,m ;get first valid control chr from table cpi escape ;end of part of table we want to check? jz badentry ;no match in table, must be bad inx h ;point to next in table cmp d ;valid entry? jnz valtest ;no, check next in table push d mvi e,'^' ; mvi c,conout ;print "^" call bdos pop d mov a,d ;get the chr again pop h mov m,a ;copy it into selection buffer adi 64 ;make a into corresponding printing char. push h mov e,a mvi c,conout ;and print it call bdos pop h pop b mov a,b cpi 30 ;check if selection buffer full jz selectout ;if it is, end selection inx h inr b jmp selectagain ;otherwise, get another chr badentry: pop h pop b jmp selectagain ;and try again endselect: pop h ;pop stack pop b ;twice... selectout: mov a,b ret ;(from selectch) ;back up one character backone: pop h pop b mov a,b cpi 0 jz selectagain dcx h dcr 0 mvi m,'$' mvi a,backspace call cout call cout mvi a,space call cout call cout mvi a,backspace call cout call cout jmp selectagain if echo ;echo chr to console echochar: cpi lf ;is the chr a lf? rz ;yes, don't show it push b ;save b & c push psw ;save a before echo to console echonow: ani 7fh ;zero high bit for display cpi cr ;if cr, back to start of line jz newscreen cpi tab jnz echoit mvi a,period ;if tab, show period instead echoit: call cout ;chr was not a lf, show it lda echopos ;increment position record inr a sta echopos cpi linelen ;full line? jnz endecho ;no newscreen: mvi a,0 sta echopos ;yes, reset it mvi a,cr ;and send a cr to screen call cout push b mvi b,linelen spacscrn: mvi a,space ;overwrite old line with spaces call cout dcr b jnz spacscrn pop b mvi a,cr call cout endecho: pop psw pop b ret ;(from echochar) endif ;look for chr in b in table pointed to by hl isitin: xra a ;check for end of table (0) cmp m jz notin ;end of table, no match mov a,b ;get the processed chr back in a ani 7fh ;zero high bit cmp m ;and compare with chr in table jz itsin ;if it is in table, do further checking inx h ;point to next chr in table jmp isitin ;and compare again itsin: mvi a,true ret ;(from isitin) notin: mvi a,nope ;(from isitin) ret ;get one chr from console and show it in uppercase coninone: push b push d push h tryakey: xra a ;clear flag register mvi e,0ffh mvi c,condir ;direct input from console for no echo call bdos cpi 0 ;if no key pressed, try again jz tryakey mov b,a ;copy chr into b sui 32 jm nocout ;do not echo if control chr. mov a,b call ucase ;make it upper case mov b,a cpi quit cnz cout ;and show it nocout: mov a,b pop h pop d pop b ret ;output chr in a to console cout: push b push d push h push psw mvi c,conout mov e,a call bdos pop psw pop h pop d pop b ret ;message pointed to by stack to console (modifies register a) showmsg: xthl ;get stack return address into hl xra a ;clear flags and accumulator add m ;get one chr of the message inx h ;point to next xthl ;restore stack rz ;return if done call cout ;else display chr jmp showmsg ;and repeat ;convert chr in register a to upper case ucase: cpi quit rz push b mov b,a call islowcs ;lower case? cpi true jnz notup ;if no, skip mov a,b ani 5fh ;make uppercase pop b ret notup: mov a,b pop b ret ;is chr in register a lower case? if yes, set a=true islowcs: push b mov b,a xra a ;clear flag register mov a,b sui 97 jm isntlow ;if <97, not lower case mov a,b adi 133 jc isntlow ;if >122, not lower case mvi a,true pop b ret isntlow: mvi a,nope pop b ret ;(from islowcs) ;check for upper case chr isupcse: ;returns a=true if chr in a is uppercase push b mov b,a xra a mov a,b sui 65 jm isntup ;cannot be less than 'A' mov a,b adi 165 ;cannot be larger than 'Z' jc isntup mvi a,true pop b ret isntup mvi a,nope pop b ret ;print function printit: mvi c,printf jmp bdos ;will return directly from bdos ;dim screen; codes shown are for Osborne dim: if osborne call showmsg db escape,')',0 endif ret ;normal brightness bright: if osborne call showmsg db escape,'(',0 endif ret ;initialize storage areas initstor: ; zero fcb, flags and buffers lxi d,outend ;point de to end of storage lxi h,infcb ;point de to beginning movzero: mvi m,0 inx h mov a,h ;check top byte of address cmp d ;for outend jnz movzero mov a,l ;now check low byte cmp e jnz movzero lxi h,infcb+1 ;point to name areas mvi b,11 ;in 11 chrs incl. type call spastor ;go put spaces inittwo: lxi h,outfcb ;zero drive indicator in outfcb mvi m,0 lxi h,outfcb+1 ;point to name areas mvi b,11 ;11 char incl. type call spastor ret ;(from initstor and inittwo) spastor: mvi a,space mov m,a ;put a space there inx h dcr b mov a,b cpi 0 jnz spastor ;if not done, repeat ret ;(from spastor) ; ** storage area ** ; tables of chrs to be processed ;option p (remove all print control chrs, except dot commands) ptable: db 01,02,03,04,05,06,07,0bh,0ch,0eh,10h db 11h,12h,13h,14h,15h,16h,17h,18h,19h db escape,0 ;option s (selected by user) stable: db '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$',0 ;characters after which a cr will be kept when reformatting crtable: db period,colon,'?!%|>]*_1234567890',0 ;menu menul: db 'L - Remove line feeds,',cr,lf db ' and pad blank lines with a space.',cr,lf,lf,'$' menuc: db 'C - Remove extra carriage returns and spaces',cr,lf db ' (leave only paragraph breaks, "unjustify")',cr,lf,lf,'$' menuw: db 'W - Change a WordStar file into an ASCII file',cr,lf,lf,'$' menup: db 'P - Remove all imbedded print commands',cr,lf,lf,'$' menus: db 'S - Remove selected imbedded print commands',cr,lf,lf,'$' menur: db 'R - Remove any "rubout" characters (7fh) only',cr,lf db 9,'(done automatically by other options above)',cr,lf,lf,'$' menuq: db 'Q - Quit',cr,lf,lf,'$' showopt: db 'Option selected:',cr,lf,'$' ;stack storage next 64 bytes ds 64 stack ds 1 ;label end of stack (it works backwards) curfcb: ds 2 ;current fcb address ;buffer and flag area infcb: db 0,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h db 0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0 db 0 outfcb: db 0,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h db 0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0 db 0 ;flags and counters choice: db 0 ;menu choice crflag: db 0 ;just erased a cr spare: db 0 ; lowcase: db 0 ;true if lower case in text ambighyph: db 0 ;true if ambiguous hyphen found newchar: db 0 ;newer of chr pair in process oldchar: db 0 ;older of chr pair in process lastread: db 0 ;last read chr lastchar: db 0 ;last copied chr penultimate: db 0 ;we store the one before last here joinfl: db 0 ;true if rejoining word wsformat: db 0 ;if true, keep 8th bit and non-break spaces zapdot: db 0 ;if true, delete dot commands dotcomfl: db 0 ;if true, processing a dot command keep: db 0 ;if true, copy this chr echopos: db 0 ;column counter for console errfl: db 0 inpos: db 0,0 outpos: db 0,0 inbuf: ds 80h inend: outbuf: ds 80h outend: db ' Copyright 1983 by Claude Ostyn' end 0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0 db 0 outfcb: db 0,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h db 0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0 db 0 ;flags and counters choice: db 0 ;menu choice crflag: db 0 ;just erased a cr spare: db 0 ; lowcase: db 0 ;true if lower case in text ambighyph: db 0 ;true if ambiguous hyphen found newchar: db 0 ;newer of chr pair in process oldchar: db 0 ;older of chr pair in process lastread: db 0 ;last read chr lastchar: db 0 ;last copied chr penultimate: db 0 ;we store the one before last here joinfl: db 0 ;true if rejoining word wsformat: db 0 ;if true,1 FILTER ver 1.1 - ASCII file filter utility :] •Usage: FILTER [drive:] [ ] = optional, < > = required$\<¾++SOURCE FILE NOT FOUND++$FILTER FIL ! ^#V#*0}@gl**}|\!"*{zN*.*" : DISK FULL: OUTPUT$!"**#"ɯ22!@"!"<µ  NO DIR SPACE: OUTPUT$Input and output files open \K++SOURCE FILE READ ERROR++$!~K3 ? ? ? ?*Y#"YD,*}W">K<Ž xÎ CANNOT CLOSE OUTPUT$Function complete - *Y7 characters deleted$*}"><  CANNOT CLOSE OUTPUT$  ~*#~_ @ |7{0* FILTER.DOC ver 1.1 by Keith Petersen, W8SDZ (revised 1/27/81) This program copies any ASCII file and filters out (ignores) all control characters except CR, LF, and TAB. It also sets the high order bit of all characters to zero so that files created with WordStar or other text processing programs can be read by MBASIC. The filtered copy of the of the file is created as 'FILTER.FIL' on the default drive. The source file is left intact. If the original file's EOF (1AH) is not at the physical end of the last sector, this program will pad the last sector with EOF's. This is useful for 'cleaning up' a file which was originally created by MBASIC or text editors which do not pad the last sector with EOF's. Command: FILTER [drive:] ; FILTER.ASM ver 1.1 ; by Keith Petersen, W8SDZ ; (revised 1/27/81) ; ;This program copies any ASCII file and filters out (ignores) ;all control characters except CR, LF, and TAB. It also sets ;the high order bit of all characters to zero so that files ;created with WordStar or other text processing programs can ;be read by MBASIC. The filtered copy of the of the file is ;created as 'FILTER.FIL' on the default drive. The source ;file is left intact. If the original file's EOF (1AH) is ;not at the physical end of the last sector, this program ;will pad the last sector with EOF's. This is useful for ;'cleaning up' a file which was originally created by MBASIC ;or text editors which do not pad the last sector with EOF's. ; ;Command: FILTER [drive:] ; ;Define write buffer size ; BSIZE EQU 1024*16 ;<--NOW SET FOR 16k ; ;BDOS equates ; WBOOT EQU 0 ;WARM BOOT ENTRY ADRS WRCON EQU 2 ;WRITE CHARACTER TO CONSOLE BDOS EQU 5 ;CP/M BDOS ENTRY ADRS PRINT EQU 9 ;PRINT STRING (DE) UNTIL '$' OPEN EQU 15 ;OPEN DISK FILE READ EQU 20 ;READ SEQUENTIAL FILE STDMA EQU 26 ;SET DMA ADDRESS FCB EQU 5CH ;DEFAULT FILE CONTROL BLOCK ; ;Program starts here ; ORG 100H ; MACLIB SEQIO ;NAME OF MACRO LIBRARY USED ; START: LXI SP,STACK ;SET STACK POINTER CALL ILPRT ;PRINT: DB CR,LF,'FILTER ver 1.1 - ' DB 'ASCII file filter utility',CR,LF,CR,LF,0 LDA FCB+1 CPI ' ' ;FILENAME THERE? JNZ OPENIT ;YES, GO OPEN IT CALL EXIT ;PRINT MSG THEN EXIT DB 'Usage: FILTER [drive:]',CR,LF DB CR,LF,' [ ] = optional, < > = required$' ; ;Open source file ; OPENIT: LXI D,FCB MVI C,OPEN CALL BDOS INR A ;CHECK FOR NO OPEN JNZ DECFIL ;NO ERROR, CONTINUE CALL EXIT DB '++SOURCE FILE NOT FOUND++$' ; ;'Declare' output file ; DECFIL: FILE OUTFILE,OUTPUT,,FILTER,FIL,BSIZE CALL ILPRT ;PRINT: DB 'Input and output files open',CR,LF,CR,LF,0 ; ;Read sector from source file ; READLP: LXI D,80H MVI C,STDMA CALL BDOS LXI D,FCB  MVI C,READ CALL BDOS ORA A ;READ OK? JZ WRDISK ;YES, SEND IT TO OUTPUT CPI 1 ;END-OF-FILE? JZ TDONE ;TRANSFER DONE, CLOSE, EXIT CALL ERXIT DB '++SOURCE FILE READ ERROR++$' ; ;Write sector to output file (with buffering) ; WRDISK: LXI H,80H ;READ BUFFER ADRS ; WRDLOP: MOV A,M ;GET BYTE FROM READ BUFFER CPI 1AH ;END OF FILE MARKER ? JZ TDONE ;TRANSFER DONE, CLOSE, EXIT ANI 7FH ;STRIP PARITY BIT CPI 7FH ;DEL (RUBOUT) ? JZ IGNORE ;YES, IGNORE IT CPI ' ' ;SPACE OR ABOVE? JNC PUTCHR ;YES GO WRITE IT CPI CR ;CARRIAGE RETURN ? JZ PUTCHR ;YES GO WRITE IT CPI LF ;LINE FEED ? JZ PUTCHR ;YES GO WRITE IT CPI TAB ;TAB CHARACTER ? JZ PUTCHR ;YES, GO WRITE IT ; ;Ignore character and add one to ignore count IGNORE: PUSH H ;SAVE INPUT BUFFER ADRS LHLD DCOUNT ;GET DELETE COUNTER INX H ;ADD ONE SHLD DCOUNT ;SAVE NEW COUNT POP H ;GET INPUT BUFFER ADRS BACK JMP TSTEND ;IGNORE CHARACTER AND CONTINUE ; ;Write character to output buffer ; PUTCHR: PUSH H ;SAVE INPUT BUFFER ADRS PUT OUTPUT ;SEND TO DISK WRITE BUFFER POP H ;GET INPUT BUFFER ADRS BACK ; TSTEND: INR L ;DONE WITH SECTOR? JNZ WRDLOP ;NO, GET ANOTHER BYTE JMP READLP ;GO GET ANOTHER SECTOR ; ;Transfer is done - close destination file ; TDONE: FINIS OUTPUT ;FLUSH BUFFERS, CLOSE CALL ILPRT ;PRINT: DB 'Function complete - ',0 LHLD DCOUNT ;GET DELETED CHAR COUNT CALL DECOUT ;PRINT IT CALL EXIT ;PRINT MSG THEN EXIT DB ' characters deleted$' ; ;Erase the incomplete output file, then exit ; ERXIT: FINIS OUTPUT ;CLOSE INCOMPLETE FILE ERASE OUTPUT ;THEN ERASE IT ; ;Print message then exit to CP/M warm boot ; EXIT: POP D ;GET MSG ADRS MVI C,PRINT ;PRINT MESSAGE CALL BDOS CALL ILPRT ;PRINT CRLF DB CR,LF,0 JMP WBOOT ;ASSURES UPDATE OF BIT MAP ; ;Inline print routine - prints string pointed to ;by stack until a zero is found. Returns to caller ;at next address after the zero terminator. ; ILPRT: XTHL ;SAVE HL, GET MSG ADRS ; ILPLP: MOV A,M ;GET CHAR CALL TYPE ;OUTPUT IT  INX H ;POINT TO NEXT MOV A,M ;TEST ORA A ;..FOR END JNZ ILPLP XTHL ;RESTORE HL, RET ADDR RET ;RET PAST MSG ; ;Send character in A register to console ; TYPE: PUSH B PUSH D PUSH H MOV E,A ;CHAR TO E FOR CP/M MVI C,WRCON ;WRITE TO CONSOLE CALL BDOS POP H POP D POP B RET ; ;Decimal output - print HL as decimal ;number with leading zero suppression ; DECOUT: PUSH B PUSH D PUSH H LXI B,-10 LXI D,-1 ; DECOU2: DAD B INX D JC DECOU2 LXI B,10 DAD B XCHG MOV A,H ORA L CNZ DECOUT MOV A,E ADI '0' CALL TYPE POP H POP D POP B RET ; DCOUNT: DW 0 ;DELETED CHARACTER COUNTER DS 100 ;ROOM FOR STACK STACK EQU $ ;STACK POINTER SET HERE ; ;Org write buffer to even page boundry ORG ($+255) AND 0FF00H BUFFERS EQU $ ;WRITE BUFFER STARTS HERE ; END address after the zero terminator. ; ILPRT: XTHL ;SAVE HL, GET MSG ADRS ; ILPLP: MOV A,M ;GET CHAR CALL TYPE ;OUTPUT IT á FILTER Version 6.1 Copyright 1983, 1986 by Claude Ostyn P.O. Box 2035 Sitka, Alaska 99835 (Enter ESC to exit) $*| g; ʰ͂ Can't find that file. Try again. ò͙ t3 t/͂Choose one letter: kwTN2`͂ :LʔCʮBWIPISʍRʪQllw.>2͂ Max. line length in output file = 250 characters $>2>C2÷Remove all carriage returns (except after period) and all extra spaces (except after period or colon) Also remove soft hyphens created by WordStar and control characters. $͂ Does the file contain lower case characters (Y/N)? NY>2͂Removing all extra spaces and carriage returns... >22:W`k.nͩ͂ Removing all inbedded5͂Enter print control characters you want to remove from the file (use CTRL key), and press when done: ~ͩ͂ Removing all selected͂ print control codes:ʝ͂ and WordStar formatting codes:͂, including dot commands͂... ͂Removing rubout characters only... !6!T"!U"T*|}~#"2-2:ʵD : :µ::2:Ÿ: V ]2ß!4: r:{:ҟ2>#2>#2> 2> 2:2:# :2ʥ2:*w#"2|} ɯ2u2!"U2!U"  ͂ File copied okay. :°͂ One or more ambiguous hyphen was found and replaced by a "#-" pair of characters in the output file. You will need to use your editor to do the necessary correction(s). ð͂Copy stopped... Do you want to save what has been copied so far? NY#NlZ͂Terminated at operator's request - file not copied! ͂ Copy another file? NYʡN ͂ ͂ ...Program terminated. ͂ Write error on output file... :T :2!6:R: :L€ A : ï : :C– ] ï P¡ ï W¬ ï :: : !~ : 6:2: :2:2:. : >2>2 / :>22>2 :C:  : !: U 6> 26 !~:ʞ : @ ʌ ʌ >2:- 8 8 : ( ͣ : >22:2> 2 :> 2 :2:2:-:- >#2 :>-2>22>2 : : ʁ G!b8x p :G8x ʁ : :ͺ!6>2: : ʴ :  :.:?! : : : : > 26!+ !A:G8! !:,  2 & > 2>-2: ͂ Name of file to copy from: :] ʀ !\u !\v> 2]u8:u2u͂ Name of file to copy to: :m !l !lv> 2m 8:2W͂ Input and output files cannot be the same! Ù ! ͂ Output file already exists... OK to overwrite (Y/N)? NY Nz ͂ Use another name for output file (Y/N)? NY ͙ 3 ͂ Deleting old output file... ͂ No room on this disk...͂ Try another disk (Y/N)? NYN>:u^>2c>2͂ This may not work if the new disk does not contain the CP/M system tracks... Insert disk for copy in drive :@s͂: and press any key, or ESC to exit 3 >ɯu "s!6+6 !~^#6*s!:ʈ:ˆ!:͎AʅB@~.ʦ͎#xʦÈ*s ®#~͎ ³͂ Bad file name, try again (or just RETURN to exit): <͂ On which drive? NƯ2֯@2͂ That drive does not exist! !u q#a>>~ʇ@s>:s#ʘ~ ʇsÇ>.s#~sŸ͂ Should the copy retain the WordStar formatting codes, such as soft spaces, soft returns and soft hyphens? NY.!6͂ Do you want to retain any dot commands found in the copy? NY>2!CW!+~#š^zw@_x#ÃÃxxʃ+6$>ss> ss>ssà   >.s:<235>2> s3> s&> sɯKxH#8>>QG nx͎Gsx_㯆#sÂGͣ x_xGxaxƅڶ>>GxAxƥ>> > s> s~# x!u6#|}!v !6! > w#x $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.:?!%|>]*_1234567890L - Remove line feeds, and pad blank lines with a space. $C - Remove extra carriage returns and spaces (leave only paragraph breaks, "unjustify") $B - As C, but insert cr/lf to break any line longer than 250 characters $W - Change a WordStar file into an ASCII file $P - Remove all imbedded print commands $S - Remove selected imbedded print commands $R - Remove any "rubout" characters (7fh) only (done automatically by other options above) $Q - Quit $Option selected: $ Copyright 1983, 1985 by Claude Ostyn >.s:<235>2> s3> s&> sɯKxH#8>>QG nx͎Gsx_㯆#sÂGͣ x_xGxaxƅڶ>>GxAxƥ>> > s> s~# x!u6#|}!v !6! > w#x $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.:?!%|>]*_1234567890L - Remove line feeds, and pad blank lines with a space. $C - Remove extra carriage returns and spaces (leave only paragraph breaks, "unjustify") $B - As C, but insert cr/lf to break any line longer than 250 characters $W - Change a WordStar file into an ASCII file $P - Remove all imbedded print commands $S - Remove selected imbedded print commands $R - Remove   ( (!9"1% FORM - copyright 1984 by Irv Hoff - 11/11/84 :] /% To use: B>FORM A:HELLO.ASM 1) B>FORM HELLO.ASM A:NAME.NEW 2) 1) uses original name for new file, original now named .BAK 2) original file stays intact, new file has new name :m `!\I ̈́ I!\ ̈́ k!lḮ 2|2i\<¢% ++ SOURCE FILE NOT FOUND ++ 2U2i!"!"I<:% File exists - erase? (Y/N):   0:_Y,% [Returning to CP/M]\ I% I x 3 > >   !> > :6* A~ J:8~~:g ʾ # ~;]J*#"":8Ң# ~ # ~':•/2~~;G~# ~ + : > : = #xx> : => # ~ ;]  # ~;] ':0/2:~;G# ~ # G> :::8:ʁ:9: ʁ:6:ʁ:ʎ*#"Oy=ڝ> Ï~:ʫ> #~ ʫ.ʫ:~#͍~ #> 2!A* ~ :B4B#~: " 6:#6 #6 ++'"*#"(6:"*#"#~ +:u#~  :B*#":4'6 #~ 6 +6 #~ u :2ʒ3ʵ"~_EʬSʬDʬM ͟"~_EDR ͟!~ ?:5~ –:5: : > ÿ:<2:<2:6:62> 2>  ʅ a 2:2> *#":ƒ% *> ͎ 2222~'¤:/2;¿:¿<2:ʿ2:<2:> ͍ =2p͍ # ,tø:5 ~ :.#"| E%I%M. 2͟2| ; d ¶| T;T *N6 #~qO Z+6 #6 #6 TO:y:y:5y:4yʖa{_A[ *ʽG| ʢ°?Ÿ:4:a | ; ö*6 *+"  |{0͎ \I% *!~;t t *j TQ tQ x #~= 2 ͢2x 2:5t 6;!~#a_~#„ š *#" ¨ *#"**}| !"*{z *I *"ü % DISK FULL: OUTPUT!"**#"~#2 ͎ &  } N } % ++ ABORTED, OUTPUT FILE DELETED ++ IFENDIFIFFIFTELSEMACROENDM?TITLE ?EQUSETMACRODEFL?EQUDBDWRSDDRBRW?% *% *} ">͍ \I<0 % CANNOT CLOSE OUTPUT0 % *% lines *% original spaces *% original tabs *% original colons after labels *% current spaces *% current tabs *% current colons after labels :6? % *% comment lines moved :R$ !\j̈́ !]{̈́ !\ ̈́ j!]Z̈́ I _% 0) remove colons from all labels 1) add colons to all labels 2) colons for M80 assemblers  3) colons for 8086 assemblers 4) all source code to lower-case 5) remove tabs, case unaffected 6) inline comments to column 32 7) inline comments to column 40 8) reformat source code (col 32) 9) reformat source code (col 40) select: ** 0!:!12% Û % [Returning to CP/M] $$$ BAK BAK\I<0 % CANNOT CLOSE OUTPUT0 % *% lines *% original spaces *% original tabs *% original colons after labels *% current spaces *% current tabs *% current colons after labels :6? % *% comment lines moved :R$ !\j̈́ !]{̈́ !\ ̈́ j!]Z̈́ I _% 0) remove colons from all labels 1) add colons to all labels 2) colons for M80 assemblers  FORM3 - Formats, changes colons and tabs in source code - 11/11/84 COPYRIGHT 1984 Irv Hoff W6FFC This program places colons after labels in source code files. It can do a variety of other things as indicated in the menu that comes up each time the program is requested: 0) remove all colons from labels 1) add colons to all labels 2) colons for M80 assemblers 3) colons for 8086 assemblers 4) all source code to lower-case 5) remove tabs, case unaffected 6) inline comments to column 32 7) inline comments to column 40 8) reformat source code (col 32) 9) reformat source code (col 40) select: x Selection 2) is primarily for Microsoft M80 assemblers with 8080 or Z80 code. It requires colons after all labels with the exception of no colons after labels in EQU lines. Selection 3) is for 8086 assemblers, which require colons af- ter all labels with the exception of DB, DD, DW, RB, RS, RW and EQU lines. Selection 4) makes all source code lower-case, does not affect DB strings or existing colons. Selection 5) removes all tabs, replacing with an appropriate number of spaces. Does not change any source code to upper- case, thus can be used on both ASCII text or source code files. Normally gives identical CRC check with programs using the [T8] option on PIP, but is faster and gives a results summmary. Selection 6) does not affect any colon, but moves all inline comments to a minimum of column 32 for neat appearance. (This is controlled by byte 0106H.) Selection 7) is same as 6) but moves comments to a minimum of column 40. (This is controlled by byte 0107H.) Selection 8) removes all tabs, then reformats all source code to a standard appearance with comments moved to column 32. (This is controlled by byte 0108H.) This is a very intelligent routine with lots of hidden features. Selection 9) is the same as 8, but moves comments to column 40 which is preferred by most 8086 users. (This is controlled by byte 0109H.) NOTE: IF USING A 1-4 SELECTION TO HANDLE COLONS AS WELL AS REFORMATTING WITH 8 OR 9, DO THEM IN THAT ORDER. THIS ALLOWS THE REFORMATTING MAX- IMUM LEEWAY IN HANDLING LABELS OVER 7 COLUMNS. (IN OTHER WORDS, 'GO UP' IN NUMBERS IF USING 8 OR 9 TO REFORMAT. ELSE ANY ORDER IS FINE.) CAUTION: ANYTHING IN THE FIRST COLUMN IS CONSIDERED TO BE A LABEL OR A COMMENT, WITH THE EXCEPTION OF 'TITLE' WHICH IS TREATED AS A COMMENT. THERE ARE NO OTHER 'RESERVED' WORDS FOR THAT COLUMN.  YOU MAY NEED TO CHECK THE LABELS MANUAULLY TO MAKE SURE EVERYTHING IN THAT COLUMN IS NORMAL. The program counts the original spaces and tabs, removes all tabs and then places tabs wherever possible. The tabs are placed for standard CP/M intervals of "every 8" columns. It pads the end of the file with CTL-Z (end-of-file) characters. When the file is finished it displays the original and the current space count, tab count and the number of colons present. A tab is placed at any location it can until it comes to a semicolon (delimiter for text comments). It will still tabulate in the text comments, but does not substitute a tab for a single space as nothing would be gained. It also protects the space between 'quotes' and does not replace any spaces with tabs. Note: Some prefer a space after the ';' for source line comments. To get this feature, change byte 105H from 00 to FF, then save 14 pages with a new name. This only works with options 6-9. Some like a capital letter in the first column of the source line comments. To get this feature, change byte 0104 from 00 to FF. This only works for options 6-9. Byte 103 changes the rate at which the line count progress is shown. DDT, etc. can be used to make any of these easy changes, then save 14 pages and rename the program as desired. ---------------------------------------------------------------------- (* = normal default settings) Byte 103 07H for every 8 lines (slow floppies) * 0FH for every 16 lines (fast floppies) 1FH for every 32 lines (normal hard disks) 3FH for every 64 lines (very fast hard disks) Byte 104 * 00H does not affect first inline comment character FFH capitalizes first incline comment character Byte 105 * 00H inline comment text follows the semicolon FFH one space between inline semicolon and comment Byte 106 * 20H puts comments to column 32 for option 6 Byte 107 * 28H puts comments to column 40 for option 7 Byte 108 * 20H puts comments to column 32 for option 8 Byte 109 * 28H puts comments to column 40 for option 9 Byte 10A 08H puts instructions in column 8 (normal) These additional features give an unusual versatility to this program. ---------------------------------------------------------------------- DISPLAYS UPON COMPLETION: ------------------------ total lines in the file original spaces original tabs original colons after labels current spaces current tabs current colons after labels - notes by Irv Hoff W6FFC ---------------------------------------------------------------------- To use: B>FORM HELLO.ASM (1) B>FORM HELLO.ASM NUNAME.ASM (2) B>FORM A:HELLO.ASM (3) B>FORM A:HELLO.ASM B:NUNAME.ASM (4) (1) Sets tabs in a file named HELLO.ASM. When finished the original file is named HELLO.BAK and the new file has the normal name. (2) The original file keeps the original name. The new file is now named NUNAME.ASM. (3) Just shows you can use two disks. The backup file will be on the same disk as the original and assumes the original name. (4) The original file remains intact, the new file is on another drive and is named NUNAME.ASM. ---------------------------------------------------------------------- 11/11/84 v3 Added instruction column option 11/07/84 v2 Added several features 11/01/84 v1 Original version of FORM ---------------------------------------------------------------------- atures 11/01/84 v1 Original version of FORM ---------------------------------------------- NUNAME.ASM (2) B>FORM A:HELLO.ASM (3) B>FORM A:HELLO.ASM B:NUNAME.ASM (4) (1) Sets tabs in a file named HELLO.ASM. When finished the original file is named HELLO.BAK and the new file has the normal name. (2) The original file keeps the original name. The new file is now named NUNAME.ASM. (3) Just shows you can use two disks. The backup file will be on the same disk as the original and assumes the original name. (4) The original file remains intact, the new file is on another drive and is named NUNAME.ASM. ---------------------------------------------------------------------- 11/11/84 v3 Added instruction column option 11/07/84 v2 Added several features 11/01/84 v1 Original version of FORM ---------------------------------------------- FROM: Irv Hoff DATE: 11 Nov 84 SUBJECT: FORM3 (READ FORM3.DOC FOR ADDITIONAL INFORMATION) FORM.COM reformats ASCII source code files automatically. It has 10 different options. All but two automatically change any source code to upper-case, the exceptions being: Option 4 - changes all source code to lower-case Option 5 - removes all tabs - usually gives identical CRC check with results of using PIP [T8] option to remove all tabs FORM has four different options for putting colons behind labels for various assemblers: Option 0 - removes all colons Option 1 - puts colons behind all labels Option 2 - for M80, colons on all labels except EQU lines Option 3 - for 8086, colons on required labels, none on excluded labels such as EQU, DB, DD, DW, RS, etc. Two options automatically move any source line comments to the column mentioned without affecting anything else. They leave a space in any case, behind the operand field if it extends too long: Option 6 - puts inline comments to column 32 Option 7 - puts inline comments to column 40 Two options automatically reformat the entire source code so the instruction field starts at tab 1 whenever possible, as soon after if not, the operand field at tab 2 wherever possible, as soon after if not and the inline comment field at tab 4 or 5 depending on the option: Option 8 - reformats, puts inline comments at column 32 Option 9 - reformats, puts inline comments at column 40 All but option 5 completely detab, remove any trailing tabs or spaces, then retab wherever a tab can go. Options are available (by changing convenient bytes at the start of the program) to change the rate the line progress is displayed if a different speed would be more appropriate on a particular system (the default rate is every 16 lines), to put a space after the semicolon for inline comments if desired, and to capitalize the first letter of inline comments if desired. FORM combined with one of the FILT programs (such as FILTW.COM) and one of the NEAT programs (such as NEATL.COM) gives the programmer a VERY powerful set of utility programs that can make any assembly-level ASCII source code look uniform throughout, in a pleasing manner. - Irv Hoff rograms that can make any assembly-level ASCII source code look uniform throughout, in a pleasing manner. - IrOption 8 - reformats, puts inline comments at column 32 Option 9 - reformats, puts inline comments at column 40 All but option 5 completely detab, remove any trailing tabs or spaces, then retab wherever a tab can go. Options are available (by changing convenient bytes at the start of the program) to change the rate the line progress is displayed if a different speed would be more appropriate on a particular system (the default rate is every 16 lines), to put a space after the semicolon for inline comments if desired, and to capitalize the first letter of inline comments if desired. FORM combined with one of the F!9"1!m":] ʞͧ\Ͳ\ͷ>2>2*ͼc> XÖ~ p>2_#Q":?:<2D*eÙ ™  \\Z$ >> M A G E << Version 3.1 05/29/83 This copy set for Osborne Executive $ MAGE31 can recover WordStar files from memory under most circum- stances, including system reset but not complete power loss. The command form is MAGE31 [D:]FILENAME.TYP [D:] is an optional drive designator. FILENAME.TYP is the mandatory file specification. The recovered text will be saved under this name. CAUTION: MAGE31 will first delete any existing file of the name specified in the command line. If you try to recover your text under its original name, you will wipe out any earlier version. Use a new file name (like RESCUED.TXT), and keep the earlier version in case your recovery is incomplete.$ MAGE will recover WordStar files from memory after almost any accident, short of a complete power loss. It will save the re- covered text under the name you have specified. CAUTION: MAGE will first delete any existing files that have the name you have specified. If you are using the original name of your lost file, you will WIPE OUT any earlier version. It is better to choose a new name (like RESCUED.TXT) for the rescued file so you will have the earlier version as a backup. Once MAGE starts running, it will display what it is recovering on the screen. You can end the recovery at any time (once you have what you want) by pressing any key. PRESS TO BEGIN PRESS ANY OTHER KEY TO ABORT$d in the command line. If you try to recover your text under its original name, you will wipe out any earlier version. Use a new file name (like RESCUED.TXT), and keep the earlier version in case your recovery is incomplete.$ MAGE will recover Wor;This version set up for the Osborne Executive by Jim Switz, FOG Executive ;Librarian, 23 January 1984 ; ;mage31.asm--mage31 will recover a wordstar file from computer memory ;after a disk-full error, system reset, or other disaster short of a ;complete power loss, but it can only recover that part of the file that ;is in memory when disaster strikes. it will save the recovered file ;under a name of your choosing and will display what it is recovering on ;the screen at the same time. ;how to use mage31--first, do a reset (probably not necessary unless you're ;going to change disks, but it doesn't hurt, so do it anyway). you can now ;change disks if you need to. run mage31. if you don't specify a filename, ;mage31 will give you instructions. if you specify a filename (in the form ;mage31 [drive:]filename.typ), mage31 will sign on, give you a last chance ;to back out, and proceed when you hit return. as mage31 recovers the file, ;it will show what it's recovering on the screen. if you want to stop the ;recovery at any point, hit any key, and mage31 will save what it has ;already recovered to disk and return you to cp/m. if you let mage31 run ;all the way, you will have some junk characters at the end of your file. ;just delete them with wordstar. ;how to set mage31 for your machine--you need to alter one equate (IMAGE) ;and one db sequence (CLRSCR) to suit your system. IMAGE must contain the ;starting address of wordstar's text buffer. to find this address, you need ;ddt, wordstar, and a text file. run wordstar and load the text file. note ;the opening text of the file (pick a file with an easily recognizable ;opening). now do a system reset (that's right, a reset). your system will ;cold boot, but the file you loaded is still there in memory. load ddt and ;start looking for the beginning of the file, using the "d" command. start ;around 7000h--both the osborne and the morrow wordstars started the text ;buffer in that area, so it's a good bet. keep using "d" to display memory ;and watch the ascii characters on the right of the screen until you see the ;text that starts your "lost" file. note the address where the file starts ;and exit ddt. put your address in the IMAGE equate, and change the IMAGE ;comment line and the VERSN message at the end of the program to show the ;make and model of your system. next check the CLRSCR db sequence near the ;end of the program. if ESC* doesn't clear your screen and home the cursor ;you'll need to change this sequence to suit your system. but remember to ;leave the '$' at the end of whatever you insert. if you don't have an 80 ;column screen, you'll want to reformat the messages. voila'--you're done. ;05/29/83--mage version 3.1: disassembled mage version 3.0 to 8080 source. ;placed starting address of text in an equate (image) so mage31 can be set ;to run on various systems. fixed bug to allow proper handling of full ;width (255 character) lines. added help message if no file specified, ;caution message on filenames, and chance to abort before recovery starts. ; ted silveira ;date unknown--original(?) mage version 3.0 for osborne o1, by chris ;and steve rudek TPA EQU 100H BDOS EQU 05H IMAGE EQU 846DH ;wordstar text start on Osborne Executive LF EQU 0AH CR EQU 0DH TAB EQU 09H ESC EQU 1BH RBOOT EQU 00H ;reboot address DBUFF EQU 80H ;cp/m default buffer start TFCB EQU 5CH ;transient file control block ORG TPA START: LXI H,0 ;save cp/m stack DAD SP SHLD OLDSP LXI SP,STACK ;set up user stack LXI H,IMAGE ;put text start address.. SHLD HLSAVE ;..where we can get at it LXI D,CLRSCR ;clear and home.. CALL WRTLNC LXI D,VERSN ;..to print version message CALL WRTLNC LDA TFCB+1 ;check to see.. CPI 20H ;..if filename specified JZ HELP ;if no, go to help routine LXI D,SIGNON ;if yes, print sign-on and.. CALL WRTLNC CALL RDCON ;..wait for go-ahead from operator LXI D,TFCB ;delete any old file.. CALL DELEFL ;..of the same name and.. LXI D,TFCB ;..make a new file.. CALL MAKEFL ;..to save the text in LXI D,CLRSCR ;clear and home.. CALL WRTLNC ;..so we can view save SETCT: MVI A,0 ;zero end-of-text flag STA EOTFLG SETCT1: MVI A,0 ;zero linefeed flag STA LFFLG MVI B,80H ;set counter to 128 (80h) LHLD HLSAVE ;point hl to text LXI D,DBUFF ;point de to cp/m default buffer CKSTOP: CALL CKCON ;check for operator cancel ORA A ;if no input.. JZ MEMRD ;..then go ahead with text recovery PAD: MVI A,20H ;but if operator cancels, use spaces (20H).. STAX D ;..to pad out.. INX D ;..the rest of the record.. DCR B JNZ PAD JMP EXIT ;..and quit MEMRD: MOV A,M ;get a character from memory (pointed by hl) CPI LF ;is it a linefeed? JNZ DSPLY ;no, skip to display-and-save PUSH PSW ;yes.. MVI A,1 ;..then set linefeed flag.. STA LFFLG POP PSW ;..and fall through to display-and-save DSPLY: STAX D ;store character in default buffer.. PUSH D ;..(pointed by de) and save address on stack MOV E,A ;print character to console screen CALL WRTCON POP D ;recover the address and.. INX D ;..increment so it points to next open slot INX H ;increment text pointer for next character get DCR B ;decrement counter so we'll know if buffer full JNZ CKSTOP ;if not full, loop for next character SHLD HLSAVE ;if buffer full, store text pointer.. CALL WRTFL ;..and write out record from default buffer LDA LFFLG ;was there a linefeed character in this batch? ORA A ;(lfflg=1 if there was) JNZ SETCT ;if there was, loop for next record LDA EOTFLG ;if there wasn't, get eotflg.. INR A ;..increment it and.. STA EOTFLG ;..save it so we know how long since linefeed CPI 3 ;if only 1 or 2 records without lf, then.. ;..we may be ok (because max ws line=255).. JNZ SETCT1 ;..so loop for another record ;but if 3 records with no linefeed, then.. EXIT: CALL CLOSFL ; close file.. EXIT1: LHLD OLDSP ;..restore cp/m stack.. SPHL RET ;..and quit  HELP: LXI D,HLPMSG ;get address of help message.. CALL WRTLNC ;..print it.. JMP EXIT1 ;..and quit RDCON: MVI C,1 ;get character from console CALL BDOS CPI 0DH ;is it a carriage return? JNZ EXIT1 ;if no, then quit RET ;if yes, then go ahead DELEFL: MVI C,13H ;delete any existing file of this name JMP BDOS MAKEFL: MVI C,16H ;make a new file JMP BDOS CKCON: MVI C,0BH ;check console.. PUSH B ;..for any input PUSH D PUSH H CALL BDOS POP H POP D POP B RET WRTCON: MVI C,2 ;write a character to the console screen PUSH B PUSH D PUSH H CALL BDOS POP H POP D POP B RET WRTLNC: MVI C,9 ;write line to console screen until.. CALL BDOS ;..'$' encountered RET WRTFL: LXI D,TFCB ;write a record to disk, sequentially MVI C,15H PUSH B PUSH D PUSH H CALL BDOS POP H POP D POP B RET CLOSFL: LXI D,TFCB ;close a file MVI C,10H PUSH B PUSH D PUSH H CALL BDOS POP H POP D POP B RET EOTFLG: DS 0001H ;flag/counter to see if end-of-text reached LFFLG: DS 0001H ;linefeed flag HLSAVE: DS 0002H ;storage for hl pointer CLRSCR: DB ESC,'Z','$' ;the '$' must remain at the end of whatever ;sequence you put here. escZ is for Osbornes VERSN: DB TAB,TAB,TAB,TAB,' >> M A G E <<',CR,LF DB TAB,TAB,TAB,' Version 3.1 05/29/83',CR,LF,CR,LF DB TAB,TAB,' This copy set for Osborne Executive ',CR,LF,'$' HLPMSG: DB CR,LF,TAB,'MAGE31 can recover WordStar files from ' DB 'memory under most circum-',CR,LF DB TAB,'stances, including system reset but not ' DB 'complete power loss.',CR,LF,CR,LF DB TAB,'The command form is',CR,LF,CR,LF DB TAB,TAB,'MAGE31 [D:]FILENAME.TYP',CR,LF,CR,LF DB TAB,'[D:] is an optional drive designator. ' DB 'FILENAME.TYP is the',CR,LF DB TAB,'mandatory file specification. The recovered ' DB 'text will be saved',CR,LF DB TAB,'under this name.',CR,LF,CR,LF DB TAB,'CAUTION: MAGE31 will first delete any existing ' DB 'file of the name',CR,LF DB TAB,'specified in the command line. If you try ' DB 'to recover your text',CR,LF DB TAB,'under its original name, you will wipe ' DB 'out any earlier version.',CR,LF DB TAB,'Use a new file name (like RESCUED.TXT), ' DB 'and keep the earlier',CR,LF DB TAB,'version in case your recovery is incomplete.$' SIGNON: DB CR,LF,TAB,'MAGE will recover WordStar files from ' DB 'memory after almost any',CR,LF DB TAB,'accident, short of a complete power loss. ' DB 'It will save the re-',CR,LF DB TAB,'covered text under the name ' DB 'you have specified.',CR,LF,CR,LF DB TAB,'CAUTION: MAGE will first delete any ' DB 'existing files that have',CR,LF DB TAB,'the name you have specified. If ' DB 'you are using the original name',CR,LF DB TAB,'of your lost file, you will ' DB 'WIPE OUT any earlier version. It is',CR,LF DB TAB,'better to choose a new name ' DB '(like RESCUED.TXT) for the rescued',CR,LF DB TAB,'file so you will have the earlier ' DB 'version as a backup.',CR,LF,CR,LF DB TAB,'Once MAGE starts running, it will display ' DB 'what it is recovering',CR,LF DB TAB,'on the screen. You can end the ' DB 'recovery at any time (once you ',CR,LF DB TAB,'have what you want) by pressing any key.' DB CR,LF,CR,LF,CR,LF,CR,LF DB TAB,'PRESS TO BEGIN',CR,LF DB TAB,'PRESS ANY OTHER KEY TO ABORT$' OLDSP: DS 2 ;storage for cp/m stack pointer DS 10H STACK: DB 0 END TAB,'covered text under the name ' DB 'you have specified.',CR,LF,CR,LF DB TAB,'CAUTION: MAGE will first delete any ' DB 'existing files that have',CR,LF DB TAB,'the name you have specified. If ' DB 'you are using the original name',CR,LF DB TAB,'of your lost file, you will ' DB 'WIPE OUT any earlier version. It is',CR,LF DB TAB,'better to choose a new name ' DB '(like RESCUED.TXT) for the rescued',CR,LF DB TAB,'file so you will have the earlier ' DB 'version as a backup.',CR,LF,CR,1l!Bw# 2b\͖<̎B͠Bͯ<̎\ͥ~!~ [ e>2Ai:Ae>w2A#FBͪĎ7B͛!<̎ NO SOURCE FILE ON DISK$NO ROOM IN DIRECTORY$OUT OF DISK SPACE$OUTPUT FILE EXISTS AND IS WRITE PROTECTED$CONVERSION COMPLETE ... thank you !!$FILTER61COM*OPQRSTFORM3 COMUVWXFORM3 DOC9YZ[\]^_`FORM3 INFabcMAGE31 COMdeMAGE31 ASMLfghijklmnoPWWS $$$1dl!#w# 2C\wpwws oldfil.fin newfile.ws where "oldfil" is the PW document name, and "newfile.ws" is the name you want for your WS document. If the two file names are the same, the old file will dissapear. WSPW.COM converts wordstar files to documents readable by PW. This works the same way. * b͸{  !w{ÖüH!K]jU 2͵ ^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2hZZk:h|/g}/o#|/g}/o#:h<2hqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2hZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! P!9~#A!9"w**w"j!z*"d!"f!Y"H>2^>2a>2`2c>2s2t>2r>2v!"@!"D!@"B!"F !F#x:~#!|2i~# :" 2i +}|~#:G:ix."2i+w# +6#!6#@A2n2?*j**|+`!#"0!#"2!>ڌo&͖=}  w~2ʸͼ56!+W ?_!~7z?ͧ:>͞@w#5.ww#w#w#w*>?@͌>w#͌5> w#@ͧ͵g 2q&0OxG͵j/ʆSx\͞.7:77!a{  ʨ ʨ0:?ŷO !y$ 7o&))T])))!y 2p_ :p@Y6@! combinations to 20 8D 0A. PW2WS COM@ mmands with Perfect Writer. PW format com- mands are made into WS comment lines. If you want to eliminate PW format commands, use PF with the file output option. Use that file as the input file to this program. ******************************************************************d to %s spaces by default. You may change this default value by entering a 'Y' now. Do you want to change the tab expansion value (Y/N)? Enter '0' for no translation of TAB character. !H9DM! !A !r@ !p@ s#r̓A+++| ! W!F o! o! o!*o!vo!o!o!&o!A !sW!o!oW͛|¾ !o!Co!A !WW!A s#r!|ڰ ̓A|Ұ ̓A! ͌û !W͗ ͗!@U!8 !A ~#fo##~#fo#| !A ~#fo##~#fo!W͗`i!A ~#fo~#fo#|? !A ~#fo~#fo!W͗!8 u!A s#r!| !8 ̓AA!8 u!A s#r!|ʃ ̓A> ” >ʯ >@  > >¬ >@ k !A n}0 !p@ ^#Vr+s6 i !A w#w̓A!A ͯ !p@ ^#Vr+s6 !A ^#Vr+s i !p@ ^#Vr+s6.!p@ ^#Vr+s6.!p@ ^#Vr+s̓Asi !p@ ^#Vr+s6!r@ !p@ s#r`i!p@  !p@ ^#Vr+s̓Asi !8 u!p@ ^#Vr+s6 !p@ ^#Vr+s6 !8 u!A s#r!| !8 u!p@ ^#Vr+s6 !p@ ^#Vr+s6 G !8 ̓AA!p@ ^#Vr+sn!p@ ^#Vr+sn!p@ ^#Vr+s6 !p@ ^#Vr+s6!p@ ^#Vr+s6 !p@ ^#Vr+s6!r@ !p@ s#r!p@ ^#Vr+sn!A s#rz ̓A| !p@ ^#Vr+sn!p@ ^#Vr+sn!p@ ^#Vr+sn&s!p@ ^#Vr+sb !r@ !p@ s#r`i!p@ ? `i!i`i͑`i!A93 Usage: A>pw2ws inputfile.typ outputfile.typ This program translates Perfect Writer text for WordStar. This allows use of the Word Plus HYPHEN program. It sets the high bit on the last let- ter of every word. It changes single OD/OA combinations to 20 8D 0A. Use the normal WordStar format commands with Perfect Writer. PW format com- mands are made into WS comment lines. If you want to eliminate PW format commands, use PF with the file output option. Use that file as the input file to this program. ************************************************************************** Tabs are expanded to %s spaces by default. You may change this default value by entering a 'Y' now. Do you want to change the tab expansion value (Y/N)? Enter '0' for no translation of TAB character. Enter a single digit number (1 - 9) to translate TAB character that many spaces in WordStar. Use for default (%s characters). No change in tab value.Can't open %s Can't create %s !9DM! 6#6! ~#fo! ^#Vr+sn`is#rzL͐ ͐i!9!9DM!!͚`is#rz!o͗! 6#6͐ ͐͐! s#rz¸!o͗!o͗!9pw2ws.comCan't open B:PW2WS.COMWrite Err New default in effect.!9DM͐`is#r! ^#Vr+s! ^#Vr+sns{G!͐N!9!9DM!! !!9DM͐n}ʙ! ^#Vr+sn&Ͷw!9DM! n&|! n&! n&&!9DM͐!͚͐s#rz!͐##w#w͐6͐~#fo!9DM͐͐s#rz>!͐͐s#r͐##6#6͐6͐~#fo!9DM͐|ŒW8͐+++|£!8͐##^#Vr+s|!!͐͐~#fo/`is#r!|͐##^#Vr+s8͐##͐?+s#r͐͐s#r͐^#Vr+sn&8!9!9DM͐|`! n&͐~͐##~#fo|ƒ!͐^#Vr+s! ns͐##^#Vr+s!!9DM`iw#w! 6#6͐ n! s{ ! n} ! ^#Vr+s! n}-! 6#6! ^#Vr+s! ^#Vr+sn! s)|P͐ ?! nѯg`is#r͐͐?`!9!9DM͐͐>Œ>ʳ>˜>>¤>>°>! n&Ͷ! n&!! n&!! n} ! !! n&!͐##^#Vr+s|q!͐͐~#fo|P!͐##6#6͐͐s#r͐^#Vr+s! ns&!9DM͐ڪ!͐n&|g}o|!͐##~#fo|!͐##~#fo`is#r͐͐͐~#fo͐/!͐+?`is#r͐##~#fo|ʿ!͐͐͐͐##~#fo͐s#r͐~#fo͐s#r!!͐~#fo8 ͐##6#6͐͐s#r!!9!9DM͐!͐͑͐~#fo̓ !Y9DM! ^#Vr+s~#fo! s#r͐! s#r! ^#Vr+sn`is{`in}%! ! s#r! 6#6! s! s! s͐n}-±! ^#Vr+s! 4͐n}0! 4͐n&)}! !! s#r! ^#Vr+sn`is{.)! ! s#r! 4! ^#Vr+sn`is`in&͛}DUUʑXʚOʣCSÓ͐~#fo|ґ! ^#Vr+s6-͐͐~#fos#r! ^#Vr+s! 6 é! 6é! 6! ~#fo! n&! ^#Vr+s~#fo! Xѯgs#rÒ! ^#Vr+s! ^#Vr+s~#fos! ^#Vr+sÒ! n}-! 6#6! ^#Vr+s~#fo! s#r͐n}ʒ͐|ʒ! ^#Vr+s! ^#Vr+sns! ^#Vr+s! ^#Vr+sH͐6! ! s#r! n}! ^#Vr+s!|͐͐! n}!0! !!9~#fo#|!î͐n}D͐͐! ^#Vr+sn&!2!9~#fo#|A!! n}ʐ! ^#Vr+s!|ڐ͐͐! !~!9~#fo#|!Nÿ͐͐`in&!!9~#fo#|¿!͐͐`in&!!9~#fo#|!P!9!9DM! n&|ͯ%! n&|ͩ!9DM! n&|ͯT! n&|ͩ!9DM͐͐ Ҧ͐^#Vr+s͐ړ͐0Û͐7s!&͐ ͐͐ ͉͐X`is͐ ͐͐ )͐X`in&#&!9!9DM`iw#w͐~#fon&)}G͐ ?͐^#Vr+snѯg`is#r͐N!9:nof2n& !o ‰ . &7*P:Rw 7,ҩ> 2h*P/:q2> :h):R==> :qw#w#w:ho&552?7:P)"XV>ڰz> ʰz2:P,"j!"l*T|^*j!^#V*X#^#VVr+s*l5*R"R*j"*lʆ2?Y#"l*T+"T*j! N#Fp+qx0##6>2?V2?   > _  7*P͆ :q2\5> 2?!*P͚7:PO*R7:P)V>z>z2:P,"j!"l*T|*lj5*R*j!ѷʛ2?ʕʕ!e*le*T+"T*R"R*l#"l*j! N#Fp+qxZ##6>2?_2?:no2n&7*T|DM*R*P >< ~# x ><& ~+ x& |}7:P,>N 2?!^#V*R:Tw =h w *Pͭ *R!s#r# !\/:q25!> 2?+ ,Ҿ >2?)~2#"j!!~#fo#^#Vp+q*j~#fo s#r5/* P PW2WS.C */ /* September 4, 1983 */ #include "a:bdscio.h" #define CR 13 #define HCR 141 #define TAB 9 #define LF 10 #define SPACE 32 #define HIGHBIT 128 main(argc, argv) char **argv; { char obuf[BUFSIZ * 8], ibuf[BUFSIZ * 8]; char *bufptr, tempbuf[320]; char tabstr[2]; int a, c; strcpy(tabstr,"3"); bufptr= &tempbuf; if (argc != 3) { printf("\nUsage: A>pw2ws inputfile.typ outputfile.typ \n\n"); puts(" This program translates Perfect Writer text for WordStar. This allows\n"); puts("use of the Word Plus HYPHEN program. It sets the high bit on the last let-\n"); puts("ter of every word. It changes single OD/OA combinations to 20 8D 0A. Use\n"); puts("the normal WordStar format commands with Perfect Writer. PW format com-\n"); puts("mands are made into WS comment lines. If you want to eliminate PW format\n"); puts("commands, use PF with the file output option, rather than sending it to \n"); puts("the printer.\n\n"); puts("**************************************************************************\n\n"); printf("Tabs are expanded to %s spaces by default.\n", tabstr); puts("You may change this default value by entering a 'Y' now. \n"); puts("Do you want to change the tab expansion value (Y/N)? "); if ((toupper(getchar())) == 'Y') { puts("\n\nEnter '0' for no translation of TAB character.\n"); puts("Enter a single digit number (1 - 9) to translate TAB character that many\n"); printf("spaces in WordStar. Use for default (%s characters). ", tabstr); if ((c= getchar()) > 47 && c < 58) { /* check digit range */ poke(0xd0e, c); /* any change in program will affect this addr */ } else { printf("\nNo change in tab value."); exit(); } } else exit(); /* write so many sectors to disk under same file */ writemem(64); } /* argc != 3 */ if (fopen(argv[1],ibuf) == ERROR) { printf("Can't open %s\n", argv[1]); exit(); } if (fcreat(argv[2],obuf) == ERROR) { printf("Can't create %s\n", argv[2]); exit(); } while ((c= getc(ibuf)) != CPMEOF) { ungetc(c,ibuf); while((c= getc(ibuf)) != CR) { switch(c) { case TAB: if (tabstr[0] == '0') { /* tab is tab */ *bufptr++ = TAB; continue; } /* tab translated to spaces */ for (a= 0; a != (atoi(tabstr)); a++) *bufptr++ = ' '; continue; case '@': /* PW format commands are made into WS comments */ *bufptr++ = '.'; *bufptr++ = '.'; *bufptr++ = c; continue; case CPMEOF: *bufptr++ = '\0'; bufptr= &tempbuf; putlin(&bufptr, obuf); goto close; default: *bufptr++ = c; } /* switch */ } /* while not CR */ getc(ibuf); /* Case of CR: assumes OA follows OD */ *bufptr++ = CR; /* so it doesn't look at this char */ *bufptr++ = LF; if ((c= getc(ibuf)) == CR) { getc(ibuf); *bufptr++ = CR; *bufptr++ = LF; } else { ungetc(c, ibuf);  *bufptr--; *bufptr--; *bufptr++ = SPACE; *bufptr++ = HCR; *bufptr++ = LF; } *bufptr++ = '\0'; bufptr= &tempbuf; while ((c= *bufptr++) != '\0') { if (c == SPACE) { *bufptr--; *bufptr--; *bufptr++ += HIGHBIT; bufptr++; } } bufptr= &tempbuf; putlin(&bufptr, obuf); } /* while, != CPMEOF */ close: putc(CPMEOF,obuf); fflush(obuf); fclose(obuf); } /* main */ /* takes a null-terminated line and writes it to output buffer w/o '\0' */ putlin(tempbuf, obuf) char obuf[], tempbuf[]; { int c, d; d= 2; while ((c= tempbuf[d++]) != '\0') { putc(c, obuf); } } writemem(a) int a; { int fd, u; char *buf; if((fd= open("pw2ws.com", 1)) == ERROR) { puts("Can't open B:PW2WS.COM"); exit(); } buf= 0x100; if ((u= write(fd, buf, a)) == ERROR) { puts("Write Err"); exit(); } puts("\nNew default in effect."); exit(); } CR; *bufptr++ = LF; } else { ungetc(c, ibuf); ͫCopyright (C) 1985 Mike Yarus AKaypro II and IVctedP= ER~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxua}.; OJ , ; !U >,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!>u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .(C = ~> x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w# w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8 J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(M|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s x(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!(͍!}$&Ͳa !"&*&!ͯE> *&!ͳ !&͡Z *&!ͳ !&͡!&**!R"!)"Ŕ= **>> RESQ finds and rescues text from RAM <<**͐bŔ' v1.3͐bŔSearch for --> b!C(+7._b!C'!!s!)"A'!}2@'*A' * ͸*@'&}o}oEʣ#!!5zʶ!}2>'!C'*>'&*A'n&!|g}os*A'!"A'*>'&#u!ŔSearching at --> *A' !!@́d b!C( !C' |}2?'*?'&!aEʑ#!}2@'Ŕ< **>> STOP SAVING TEXT BY HITTING ANY KEY <<**͐b*A'!R*?'&"A'ŔFound cue string at --> *A' !!@́d͐bR͐b*A'!Rn&! -}oE"*A'!R"A'"!&RES.Q<b!&b͠}o*A' * ͸}o*A'n&!a}oEʅ#!&[*A'n&bR*A'n&b*A'!"A'!B#!&bà#*A'!6R"A'?!R͐bR͐b*@'&}oE*$ŔString not found between !) !!@́d and * !!@́d in RAM͐bz$ŔC **>> Recovered text put in RES.Q on the logged drive <<**͐band= **>> RESQ finds and rescues text from RAM <<**͐bŔ' v1.3͐bŔS **>> RESQ v1.3 <<** If you've ever lost text due to a WordStar "disk full" glitch, or forgotten to save that text file you just downloaded, or frozen your console while handling an edited text, or given the wrong answer to "Abandon current version?", you can use RESQ. This program: * dynamically finds the limits of computer memory (the TPA) * hunts between those limits for a text phrase you supply * backs up from the phrase until it hits control characters * now goes forward again, showing you the text * simultaneously saves the text in RES.Q on your logged drive * stops and closes the rescued file when you hit any key, or * when it finds the end-of-file character (^Z) RESQ searches its own version of RAM with all eighth bits reset. Thus it finds text made by WordStar as easily as ASCII text. Similarly, it ignores the common WordStar control characters when backing up. The backing feature makes it unecessary for you to remember the phrase (up to 55 characters) which begins your semi-lost file. Just give RESQ a phrase anywhere in the text, and it will usually be able to get back to the head of the text before beginning to save. If not, try another phrase which may come earlier in the file. You might have to edit the beginning and end of the saved text to restore it completely, but then... RESQ works for any program which buffers text above the point where RESQ itself leaves off, at about 28FFh. For example, RESQ finds text left in RAM by WordStar, Mex, and the Turbo Pascal editor equally well. The search is unaffected if you must reset (cold boot) in order to revive your console before using it to find your text. RESQ is also occasionally useful to find program headers, etc. for manipulation by DDT, SID, DSD,...because it tells the user the address (in decimal) where the phrase was found. Some programs which handle text do not put it intact in a buffer, and in these cases, RESQ will sign off, reporting the range of addresses searched unsucessfully. Another occasional cause of wierd results is that some programs (eg, VDO and VDE) buffer their text in an encoded form which differs from the onscreen version. In that case, the best that RESQ can do is find and save the encoded text. Search phrases must be entered exactly as they occur, capitalization matters. On the other hand, a single word is likely to be unique in RAM, and is usually all that is needed to guide the search successfully. Though it uses a different algorithm, RESQ was inspired by Chris and Steve Rudek's MAGE, which is a Public Domain "saver" directed only at the address of the WordStar text buffer. RESQ was written for CP/M 2.2 and uses Z80 operations. Because it searches from its own top to an address which is determined from the structure of your computer's RAM at the moment RESQ is invoked, it will probably work without adjustment on most CP/M systems. This is the feature which distinguishes v1.2 from v1.3. Good luck; but you'll need less luck with RESQ. September, 1985 Mike Yarus 2231 16th Street Boulder, CO 80302 Compuserve 73145,513 r, capitalization matters. On the other hand, a single word is likely to be unique in RAM, and is usually all that is needed to guide the search successfully. Though it uses a different algorithm, RESQ was inspired by Chris and Steve Rudek's MAGE, which is a Public Domain "saver" directed only at the address of the WordStar text buffer. RESQ was written for CP/M 2.2 and uses Z80 operations. Because it searches from its own top to an address which is determined from the structure of your computer's RAM at the moment RESQ is invoked, it will probably work without adjustment on most CP/M systems. This is the feature whi:] ]Ï͒\ͤ\ͩ:2:2*„:=2ʄ:ʄ~ʄ o:2_#Dͮ?>„͹ _\\  ɀ!s S A V E - W S Version 2.0 for Wordstar 2.26 on Osborne 1 (c) 1985 by John M. Steele donated to FOG, its chapters, and members for non-commercial use only *R E L A X and read this. If your text is still in memory, SAVE-WS will recover it for you. *Be sure there is room for your file on the drive you specified (or default). You can load another formatted disk if you are not sure. SAVE-WS resets the drives before proceeding. *SAVE-WS may save past the end of your text. After you see the end of your text, hit ANY key to STOP SAVE-WS. <<<<<< HIT ANY KEY TO BEGIN >>>>>> $Usage: SAVE-WS X:FILENAME.TYP saves abandoned Wordstar 2.26 text in memory to filename. X: is optional drive spec. $.mt 0 SAVE.DOC Version 2.0 (c) 1985 by John M. Steele, DEFOG NOTICE: SAVE.DOC, SAVE-WS.COM, and SAVE-MB.COM have been donated to FOG for non-commercial distribution to its affiliated chapters and members. The author retains all other copyrights. VERSIO 2. NOTES I Versio 1.0 thes program wer name WS-SAVE.CO an MB-SAVE.COM The hav bee rename s tha the wil b adjacen i sorte directory Tw mino problem i Versio 1. have been corrected: *I n fil nam i specified th Versio progra give brie usag description wherea th Versio 1. create fil o (blank).(blank) which could not be accessed. *The Version 2. progra correctl retain th defaul driv whil resettin th disks Versio 1. defaulte t th A driv an woul writ t th B driv onl i th B designation was included in the filespec. Th use patc addresse give belo hav bee revised for the Version 2.0 program. Th April/Ma 198 issu o th Portabl Companio define procedur fo recover o los Wordsta o MBASI file fro memor usin DD an SAV commands Th procedure wor bu ma b difficul t remembe o locat unde th pressur o th dreade BDO ERRO o othe crisis Thes procedure hav bee reduce t program whic ca b kep o you dis an ar eas t use. SAVE-WS.COM ----------- SAVE-WS saves Wordstar text from memory to a specified file. The algorithm for finding the end- of-text is weak and may result in junk appended to the end of the file which you will have to edit out, but this is much easier than re-typing the text. Note that in a long document, any text beyond the starting location of the CCP (at CF00h in the Osborne 1) will be overwritten when CP/M is re- loaded, so some text may be missing at the end of the file. USAGE: 1. The recommended procedure is to place a copy of SAVE-WS on your Wordstar diskette before the need arises. The procedure below assumes that SAVE-WS is on the A: drive and that B: has been logged as the default drive. Other arrangements will work if the drives are correctly specified. 2. Exit to CP/M and type A:SAVE-WS x:filename.ext where the x: is an optional drive specification (A: or B:) and filename.ext is the CP/M filename you would like your text written to. The specified (or default) destination drive must have room for the file. However, SAVE-WS will pause after displaying its sign-on message. At this point, you may load another diskette on the destination drive, SAVE-WS will reset the drives for you. Hit any key to begin the file recovery. 3. File recovery will be stopped by any of four conditions: A. User Input: The text is displayed on the screen as it is written to file. If you see SAVE-WS continue after the end of valid text, hit any key to stop the process and close the file. B. Encounter ^Z: In saving a file, Wordstar fills the sector with ^Z. If you are editting an old file, and have not inserted too much, there may be one or more ^Z at the end of text. This will close the file. C. Long Line: If SAVE-WS encounters more than 128 characters without a line feed, it terminates the write to file. The 128 character limit is arbitrary and may be patched by the user. D. Encounter the CCP: SAVE-WS calculates the beginning of CP/M (specifically the CCP) and stops the write at this address. Any text above this address has been overwritten in re- loading CP/M before SAVE-WS is even called. 4. Reload Wordstar, call up the file in which you stored your text and check it carefully, editting as required. Note t hat in very long files, Wordstar may have written part of the text to a temporary file ( .$$$ extension) and that only part of text was in memory. USER PATCHES The distributed version of SAVE-WS is correct only for Wordstar 2.26. Wordstar 2.26 starts text at memory address 7321h. Other versions of Wordstar start text at different memory locations. SAVE-WS stores the start-of-text address at 01E7h and 01E8h, low byte first. Patch this address for other versions of Wordstar. If you patch the start address above, you may wish to patch the Wordstar version number in the sign-on. It is located in four contiguous bytes startin a 0215h an agai a 0495h Pleas d no patc m copyrigh o distributio notice. The long line limit of 128 characters (80h) is stored at 01E4h. If SAVE-WS encounters this many characters without a line feed, it closes the file. Users working with wide documents may wish to change  thi limit I ma be increase t maximu valu of 255 characters (FFh). SAVE-MB.COM ----------- SAVE-MB saves MBASIC programs from memory to a specified file. Note that in a long program, any lines beyond the starting location of the CCP (at CF00h in the Osborne 1) will be overwritten when CP/M is re-loaded, so some lines may be missing at the end of the file. I am indebted to Jim McHutchion of DEFOG for his note on recovering MBASIC files which identified the locations (0AC8h and 0AC6h) at which MBASIC stores the addresses for the start and end of program memory. This allows SAVE-MB to teminate more cleanly than SAVE-WS. USAGE: 1. The recommended procedure is to place a copy of SAVE-MB on your MBASIC diskette before the need arises. The procedure below assumes that SAVE-MB is on the A: drive and that B: has been logged as the default drive. Other arrangements will work if the drives are correctly specified. 2. Exit to CP/M and type A:SAVE-MB x:filename.BAS where the x: is an optional drive specification (A: or B:) and filename.BAS is the CP/M filename you would like your text written to. The specified (or default) destination drive must have room for the file. However, SAVE-MB will pause after displaying its sign-on message. At this point, you may load another diskette on the destination drive, SAVE-MB will reset the drives for you. Hit any key to begin the file recovery. 3. SAVE-MB will write your program to file and stop reliably at the end of the program provided it ends below the start of the CCP (CF00h in the Osborne 1). If your program is too long, recovery may stop in mid-line and some lines may be lost. 4. Reload MBASIC, call up the file in which you stored your program and check it carefully, editting as required. USER PATCHES: MBASIC 5.21 stores the address of the start of program at 0AC8h; for Version 5.21, the contents are always 61AEh. The address of the end of program is stored at 0AC6h and contents are a function of program length. SAVE-MB references both of these locations as part of the recovery process. The author does not know whether these locations are common to all versions of MBASIC or require patching. References to addresses 0AC7h, 0AC6h, and 0AC8h are made in SAVE-MB at addresses 013Ah, 0142h, and 0148h respectively and may require patching for other versions of MBASIC. Note that all references are in the usual low byte first format. (end of document) below the start of the CCP (CF00h in the Osborne 1). If your program is too long, recovery may stop in mid-line and some lines may be lost. 4. Reload MBASIC, call up the file in which you stored your program and check it carefully, editting as required. USER PATCHES: MBASIC 5.21 stores the address of the start of program at 0AC8h; for Version 5.22 ' WS-DOS.BAS 4 ' by Andrew Fluegelman 6 ' Copyright 1983, The Headlands Press, Inc. 8 ' Modified for CP/M - Dane Sumberg 1/14/84 10 DEFINT A-Z:ON ERROR GOTO 9000 15 A=0:A$="":L$="":P=0 'optimize key variables 20 CRLF$=CHR$(13)+CHR$(10):HBLF$=CHR$(141)+CHR$(10)'hard & soft CR/LF 25 SP$=CHR$(32):TB$=CHR$(9)'space & tab 30 SH$=CHR$(31):PB$=CHR$(20)'soft hyphen & placebo 35 DT=19:DIM D$(19):FOR P=1 TO DT:READ D$(P):NEXT'read dot commands 40 EN=4:DIM EN(4),ENO$(4),ENC$(4),MRK(4)'dim & read enhancement symbols 45 FOR P=1 TO EN:READ EN(P),ENO$(P),ENC$(P):MRK(P)=0:NEXT 100 PRINT CHR$(12) 105 PRINT" ==== CONVERT ==== 110 PRINT 115 PRINT" 1 - DOS to WS 120 PRINT" 2 - WS to DOS 900 PRINT" x - exit 905 PRINT 910 PRINT"Choose:"; 915 INPUT"",Q$:IF Q$="X" OR Q$="x" THEN SYSTEM 920 ON VAL(Q$) GOTO 1000,2000 925 PRINT CHR$(7):GOTO 100 930 ' 1000 PRINT CHR$(12) 1005 PRINT" === DOS-to-WORDSTAR CONVERTER ===" 1010 PRINT 1015 PRINT"This routine will convert a standard DOS file into the form!at 1020 PRINT" required by WordStar for paragraph reforming by converting 1025 PRINT" 'hard' carriage returns (ASCII 13) into 'soft' CRs (ASCII 141). 1030 PRINT"If the file contains blank lines between paragraphs or indented 1035 PRINT" paragraphs, hard returns will be preserved at each paragraph end. 1040 PRINT 1045 GOSUB 8000:IF FL$="" THEN 100 1050 PRINT:PRINT"Conversion in progress..."; 1055 IF EOF(1) THEN 8045 ELSE LINE INPUT #1,L$ 1060 IF EOF(1) THEN PRINT #2,L$+CRLF$;:GOTO 8045 1065 LINE INPUT #1,A$ 1070 IF A$="" THEN 1090 'test for blank line 1075 IF LEFT$(A$,2)=SP$+SP$ THEN 1090 'test for indent 1080 IF LEFT$(A$,1)=TB$ THEN 1090 'also test for tab 1085 PRINT #2,L$+HBLF$;:L$=A$:GOTO 1060 'write line with soft CR 1090 PRINT #2,L$+CRLF$;:L$=A$:PRINT PB$;:GOTO 1060 'write line and hard CR 1095 ' 2000 PRINT CHR$(12) 2005 PRINT" === WORDSTAR-to-DOS CONVERTER ===" 2010 PRINT 2015 PRINT"This routine converts a WordStar 'document' file 2020 PRINT" into standard DOS format. All 'high-bit' characters 2025 PRINT" are converted to their 'low-bit' equivalents. 2030 PRINT"All 'soft' hyphens are stripped, except that any hyphens 2035 PRINT" at the ends of lines are retained. 2040 PRINT 2045 PRINT"You can either strip or retain lines that contain dot commands. 2050 PRINT"As another option, you can either strip all print enhancements 2055 PRINT" or replace certain enhancement codes as follows: 2060 PRINT 2065 PRINT" underline (^S) becomes << ... >> 2070 PRINT" boldface (^B) becomes <<< ... >>> 2075 PRINT" superscript (^T) becomes <^ ... ^> 2080 PRINT" subscript (^V) becomes <_ ... _> 2085 PRINT 2090 PRINT:INPUT"Strip or Retain dot commands (s/r):",Q$ 2095 IF Q$="S" OR Q$="s" THEN STRIPDOT=-1 ELSE STRIPDOT=0 2100 INPUT"Strip or Replace print enhancements (s/r):",Q$ 2105 IF Q$="R" OR Q$="r" THEN ENHANCE=-1 ELSE ENHANCE=0 2110 GOSUB 8000:IF FL$="" THEN 100 2115 PRINT:PRINT"Conversion in progress..."; 2120 L$="" 2125 IF EOF(1) THEN 8045 ELSE A$=INPUT$(1,#1):A=ASC(A$):IF A>30 AND A<128 THEN L$=L$+A$:GOTO 2125 'soft hyphen or normal ASCII, proceed 2130 IF A>127 THEN A=A-128:A$=CHR$(A) 'convert to low-bit character 2135 IF A>31 THEN L$=L$+A$:GOTO 2125 'now if normal ASCII, proceed 2140 IF A=13 THEN GOSUB 2170:A$=INPUT$(1,#1):GOTO 2120'eol, process and remove LF 2145 IF NOT ENHANCE THEN 2125 2150 ' deal with enhancements 2155 FOR P=1 TO EN:IF A<>EN(P) THEN 2165 'find special characters 2160 IF MRK(P) THEN L$=L$+ENC$(P):MRK(P)=0 ELSE L$=L$+ENO$(P):MRK(P)=-1'convert 2165 NEXT:GOTO 2125 2170 ' subroutine to strip soft hyphens and dot commands 2175 P=INSTR(L$,SH$):IF P=0 OR P>=LEN(L$)-1 THEN 2180 ELSE L$=LEFT$(L$,P-1)+RIGHT$(L$,LEN(L$)-P):GOTO 2175 'strip soft hyphens... 2180 IF RIGHT$(L$,1)=SH$ THEN MID$(L$,LEN(L$),1)="-" 'except at eol 2185 ' 2190 IF STRIPDOT AND (LEFT$(L$,1)=".") THEN 2200 'possible dot command 2195 PRINT #2,L$:PRINT PB$;:RETURN 'write line to disk 2200 B$=MID$(L$,2,1):A=ASC(B$):IF A>64 AND A<91 THEN A=A+32:B$=CHR$(A) 2205 C$=MID$(L$,3,1):A=ASC(C$):IF A>64 AND A<91 THEN A=A+32:C$=CHR$(A) 2210 DUMP=0:FOR P=1 TO DT:IF B$+C$=D$(P) THEN DUMP=-1 'search for dot cmds. 2215 NEXT:IF DUMP THEN RETURN ELSE GOTO 2195 'dump line if dot command 2220 ' 8000 ' FILE SPECS 8005 INPUT"File to convert:",FL$:IF FL$="" THEN RETURN 8010 IF LEFT$(FL$,1)="?" THEN GOSUB 8035:GOTO 8005 8015 OPEN "I", 1 , FL$ 8020 INPUT"Convert to file:",FL$:IF FL$="" THEN 8005 8025 IF LEFT$(FL$,1)="?" THEN GOSUB 8035:GOTO 8020 8030 OPEN "O", 2 , FL$:RETURN 8035 IF LEN(FL$)>1 THEN FL$=RIGHT$(FL$,LEN(FL$)-1) ELSE FL$="*.*" 8040 PRINT:FILES FL$:PRINT:RETURN 8045 CLOSE:PRINT CHR$(7):PRINT:PRINT"Done!":GOTO 105 8050 ' 9000 ' Error Trapping 9005 IF ERL=8015 THEN CLOSE:PRINT CHR$(7):PRINT"===Filespec Error1===":RESUME 8005 9010 IF ERL=8030 THEN CLOSE 2:PRINT CHR$(7):PRINT"===Filespec Error2===":RESUME 8020 9015 IF ERL=8040 THEN CLOSE:PRINT CHR$(7):PRINT"===File(s) Not Found===":RESUME 8005 9020 ON ERROR GOTO 0 9025 ' 10000 DATA bp,uj,po,cw,ig,cp,fo,fm,he,hm,lh,mb,mt,pa,op,pn,pc,sr,pl 10005 DATA 19,"<<",">>" 10010 DATA 2,"<<<",">>>" 10015 DATA 22,"<_","_>" 10020 DATA 20,"<^","^>" 10030 END p,215 NEXT:IF DUMP THEN RETURN ELSE GOTO 2195 'dump line if dot command 2220 ' 8000 ' FILE SPECS 8005 INPUT"File to convert:",FL$:IF FL$="" THEN RETURN 8010 IF LEFT$(FL$,1)="?" THEN GOSUB 8035:GOTO 8005 8015 OPEN "I", 1 , FL$ 8020 INPUT"Convert to file:",FL$:IF FL$="" THEN 8005 8025 IF LEFT$(FL$,1)="?" THEN GOSUB 8035:GOTO 8020 8030 OPEN "O", 2 , FL$:RETURN 8035 IF LEN(FL$)>1 THEN FL$=RIGHT$(FL$,LEN(FL$)-1) ELSE FL$="*.*" 8040 PRINT:FILES FL$:PRINT:RETURN 8045 CLOSE:PRINT CHR$(7):PRINT:PRINT"Done!":GOTO 105 8050 ' 9000 ' Error Trapping 9005 IF ERL=8015 THEN CLOSE:PRINT CHR$(7):PRINT"===Filespec Error1===":RESUME 8005 9010 IF ERL=8030 THEN CLOSE 2:PRINT CHR$(7):PRINT"===Filespec Error2===":RESUME 8020 9015 IF ERL=8040 THEN CLOSE:PRINT CHR$(7):PRINT"===File(s) Not Found===":RESUME 8005 9020 ON ERROR GOTO 0 9025 ' 10000 DATA bp,uj,po,cw,ig,cp,fo,fm,he,hm,lh,mb,mt,pa,op," Documentation for SOFTCR.BAS by Dane Sumberg, 1/14/84 SOFTCR.BAS is a modified version of Andrew Fluegelman's handy WS-DOS.BAS. It was published in Vol. 1, No. 1 of "PC WORLD," distributed in late 1983. With the exception of a few minor syntax changes to allow the program to run on an Osborne 1, the program is intact. Changes involve substituting CHR$ (12) for CLS to clear the screen, and "open file" syntax at lines 8015 and 8030. The following is a reprint of the explanation which ran with the program listing: "DOS to WordStar to DOS" If you receive a text file via telecommunications, it will probably come to you in standard DOS format; that is, with each line terminated by a carriage return/line feed sequence. If you try to edit that file using the WordStar word processing program, you'll discover that it's exceedingly difficult to reformat paragraphs after making revisions. The problem arises because WordStar uses an end-of- line convention for its document files that is different from DOS files. Lines in a standard DOS file, such as a file created by the DOS 'COPY CON:' command, terminate with two characters. The first of these characters is commonly called a carriage return. The ASCII value for this character is 13 in decimal (OD in hexadecimal). The second end-of-line character is commonly called a line feed. It has an ASCII value of 10 decimal, which is OA in hexadecimal. If you use the DOS DEBUG.COM utility to examine one of your text files, you'll regularly see the two characters, 'OD OA', which signify the end of each line. WordStar uses a different convention for its text files. Each line terminates with the ASCII characters 141 and 10. (All ASCII codes will subsequently be referred to in decimal notation.) The ASCII 141 represents the same character as the ASCII 13 carriage return, but with a one instead of a zero, as the most significant bit of 8 binary digits that make up the character. MicroPro calls this a high-bit character. The ASCII decimal value of a high-bit character is 128 greater than its low- bit version. When WordStar sees one of these high-bit carriage returns and a line feed (141 10) at the end of a line, it knows that it can reform that line to accommodate revisions or different margins. If WordStar sees a line ending with regular carriage return and line feed (13 10), it treats that line as the end of a paragraph and won't reform past it. That is why WordStar can't reform a text file that is in standard DOS format. You could write a program that merely converts all the regular carriage returns to high-bit carriage returns, but then WordStar would treat the converted file as one big paragraph. Upon invocation of the reform command, the text would collapse into a solid block. What is needed is a program that decides where paragraph endings should be preserved. A more complicated problem arises if you want to use a WordStar-created document as a standard DOS file. WordStar encodes the last character of each word as the high-bit version of that character; for example, a lowercase 'e' (ASCII 101) at the end of a word is encoded as ASCII 229. If you view a WordStar document file with the DOS TYPE command, you'll see strange characters throughout the file. Once again, the solution is not as simple as converting all the high-bit characters to their low-bit equivalents. WordStar document files may contain various print enhancement characters such as Control-S (ASCII 2) for boldface. Some lines may contain "dot" commands used for print formatting. Furthermore, WordStar encodes "soft" hyphens as ASCII 31 characters. These must be stripped if they occur in the middle of a line but should appear as regular hyphens if they reside at the end of a line. The program handles all these problems. It will convert a DOS text file into WordStar text format and convert a WordStar document file into a standard DOS file. I've found it very useful in both receiving and sending text files over the phone lines. Most of the program features are documented in the option prompts. If you enter a question mark in response to a file specification prompt, you'll see the files on the default drive. You can follow the question mark with any of the DOS filespec conventions. (Inputting ? b:*.BAS will list all of the .BAS files on drive B.) If you want to terminate when asked for a file specification, just press ENTER. The performance of the program improves considerably if the two files are on different disk drives. For optimum performance, put both files on an electronic drive. Indidentally, the program compiles very nicely using the '/e' option of the BASIC Compiler. andles all these problems. It will convert a DOS text file into WordStar text format and convert a WordStar document file i#!ls!\s*w#I  *** Job Finished *** $*~#"!56!"=9  Disk Error. $!5i6!I"I*w#"~# xs I MAGE31 COMdeMAGE31 ASMLfghijklmnoPWWS COMpWSPW COMqPWWS DOCrPW2WS COM@stuvwxyzPW2WS C {|}~RESQ13 COMGRESQ13 DOCSAVE-WS2COMSAVE20 DOC=SOFTCR BAS)SOFTCR DOC'STRIP $$$ STRIP.AS͠ I TH SOURC FO FIL T STRI TH COMMENT FRO A ASSEMBL٠ LANGUAG ASCI FILE US I T STRI COMMENTӠ FRO͠ FILŠ THA YO DISTRIBUT T KEE HANKY-PANK DOWN EVE STRI FILEӠ HAV SOL T KEE TH UN-EDUCATE FRO PLAYIN WITȠ IT WIT LITTL WORK THI PROGRA COUL B MODIFIE TϠ ELIMINAT REMARKӠ FRO BASI FILES THI I JUS CHEASE FIL THA DOE 12 BYTE A TIM AN LEAVE TH CR/LF' I AFTE STRIPPIN TH COMMENTS. IF YOU DON'T LIKE IT, CHANGE IT. RKM. PWWS DOCrPW2WS COM@stuvwxyzPW2WS C {|}~RESQ13 COMGRESQ13 DOCSAVE-WS2COMSAVE20 DOC=SOFTCR BAS)SOFTCR DOC'STRIP COMSTRIP $$$; ;***********************************************; ; ; ; STRIP: THIS PROGRAM WILL STRIP THE ; ; COMMENTS FROM AN ASSEMBLY LANGUAGE ; ; SOURCE FILE. COMMENTS ARE: ; ; 1) CR,LF,";" ; ; 2) TAB,";" ; ; ALL TEXT FOLLOWING THE SEMI-COLON ; ; AND UP TO THE NEXT CR/LF WILL BE ; ; ELIMINATED FROM THE DESTINATION FILE. ; ; THE FORM OF THE COMMAND IS: ; ; ; ; STRIP NEWFIL.TYP=ORGFIL.TYP ; ; ; ; I ASSUME YOUR OPERATING SYSTEM WILL ; ; INTERPRET THE "=" AS A COMMAND CHAR ; ; AND STORE NEWFIL IN FCB0 (5CH) AND ; ; ORGFIL IN FCB1 (6CH). WITH A LITTLE ; ; WORK, THIS FILE COULD STRIP REMARKS ; ; FROM BASIC FILES. USE THIS FILE ANY ; ; WAY THAT PLEASES YOU, BUT DON'T SELL ; ; THIS SUCKER. RANDY M., SANTA ANA, CA. ; ; ; ; ; ;***********************************************; ; ORG 100H ; START: LXI H,6CH ;POINT TO 2'ND FCB LXI D,SOURCE ;POINT TO SOURCE FCB AREA LXI B,15 ;XFER SOME CALL LDIR ;DO IT LXI H,5CH ;GET 1'ST FCB LXI D,DEST ;POINT TO DESTINATION FCB LXI B,15 CALL LDIR ;DO IT LXI D,SOURCE ;OPEN SOURCE FILE MVI C,15 CALL 5 INR A ;SEE IF NOT FOUND JNZ LABL1 ;JIF WE FOUND IT LXI D,CANT MVI C,9 CALL 5 JMP 0 ; CANT: DB 13,10,'Can''t open source file.',13,10,'$' ; LABL1: LXI D,DEST ;DELETE THE DESTINATION FILE MVI C,19 CALL 5 LXI D,DEST ;CREATE IT MVI C,22 CALL 5 INR A ;SEE IF OUT OF SPACE JNZ LABL2 ;JIF NO LXI D,SPACE MVI C,9 CALL 5 JMP 0 ; SPACE: DB 13,10,'Out of disk space.',13,10,'$' ; LABL2: CALL GETBYT ;GET A BYTE OF DATA JZ LABL3 ;JIF DONE LABL2A: PUSH PSW ;SAVE THE CHAR CALL PUTBYTE ;SAVE IT POP PSW ;GET THE CHAR BACK CPI 9 ;SEE IF TAB JZ LABL2B ;JIF YES CPI 13 ;SEE IF CARRIAGE RETURN JZ LABL2B CPI 10 ;SEE IF LF JNZ LABL2 ;JIF NO ; ; SEARCH FOR NEXT CR OR LF ; LABL2B: CALL GETBYT ;GET A BYTE JZ LABL3 ;JIF DONE CPI ';' ;SEE IF COMMENT JNZ LABL2A ;JIF NO LABL2C: CALL GETBYT ;SEARCH FOR CR/LF JZ LABL3 ;JIF DONE CPI 13 ;SEE IF CR JZ LABL2A ;JIF YES CPI 10 ;SEE IF LINE FEED JZ LABL2A ;JIF YES JMP LABL2C ; ; LABL3: LDA BYTE2 ;GET BYTE COUNTER MOV B,A ;SAVE IN B MVI A,1AH ;EOF MARKER LHLD POINT2 ;GET POINTER LABL3A: MOV M,A ;SAVE EOF MARKER INX H ;BUMP POINTER DCR B JNZ LABL3A ;JIF NOT DONE LXI D,DBUF ;POINT TO DESTINATION BUFFER MVI C,26 CALL 5 LXI D,DEST ;POINT TO FCB MVI C,21 ;WRITE IT CALL 5 LXI D,DEST ;CLOSE DESTINATION MVI C,16 CALL 5 LXI D,MES1 MVI C,9 CALL 5 JMP 0 ; MES1: DB 13,10,'*** Job Finished ***',13,10,'$' ; GETBYT: LHLD POINT1 MOV A,M ;GET A BYTE INX H ;BUMP POINTER SHLD POINT1 ;SAVE IT LXI H,BYTE1 ;GET BYTE COUNTER DCR M ;BUMP IT RNZ MVI M,81H ;RE-INIT TO 128 BYTES LXI H,SBUF ;POINT TO START OF BUFFER SHLD POINT1 ;SAVE IT LXI D,SBUF ;POINT TO SOURCE BUFFER MVI C,26 ;CHANGE DMA ADDRESS CALL 5 ;* LXI D,SOURCE ;POINT TO SOURCE FCB MVI C,20 ;READ IN A RECORD CALL 5 ORA A ;SEE IF OK JZ GETBYT ;GET A BYTE FROM BUFFER DCR$ A ;SEE IF DONE RZ LXI D,MES2 MVI C,9 CALL 5 XRA A RET ; MES2: DB 13,10,'Disk Error.',13,10,'$' ; ; PUTBYTE: PUSH PSW ;SAVE THE CHAR LXI H,BYTE2 ;POINT TO BYTE COUNTER DCR M JNZ LABL4 ;JIF NOT DONE MVI M,80H ;RESET COUNTER LXI H,DBUF ;RE-INIT POINTER SHLD POINT2 LXI D,DBUF ;POINT TO DESTINATION BUFFER MVI C,26 CALL 5 LXI D,DEST ;POINT TO FCB MVI C,21 ;WRITE IT CALL 5 LABL4: POP PSW ;GET THE CHAR LHLD POINT2 ;GET POINTER MOV M,A ;SAVE IT INX H ;BUMP POINTER SHLD POINT2 ;SAVE IT RET ; LDIR: MOV A,M ;GET A BYTE FROM SOURCE STAX D ;SAVE IT IN DESTINATION INX H ;BUMP POINTERS INX D ;* DCX B ;DEC LOOP COUNT MOV A,B ;TEST IF DONE ORA C JNZ LDIR RET ; COUNT: DB 9 BYTE1: DB 1 ;SECTOR CHAR COUNTER BYTE2: DB 129 POINT1: DW SBUF POINT2: DW DBUF ; SOURCE DB 0,' ',0,0,0,0,0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0,0,0,0 DEST: DB 0,' ',0,0,0,0,0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0,0,0,0 ; SBUF DS 128 DBUF DS 128 ; END START  PUSH PSW ;SAVE THE CHAR LXI H,BYTE2 ;POINT TO BYTE COUNTER DCR M JNZ LABL4 ;JIF NOT DONE MVI M,80H ;RESET COUNTER LXI H,DBUF ;RE-INIT POINTER SHLD POINT2 LXI D,DBUF ;POINT TO DESTINATION BUFFER MVI C,26 CALL 5 LXI D,DEST ;POINT TO FCB MVI C,21 ;WRITE IT CALL 5 LABL4: POP PSW ;GET THE CHAR LHLD POINT2 ;GET POINTER MOV M,A ;SAVE IT INX H ;BUMP POINTER SHLD POINT2 ;SAVE IT RET ; LDIR: MOV A,M ;GET A BYTE FROM SOURCE STAX D ;SAVE IT IN DESTINATION INX H ;BUMP POINTERS INX D ;* DCX B ;DEC LOOP COUNT MOV A,B ;TEST IF DONE ORA C JNZ LDIR RET ; COUNT: DB 9 BYTE1: DB 1 ;SECTOR CHAR COUNTER BYTE2: DB 129 POINT1: DW SBUF POINT2: DW DBUF ; SOURCE DB 0,' ',0,0,0,0,0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0,0,0,0 DEST: DB 0,' ',0,0,0,0,0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0,0,0,0 ; SBUF DS 128 DBUF DS 128 wWordStar NonDoc <--> Doc File Conversion Program Ver. 1.0 (c) 1984 William C. Parke !9"s"u1l!=!\͇>>!l\$!\<>!\ͯ\!\b#!\!^#V"n"p!\b!"*.|o>g"lͣ%*l"l!"u!\͇>!\ʁ!\\ x!\\!\$!b!N>/«~_N̯T̻X!\f!=!f+~/#~N!{: !j{ͣ!r>w4"p*p!\>!v# x:r+ !>:r*l*n}o|g#"n!\!^#Vr+s!w#w#w~w~! ̸ †6 +~# ~+~w#~ ++~ ##~##~ ++~6~!q"6> 2>">!2y>>!!^#Vr+s O*s*u$!O N#F!==!= ~[ R[#=> [> P_#{>.[{> [x~[#{~7#~ +/,[?}o|g*l*n{z ͼɯw#½y~# 2~# y>:#  Destination file exists. Erase it?--> Error detecte Command format: >WSDOCON SOURCE {DESTIN.} {/s} Valid switches: /T :Tabs Preserved and /N :Produce Non-doc File: Format o, Cannot Ope Writin Readin|o>g"lͣ%*l"l!"u!\͇>!\ʁ!\\ x!\\!\$!b!N>/«~_N̯T̻X!\f!=!f+~/#~N!{: !j{ͣ!r>w4"p*p!\>!v# x:r+ !>:r*l*n}o|g#"n!\!^#Vr+s!w#w#w~w~! ̸ †6 +~# ~+~w#~ ++~ ##~##~ ++~6~!q"6> 2>">!2y>>!!^#Vr+s O*s*u$!O N#F!==!= ~[ R[#=> [> P_#{>.[{> [x~[#{~7#~ +/,[?}o|g*l*n{z ͼɯw#½y~# 2~# y>:#  Destination file e WordStar Non-Document to Document Conversion Program DrWilliam C. Parke Micropro' WordSta wor processo create an handle tw kind o files "document fil use high-bi flag t signa wor boundaries "soft space an "soft carriag returns Thes flag le WordSta properl justif an forma th file "non- document fil use n formattin o justificatio flags Thi typ o fil i create t edi dat o progra sourc code fo whic tex formattin i no required. "document fil ca easil b converte t "non-document fil b simpl usin th CP/ utilit PI t cop th fil wit the "Z" switch set. For example, >PIP DESTIN.DOC=SOURCE.DOC [Z] wil creat fil DESTIN.DOC fro th fil SOURCE.DO whic ha al high-bit o eac characte (als calle th parit bit se t zero Thi conversio ma b necessar i yo inten t edi the file with another word processor besides Word%Star. Ther ar occasion whe yo ma wis t conver "non-document fil t "document file Fo example th "non-doc fil ma hav bee create o som othe wor processor o i ma hav bee WordSta "doc fil transferre vi mode wit th parit bi maske off Thi typ o conversio i les trivia task Micropr suggest tha yo ente th fil a WordSta "document file delet al unwante space an carriag return an reforma eac paragraph Thi i laboriou procedure. Th progra WSDOCO wa writte t reliev thi labor I wil do the following: 1) Establish word boundary flags. 2) Make all extra spaces between words "soft" spaces. 3 Se al carriag return withi paragrap t "soft carriag returns Paragrap boundarie ar recognize b th existenc o blan line (mor tha on carriag return-lin feed) Thes boundaries are not made "soft". 4 Conver ta character he 0 int spaces a th optio of the user. The command format is: >WSDOCON SOURCE.DOC DESTIN.DOC or >WSDOCON SOURCE.DOC Th secon for wil writ th converte fil bac t th original file. WordSta doe no us ta character (CTL-I's i it files Instead th ta ke i converte t th (use settable numbe o spaces However othe wor processors suc a PIŠ fro Software Toolworks, use tabs in the file to preserve space. WSDOCO wil conver eac ta encountere int singl space i anticipatio o reformatin withi WordStar I ther ar tab i th you fil whic establis fixe columns yo ma wis t preserv thes tab i th conversion Thi ca b don usin the "/T" switch in the form: >WSDOCON SOURCE.DOC DESTIN.DOC /T secon switc ("/N" i availabl fo th conversio o "document fil t "non-document file Yo ma fin thi typ o conversio mor convenien usin WSDOCO tha usin PIP sinc yo nee no creat ne fil i th process: >WSDOCON SOURCE.DOC /N Afte usin WSDOCO t creat "document file yo ca us WordSta t reforma paragraph t yo liking.  (CTL-I's i it files Instead th ta ke i converte t th (use settable numbe o spaces However othe wor processors suc a PIŠ fro Software Toolworks, use tabs in the file to preserve space. WSDOCO wil conver eac ta encountere int singl space i anticipatio o reformatin withi WordStar I ther ar tab i th you fil whic establis fixe columns yo ma wis t preserv thes tab i th conversion Thi ca b don usin the "/T" switch in the form: >WSDOCON SOURCE.DOC DESTIN.DOC /T secon switc ("/N" i availabl fo th conversio o "document fil t "non-document file Yo ma fin thi typ o conversio mor convenien usin WSDOCO tha us This is the release date of the disk. MAGE31 COM dMAGE31 ASM f&PWWS COM pWSPW COM qPWWS DOC rPW2WS COM s PW2WS C {RESQ13 COM #RESQ13 DOC SAVE-WS2COM SAVE20 DOC SOFTCR BAS SOFTCR DOC STRIP COM FILTER61.COM 20 C9 5376 42 FORM3 .COM 61 27 3584 28 FORM3 .DOC E0 12 7296 57 FORM3 .INF F7 1E 2432 19 MAGE31 .COM 13 47 1792 14 MAGE31 .ASM 1B 3A 9728 76 PWWS .COM 78 AF 384 3 WSPW .COM 0E 0C 384 3 PWWS .DOC 63 E0 1024 8 PW2WS .COM 97 22 8192 64 PW2WS .C EA 3A 4096 32 RESQ13 .COM 0C 98 9088 71 RESQ13  Fog Library Disk FOG-CPM.087 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Word processing converts, filters, and other utilities. Filename Description -07-00 .86 This is the releas&e date of the disk. -CPM087 .DOC This is the description of the disk contents. ENSOFT3 .COM AE01 10K ver. 3.0 [Ensoft 1 of 3] Converts "hard" ASCII files to WordStar "soft" format. This version was written in Turbo Pascal and source is included. ENSOFT3 .DOC 7023 5K ver. 3.0 [Ensoft 2 of 3] ENSOFT3 .PAS B0C2 3K ver. 3.0 [Ensoft 3 of 3] FILTER .COM B1BB 5K ver. 6.1 [Filter Programs 1 of 7] Three versions (1.1, 3.4, and 6.1) of a program to strip high bit and control characters from WordStar files (creates standard ASCII). ASseMbler source (for versions 1.1 and 3.4) is included. FILTER .DOC AB34 11K ver. 6.1 [Filter Programs 2 of 7] FILTER .ASM CCE6 35K ver. 6.1 [Filter Programs 3 of 7] FILTER11.COM FF3E 1K ver. 6.1 [Filter Programs 4 of 7] FILTER11.DOC CE3C 1K ver. 6.1 [Filter Programs 5 of 7] FILTER11.ASM E672 5K ver. 6.1 [Filter Programs 6 of 7] FILTER61.COM 20C9 6K ver. 6.1 [Filter Programs 7 of 7] FORM3 .COM 6127 4K ver. 3.0 [FORM 1 of 3] Irv Hoff's program to help ASM programmers. Places colons after labels, changes upper to lower case, removes tabs, formats comments, etc. See also FOG-CPM.010 FORM3 .DOC E012 8K ver. 3.0 [FORM 2 of 3] FORM3 .INF F71E 3K ver. 3.0 [FORM 3 of 3] MAGE31 .COM 1347 2K ver. 3.1 [Mage 1 of 2] Public domain version of this program which recovers a WordStar file from memory after a "disk full" error or system crash. MAGE31 .ASM 1B3A 10K ver. 3.1 [Mage 2 of 2] PWWS .COM 78AF 1K [PerfectWriter Conv 1 of 5] Translates Perfect Writer files to WordStar and vice versa. One module converts PW format commands to WS comment lines. WSPW .COM 0E0C 1K [PerfectWriter Conv 2 of 5] PWWS .DOC 63E0 1K [PerfectWriter Conv 3 of 5] PW2WS .COM 9722 8K [PerfectWriter Conv 4 of 5] PW2WS .C EA3A 4K [PerfectWriter Conv 5 of 5] RESQ13 .COM 0C98 9K ver. 1.3 [RESQ 1 of 2] Searches computer memory for text and allows you to save it to a file. Most common use is text recovery after a crash. RESQ13 .DOC DCC9 4K ver. 1.3 [RESQ 2 of 2] SAVE-WS2.COM 463C 1K ver. 2.0 [Save WordStar 2.26 1 of 2] Recovers WordStar (version 2.26) text from memory to a file after a system crash. SAVE20 .DOC B803 8K ver. 2.0 [Save WordStar 2.26 2 of 2] SOFTCR .BAS 36BE 6K [SOFTCR 1 of 2] An MBasic program to "harden" or "soften" a text file. SOFTCR .DOC 41B6 5K [SOFTCR 2 of 2] STRIP .COM 59BF 1K [STRIP 1 of 3] Strips comments from assembly language source files. Includes ASseMbler source. STRIP .DOC 5A4E 1K [STRIP 2 of 3] STRIP .ASM 2F6C 5K  [STRIP 3 of 3] WSDOCON .COM 276D 2K [WS Doc Conversion 1 of 2] "Softens" standard ASCII files to WordStar format. WSDOCON .DOC 2C38 4K [WS Doc Conversion 2 of 2] f 5] Translates Perfect Writer files to WordStar and vice versa. One module converts PW format commands to WS comment lines. WSPW .COM 0E0C 1K [PerfectWriter Conv 2 of 5] PWWS .DOC 63E0 1K [PerfectWriter Conv 3 of 5] PW2WS .COM '