Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/sixbit.mac
There is 1 other file named sixbit.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,sixbit);
INTEGER PROCEDURE sixbit(t); text t;
COMMENT Convert at most 6 characters from t to sixbit;


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

	TITLE	sixbit
	ENTRY	sixbit
	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 ;!

	t==<result==XWAC1>


sixbit:	PROC
	EXCH	XWAC1,(XTAC)
	EXCH	XWAC2,1(XTAC)
	JUMPE	XWAC1,L9
	LF	,ZTVSP(,XWAC1)
	IF	JUMPE FALSE
	THEN	IDIVI 5
		ADD [POINT 7,2
		   POINT 7,2,6
		   POINT 7,2,13
		   POINT 7,2,20
		   POINT 7,2,27](X1)
		ST X1
	ELSE
		L X1,[POINT 7,2]
	FI
	ADDI X1,(XWAC1)
	SETZ XWAC1,
	L XIAC,[POINT 6,XWAC1]
	LF XWAC2,ZTVLNG(,XWAC1)
	CAILE XWAC2,6
	 LI XWAC2,6
	SETZ	XWAC1,
	LOOP
	  ILDB X1
	  SUBI 40
	  CAIL 100
	   SUBI 40
	  SKIPGE
	   SETZ
	  IDPB XIAC
	AS
	  SOJG XWAC2,TRUE
	SA

L9():!	EXCH XWAC2,1(XTAC)
	EXCH XWAC1,(XTAC)
	RET
	EPROC
	LIT
	END;