aboutsummaryrefslogtreecommitdiff
path: root/unix/gdev/iism70
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 /unix/gdev/iism70
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'unix/gdev/iism70')
-rw-r--r--unix/gdev/iism70/README18
-rw-r--r--unix/gdev/iism70/m70.h27
-rw-r--r--unix/gdev/iism70/mkpkg15
-rw-r--r--unix/gdev/iism70/zclm70.x12
-rw-r--r--unix/gdev/iism70/zopm70.x14
-rw-r--r--unix/gdev/iism70/zrdm70.x14
-rw-r--r--unix/gdev/iism70/zstm70.x28
-rw-r--r--unix/gdev/iism70/zwrm70.x14
-rw-r--r--unix/gdev/iism70/zwtm70.x13
9 files changed, 155 insertions, 0 deletions
diff --git a/unix/gdev/iism70/README b/unix/gdev/iism70/README
new file mode 100644
index 00000000..8023068b
--- /dev/null
+++ b/unix/gdev/iism70/README
@@ -0,0 +1,18 @@
+UNIX IRAF/FIO device driver for the IIS Model 70
+(will probably also work for the model 75). 11/85 dct
+----------------------------------------------------------------------
+
+This directory contains the IRAF/FIO driver subroutines for the IIS Model 70
+image display on UNIX. On a UNIX system the ZIFOBF (binary file) driver is
+used to access the display, hence the subroutines herein merely map the calls
+into the corresponding BF procedures.
+
+
+Driver Procedures:
+
+ zopm70 -- open + allocate
+ zclm70 -- close + deallocate
+ zrdm70 -- asynchronous binary read
+ zwrm70 -- asynchronous binary write
+ zwtm70 -- wait for i/o completion, return status
+ zstm70 -- get device status
diff --git a/unix/gdev/iism70/m70.h b/unix/gdev/iism70/m70.h
new file mode 100644
index 00000000..6a1a7d28
--- /dev/null
+++ b/unix/gdev/iism70/m70.h
@@ -0,0 +1,27 @@
+# Definitions for the VMS/IIS device driver.
+
+define IIS_READ 1 # read function code
+define IIS_WRITE 0 # write function code
+define IIS_INACTIVE -1 # no i/o in progress
+
+define EFN EFN2 # EFN to use for i/o
+define EFN1W 0 # efn #1, wait for completion
+define EFN2 1 # efn #2, no wait for completion
+define EFN3 2 # efn #3, no wait for completion
+
+# Function control block structure for IIS. The first part of the structure
+# is filled in by VMS at open time; all we need to know is the offset of the
+# device name. We use the latter part of the buffer
+
+define LEN_FCB 30
+define FCB_U_NAME (P2S($1)+16+($2)-1)
+define FCB_STATUS Memi[$1+20] # channel status (r, w, err)
+define FCB_NBYTES Memi[$1+21] # nbytes last transfer
+define FCB_EFN Memi[$1+22] # event flag used for transfer
+
+# IIS device status words.
+
+define IIS_FILSIZE (512 * 512 * SZB_CHAR)
+define IIS_BLKSIZE 1024
+define IIS_OPTBUFSIZE (512 * SZB_CHAR)
+define IIS_MAXBUFSIZE 32768
diff --git a/unix/gdev/iism70/mkpkg b/unix/gdev/iism70/mkpkg
new file mode 100644
index 00000000..57b920c5
--- /dev/null
+++ b/unix/gdev/iism70/mkpkg
@@ -0,0 +1,15 @@
+# Make the UNIX version of the IIS driver.
+
+$checkout libsys.a lib$
+$update libsys.a
+$checkin libsys.a lib$
+$exit
+
+libsys.a:
+ zclm70.x
+ zopm70.x
+ zrdm70.x
+ zstm70.x m70.h <fio.h> <mach.h>
+ zwrm70.x
+ zwtm70.x
+ ;
diff --git a/unix/gdev/iism70/zclm70.x b/unix/gdev/iism70/zclm70.x
new file mode 100644
index 00000000..719bc727
--- /dev/null
+++ b/unix/gdev/iism70/zclm70.x
@@ -0,0 +1,12 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ZCLM70 -- Close and deallocate the IIS.
+
+procedure zclm70 (chan, status)
+
+int chan
+int status
+
+begin
+ call zclsbf (chan, status)
+end
diff --git a/unix/gdev/iism70/zopm70.x b/unix/gdev/iism70/zopm70.x
new file mode 100644
index 00000000..5c49d506
--- /dev/null
+++ b/unix/gdev/iism70/zopm70.x
@@ -0,0 +1,14 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ZOPM70 -- Open the IIS for binary file i/o. The device will be automatically
+# allocated if necessary.
+
+procedure zopm70 (device, mode, chan)
+
+char device[ARB] # packed UNIX device name
+int mode # access mode
+int chan # receives device channel
+
+begin
+ call zopnbf (device, mode, chan)
+end
diff --git a/unix/gdev/iism70/zrdm70.x b/unix/gdev/iism70/zrdm70.x
new file mode 100644
index 00000000..f3ef3f2a
--- /dev/null
+++ b/unix/gdev/iism70/zrdm70.x
@@ -0,0 +1,14 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ZRDM70 -- Initiate an asynchronous read from the IIS.
+
+procedure zrdm70 (chan, buf, nbytes, offset)
+
+int chan # FCB pointer for device
+char buf[ARB] # output buffer
+int nbytes # number of bytes to read
+long offset # not used for this device
+
+begin
+ call zardbf (chan, buf, nbytes, offset)
+end
diff --git a/unix/gdev/iism70/zstm70.x b/unix/gdev/iism70/zstm70.x
new file mode 100644
index 00000000..2b790dfa
--- /dev/null
+++ b/unix/gdev/iism70/zstm70.x
@@ -0,0 +1,28 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include <fio.h>
+include "m70.h"
+
+# ZSTM70 -- Return device status for the IIS.
+
+procedure zstm70 (chan, what, lvalue)
+
+int chan # FCB pointer for device
+int what # status parameter
+long lvalue
+
+begin
+ switch (what) {
+ case FSTT_FILSIZE:
+ lvalue = IIS_FILSIZE
+ case FSTT_BLKSIZE:
+ lvalue = IIS_BLKSIZE
+ case FSTT_OPTBUFSIZE:
+ lvalue = IIS_OPTBUFSIZE
+ case FSTT_MAXBUFSIZE:
+ lvalue = IIS_MAXBUFSIZE
+ default:
+ lvalue = ERR
+ }
+end
diff --git a/unix/gdev/iism70/zwrm70.x b/unix/gdev/iism70/zwrm70.x
new file mode 100644
index 00000000..10545f99
--- /dev/null
+++ b/unix/gdev/iism70/zwrm70.x
@@ -0,0 +1,14 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ZWRM70 -- Initiate an asynchronous write to the IIS.
+
+procedure zwrm70 (chan, buf, nbytes, offset)
+
+int chan # FCB pointer for device
+char buf[ARB] # input buffer
+int nbytes # number of bytes to write
+long offset # not used for this device
+
+begin
+ call zawrbf (chan, buf, nbytes, offset)
+end
diff --git a/unix/gdev/iism70/zwtm70.x b/unix/gdev/iism70/zwtm70.x
new file mode 100644
index 00000000..b2523c31
--- /dev/null
+++ b/unix/gdev/iism70/zwtm70.x
@@ -0,0 +1,13 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ZWTM70 -- Wait for i/o completion and return the number of bytes read or
+# written or ERR. Repetitive calls return the same value.
+
+procedure zwtm70 (chan, status)
+
+int chan # FCB pointer for device
+int status # nbytes transferred or ERR
+
+begin
+ call zawtbf (chan, status)
+end