aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/iism70/iisofm.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/images/tv/iis/iism70/iisofm.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/images/tv/iis/iism70/iisofm.x')
-rw-r--r--pkg/images/tv/iis/iism70/iisofm.x53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/iism70/iisofm.x b/pkg/images/tv/iis/iism70/iisofm.x
new file mode 100644
index 00000000..0c19c117
--- /dev/null
+++ b/pkg/images/tv/iis/iism70/iisofm.x
@@ -0,0 +1,53 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include "iis.h"
+include "../lib/ids.h"
+
+define LUT_OMAX 1023
+
+# IISOFM -- Read and Write OUTPUT look up table.
+# Written data is from end points, read data is full
+# array.
+
+procedure iisofm (rw, color, offset, n, data)
+
+short rw # read or write
+short color[ARB] # color(s) to write
+short offset # offset into lut
+short n # number of data values
+short data[ARB] # the data
+
+int command,len,x,y,z
+int mapcolor()
+pointer sp, odata
+
+include "iis.com"
+
+begin
+ z = mapcolor (color)
+ if ( rw == IDS_WRITE) {
+ if (n < 4)
+ return
+
+ call smark (sp)
+ call salloc (odata, LEN_OFM, TY_SHORT)
+ call aclrs (Mems[odata], LEN_OFM)
+
+ command = IWRITE+VRETRACE
+ call idslfill (data, int(n), Mems[odata], LEN_OFM, 0, LUT_OMAX)
+ len = LEN_OFM
+ }
+ else {
+ len = n
+ command = IREAD+VRETRACE
+ }
+ y = ADVYONXOV
+ x = ADVXONTC
+ call iishdr (command, len, OFM, x, y, z, 0)
+ if (rw == IDS_WRITE) {
+ call iisio (Mems[odata], len * SZB_CHAR)
+ call sfree (sp)
+ } else
+ call iisio (data, len * SZB_CHAR)
+end