LAH717H ; IHS/DIR/FJE - HITACHI 717 WITH JT-717 PROTOCOL CONTROLLER 7/20/90 09:10 ;
;;5.2;LA;;NOV 01, 1997
;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
;;
;Call with T set to Instrument data is to/from
RCHK S CTRL=$P(IN,"~",2),IN=$P(IN,"~",1) G:CTRL]"" @CTRL
Q
B ;
D ;
F Q
C ;
W I "CEKN"'[$E(IN,3) S OUT=$C(4),T=T-BASE Q
S FTN=$E(IN,1,2) I FTN'=51,FTN'=55 Q
S C=^LA(T,"C",0)+2 I '$D(^(C-1))#2 S OUT=$C(4),T=T-BASE Q
S ^LA(T,"C",0)=C,OUT=$C(2)_FTN_^LA(T,"C",C-1)_$C(23)
S LRECORD=$C(2)_FTN_^LA(T,"C",C)_$C(3)
L ^LA(T,"O") S (O,^LA(T,"O"))=^LA(T,"O")+2,^("O",O-1)=OUT,^(O)=LRECORD,^(0)=^LA(T,"O",0)+1 L ^LA("Q") S (Q,^LA("Q"))=^LA("Q")+1,^LA("Q",Q)=T,T=T-BASE L
Q
U S Q=^LA(T,"O",0)-1,^LA(T,"O",0)=Q,OUT=^(Q) L ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=T,T=T-BASE L
Q
LAH717H ; IHS/DIR/FJE - HITACHI 717 WITH JT-717 PROTOCOL CONTROLLER 7/20/90 09:10 ;
+1 ;;5.2;LA;;NOV 01, 1997
+2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
+3 ;;
+4 ;Call with T set to Instrument data is to/from
RCHK SET CTRL=$PIECE(IN,"~",2)
SET IN=$PIECE(IN,"~",1)
IF CTRL]""
GOTO @CTRL
+1 QUIT
B ;
D ;
F QUIT
C ;
W IF "CEKN"'[$EXTRACT(IN,3)
SET OUT=$CHAR(4)
SET T=T-BASE
QUIT
+1 SET FTN=$EXTRACT(IN,1,2)
IF FTN'=51
IF FTN'=55
QUIT
+2 SET C=^LA(T,"C",0)+2
IF '$DATA(^(C-1))#2
SET OUT=$CHAR(4)
SET T=T-BASE
QUIT
+3 SET ^LA(T,"C",0)=C
SET OUT=$CHAR(2)_FTN_^LA(T,"C",C-1)_$CHAR(23)
+4 SET LRECORD=$CHAR(2)_FTN_^LA(T,"C",C)_$CHAR(3)
+5 LOCK ^LA(T,"O")
SET (O,^LA(T,"O"))=^LA(T,"O")+2
SET ^("O",O-1)=OUT
SET ^(O)=LRECORD
SET ^(0)=^LA(T,"O",0)+1
LOCK ^LA("Q")
SET (Q,^LA("Q"))=^LA("Q")+1
SET ^LA("Q",Q)=T
SET T=T-BASE
LOCK
+6 QUIT
U SET Q=^LA(T,"O",0)-1
SET ^LA(T,"O",0)=Q
SET OUT=^(Q)
LOCK ^LA("Q")
SET Q=^LA("Q")+1
SET ^("Q")=Q
SET ^("Q",Q)=T
SET T=T-BASE
LOCK
+1 QUIT