Second BONUS release for tonight: TEXT2COM - make .com out of .txt
Eric Auer <[email protected]> Fri, 8 Nov 2002 03:49:55 +0100 (MET)
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am proud to announce yet another polished-up item from my "things I wrote in the mid-90s" collection: TEXT2COM. It is not so much polished-up than more a more or less complete rewrite. Nice little proggie :-). TEXT2COM itself is not a program but only a chunk of data that makes up the beginning of a .com program. You must use copy /b text2com.bin + yourtextfile + EOF > program.com yourself (EOF only needed if yourtextfile has no trailing EOF or zero char- acters embedded anyway - if you fail to provide an EOF marker, you will be able to read some rubbish from your RAM contents when you scroll down too far). Program.com will then display the contents of yourtextfile and allow you to scroll (vertically only) around it it. The nice thing is that you can use for example UPX to compress program.com: You will save disk space and still be able to read the file. And running "program" is even easier than running "more yourtextfile" anyway :-). To get back yourtextfile, you do all steps in reverse order (UPX -d to undo UPX, and then TAIL to undo COPY), because the output of Program.com cannot be redirected. It can be "speeded up", though, by using TURBO3 which I also have released tonight. You can get TEXT2COM.BIN, its sources and definitely more useful documentation on it at: http://www.coli.uni-sb.de/~eric/stuff/soft/specials/ ... the license is neither GNU GPL nor Public Domain this time, read the docs for details. Do not worry, it is at least Open Source Freeware. Have fun! Cheers, Eric. PS: I am not planning to add lots of fancy features to this. Use the 1985 freeware LIST.com 6.0 by Vernon D. Buerg or something similar when you need a fancy "lister" with searching, printing and all this (Hint: LESS has been ported to DOS as part of the GNUish tools)... I am especially not planning to add a "jump to line X at startup" command line option, nor a nifty "export text" function. If it turns out to be really useful, I could add a /d option which would just print the whole data using for example int 21h function 2 (stdout writing) and would allow you to extract the .txt content of a .com text by doing text.com /d > text.txt ... Just in case that you do not like using TAIL.