The zip contains three asm programs that read standard input and write standard output, so that they can be used as "pipes".
stdio.asm
is little more than a stub to illustrate the buffered file i/o and the get/put loop. It just capitalizes every byte in the input. When it's assembled, try e.g.
echo Hello|stdio
and out comes "HELLO", or enter
stdio<sometextfile
and the capitalized file is written to the screen.
The other two
8-7.asm
7-8.asm
are a little fancier. 8-7 slightly compresses any text that contains only lower ascii and no zeros, and 7-8 uncompresses the result. So if you go
type somefile|8-7
or
8-7<somefile
you see gibberish, but if you go
type somefile|8-7|7-8
or
8-7|7-8 <somefile
then out comes "somefile".
[attachment deleted by admin]
Nice work Larry,
Very clear and useful example code covering a topic that seems to come up regularly here.