Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/finlst.bli
There are no other files named finlst.bli in the archive.
! File:   FINLST.BLI
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

MODULE FINLST(TIMER=EXTERNAL(SIX12))=
BEGIN
SWITCHES NOLIST;
REQUIRE COMMON.BEG;
REQUIRE JBEG.BEG;
SWITCHES LIST;


! LIST PROCESSING ROUTINES FOR USE BY FINAL AND CODE.


GLOBAL ROUTINE GETCELL(TYPE,SIZE) =
  BEGIN
    REGISTER CELL;
    CELL _ GETSPACE(ST,.SIZE+MINCELLSIZE) + MINCELLSIZE;
    CELL[NEXTF] _ CELL[PREVF] _ CELL[BOTF] _ CELL[TOPF] _ .CELL;
    CELL[CELLSIZEF] _ .SIZE;
    CELL[CELLTYPEF] _ .TYPE;
    RETURN .CELL
  END;

GLOBAL ROUTINE NEWCODECELL =
    GETCELL(CODECELLT,CODECELLSIZE);





GLOBAL ROUTINE NEWLABCELL(LNAME)=
  BEGIN
    REGISTER LAB;
    LAB_GETCELL(LABCELLT,LABCELLSIZE);
    LAB[LABNAMF]_.LNAME;
    .LAB
  END;




GLOBAL ROUTINE PUSHBOT(HD,IND) =
  BEGIN
    REGISTER PREVBOT;
    PREVBOT _ .HD[BOTF];
    TOPELSENEXT(.PREVBOT EQL .HD,.PREVBOT) _ HD[BOTF] _ .IND;
    IND[PREVF] _ .PREVBOT;
    IND[NEXTF] _ .HD;
    RETURN .IND
  END;

GLOBAL ROUTINE PUSHTOP(HD,IND) =
  BEGIN
    REGISTER PREVTOP;
    PREVTOP _ .HD[TOPF];
    BOTELSEPREV(.PREVTOP EQL .HD,.PREVTOP) _ HD[TOPF] _ .IND;
    IND[PREVF] _ .HD;
    IND[NEXTF] _ .PREVTOP;
    RETURN .IND
  END;


END
END
ELUDOM