Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/dfkedt.mac
There are no other files named dfkedt.mac in the archive.
;*MAINDEC-10-DFKED

	MCNVER==0
	DECVER==3

	XLIST

DEFINE	NAME (MCNVER,DECVER)<
	LIST

TITLE	DFKED EXTENDED ADDRESSING TEST
>
	LALL
	NAME	\MCNVER,\DECVER

;*COPYRIGHT (C) 1980 1982 1984
;*DIGITAL EQUIPMENT CORP.
;*MARLBORO, MASS. 01752

;*AUTHOR: ROBERT NOBREGA

;*MAINTAINER:	36-BIT DIAGNOSTICS ENGINEERING

	LOC	137
MCNVER,,DECVER
EXCASB==1				;ASSEMBLE FOR EXEC MODE OPERATION
DEBUG==100				;SAVE AN AREA FOR DEBUGGING
ITERAT==1
PGMEND==1				;ASSEMBLE PROGRAM END STATEMENT

SADR1=	BEGIN
SADR2=	BEGIN
SADR3=	BEGIN
SADR4=	SRTDDT
SADR5=	$BEND2
SADR6=	SRTDDT
SADR7=	HALT BEGIN
SADR8=	HALT BEGIN
SADR9=	HALT BEGIN
SADR10=	HALT BEGIN
SADR11=	HALT BEGIN
PAREA1=	0
PAREA2=	17
PAREA3=	SIXBIT /DFKED/
PAREA4=	SIXBIT /PNT/
PAREA5=	0
PAREA6=	0
SUBTTL COMMON CODING FOR ALL KL TESTS

A=1
B=2
C=3					;TEMPORARIES WHICH MUST BE CONSECUTIVE WITH A > 0

ACL=6					;NUMBER OF WORDS IN INSTRUCTION ARGUMENT BLOCK

AC=4					;THIS THROUGH AC5 USED FOR INSTRUCTION ARGUMENTS
AC0=AC					;FOR FLUIDIDITY
AC1=5
AC2=6
AC3=7
AC4=10
AC5=11

;NOTICE THAT I,X,Y OVERLAP T1, T2, T3

I=12					;HOLDS INDIRECT BIT
X=13					;HOLDS INDEX FIELD
Y=14					;HOLDS Y FIELD (RIGHT HALF)

T1=12
T2=13
T3=14
T4=15
T5=16			


;ROUTINE TO TYPE THE CONTENTS OF "MEMORY" IN OCTAL.



DEFINE TYPHAF(MEMORY)<
	GO[	PUT
		MOVE	MEMORY
		PNTHW
		PSP
		GET
		RTN]
>

;ROUTINE TO TYPE "TEXT".

DEFINE TYPE(TEXT)<
	GO[	PUT
		MOVEI	[ASCIZ _TEXT_]
		PNTAL
		GET
		RTN]
	>
DEFINE SETUP<
	MOVEI	.			;GET PC
	MOVEM	TESTPC			;SAVE IT
>
;THE FOLLOWING MACRO ALLOWS ARBITRARY PHYSICAL PAGES TO BE REFERENCED
;BY ARBITRARY VIRTUAL PAGE AND SECTION NUMBER.  FOR EXAMPLE,
;		PAGMAP (P1,21,345)
;CAUSES PAGE P1/1000 TO BE SECTION 21 PAGE 345.
;THIS ROUTINE IS FOR EXEC MAPPING.  USE UPAGMP FOR USER MAPPING.

DEFINE PAGMAP(ADDR,SN,PN)
<	MOVEI	A,ADDR
	MOVEI	B,SN
	MOVEI	C,PN
	MOVSI	T3,0
	PUSHJ	P,PMAPRT
>

;MACRO FOR ASSIGNING USER PAGES.

DEFINE UPAGMP(ADDR,SN,PN)
<	MOVEI	A,ADDR
	MOVEI	B,SN
	MOVEI	C,PN
	MOVSI	T3,1
	PUSHJ	P,PMAPRT
>

;MACRO TO SET PCU AND PCS.  EXAMPLES:
;	PREV (U,21)	;PCU ON, PCS=21
;	PREV (X,0)	;PCU OFF, PCS=0

	DEFINE	PREV(PCU,PCS)
	<	PUSH	P,A
	PUSH	P,B
	SFM	A
IFIDN <PCU> <U>, <	TLO A,(PCUBIT)
>
IFIDN <PCU> <X>, <	TLZ A,(PCUBIT)
>
	XMOVEI	B,.+2
	XJRSTF	A
	MOVEI	A,PCS
	DPB	A,[220500,,UPWD]
	DATAO	PAG,UPWD
	POP	P,B
	POP	P,A>

;MACRO TO ALLOW "XJMP FOO" TO CLEAR PC FLAGS AND JUMP TO ANY ADDRESS.
;FOR INSTANCE "XJMP 123456755" CLEARS THE PC FLAGS AND JUMPS TO SECTION
;123 (IF WE HAVE ONE), PAGE 456, WORD 755.

DEFINE XJMP(ADDR)<
	XJRSTF [EXP 0,ADDR]>


;SPECIAL INSTRUCTION MNEMONICS

OPDEF XMOVEI [SETMI]			;"MOVE EXTENDED ADDRESS"
OPDEF XJRSTF [JRST 5,]			;RESTORE FLAGS AND PROGRAM COUNTER
OPDEF XJEN [JRST 6,]			;RESTORE FLAGS AND PROGRAM COUNTER AND DISMISS
OPDEF XPCW [JRST 7,]			;SAVE THEN RESTORE FLAGS AND PROGRAM-COUNTER
OPDEF SFM [JRST 14,]			;SAVE FLAGS IN MEMORY
OPDEF EXTEND [123B8]			;INVOKES EXTENDED INSTRUCTIONS.
OPDEF MOVSLJ [16B8]			;MOVE STRING LEFT JUSTIFIED INSTRUCTION
OPDEF CVTDBO [10B8]			;CONVERTS DECIMAL DIGITS TO BINARY.
OPDEF XBLT [20B8]			;EXTENDED BLT INSTRUCTION
OPDEF PXCT [XCT]			;PXCT IS XCT WITH NON-0 AC FIELD, USUALLY.
OPDEF GOEXEC [76B8]			;MUUO TO GET FROM USER MODE BACK TO EXEC MODE.
OPDEF EDIT [4B8]			;EDIT STRING OPCODE
N==0
	STOP==0				;EDIT OPERATORS
	SELECT==1			;EDIT A BYTE
	SIGST==2			;START SIGNIFICANCE
	FLDSEP==3			;SEPERATE FIELDS
	EXCHMD==4			;EXCHANGE MARK AND DESTINATION POINTERS
	MESSAG==100+N			;PUT NTH MESSAGE CHARACTER IN
	SKPM==500+N			;SKIP N OPERATORS IF MINUS FLAG IS SET.
	SKPN==600+N			;SKIP IF NON-ZERO FLAG IS SET.
	SKPA==700+N			;SKIP ALWAYS.

;KL PAGING STUFF

PION==200
PIOFF==400
PICLR==10000				;PI SYMBOLS FOR "CONO PI" INSTRUCTION.
TIM==20					;TIMER DEVICE CODE.
MTR==24					;ACCOUNTING METER DEVICE CODE.
OURACS==2				;OUR WORKING AC BLOCK IS NUMBER 2
REVBLK==6				;AC BLOCK NUMBER THAT HOLDS FOLLOWING THINGS:

CSTMSK==0				;0 HOLDS CORE STATUS TABLE MASK WHICH GETS ANDED INTO CST ENTRY
CSTDAT==1				;1 HOLDS CST DATA WHICH GETS ORED INTO CST ENTRY
CBR==2					;2 HOLDS CORE STATUS TABLE BASE REGISTER
SPTBR==3				;3 HOLDS SPECIAL PAGE TABLE BASE REGISTER

TRAP3=EPT+423				;HOLDS TRAP 3 TRAP INSTRUCTION.
ESECT=EPT+540				;ESECT+N/	POINTER TO EXEC SECTION N PAGE TABLE
USRBIT==1B5				;USER MODE BIT
UIOBIT==1B6				;USER IO BIT (REQUIRED TO DO IO INSTRUCTIONS IN USER MODE)
PCUBIT==1B6				;PREVIOUS CONTEXT USER BIT.
USECT=UPT+540				;USECT+N/	POINTER TO USER SECTION N PAGE TABLE
MCODE=UPT+424				;MUUO OPCODE AND FLAGS
MOLDPC=MCODE+1				;PC WHENCE MUUO CAME
MADDR=MCODE+2				;EFFECTIVE ADDRESS OF MUUO
MINFO=UPT+427				;HOLDS PCS AND OTHER STUFF AT TIME OF MUUO
UUONPC=UPT+430				;EIGHT LOCATIONS STARTING HERE HOLD NEW PC'S FOR MUUO
UUOPTR=EPT+420				;HOLDS POINTER TO 4-WORD BLOCK FOR EXEC MODE LUUO'S.
ULPTR=UPT+420				;HOLDS USER LUUO BLOCK POINTER.
TIMBAS=EPT+510				;HOLDS HIGH ORDER TIME BASE VALUE.
PFW=UPT+500				;PAGE FAIL WORD.
PFPC=UPT+501				;THIS AND NEXT WORD HOLD PC OF PAGE FAILURE.
PFHA=UPT+503				;PAGE FAULT HANDLER ADDRESS ADDRESS
ACCESS=(1B2+1B4+1B6)			;ACCESS BITS, PRIVATE, CACHE, WRITE
KLPAGF==1B21				;FLAG FOR TURNING ON KL PAGING
TRAPF==1B22				;FLAG FOR TURNING ON TRAPPING