(FILECREATED "14-May-85 12:19:43" {DSK}<DSK>HTHOMPSON>DSL>MOVEDATA.;1 4498 changes to: (FNS AWIN WIN AFIN FIN) (VARS MOVEDATACOMS \FloatArray) previous date: " 9-May-85 16:53:57" {DSK}<DSK>HTHOMPSON>MOVEDATA.;1) (* Copyright (c) 1985 by Speech Input Project, Univ. of Edinburgh. All rights reserved.) (PRETTYCOMPRINT MOVEDATACOMS) (RPAQQ MOVEDATACOMS ([VARS (\FloatArray (ARRAY 1 'FLOATP] (FNS AFIN AWIN FIN WIN))) (RPAQ \FloatArray (ARRAY 1 'FLOATP)) (DEFINEQ (AFIN [LAMBDA (stream array nFloats firstElt format) (* ht: " 9-May-85 16:53") (let ((base (ARRAYBASE array))) (SELECTQ format [VAX (for i from (if firstElt then (LLSH (DIFFERENCE firstElt (ARRAYORIG array)) 2) else 0) by 4 to (LLSH (PLUS (if firstElt then (DIFFERENCE firstElt (ARRAYORIG array)) else 0) (OR nFloats (ARRAYSIZE array)) -1) 2) do (\PUTBASEBYTE base i+1 (BIN stream)) (\PUTBASEBYTE base i (BIN stream)+-1) (\PUTBASEBYTE base i+3 (BIN stream)) (\PUTBASEBYTE base i+2 (BIN stream] (\BINS stream base (if firstElt then (LLSH (DIFFERENCE firstElt (ARRAYORIG array)) 2) else 0) (LLSH (OR nFloats (ARRAYSIZE array)) 2))) array]) (AWIN [LAMBDA (stream array nWords firstElt format offset) (* ht: "14-May-85 11:49") (let ((base (ARRAYBASE array)) word) [SELECTQ format [VAX (if (NULL offset) then (SETQ offset 0)) (for i from (if firstElt then (DIFFERENCE firstElt (ARRAYORIG array)) else 0) to (PLUS (if firstElt then (DIFFERENCE firstElt (ARRAYORIG array)) else 0) (OR nWords (ARRAYSIZE array)) -1) do (SETQ word (LOGOR (BIN stream) (LLSH (BIN stream) 8))) (\PUTBASE base i (IMAX 0 (DIFFERENCE (if (GREATERP word 32767) then (IDIFFERENCE word 65536) else word) offset] (if (AND offset (NOT (ZEROP offset))) then (* * from non-vax with offset) (for i from (if firstElt then (DIFFERENCE firstElt (ARRAYORIG array)) else 0) to (PLUS (if firstElt then (DIFFERENCE firstElt (ARRAYORIG array)) else 0) (OR nWords (ARRAYSIZE array)) -1) do (\PUTBASE base i (DIFFERENCE (LOGOR (LLSH (BIN stream) 8) (BIN stream)) offset))) else (* * fast case - from non-vax with no offset) (\BINS stream base (if firstElt then (LLSH (DIFFERENCE firstElt (ARRAYORIG array)) 1) else 0) (LLSH (OR nWords (ARRAYSIZE array)) 1] array]) (FIN [LAMBDA (stream format) (* ht: " 9-May-85 16:15") (let ((floatPointer (ARRAYBASE \FloatArray))) [SELECTQ format (VAX (\PUTBASEBYTE floatPointer 1 (BIN stream)) (\PUTBASEBYTE floatPointer 0 (BIN stream)+-1) (\PUTBASEBYTE floatPointer 3 (BIN stream)) (\PUTBASEBYTE floatPointer 2 (BIN stream))) (PROGN (\PUTBASEBYTE floatPointer 0 (BIN stream)) (\PUTBASEBYTE floatPointer 1 (BIN stream)) (\PUTBASEBYTE floatPointer 2 (BIN stream)) (\PUTBASEBYTE floatPointer 3 (BIN stream] (ELT \FloatArray 1]) (WIN [LAMBDA (stream format offset) (* ht: "13-May-85 12:01") (SELECTQ format (VAX (LET [(word (LOGOR (BIN stream) (LLSH (BIN stream) 8] (if word gt 32767 then (IDIFFERENCE word 65536) else word) -(OR offset 0))) ((LOGOR (LLSH (BIN stream) 8) (BIN stream)) -(OR offset 0]) ) (PUTPROPS MOVEDATA COPYRIGHT ("Speech Input Project, Univ. of Edinburgh" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (501 4396 (AFIN 511 . 1490) (AWIN 1492 . 3264) (FIN 3266 . 3942) (WIN 3944 . 4394))))) STOP