home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR8
/
2READ.ZIP
/
READ.TXT
< prev
next >
Wrap
Text File
|
1993-07-27
|
8KB
|
138 lines
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ │
█ ▐▐▐▐▐▐ ▐▐▐ │██
█ ▐▐ ▐▐ ▐▐ │██
█ ▐▐ ▐▐ ▐▐▐▐ ▐▐▐▐ ▐▐ │██
█ ▐▐▐▐▐ ▐▐ ▐▐ ▐▐ ▐▐▐▐▐ │██
█ ▐▐ ▐▐ ▐▐▐▐▐▐ ▐▐▐▐▐ ▐▐ ▐▐ │██
█ ▐▐ ▐▐ ▐▐ ▐▐ ▐▐ ▐▐ ▐▐ │██
█ ▐▐▐ ▐▐ ▐▐▐▐ ▐▐▐ ▐▐ ▐▐▐ ▐▐ │██
█ │██
█ Tue 07-27-1993 13:51:00 │██
█ │██
█ John De Palma on CompuServe 76076,571 │██
▀─────────────────────────────────────────────────────────────────┘██
███████████████████████████████████████████████████████████████████
╒════════════╕
│ READ.COM │
╘════════════╛
What's that you say? Who needs another "text file loader?" Who
needs a small, simple minded executable program that will load an
ASCII file and pop it up on the screen allowing you to scroll up
and down from beginning to end and then exit with a touch of the
{Esc} key? Who needs that in the era of Windows, multitasking,
Pentium chips, and dialog boxes. Well partner, we ALL do!
Many times all you want to do is use a low memory program to look
at a file -OR- display a text file IN YOUR BATCH FILE.
This second reason is my reason. I make batch files for myself and
for the office. Six months later we both wonder what these batch
files were supposed to do. The people at the office don't even
bother to wonder, as the normal help file are usually terse "ECHO"
line statements telling them to do something that they don't
understand.
READ.COM is a 8K QuickBASIC 4.5 program. It is NOT a true *.COM
file but I left that extension as it appears too small in size to
be a QuickBASIC 4.5 executable file. Indeed and in truth if you
complied the code inside the QuickBASIC environment, this little
honey would be 45K in size!
The reduction in compiled size is from compiling with Crescent
Software's PDQ Library and then squeezing that file down with
EXE2COM.EXE (removes header space and changes the name to *.COM;
from PDQ) and then LZEXE.EXE (from Fabrice Bellard, a Freeware
program from France). So, unlike most of my stuff, I did NOT
include the source code as it is PDQ modified QuickBASIC code.
However if any of you junior propeller hat wearers want to see how
this is done, just E-Mail me and I will upload to you the plain
vanilla QuickBASIC 4.5 code.
The source code outline is taken from one of my two favorite BASIC
authors, John Clark Craig's book, "Microsoft Quickbasic
Programmer's Toolbox, ISBN 1-55615-127-6, Microsoft Press, 1988."
The rest of the hard stuff from my other BASIC guru, Ethan Winer of
Crescent Software fame. Me? I just provided the "glue" to the code.
If you ran GO.BAT when you unarchived this file set, you are
reading this INSIDE that batch file. You will know that you are
still inside a batch file as when you press {Esc}, this text file
will unload, the BATCH FILE will beep and LOAD a second text file.
When you read then exit that second batch file, you will note my
"Brag box" pops up to tell you I am the proud papa of this little
simple son of a code.
READ.COM only accepts two parameters on the command line.
READ {FileName.Ext} /n
READ.COM File Name No Brag box switch
╒╤═══════════════════════════════════════════════════════════════╤╕
││ IF YOU READ NOTHING ELSE, READ THE PARAGRAPHS IN THIS BOX ││
│╘═══════════════════════════════════════════════════════════════╛│
│ │
│ If the text file is NOT in the same directory that you execute │
│ READ.COM from, you MUST enter the full path and FileName of the │
│ text file or you will get a beep and as very terse help message │
│ to do just that. │
│ │
│ Entering a LONG file name as: "E:\QB45\TOOLBOX\README.TXT," │
│ the first line display will read "E:\README.TXT" as the code │
│ parses and truncates the full path name so it can be displayed │
│ in fifteen (15) characters on line one. │ │
│ │
│ READ.COM will display in text mode (Screen 0) any true ASCII │
│ file up to two-thousand (2,000) lines! That translates using │
│ five (5) characters as the average word plus space length as │
│ thirty-two thousand (32,000) words. If the file is larger, all │
│ you will see is 2,000 lines. │
│ │
│ If you enter a name of a file that doesn't exist, a zero length │
│ file will be created and you will be staring at an empty file. │
│ │
╘═════════════════════════════════════════════════════════════════╛
Since I know many of you out there are like me and though you make
like your new toy, you eventually try to test it to its limits,
often times breaking it and then throwing it away..
So, go ahead, load an executable (*.COM, *.EXE, *.DLL, etc) file
with this little gem... Surprise surprise, no lock up, no beep, no
nothing... Just the first line or two of that file up to the place
where the program sees an "End Of File" marker. This is a friendly,
simple fella of a program.
I made it to insert Help files into my batch files as it allows
scrolling, is small and fast and in plain ole vanilla QuickBASIC.
Let me know if you feel the same.
┌──────────────────┬──────────────────┬────────────────────┐
├─────────── │ THE AUTHOR │ ────────────┤
└──────────────────┴──────────────────┴────────────────────┘
John De Palma likes computers because he sees them as big toys.
Computers to him are complicated black boxes that have infinite
possibilities for causing to the user --at the same time --
enjoyment and pain. Unlike most computer users he really doesn't
like to use the computer to do anything important (like write a
letter to PC Magazine or to your IRS agent) but to tinker with.
He was one of those kids that took his Dad's watch apart to see how
it worked, but never figured out how to put it back together again
(boy was THAT a lesson in "leaving things alone!"). You can usually
find him on CompuServe --somewhere-- uploading some fairly useless
program that other "kids" like and download.
He would welcome any thoughts, comments, criticisms, spelling
corrections, or QUICK BASIC code that is under-standable by an
ordinary mortal. He looks forward to receiving any kind of
reader's mail. He can be reached by dialing CompuServe's E-Mail
service and leaving a message there.
His CompuServe number is: 76076,571.