Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/24/adjptr.mac
There are 2 other files named adjptr.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,adjptr);
INTEGER PROCEDURE adjptr(bp,incr);
INTEGER  bp, incr;
COMMENT Adjust the byte pointer BP by INCR bytes.
The value of ADJPTR is the adjusted pointer.
;

!*;! MACRO-10 code !*;!

	TITLE	adjptr
	ENTRY	adjptr
	SUBTTL	SIMULA utility, Lars Enderin Jan 1978

;!*** Copyright 1978 by the Swedish Defence Research Institute. ***
;!*** Copying is allowed.					***


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	incr==<bp==<result==0>>+1

adjptr:	PROC
	LD X0,bp(XTAC)
	IF JUMPE X1,FALSE
	THEN
	  IF ;! incr = 1
	    CAIE X1,1
	    GOTO FALSE
	  THEN L X1,bp(XTAC)
	    IBP X1
	  ELSE
	    LOOP
	      IBP
	    AS
	      SOJG  X1,TRUE
	    SA
	    L  X1,
	  FI
	  ST X1,result(XTAC)
	FI
	RET
	EPROC
	LIT
	END;