home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
DOSUT-17.ZIP
/
SIZER.DOC
< prev
next >
Wrap
Text File
|
1983-12-15
|
3KB
|
89 lines
This program tests the size of a file and sets an errorlevel
based on it's findings. Currently, it is set up for the file
ERRLOG and expects it to be 115 bytes long. If it does not find
the file or it is not 115 bytes big, an errorlevel 1 is returned
(the file is assumed to be in the current working directory).
Otherwise, errorlevel 0 is returned. This program requires DOS
2.0.
This program is currently set up for the PASCAL compiler. If PAS1
goes OK, the following output is generated:
IBM Personal Computer Pascal Compiler
Version 1.00 (C)Copyright IBM Corp 1981
Pass One No Errors Detected.
which is exactly 115 bytes big when redirected to a disk file.
The output of IBM Basic Compiler is 211 bytes.
The output of MS Pascal Compiler is 98 bytes.
To use this program with the other compilers/assemblers, follow these
steps.
1. Run the compiler/assembler on a known good program and redirect
the output to the disk file ERRLOG.
2. Do a "DIR ERRLOG" and look at the size of the file.
3. Put the file size in the EQUATE section below in SIZELO (SIZEHI
should always be zero unless your compiler generates more than
64k of messages!).
4. If you like, change the FILENAME DB statement near the end of
this program to a filename of your liking.
5. Assemble and link as follows:
MASM SIZER,,;
LINK SIZER; (Ignore "NO STACK" message)
EXE2BIN SIZER.EXE SIZER.COM
6. Have fun!
One note for you PASCAL fans: PAS2 does not like to have his output
redirected -- it hangs the system. I haven't investigated it so I
don't know the reason why. If someone figures out why, please pass
it along.
Usage:
echo off
cls
echo Compiling %1 .....
pas1 %1,,; > errlog
SIZER
if errorlevel 1 goto error
echo PAS1 ok. Starting PAS2....
pas2
goto end
:error
edit %1.pas
:end
echo on
Copyright (C) 1983 Tony Alan Rhea
This program may be copied and distributed for personal use
but not for profit provided this notice is included. Author makes
no warranty, expressed or implied, as to the correct nature and
operation of this software.
You may make and distribute as many copies of this program as you wish
for your PERSONAL use only ( NOT for business purposes, please! ).
Feel free to modify, mutilate, or adulterate this program. If you come
up with an bug or improvement, please let me know by writing me at this
address:
Tony A. Rhea
1030 Ivy Lane
Cary, NC 27511
If you do modify it, please give me credit in the program. This helps
to preserve my ego and increase my fame (but, unfortunately, NOT my
financial status). Also, I would appreciate a copy of the modified
version, preferably on disk (I'll be happy to return your diskette).
If you like this program ( or HATE it ), please let me know. Drop me
a line at the address given above.
This program has been submitted for publication in PC-WORLD magazine.
Revision history:
rev 1.0 11/14/83 { original release }