Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/libsim/loadby.mac
There are 2 other files named loadby.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,loadbyte);
INTEGER PROCEDURE loadbyte(bp,incr); INTEGER bp,incr;
COMMENT Load a byte via the standard byte pointer BP.
If incr = 0, use LDB, if incr = 1, use ILDB. If other values of incr are given,
modify before using  LDB.
;

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

	TITLE	loadbyte
	ENTRY	loadbyte
	SUBTTL	SIMULA utility, Lars Enderin Oct 1977

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


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

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

loadbyte:
	PROC
	LD bp(XTAC)
	IF JUMPN X1,FALSE
	THEN LDB X1,
	ELSE
	  IF CAIE X1,1
	     GOTO FALSE
	  THEN ILDB X1,
	  ELSE ;!Modify (KL-10 only)
	    ADJBP X1,bp(XTAC)
	    LDB X1,X1
	FI FI
	ST X1,result(XTAC)
	RET
	EPROC
	LIT
	END;