Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/param.ksm
There are no other files named param.ksm in the archive.
SUBTTL	CONSOLE DATA SWITCH ASSIGNMENTS, MARCH 1978

DEFINE	S,<;*********************************************************************>

S
;*DATA SWITCHES
;*LEFT HALF SWITCHES ARE PRE-ASSIGNED FOR SUBROUTINE PACKAGE USE
;*AND CONTROL LOOPING, PRINTING (TTY OR OTHER DEVICE) AND MISC. FUNCTIONS
S

ABORT==	400000			;ABORT PROGRAM ON PASS COMPLETION
RSTART==200000			;RESTART TEST, PRINT TOTALS
TOTALS==100000			;PRINT TOTALS, CONTINUE

NOPNT==	040000			;INHIBIT ALL PRINT/TYPE OUT (EXCEPT FORCED)
PNTLPT==020000			;PRINT ALL DATA ON LPT (LOGICAL DEVICE, USER MODE)
DING==	010000			;RING BELL ON ERROR

LOOPER==004000			;ENTER EXERCISE/CHECK LOOP ON ERROR
ERSTOP==002000			;HALT ON TEST ERROR
PALERS==001000			;PRINT ALL ERRORS

RELIAB==000400			;RELIABILITY MODE
TXTINH==000200			;INHIBIT ERROR TEXT
INHPAG==000100			;INHIBIT PAGING

MODDVC==000040			;MODIFY DEVICE CODE
INHCSH==000020			;INHIBIT CACHE
OPRSEL==000010			;OPERATOR SELECTION

CHAIN==	000004			;CHAIN CONTROL SWITCH

				;SWITCH 16 RESERVED

				;SWITCH 17 RESERVED !!!
SUBTTL	PROGRAM/SUBROUTINE PARAMETERS

S
;*SPECIAL SUBPROGRAM LINKAGES
S

FSELNK=	27772	;FILE SELECT LINK
FRDLNK=	27773	;FILE READ LINK
LDLNK=	27774	;LOAD LINKAGE ADDRESS
DDTLNK=	27775	;DDT LINKAGE ADDRESS
MODLNK=	27776	;OPERATIONAL MODE CHECK LINKAGE ADDRESS
SUBLNK=	27777	;SUBROUTINE LINKAGE ADDRESS

S
;*SPECIAL SUBROUTINE FATAL HALTS
;*USED TO REPORT ERRORS THAT CAUSE THE SUBROUTINES TO BE UNUSABLE
S

;ADDRESS   TAG	REASON
;---------------------

; 1010 	NOEXEC	;PROGRAM NOT CODED FOR EXEC MODE OPERATION
; 1011  PLERR	;FATAL PUSH LIST POINTER ERROR
; 1012  PLERR1	;INITIAL PUSH LIST POINTER ERROR
; 1013  MUOERR	;MUUO WITH LUUO HANDLER WIPED OUT
; 1014  SMBER	;KS-10 INTERRUPT WITHOUT DOORBELL
; 1015  SMCER	;KS-10 CLOCK INTERRUPT WITHOUT FLAG SET
; 1016  CPIERR	;CPU INITIALIZATION ERROR
; 1017  EOPERR	;END OF PROGRAM ERROR
; 1020  LUOERR	;INTERRUPT WITH LUUO HANDLER WIPED OUT

S
S
;OPERATOR DEFINITIONS (NON-UUO'S)
S

OPDEF	GO	[PUSHJ	P,]	;SUBROUTINE CALL
OPDEF	RTN	[POPJ	P,]	;SUBROUTINE RETURN 
OPDEF	PUT	[PUSH	P,]	;PUT DATA ON PUSH LIST
OPDEF	GET	[POP	P,]	;GET DATA FROM PUSH LIST 
OPDEF	PJRST	[JRST	]	;JRST TO ROUTINE THAT RTN'S
OPDEF	HALT	[JRST	4,]	;DEFINITION FOR DDT
OPDEF	JRSTF	[JRST	2,]	;DEFINITION FOR DDT
OPDEF	JEN	[JRST	12,]	;DEFINITION FOR DDT

S
;*SUBROUTINE INITIALIZATION CALL
S

OPDEF	PGMINT	[JSP	0,SBINIT]	;SUBROUTINE INITIALIZATION

S
;*HALTING UUO'S (A MORE GRACEFUL HALT THAN SIMPLY USING THE HALT INSTRUCTION).
S

OPDEF	FATAL	[37B8!15B12!4]	;FATAL PROGRAMMING HALT
OPDEF	ERRHLT	[37B8!14B12!4]	;PROGRAM ERROR HALT

S
;*TERMINAL INPUT UUO'S
;*ALWAYS COME FROM THE CONSOLE TERMINAL IN EXEC MODE OR THE
;*CONTROLLING TERMINAL (REAL TERMINAL OR PTY) IN USER MODE.
S

OPDEF	TTICHR 	[37B8!0B12!3]	;TTY, INPUT ANY CHARACTER
OPDEF	TTIYES	[37B8!1B12!3]	;TTY, NORMAL RETURN Y
OPDEF	TTINO	[37B8!2B12!3]	;TTY, NORMAL RETURN N
OPDEF	TTIOCT	[37B8!3B12!3]	;TTY, INPUT OCTAL WORD
OPDEF	TTIDEC	[37B8!4B12!3]	;TTY, INPUT DECIMAL WORD
OPDEF	TTICNV	[37B8!5B12!3]	;TTY, INPUT CONVERTABLE WORD
OPDEF	TTLOOK	[37B8!6B12!3]	;TTY, KEYBOARD CHECK
OPDEF	TTALTM	[37B8!7B12!3]	;TTY, ALT-MODE CHECK
OPDEF	TTSIXB	[37B8!10B12!3]	;TTY, INPUT SIXBIT WORD
OPDEF	TTYINP	[37B8!11B12!3]	;TTY, IMAGE MODE INPUT
OPDEF	TTICLR	[37B8!12B12!3]	;TTY, CLEAR INPUT
;*TERMINAL OUTPUT UUO'S.

OPDEF	PNTA	[37B8!0B12!0]	;PRINT ASCII WORD
OPDEF	PNTAF	[37B8!0B12!1]	;PRINT ASCII WORD FORCED
OPDEF	PNTAL	[37B8!17B12!0]	;PRINT ASCIZ LINE
OPDEF	PNTALF	[37B8!17B12!1]	;PRINT ASCIZ LINE FORCED
OPDEF	PSIXL	[37B8!14B12!3]	;PRINT SIXBIT'Z LINE
OPDEF	PSIXLF	[37B8!15B12!3]	;PRINT SIXBIT'Z LINE FORCED
OPDEF	PNTMSG	[37B8!0B12!0]	;PRINT MESSAGE IMMEDIATE
OPDEF	PNTMSF	[37B8!1B12!0]	;PRINT MESSAGE IMMEDIATE FORCED
OPDEF	PSIXM	[37B8!2B12!0]	;PRINT SIXBIT'Z MSG IMMEDIATE
OPDEF	PSIXMF	[37B8!4B12!0]	;PRINT SIXBIT'Z MSG IMM FORCED
OPDEF	PNTCI	[37B8!0B12!0]	;PRINT CHARACTER IMMEDIATE
OPDEF	PNTCIF	[37B8!1B12!0]	;PRINT CHARACTER IMMEDIATE FORCED
OPDEF	PNTCHR	[37B8!12B12!0]	;PRINT CHARACTER
OPDEF	PNTCHF	[37B8!12B12!1]	;PRINT CHARACTER FORCED
OPDEF	PNT1	[37B8!1B12!0]	;PRINT ONE OCTAL DIGIT
OPDEF	PNT1F	[37B8!1B12!1]	;PRINT 1 OCTAL DIGIT FORCED	
OPDEF	PNT2	[37B8!2B12!0]	;PRINT TWO OCTAL DIGITS
OPDEF	PNT2F	[37B8!2B12!1]	;PRINT 2 OCTAL DIGITS FORCED	
OPDEF	PNT3	[37B8!3B12!0]	;PRINT THREE OCTAL DIGITS
OPDEF	PNT3F	[37B8!3B12!1]	;PRINT THREE OCTAL DIGITS FORCED	
OPDEF	PNT4	[37B8!4B12!0]	;PRINT FOUR OCTAL DIGITS
OPDEF	PNT4F	[37B8!4B12!1]	;PRINT FOUR OCTAL DIGITS FORCED
OPDEF	PNT5	[37B8!5B12!0]	;PRINT FIVE OCTAL DIGITS
OPDEF	PNT5F	[37B8!5B12!1]	;PRINT FIVE OCTAL DIGITS FORCED
OPDEF	PNT6	[37B8!6B12!0]	;PRINT SIX OCTAL DIGITS
OPDEF	PNT6F	[37B8!6B12!1]	;PRINT SIX OCTAL DIGITS FORCED
OPDEF	PNT7	[37B8!7B12!0]	;PRINT 7 OCTAL DIGITS
OPDEF	PNT7F	[37B8!7B12!1]	;PRINT 7 OCTAL DIGITS FORCED
OPDEF	PNT11	[37B8!11B12!0]	;PRINT 11 OCTAL DIGITS
OPDEF	PNT11F	[37B8!11B12!1]	;PRINT 11 OCTAL DIGITS FORCED.
OPDEF	PNTADR	[37B8!10B12!0]	;PRINT PHYSICAL ADDRESS
OPDEF	PNTADF	[37B8!10B12!1]	;PRINT PHYSICAL ADDRESS FORCED
OPDEF	PNTOCT  [37B8!14B12!0]	;PRINT FULL WORD OCTAL
OPDEF	PNTOTF	[37B8!14B12!1]	;PRINT FULL WORD OCTAL FORCED
OPDEF	PNTHW	[37B8!13B12!0]	;PRINT OCTAL HALF WORDS, 6 SP 6
OPDEF	PNTHWF	[37B8!13B12!1]	;PRINT OCTAL HALF WORDS, 6 SP 6 FORCED
OPDEF	PNTOCS	[37B8!16B12!3]	;PRINT OCTAL, SUPPRESS LEADING 0'S
OPDEF	PNTOCF	[37B8!17B12!3]	;PRINT OCTAL, SUPPRESS LEADING 0'S FORCED
OPDEF	PNTDEC	[37B8!15B12!0]	;PRINT DECIMAL, SUPRESS LEADING 0'S
OPDEF	PNTDCF	[37B8!15B12!1]	;PRINT DECIMAL, SUPRESS LEADING 0'S FORCED
OPDEF	PNTDS	[37B8!16B12!0]	;PRINT DECIMAL, SPACES FOR LD 0'S
OPDEF	PNTDSF	[37B8!16B12!1]	;PRINT DECIMAL, SPACES FOR LD 0'S FORCED
OPDEF	PNTNM	[37B8!4B12!2]	;PRINT PROGRAM NAME
OPDEF	PNTSIX	[37B8!0B12!2]	;PRINT SIXBIT WORD
OPDEF	PNTSXF	[37B8!1B12!2]	;PRINT SIXBIT WORD FORCED
OPDEF	DROPDV	[37B8!5B12!2]	;CLOSE LOGICAL FILE, USER MODE
OPDEF	PNTCW	[37B8!2B12!2]	;PRINT DF10 CONTROL WORD
OPDEF	PNTCWF	[37B8!3B12!2]	;PRINT DF10 CONTROL WORD FORCED
OPDEF	PCRL	[37B8!0B12!CRLF] ;PRINT CARRIAGE RETURN/LINE FEED
OPDEF	PCRLF	[37B8!1B12!CRLF] ;PRINT CARRIAGE RETURN/LINE FEED FORCED
OPDEF	PSP	[37B8!0B12!40]	;PRINT SPACE
OPDEF	PSPF	[37B8!1B12!40]	;PRINT SPACE FORCED
OPDEF	PCRL2	[37B8!0B12!CRLF2] ;PRINT CARRIAGE RETURN/LINE FEED (TWICE)
OPDEF	PCRL2F	[37B8!1B12!CRLF2] ;PRINT CARRIAGE RETURN/LINE FEED (TWICE) FORCED
OPDEF	PBELL	[37B8!1B12!7]	;PRINT TTY BELL

OPDEF	PFORCE	[37B8!1B12!26]	;PRINT FORCE, CONTROL O OVERRIDE

DEFINE	PMSG	(ARG),<
	PSIXM	[SIXBIT\ARG'_\]>

DEFINE	PMSGF	(ARG),<
	PSIXMF	[SIXBIT\ARG'_\]>

;*SIXBTZ -- MACRO TO GENERATE SIXBIT DATA FOR PRINTING
;*	CONSERVES CORE OVER ASCIZ

DEFINE	SIXBTZ	(ARG),<	[SIXBIT\ARG'_\]>

;*CONSOLE SWITCH INPUT UUO.
;*READS CONSOLE SWITCHES IF IN EXEC MODE OR ASKS FOR THEM IF
;* USER MODE.

OPDEF	SWITCH	[37B8!10B12!2]	;INPUT CONSOLE SWITCHES

;*CLOCK INITIALIZATION UUO - TO SET DESIRED CLOCK OPERATION
;*EITHER IGNORE CLOCK, ONLY LET IT TICK OR CAUSE INTERRUPT TO OCCUR.

OPDEF	CLOKOP	[37B8!13B12!4]	;CLOCK OPERATION UUO - CLOCK
OPDEF	MTROP	[37B8!4B12!4]	;CLOCK OPERATION UUO - METER

;*KS-10 CACHE OPERATION UUO'S

OPDEF	CINVAL	[37B8!1B12!4]	;CACHE INVALIDATE
OPDEF	CFLUSH	[37B8!2B12!4]	;CACHE FLUSH
OPDEF	CWRTBI	[37B8!3B12!4]	;CACHE WRITE-BACK & INVALIDATE
;*END OF PASS/PROGRAM UUOS

;PERFORMS THE END OF PASS FUNCTIONS. INCREMENT PASS COUNT,
;*DECREMENT ITERATION COUNT, CHECK IF FINISHED WITH THIS PROGRAM ETC.

OPDEF	ENDUUO	[37B8!12B12!4]	;UUO TO DISPLAY LIGHTS
OPDEF	EOPUUO	[37B8!16B12!4]	;END OF PROGRAM UUO

;*MEMORY MANAGEMENT UUO'S
;*UUO'S TO PERFORM VARIOUS MEMORY FUNCTIONS. MAPPING, ZEROING, PAGING,
;*ADDRESS CONVERSION, ETC...

OPDEF	MAPMEM	[37B8!0B12!4]	;MAP MEMORY
OPDEF	MEMZRO	[37B8!12B12!2]	;ZERO MEMORY
OPDEF	MEMSEG	[37B8!11B12!2]	;SETUP MEMORY SEGMENT
OPDEF	MAPADR	[37B8!13B12!2]	;VIRTUAL TO PHYSICAL ADR CONVERT
OPDEF	MAPCNK	[37B8!15B12!2]	;MAP MEMORY CHUNK
OPDEF	MAPSET	[37B8!14B12!2]	;SET KI10 EXEC PAGE MAP
OPDEF	MAPPNT	[37B8!17B12!2]	;PRINT MEMORY MAP

;*DEVICE CODE MODIFICATION UUO
;*ALLOWS THE MODIFICATION OF IOT'S TO ONE DEVICE TO BE CHANGED TO
;*IOT'S TO A DIFFERENT DEVICE CODE.

OPDEF	MODPCU	[37B8!7B12!2]	;MODIFY PERHIPERAL CODE, USER
OPDEF	MODPCP	[37B8!6B12!2]	;MODIFY PERHIPERAL CODE, PROGRAM

	IFNDEF	MODDVL,<MODDVL==BEGIN>
	IFNDEF	MODDVU,<MODDVU==BEGIN>

;*"DIAMON" FILE SELECTION AND READ UUOS

OPDEF	FSELECT	[37B8!5B12!4]	;FILE SELECTION
OPDEF	FREAD	[37B8!6B12!4]	;FILE READ - ASCII DATA
OPDEF	FRD36	[37B8!7B12!4]	;FILE READ - 36 BIT DATA
OPDEF	FRD8	[37B8!10B12!4]	;FILE READ - 8 BIT DATA

	XLIST
IFNDEF	EROLD,<LIST
SUBTTL	ERROR HANDLING UUO DEFINITIONS

S
;*ERROR HANDLER PARAMETERS
S

OPDEF	ERUUO	[36B8]		;ERROR CALL UUO
OPDEF	ERLOOP	[35B8]		;ERROR LOOP, CHECKS PC,REPT,REPT1,ERROR
OPDEF	ERLP1	[35B8!1B12]	;ERROR LOOP IF PC'S MATCH
OPDEF	ERLP2	[35B8!2B12]	;ERROR LOOP IF ANY ERROR
OPDEF	REPTUO	[34B8]		;REPEAT LOOP UUO

;*THE ERROR HANDLER MACROS

;*A MACRO TO REPORT AN ERROR AND LOOP

	DEFINE	ERROR	(ADR,FORMAT,CORECT,ACTUAL,F,D,ERR)<
							SALL
	ERUUO	FORMAT,[T,,[SIXBIT\F'_\]
		   CORECT,,ACTUAL
		   [SIXBIT\D'_\],,ERR]
							XALL
	ERLOOP	ADR		;IF ERROR, LOOP TO ADR
>

;*A MACRO TO REPORT AN ERROR AND NOT LOOP

	DEFINE	ERROR1	(FORMAT,CORECT,ACTUAL,F,D,ERR)<
							SALL
	ERUUO	FORMAT,[T,,[SIXBIT\F'_\]
		   CORECT,,ACTUAL
		   [SIXBIT\D'_\],,ERR]
							XALL>

>;END OF EROLD CONDITIONAL

	XLIST
IFDEF	$PAPER,<LIST>
SUBTTL	STANDARD PROGRAM ASSIGNMENTS

S
;*ACCUMULATORS
S

P=	17			;PUSHDOWN POINTER AC (IF PUSH LIST USED)
REPT==	15			;ERROR HANDLER REPEAT AC
REPT1==	16			; "

S
;*PDP-10 STANDARD PC CONTROL FLAGS (SAVED ON PUSHJ, JSR, ETC..)
S

AROV==	400000			;ARITHMETIC OVERFLOW
CRY0==	200000			;CARRY 0
CRY1==	100000			;CARRY 1
FOV==	40000			;FLOATING POINT OVERFLOW
BIS==	20000			;BYTE INTERRUPT
USERF==	10000			;USER MODE
EXIOT==	4000			;USER PRIV I/O
TN0==	400			;TRAP NUMBER BIT 0
TN1==	200			;TRAP NUMBER BIT 1
FXU==	100			;FLOATING POINT UNDERFLOW
DCK==	40			;DIVIDE CHECK

S
;*PDP-10 STANDARD ADDRESS ASSIGNMENTS
S

LUUO==	40			;UUO STORAGE, UUO 1-37
LUUOI==	41			;UUO SERVICE INSTRUCTION

S
;*JOB DATA AREA EXTERNALS (OLD DEFINITIONS)
S

JOBUUO==40
JOB41==	41
JOBREL==44
JOBDDT==74
JOBSYM==116
JOBUSY==117
JOBSA==	120
JOBFF==	121
JOBREN==124
JOBAPR==125
JOBCNI==126
JOBTPC==127
JOBOPC==130
JOBVER==137
S
;*JOB DATA AREA EXTERNALS (NEW DEFINITIONS)
S

.JBUUO==40
.JB41==	41
.JBREL==44
.JBDDT==74
.JBSYM==116
.JBUSY==117
.JBSA==	120
.JBFF==	121
.JBREN==124
.JBAPR==125
.JBCNI==126
.JBTPC==127
.JBOPC==130
.JBVER==137

S
;*USER MODE APR ASSIGNMENTS (FOR "APRENB" CALL)
S

PDLOVU==200000			;PUSHDOWN LIST OVERFLOW
MPVU==	20000			;MEMORY PROTECTION VIOLATION
NXMU==	10000			;NON-X-MEMORY
PARU==	4000			;PARITY ERROR
CLKU==	1000			;CLOCK
FOVU==	100			;FLOATING OVERFLOW
AROVU==	10			;ARITHMETIC OVERFLOW

S
;*USER MODE PRINT OUTPUT CHANNEL ASSIGNMENTS (FOR SUBROUTINE PACKAGE)
;*THE USER SHOULD BE CAUTIONED NOT TO USE THESE CHANNELS WHEN
;*USING THE SUBROUTINE PACKAGE AND CODING USER MODE PROGRAMS.
S

$DEVCH==17			;LOGICAL DEVICE CHANNEL

S
;*PDP-10 SPECIAL COMPATABILITY ASSIGNMENTS
S

PAG==	010		;PAGING I/O DEVICE CODE

CCA==	014		;CACHE I/O DEVICE CODE
S
;*PDP-10 STANDARD APR CONO ASSIGNMENTS
S

IOCLR==	200000			;CLEAR ALL I/O DEVICES

S
;*PDP-10 STANDARD PI CONO ASSIGNMENTS
S

PICLR==	10000			;CLEAR PI SYSTEM
REQSET==4000			;SET PROGRAM PI REQUEST
CHNON==	2000			;TURN ON CHANNEL
CHNOFF==1000			;TURN OFF CHANNEL
PIOFF==	400			;TURN OFF PI SYSTEM
PION==	200			;TURN ON PI SYSTEM

S
;*PDP-10 STANDARD PI CONI ASSIGNMENTS
S

PION==	200			;PI SYSTEM ON

S
;*PDP-10 STANDARD PI CHANNEL ASSIGNMENTS
S

PICHN1==100			;PI CHANNEL 1
PICHN2==40			;PI CHANNEL 2
PICHN3==20			;PI CHANNEL 3
PICHN4==10			;PI CHANNEL 4
PICHN5==4			;PI CHANNEL 5
PICHN6==2			;PI CHANNEL 6
PICHN7==1			;PI CHANNEL 7
PICHNA==177			;ALL PI CHANNELS, 1 THRU 7
S
;*KS10 CONO APR 000 ASSIGMENTS
S

LIOCLR==200000			;CLEAR ALL I/O DEVICES
LFLGEN==100000			;ENABLE SELECTED FLAG
LFLGDS==40000			;DISABLE SELECTED FLAG
LFLGCL==20000			;CLEAR SELECTED FLAG
LFLGST==10000			;SET SELECTED FLAG
LPWRFL==1000			;POWER FAIL FLAG
LNXMER==400			;NON-EXISTENT MEMORY FLAG
LPARER==200			;MB PARITY ERROR FLAG
LPSFT==	100			;SOFT MEMORY ERROR
LACLK==	40			;INTERVAL TIMER
LAPRP7==7			;APR PI CHANNEL 7
LAPRP6==6			;APR PI CHANNEL 6
LAPRP5==5			;APR PI CHANNEL 5
LAPRP4==4			;APR PI CHANNEL 4
LAPRP3==3			;APR PI CHANNEL 3
LAPRP2==2			;APR PI CHANNEL 2
LAPRP1==1			;APR PI CHANNEL 1
LEPWRF==101000			;ENABLE POWER FAIL
LDPWRF==041000			;DISABLE POWER FAIL
LCPWRF==021000			;CLR POWER FAIL
LSPWRF==011000			;SET POWER FAIL
LENXER==100400			;ENABLE NON-EXISTENT MEMORY
LDNXER==040400			;DISABLE NON-EXISTENT MEORY
LCNXER==020400			;CLR NON-EXISTENT MEMORY
LSNXER==010400			;SET NON-EXISTENT MEMORY
LEPAER==100200			;ENABLE PARITY ERRORS
LDPAER==040200			;DISABLE PARITY ERRORS
LCPAER==020200			;CLR PARITY ERROR
LSPAER==010200			;SET PARITY ERROR
LEPSFT==100100			;ENABLE SOFT MEMORY ERROR
LDPSFT==040100			;DISABLE SOFT MEMORY ERROR
LCPSFT==020100			;CLR SOFT MEMORY ERROR
LSPSFT==010100			;SET SOFT MEMORY ERROR
LAPRAL==121600			;CLR ALL ERROR FLAGS & ENABLE
S
;*KS10 CONI APR 000 ASSIGMENTS (LEFT HALF)
S

LPWRFE==1000			;POWER FAILURES ENABLED
LNXMEN==400			;NON-EXISTENT MEMORY ERRORS ENABLED
LPAREN==200			;PARITY ERRORS ENABLED
LPSFTE==100			;SOFT MEMORY ERROR ENABLED
LACLKE==40			;INTERVAL TIMER ENABLED

S
;*KS10 CONI APR 000 ASSIGMENTS (RIGHT HALF)
S

LPWRFL==1000			;POWER FAIL FLAG
LNXMER==400			;NON-EXISTENT MEMORY FLAG
LPARER==200			;PARITY ERROR FLAG
LPSFTER==100			;SOFT MEMORY ERROR FLAG
LAPRP7==7			;APR PI CHANNEL 7
LAPRP6==6			;APR PI CHANNEL 6
LAPRP5==5			;APR PI CHANNEL 5
LAPRP4==4			;APR PI CHANNEL 4
LAPRP3==3			;APR PI CHANNEL 3
LAPRP2==2			;APR PI CHANNEL 2
LAPRP1==1			;APR PI CHANNEL 1
LINT==10			;APR INTERRUPT

S
;*KS10 DATAO APR 000 ASSIGMENTS (LEFT HALF)
S

LINSTF==400			;ADDRESS BREAK REQUEST FOR INST. FETCH
LDATAF==200			;ADDRESS BREAK REQUEST FOR DATA FETCH
LWRITE==100			;ADDRESS BREAK REQUEST FOR DATA WRITE
LUSCMP==40			;USER ADDRESS COMPARE
LEXCMP==0			;EXEC ADDRESS COMPARE

S
;*KS10 DATAO APR 000 ASSIGMENTS (RIGHT HALF)
S

;DATAO APR,ADDRESS SWITCHES=13-35
S
;*KS10 DATAI APR 000 ASSIGMENTS (LEFT HALF)
S

LINSTF==400			;ADDRESS BREAK REQUEST FOR INST. FETCH
LDATAF==200			;ADDRESS BREAK REQUEST FOR DATA FETCH
LWRITE==100			;ADDRESS BREAK REQUEST FOR DATA WRITE
LUSCMP==40			;USER ADDRESS COMPARE
LEXCMP==0			;EXEC ADDRESS COMPARE

S
;*KS10 DATAI APR 000 ASSIGMENTS (RIGHT HALF)
S

;DATAI APR,ADDRESS SWITCHES=13-35

S
;*KS10 BLKO APR 000 ASSIGMENTS (IMMEDIATE MODE)
S

;REFILL ALGORITHM BITS 18-20
;REFILL ALGORITHM ADDRESS 27-33

S
;*KS10 BLKI APR 000 ASSIGMENTS
S

;MICRO-CODE OPTIONS = 0-8
;MICRO-CODE VERSION NUMBER = 9-17
;HARDWARE OPTIONS =18-20
;PROCESSOR SERIAL NUMBER = 21-35
S
;*KS10 CONO PI 004 ASSIGMENTS
S

LRQCLR==20000			;DROP INTERRUPT ON SELECTED CHANNEL
LPICLR==10000			;CLEAR PI SYSTEM
LREQSE==4000			;REQUEST INTERRUPT ON SELECTED CHANNEL
LCHNON=2000			;TURN ON SELECTED CHANNEL
LCHNOF==1000			;TURN OFF SELECTED CHANNEL
LPIOFF==400			;TURN PI SYSTEM OFF
LPION==200			;TURN PI SYSTEM ON
LPICH1==100			;PI CHANNEL 1
LPICH2==40			;PI CHANNEL 2
LPICH3==20			;PI CHANNEL 3
LPICH4==10			;PI CHANNEL 4
LPICH5==4			;PI CHANNEL 5
LPICH6==2			;PI CHANNEL 6
LPICH7==1			;PI CHANNEL 7
LPICHA==177			;ALL PI CHANNELS

S
;*KS10 CONI PI 004 ASSIGMENTS (LEFT HALF)
S

LPRCH1==100			;PROGRAM REQUEST ON CHANNEL 1
LPRCH2==40			;PROGRAM REQUEST ON CHANNEL 2
LPRCH3==20			;PROGRAM REQUEST ON CHANNEL 3
LPRCH4==10			;PROGRAM REQUEST ON CHANNEL 4
LPRCH5==4			;PROGRAM REQUEST ON CHANNEL 5
LPRCH6==2			;PROGRAM REQUEST ON CHANNEL 6
LPRCH7==1			;PROGRAM REQUEST ON CHANNEL 7

S
;*KS10 CONI PI 004 ASSIGMENTS (RIGHT HALF)
S

LPIIP1==40000			;PI IN PROGRESS ON CHANNEL 1
LPIIP2==20000			;PI IN PROGRESS ON CHANNEL 2
LPIIP3==10000			;PI IN PROGRESS ON CHANNEL 3
LPIIP4==4000			;PI IN PROGRESS ON CHANNEL 4
LPIIP5==2000			;PI IN PROGRESS ON CHANNEL 5
LPIIP6==1000			;PI IN PROGRESS ON CHANNEL 6
LPIIP7==400			;PI IN PROGRESS ON CHANNEL 7
LPION==200			;PI SYSTEM ON
LPICH1==100			;PI CHANNEL 1 ON
LPICH2==40			;PI CHANNEL 2 ON
LPICH3==20			;PI CHANNEL 3 ON
LPICH4==10			;PI CHANNEL 4 ON
LPICH5==4			;PI CHANNEL 5 ON
LPICH6==2			;PI CHANNEL 6 ON
LPICH7==1			;PI CHANNEL 7 ON
S
;*KS10 DATAO PAG 010 ASSIGMENTS (LEFT HALF)
S

LLACBL==400000			;LOAD AC BLOCKS
LLDUSB==100000			;LOAD USER BASE REGISTER
;CURRENT AC BLOCKS BITS 6 - 8
;PREVIOUS AC BLOCKS BITS 9 - 11

S
;*KS10 DATAO PAG 010 ASSIGMENTS (RIGHT HALF)
S

;USER BASE REGISTER BITS 23 - 35

S
;*KS10 DATAI PAG 010 ASSIGMENTS (LEFT HALF)
S

LLACBL==400000			;LOAD AC BLOCKS
LLDUSB==100000			;LOAD USER BASE REGISTER
;CURRENT AC BLOCKS BITS 6 - 8
;PREVIOUS AC BLOCKS BITS 9 - 11

S
;*KS10 DATAI PAG 010 ASSIGMENTS (RIGHT HALF)
S

;USER BASE REGISTER BITS 25 - 35

S
;*KS10 CONO PAG 010 ASSIGMENTS
S

LSMODE==40000			;SECTION MODE
LTRPEN==20000			;TRAP AND PAGE CACHE ENABLE

;EXEC BASE REGISTER = 25-35

S
;*KS10 CONI PAG 010 ASSIGMENTS
S

LSECMO==40000			;SECTION MODE
LTRPAE==20000			;TRAP AND PAGE CACHE ENABLE

;EXEC BASE REGISTER = 25-35

S
;*KS10 BLKO PAG 010 ASSIGMENTS (IMMEDIATE MODE)
S

S
;*KS10 EXEC PAGE MAP PAGE ASSIGNMENTS
S

UBAVEC==100			;UNIBUS VECTOR TABLE ADDRESS

AROVTP==421			;ARITHMETIC TRAP
PDOVTP==422			;PUSHDOWN OVERFLOW TRAP
TRP3TP==423			;TRAP 3 TRAP

LTBASH==510			;TIME-BASE, HI
LTBASL==511			;TIME-BASE, LO
LPRFMH==512			;PERFORMANCE ANAYLYSIS, HI
LPRFML==513			;PERFORMANCE ANAYLYSIS, LO

S
;*KS10 USER PAGE MAP PAGE ASSIGNMENTS
S

AROVTP==421			;ARITHMETIC TRAP
PDOVTP==422			;PUSHDOWN OVERFLOW TRAP
TRP3TP==423			;TRAP 3 TRAP

MUUO==	424			;MUUO STORAGE
MUUOPC==425			;C(PC) OF MUUO STORAGE
LCNTXT==426			;PROCESS CONTEXT WORD

KNTRP==430			;KERNAL	 	NO TRAP - NEW PC'S-
KTRP==	431			;"	 	TRAP
SNTRP==432			;SUPERVISOR	NO TRAP
STRP==	433			;"		TRAP
CNTRP==434			;CONCEAL 	NO TRAP
CTRP==	435			;"		TRAP
PNTRP==436			;PUBLIC		NO TRAP
PTRP==	437			;"		TRAP

LEUPFW==500			;EXEC & USER PAGE FAIL WORD
LPFWPC==501			;C(PC) OF PAGE FAIL WORD
LPGFTR==502			;PAGE FAIL NEW PC

LEBXMH==504			;E-BOX CLOCK TICK METER, HI
LEBXML==505			;E-BOX CLOCK TICK METER, LO
LMBXMH==506			;M-BOX CYCLE METER, HI
LMBXML==507			;M-BOX CYCLE METER, LO
S
;*KS10 I/O INSTRUCTIONS
S

OPDEF	APRID	[700B8+0B12]	;READ PROCESSOR ID
OPDEF	WRAPR	[700B8+4B12]	;WRITE APR
OPDEF	RDAPR	[700B8+5B12]	;READ APR
OPDEF	WRPI	[700B8+14B12]	;WRITE PI
OPDEF	RDPI	[700B8+15B12]	;READ PI

OPDEF	RDUBR	[701B8+1B12]	;READ USER BASE REGISTER
OPDEF	CLRPT	[701B8+2B12]	;CLEAR HARDWARE PAGE TABLE
OPDEF	WRUBR	[701B8+3B12]	;WRITE USER BASE REGISTER
OPDEF	RDEBR	[701B8+5B12]	;READ EXEC BASE REGISTER
OPDEF	WREBR	[701B8+4B12]	;WRITE EXEC BASE REGISTER

OPDEF	RDSPB	[702B8+0B12]	;READ SPT BASE REGISTER
OPDEF	RDCSB	[702B8+1B12]	;READ CORE STATUS TABLE BASE REGISTER
OPDEF	RDPUR	[702B8+2B12]	;READ PROCESS USE REGISTER
OPDEF	RDCSTM	[702B8+3B12]	;READ CST MASK REGISTER
OPDEF	RDTIM	[702B8+4B12]	;READ TIME BASE
OPDEF	RDINT	[702B8+5B12]	;READ INTERVAL TIMER
OPDEF	RDHSB	[702B8+6B12]	;READ HALT STATUS BLOCK ADDRESS

OPDEF	WRSPB	[702B8+10B12]	;WRITE SPT BASE REGISTER
OPDEF	WRCSB	[702B8+11B12]	;WRITE CORE STATUS TABLE BASE REGISTER
OPDEF	WRPUR	[702B8+12B12]	;WRITE PROCESS USE REGISTER
OPDEF	WRCSTM	[702B8+13B12]	;WRITE CST MASK REGISTER
OPDEF	WRTIM	[702B8+14B12]	;WRITE TIME BASE
OPDEF	WRINT	[702B8+15B12]	;WRITE INTERVAL TIMER
OPDEF	WRHSB	[702B8+16B12]	;WRITE HALT STATUS BLOCK ADDRESS
S
;*KS10 UNIBUS I/O INSTRUCTIONS
S

OPDEF	TIOE	[710B8]		;TEST I/O, SKIP IF ZERO
OPDEF	TION	[711B8]		;TEST I/O, SKIP IF NON-ZERO
OPDEF	RDIO	[712B8]		;READ I/O
OPDEF	WRIO	[713B8]		;WRITE I/O
OPDEF	BSIO	[714B8]		;BIT SET I/O
OPDEF	BCIO	[715B8]		;BIT CLEAR I/O
OPDEF	TIOEB	[720B8]		;	BYTE MODE
OPDEF	TIONB	[721B8]
OPDEF	RDIOB	[722B8]
OPDEF	WRIOB	[723B8]
OPDEF	BSIOB	[724B8]
OPDEF	BCIOB	[725B8]

S
;*KS10 UNIBUS BIT NUMBERS
S

EBIT0==1
EBIT1==2
EBIT2==4
EBIT3==10
EBIT4==20
EBIT5==40
EBIT6==100
EBIT7==200
EBIT8==400
EBIT9==1000
EBIT10==2000
EBIT11==4000
EBIT12==10000
EBIT13==20000
EBIT14==40000
EBIT15==100000

	LIST