Trailing-Edge
-
PDP-10 Archives
-
decuslib10-05
-
43,50337/23/upto.mac
There is 1 other file named upto.mac in the archive. Click here to see a list.
COMMENT & SIMULA specification;
OPTIONS(/EXTERN:QUICK,upto);
TEXT PROCEDURE upto(t,i);
TEXT t; INTEGER i;
! IF i>0 THEN
! upto :- IF i>t.Length THEN t ELSE t.Sub(1,i-1);
!&;! MACRO-10 code !;!
TITLE upto
SUBTTL Subtext before Pos=i
SALL
SEARCH SIMMCR,SIMMAC
MACINIT
ENTRY upto
upto: PROC
LF ,ZTVLNG(XTAC) ;! t.Length
SOSG X1,2(XTAC) ;! i-1
SETZB X1,(XTAC) ;! NOTEXT if i<1
IF ;! i>=1
JUMPL X1,FALSE
THEN
CAILE (X1) ;! Min(t.Length,i-1)
LI (X1)
MOVSM 1(XTAC) ;! to upto.Length, upto.Pos := 1
FI
RETURN
EPROC
END;