perm filename TEST.SAI[AID,HE] blob sn#378669 filedate 1978-09-05 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	BEGIN
C00004 ENDMK
C⊗;
BEGIN
PROCEDURE FC11(REAL F10; REFERENCE INTEGER WORD1, WORD2);
 BEGIN
 COMMENT Convert a pdp-10 floating number (i.e. F10) to a two pdp-11 word (i.e. WORD1,
  WORD2) floating number format to be sent to the 11 ;
 INTEGER SIGNEXP, FRAC1, FRAC2;
 IF MEMORY[LOCATION(F10)]=0 THEN BEGIN WORD1←WORD2←0; RETURN END;
 SIGNEXP← MEMORY[LOCATION(F10)] LSH -27;
 FRAC1← (MEMORY[LOCATION(F10)] LSH 10) LSH -29;
 FRAC2← (MEMORY[LOCATION(F10)] LSH 17) LSH -20;
PRINT("SIGNEXP=",CVOS(SIGNEXP),"  FRAC1=",CVOS(FRAC1),"  FRAC2=",CVOS(FRAC2));
 WORD1← SIGNEXP LSH 7  LOR  FRAC1;
 WORD2← FRAC2;
 END;
INTEGER A,B;
REAL R;
R←-3.0;
PRINT(CVOS(R));
END