Skip to content

Instantly share code, notes, and snippets.

@dkelosky
Last active January 21, 2019 16:05
Show Gist options
  • Save dkelosky/ce47f66d2e11e0ebd4ed188f3f704ee1 to your computer and use it in GitHub Desktop.
Save dkelosky/ce47f66d2e11e0ebd4ed188f3f704ee1 to your computer and use it in GitHub Desktop.
#include "ams.h"
void main()
{
char inbuff[80] = {0};
char writeBuf[132] = {0};
IO_CTRL *sysprintIoc = openOutputAssert("SYSPRINT", 132, 132, dcbrecf + dcbrecbr);
IO_CTRL *inIoc = openInputAssert("IN", 80, 80, dcbrecf);
while (0 == readSync(inIoc, inbuff))
{
memset(writeBuf, ' ', 132);
memcpy(writeBuf, inbuff, 80);
writeSync(sysprintIoc, writeBuf);
}
closeAssert(sysprintIoc);
closeAssert(inIoc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment