Google
 

Trailing-Edge - PDP-10 Archives - BB-H064A-SM - sources/getcno.mac
There are no other files named getcno.mac in the archive.
	TITLE GETCNO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; FORTRAN LIBRARY SUBROUTINE TO RETURN JOB'S CHARGE NUMBER
;
;    COPYRIGHT (C) 1976,1977 BY
;    DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;	CALL GETCNO(LOC)
;	   OR
;	CALL GETACN(LOC)
;	EITHER CALL RETURNS THE JOB'S ACCOUNT # AS AN ASCII STRING
;	IN ARRAY "LOC".    LOC = PDX12
;			   LOC+1=345.6
;			   LOC+2=7 WITH ASCII SPACE FILLERS.
A==2
B==3
P==^O17
ARG==^O16
.GTCNO==^O33
	ENTRY GETCNO
	ENTRY	GETACN
GETACN:

GETCNO:	DMOVEM	A,%S2%	;SAVE 2 WORKING REGISTERS.
	DMOVE	A,[SIXBIT .   BAD #.]
	DMOVEM	A,BACA
	SETZM	BACA+2		;INIT ARG TO "BAD #"
	MOVE	B,[XWD -1,.GTCNO]
	GETTAB	B,
	SKIPA
	MOVEM	B,BACB		;PUT BINARY VALUE IN NEXT CALLS'
	MOVEI	1,BACA		; ARG LIST.
	PUSHJ	P,BACCT	;GET SIXBIT INTERPRETATION.
	JFCL			;IGNORE ERROR RETURN.
	HRRZ	ARG,(ARG)	;BUILD BYTE PTR IN ARG
	TLNE	ARG,^O20	;FIND END OF POSSIBLE INDIRECT STRING.
	JRST	.-2
	AND	ARG,[OCT 37777777]
	SUBI	ARG,1
	ADD	ARG,[POINT 7,0,35]
	HRROI	0,-^D15		;INIT LOOP COUNTER
	HRL	A,BACA		;REG A,B = SIXBIT ANSWER
	HLR	A,BACA+1
	HRL	B,BACA+1
	HLR	B,BACA+2
PLDD.:	SETZ	1,
	LSHC	1,6		;GET NEXT SIXBIT CHARACTER
	ADDI	1,^O40	;CONVERT TO ASCII
	IDPB	1,A