From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/stdgraph/stgoutput.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys/gio/stdgraph/stgoutput.x (limited to 'sys/gio/stdgraph/stgoutput.x') diff --git a/sys/gio/stdgraph/stgoutput.x b/sys/gio/stdgraph/stgoutput.x new file mode 100644 index 00000000..098af6e7 --- /dev/null +++ b/sys/gio/stdgraph/stgoutput.x @@ -0,0 +1,28 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "stdgraph.h" + +# STG_OUTPUT2 -- Encode two arguments using the program given and write the +# encoded character string to the output file. + +procedure stg_output2 (fd, program, arg1, arg2) + +int fd # output file +char program[ARB] # encoder program defining encoding +int arg1 # argument to be placed in register 1 +int arg2 # argument to be placed in register 2 + +int stg_encode() +include "stdgraph.com" + +begin + # Set up encoder. + g_reg[1] = arg1 + g_reg[2] = arg2 + g_reg[E_IOP] = 1 + + # Encode the output string and write the encoded string to the output + # file. + if (stg_encode (g_xy, g_mem, g_reg) == OK) + call write (fd, g_mem, g_reg[E_IOP] - 1) +end -- cgit