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/osb/nmipak8.x | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sys/osb/nmipak8.x (limited to 'sys/osb/nmipak8.x') diff --git a/sys/osb/nmipak8.x b/sys/osb/nmipak8.x new file mode 100644 index 00000000..6cf2720d --- /dev/null +++ b/sys/osb/nmipak8.x @@ -0,0 +1,34 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# NMIPAK8 -- Pack an SPP array of the indicated datatype into an 8 bit +# unsigned NMI array. + +procedure nmipak8 (spp, nmi, nelems, spp_datatype) + +int spp[ARB] #I input array of SPP integers +int nmi[ARB] #O output NMI format array +int nelems #I number of integers to be converted +int spp_datatype #I SPP datatype code + +begin + switch (spp_datatype) { + case TY_UBYTE: + call achtbb (spp, nmi, nelems) + case TY_USHORT: + call achtub (spp, nmi, nelems) + case TY_CHAR: + call achtcb (spp, nmi, nelems) + case TY_SHORT: + call achtsb (spp, nmi, nelems) + case TY_INT, TY_POINTER, TY_STRUCT: + call achtib (spp, nmi, nelems) + case TY_LONG: + call achtlb (spp, nmi, nelems) + case TY_REAL: + call achtrb (spp, nmi, nelems) + case TY_DOUBLE: + call achtdb (spp, nmi, nelems) + case TY_COMPLEX: + call achtxb (spp, nmi, nelems) + } +end -- cgit