Google
 

Trailing-Edge - PDP-10 Archives - ksu2_130 - blast.mac
There is 1 other file named blast.mac in the archive. Click here to see a list.
TITLE	BLAST -- BLAST DROM CHIPS

	SEARCH	MONSYM,MACSYM
	.REQUI	SYS:MACREL

	T1=1
	T2=2
	T3=3
	T4=4
	CR=5
	RA=6
	RB=7
	JFN=10
	AP=11
	P=17

START:	RESET
	SETZM	BBFLAG
	MOVE	P,[IOWD 1000,677000]
	TMSG	<
DO YOU WANT BREADBOARD FORMAT? >
	PBIN
	CAIN	T1,"Y"
	SETOM	BBFLAG
	HRROI	T1,[ASCIZ "PRODUCTION FORMAT"]
	SKIPE	BBFLAG
	HRROI	T1,[ASCIZ "!!!!!BREADBOARD FORMAT!!!!!"]
	PSOUT
	TMSG	<
>
	HRROI	T2,[ASCIZ "E113.PTP"]
	CALL	OPEN
	MOVE	CR,[PUSHJ P,E113]
	CALL	DOROM
	CALL	CLOSE
	HRROI	T2,[ASCIZ "E114.PTP"]
	CALL	OPEN
	MOVE	CR,[
		PUSHJ P,[
		LDB T1,[POINT 4,DROM(RA),5]
		LSH T1,4
		LDB RB,[POINT 4,DROM(RA),11]
		IOR RB,T1
		POPJ P,0]]
	CALL	DOROM
	CALL	CLOSE
	HRROI	T2,[ASCIZ "E115.PTP"]
	CALL	OPEN
	MOVE	CR,[LDB RB,[POINT 8,DROM(RA),23]]
	CALL	DOROM
	CALL	CLOSE
	HALTF
OPEN:	MOVX	T1,GJ%FOU!GJ%NEW!GJ%SHT
	GTJFN
	ERMSG	<GTJFN FAILURE FOR A .PTP FILE>
	HRRZM	T1,JFN
	MOVX	T2,44B5!OF%WR
	OPENF
	ERMSG	<CAN NOT OPEN .PTP FILE>
	RET

CLOSE:	MOVE	T1,JFN
	CLOSF
	ERMSG	<CAN NOT CLOSE .PTP FILE>
	RET
DEFINE	REV1(TO,FROM,WIDTH,BIT),<
	TXNE	FROM,1B<^D35-BIT>
	TXO	TO,1B<^D36-WIDTH+BIT>
>

DEFINE	REV(TO,FROM,WIDTH,%A),<
	MOVE	TO,FROM
	SKIPN	BBFLAG
	JRST	%A
	MOVEI	TO,0
	ZZ..==0
	RADIX	10
REPEAT WIDTH,<
	REV1	TO,FROM,WIDTH,\ZZ..
	ZZ..==ZZ..+1
>
%A:
	RADIX	8
>

DOROM:	MOVE	T1,JFN
	MOVEI	T2,377
	BOUT
	ERMSG	<CAN NOT DO INITIAL BOUT>
	MOVSI	AP,-^D512
DOROM1:	REV	RA,AP,^D9
	XCT	CR
	MOVE	T1,JFN
	REV	T2,RB,^D8
	BOUT
	ERMSG	<CAN NOT DO BOUT>
	AOBJN	AP,DOROM1
	RET
DEFINE	MOVBIT(TO,FROM),<
	TXNE	T1,1B<FROM>
	TRO	RB,1B<^D28+TO>
>

E113:	MOVE	T1,DROM(RA)
	MOVEI	RB,0
	MOVBIT	0,^D25
	MOVBIT	1,^D24
	MOVBIT	2,^D9
	MOVBIT	3,^D28
	MOVBIT	4,^D29
	MOVBIT	5,^D26
	MOVBIT	6,^D30
	MOVBIT	7,^D27
	RET
BBFLAG:	0
DROM:	BLOCK	^D512

DEFINE	U(PC,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T),<
>

DEFINE	D(PC,A,B,C),<
	RELOC	DROM+PC
	BYTE	(12)A,B,C
	RELOC
>

DEFINE	END,<
	PURGE	END
	END	<1,,START>
>

IF2,<	XLIST>