Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/idsixb.mac
There is 1 other file named idsixb.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:CODE,idsixbit);
TEXT PROCEDURE idsixbit(id6a,id6b); INTEGER id6a,id6b;
COMMENT Converts the two words id6a,id6b to a 12-character text (ASCII).
The result is Strip of this identifier.
;

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

	TITLE	idsixbit
	ENTRY	idsixbit
	SUBTTL	SIMULA utility, Lars Enderin April 1976

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


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	id6a==4
	id6b==5
	result==2
	bp==XWAC3
	xret==XWAC5
	len==XWAC6

idsixbit:
	PROC
	SKIPN	id6a(XCB)
	BRANCH	CSEP
	LI	XWAC1,^d12
	EXEC	TXBL
	Z
	SETZ	len,
	LI	bp,2(XWAC1)	;! Make byte pointer
	HRLI	bp,(POINT 7,)
	L	X1,id6a(XCB)
	JSP	xret,convert
	L	X1,id6b(XCB)
	JSP	xret,convert
	SF	len,ZTVLNG(,XWAC1)
	STD	XWAC1,result(XCB)
	BRANCH	CSEP
	EPROC

convert:PROC
	JUMPE	X1,(xret)
	LOOP
		SETZ
		LSHC	6
		ADDI	40
		IDPB	bp
		ADDI	len,1
	AS
		JUMPN	X1,TRUE
	SA
	BRANCH	(xret)
	EPROC
	LIT
	END;