Dec 312017
 
UUENCODE/UUDECODE (Uuencode binary files to ASCII text files and vise-versa) with full ASM code.
File TOADUU19.ZIP from The Programmer’s Corner in
Category UNIX Files
UUENCODE/UUDECODE (Uuencode binary files to ASCII text files and vise-versa) with full ASM code.
File Name File Size Zip Size Zip Type
TOADUU.DOC 7422 3361 deflated
UUD19.ASM 18072 6632 deflated
UUD19.COM 744 642 deflated
UUE19.ASM 19062 7416 deflated
UUE19.COM 748 674 deflated

Download File TOADUU19.ZIP Here

Contents of the TOADUU.DOC file


TOADUU.DOC

Author:David Kirschbaum, Toad Hall
[email protected]
(See Credits below)

Function:UUE.COM: Uuencode binary files to ASCII text files.
UUD.COM: Uudecode uuencoded files to original binary form.
Both are compatible with the Unix (and other) uuencode/
uudecode utilities.

Usage:UUE.COM:
UUE
Displays usage message, prompts for input file name.
UUE [d:][\path\]filename.bin
Produces filename.uue in current directory.

If you recompile, enabling the STDOUT switch,
redirection is enabled, requiring the following:
UUE [d:][\path\]filename.bin [>filename.uue]
Uuencodes filename.bin, sends uuencoded product to
standard output (console) or wherever redirected.

UUD.COM:
UUD
Displays usage message, prompts for input file name.
UUD [d:][\path\]filename.uue
Produces a uudecoded file, with the filename taken from
| within the uuencoded file (which might include a path).


Notes:WARNING: UUD and UUE do NOT check for existing files,
and will gleefully write over them! Check first!

|Both programs accept an input path\filename up to 80 chars
long, and will prompt if none is specified.

A uuencoded filename is created by stripping the ".typ" (if
present) from the original filename and appending ".uue"
as the file type.
A uudecoded filename is taken from the uuencoded source file
|and is written to the current directory (or to the path
|included in the file header).

You can recompile UUE.ASM to send output to the DOS standard
output ('>wherever') if you desire. (It's currently compiled
as UUE.COM to produce "filename.uue".)

Input files may be any length.

When using UUD to decode uuencoded files:
Uuencoded file headers (mailing headers, etc.) need not
be removed. However, any spurious lines between the
"begin" and "end" lines MUST be removed.
Anything beyond the "end" line is ignored.
If no "end" is found, the output file is saved,
but an error message is displayed.
| Certain uuencoders append a "checksum" character to the
| end of each uuencoded line. UUD ignores these.
| Uuencoded files generated or moved through a Unix system
| may have LF (ASCII 10) line endings instead of the DOS-
| convention CR/LF (ASCII 13/10) endings. UD will handle
| those LF ends of line as well. You MAY get a "end not
| found" message, but the uudecoded file will be intact.
| Certain systems and mailers will strip off trailing
| spaces on lines. UUD now attempts to replace them.

Credits:Credit to Theodore A. Kaldis ([email protected]),
the original author of UU.ASM (the source and inspiration
of this code.
UUD is basically his UU, SEVERELY tweaked! However, since
it significantly resembles UU, Theodore's copyright
constraints apply.
UUE is my own, so I freely release it to the public domain.


UUE

v1.9, 29 Jul 89
- Received a bug report about UUD (or maybe UUE) improperly adding
an extra byte to files whose sizes are not an even divisor of 3.
Donno exactly how I fixed it (since there were other tweaks at
the same time), but it's fixed now! (I think.)
- Reference tweaks slightly sped things up.

Toad Hall

v1.8, 5 Jul 89
- Version number bumped to v1.8 (skipping v1.4 thru v1.7)
just to get in synch with the companion uudecode program.

- Thanks to Karl-L. Noell
for two bug reports:
1 - Target filename prompt bug:

| When I call up UUE12 or UUD17 without filename, a prompt appears:
| Input path/file:
| but answering to that prompt always yields the message
| "Input file error."

Dumb error, fixed.

2 - Excessive uuencoded line length at the 45000-byte input point:

| There is one effect, but it doesn't cause any harm:
| when I uuencode large binary files, the resulting *.UUE always has
| line 1001 3 bytes longer as you'll see from the following cut:

| Line

| 1000: M!)(0A")3S,| 1001: P1SJAV\VFJ+/YP6:,0$$!-Q]T0J?D3%2F&.=RN#%OYP!:<(H8\P$9*F"E#
| 1002: M%UA5L3N,TR%C\*86_8E$%!#4(E(JYY.BA$XSJ-.2`72G;[email protected]"=S

| Obviously it has to do with your "READSIZE 45000" which is reached in
| that line (1000 lines * 45 bytes). Anyway the UUDECODE works fine, I've
| tried it with your UUD12 and with UUDECODE 2.14 . The byte count 'P'
| (instead of 'M') tells us, that there are 3 bytes more in this line.

Karl-L was right .. I should've checked to see if we had a full line
(60 chars) of uuencoded bytes BEFORE we check if our binary buffer's
been used up. That'll insure the full line gets written out as soon
as it becomes full.

The fix seems to be working fine, testing with various odd sized files
(to include monster ones that insure that 45000-byte refill).

Added a little logo at the end (overrun by buffers) just to identify
the program.

v1.3
- Wasn't handling non-MOD 3 sized source files (e.g., wrong binary count
character in the uuencoded file for the last line). Fixed.
- Tweaked more for speed.

v1.1
- Original release.

UUD

v1.8, 5 Jul 89
Thanks to Karl-L. Noell
for a bug report:

| When I call up UUE12 or UUD17 without filename, a prompt appears:
| Input path/file:
| but answering to that prompt always yields the message
| "Input file error."

Karl-L's right .. stupid .. donno how I missed it. Fixed.

Added a little logo at the end (overrun by buffers) just to identify
the program.

v1.7
- Bugs weren't fixed, plus found new ones. Turns out nothing's been
working right since about v1.3 (and that wasn't right either!).
- Now correctly creates an output file the same size as the original
file before uuencoding.
- Still handles 'truncated' lines, strips headers and trailers,
handles End-of-line types CR/LF, CR, LF.
- Tweaked a little for more speed.
- 'Dynamic' sizing of input buffer (to use most of available 64K
code segment.

v1.6
- Stupid bugs crept in with v1.4's "pad truncated line" function.
Fixed now. More thanks to Brad Keister.

v1.5
- Added ability to process uuencoded files with LF end of lines
(from Unix systems).
- Added ability to accept (and ignore) checksum characters appended
to uuencoded lines. (Had to sacrifice the ability to catch garbaged
uuencoded lines longer than expected.)
- Just noticed paths will work if they're part of the file name in the
uuencoded file's "begin" line.
- Was suggested UUD provide a default ".UUE" file type if none given.
Not gonna do that .. my Unix uudecode doesn't, so why should I?
Thanks to Brad Keister, [email protected], for his bringing up these
problems (mainly with the UU219.ARC package on SIMTEL and his own Unix
host's uuencode).

v1.4
- General tightening
- Added checks for "truncated" uuencode files. Some older uuencodes
(NOT my UUE) use space characters (which can be trimmed off by various
mailers and systems).
If such a truncated uuencoded line is found, it's padded back to its
original length with spaces.
Thanks to Keith Petersen for that suggestion.


 December 31, 2017  Add comments

Leave a Reply