[net.micro.pc] Spool Source

dad@aluxz.UUCP (DAPKUS) (05/06/85)

\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/


Following is the spool program that I referred to a while
back.  I sent it to Unix* using umodem, then wrote a small
C program to change it to hex.  Take the following sh file
and run it.  You will then end up with a file called 
spool.com which should be sent to the micro.  Not exactly
sure if this program survived, I have a Z-100, therefore it
won't run.

The spool program simply takes the output being sent to the
parallel port and routes it to a disk file.  Good luck!

The documentation is the first thing in the sh file.



				Donald A. Dapkus
				AT&T Bell Laboratories, Allentown, PA
				{ ihnp4, allegra } aluxz!dad



#-----------------------------------------------------------
#	This is a shell archive with automatic makefile.
#	remove everything before this dotted line and
#	execute as "sh filename" in its own directory.
#
#	Creates binary file: spool.com
#
# Wrapped by dad on Sat May  4 23:24:06 EDT 1985
# Contents:  spool.doc spool.hex hexbin.c
 
echo "Working..."
sed 's/^@//' > "spool.doc" <<'@//E*O*F spool.doc//'

			SPOOL COMMAND DOCUMENTATION

The SPOOL command allows you to redirect output which would normally be sent to
a parallel printer and store it in a disk file. This might be useful if you
plan to later send the file over a modem to another computer for printing.
SPOOL is invoked as follows:

	SPOOL <filename>

Where <filename> is the file into which the print data is to be placed.  The
file need not exist, but if it does, it will be deleted and recreated. Once
SPOOL has been invoked for the first time the message:

	SPOOL INSTALLED

will appear and the command portion will exit, leaving behind a permanant
printer interrupt handler built-in to DOS.  Output directed to the printer will
be directed to the file until an error occurs or the disk containing the file
becomes full (in this case an error message will be displayed and the file is
closed).

At any time the user may stop the spooling process and redirect printer output
to the printer by typing:

	SPOOL

with no filename.  SPOOL may be restarted at any time again as described above
(but the permanent part remains resident even when it has been disabled).

SPOOL works with DOS 2.0 (other versions of DOS may work, but they have not
been tested).  It uses about 4K of memory once installed.  Because of a DOS
version dependent patch it is possible to use the PrtSc key with SPOOL but
this is sometimes a risky business!  SPOOL should work with most word
processors just fine, however.

This program is provided as is and no warrantee, expressed or implied, is
made as to its usefulness for any intended purpose or its reliability. The
author and the University of California are not liable for any loss resulting
from the use of this program.

		Don D. Worth
		UCLA/OAC
		1/11/84








@//E*O*F spool.doc//
chmod u=rw,g=r,o= spool.doc
 
sed 's/^@//' > "spool.hex" <<'@//E*O*F spool.hex//'
E9E111FB1E5351525657508CCE8EDE803E190200750C585F5E5A595B1F2E
FF2E58020AE475248CD68936E2108BF48936E0108CCE8ED6BEE4128BE6E8
16008B36E0108BE68B36E2108ED658B4905F5E5A595B1FCF803E19020074
EF50813E5C0200027503E81000588B1E5C0281C360028807FF065C02C333
C03B065C0274F7A35C02061E8CD88EC0A1E2108ED8BE0000BF6004B9800C
FCF3A41F1EB42FCD210653BA6002B41ACD21BA1A02B40FCD21A15E02A33B
02C70628020002BA1A02B422CD210A065602A25602FF065E02BA1A02B410
CD215A1FB41ACD211F07803E5602307519A1E2103D00017710068EC0BF00
00BE6004B9800CFCF3A407C333C0CD10BE3F028A043C24740933DBB40ECD
1046EBF1C606190200EBCA00000000000000000000000000000000000000
0000000000000000000000000000000000000007070753504F4F4C205752
495445204552524F52202D20302400000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000535441434B20202053544143
4B202020535441434B202020535441434B202020535441434B2020205354
41434B202020535441434B202020535441434B202020535441434B202020
535441434B202020535441434B202020535441434B202020535441434B20
2020535441434B202020535441434B202020535441434B20202053544143
4B202020535441434B202020535441434B202020535441434B2020205354
41434B202020535441434B202020535441434B202020535441434B202020
535441434B202020535441434B202020535441434B202020535441434B20
2020535441434B202020535441434B202020535441434B20202053544143
4B202020535441434B202020535441434B202020535441434B2020205354
41434B202020535441434B202020535441434B202020535441434B202020
535441434B202020535441434B202020535441434B202020535441434B20
2020535441434B202020535441434B202020535441434B20202053544143
4B202020535441434B202020535441434B202020535441434B2020205354
41434B202020535441434B202020535441434B202020535441434B202020
535441434B202020535441434B202020535441434B202020535441434B20
2020535441434B202020535441434B202020535441434B20202053544143
4B202020535441434B202020535441434B202020E8A000803E1902007410
B01AA3E210E85EEEE87EEEC60619020026803E5D00207449BE5C00BF1A02
B92300061E071FFCF3A4061E071FBA1A02B413CD21BA1A02B416CD213CFF
750BBAB413B409CD2133C0CD21C6061902FFC7065E020000C7065C020000
B410BA1A02CD21E83500742B1E33C08ED8A15C002EA35802A15E002EA35A
02B80301A35C008CC8A35E001FBAA013B409CD21BAE412CD278CC88ED833
C0CD2133C08ED8A15C003D030174058CC88ED8C3A15E008ED8C300000D0A
53504F4F4C20494E5354414C4C45440D0A240D0A4E4F20524F4F4D20494E
204449524543544F525920464F522053504F4F4C2046494C45070D0A2400
26891E02008CC3268A0E040032EDBF100026C6052047E2F9B000EB035B33
DB5F5E5A5907CB8BFA8EC326A10000268B0E020083F90075183D00007506
C7050000EB1A8EC0890526C70602000000EB0D8EC026890E02008EC126A3
00008EC333DB268A1E040083C310D1EBD1EBD1EBD1EB8CC2B001B4029A00
00462EEBA20BC0750140051F00D1E8D1E8D1E8D1E8508BD0B001B4019A00
00462E3C007403EB5C908EC326C7060000000026C7060200000058D1E0D1
E0D1E0D1E02D100026A2040026C60608000026C60609000026C6060A0000
26C6060B000326C6060C000026C6060D000026C7060500000026C6060700
0026C7060E00000032C0C358B004C3000000000000000000000000000000
@//E*O*F spool.hex//
chmod u=rw,g=r,o= spool.hex
 
sed 's/^@//' > "hexbin.c" <<'@//E*O*F hexbin.c//'
#include "stdio.h"

main()
{
	int c,d;

	for(;;) {
		if((c=getbyte())==256) break;
		if((d=getbyte())==256) break;
		c-=48;
		d-=48;
		if(c>9) c-=7;
		if(d>9) d-=7;
		putchar(c*16+d);
	}
}

getbyte()
{
	int byte;

loop:
	if((byte=getchar())==EOF) return(256);
	if(byte<'0' || byte>'F') goto loop;
	if(byte>'9' && byte<'A') goto loop;
	return(byte);
}
@//E*O*F hexbin.c//
chmod u=rw,g=r,o= hexbin.c
 
cc hexbin.c
a.out <spool.hex >spool.com
rm a.out hexbin.c spool.hex