Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/debugging-tools/dts/dtsunv.mac
There are no other files named dtsunv.mac in the archive.
;COPYRIGHT (C) 1978 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
;TRANSFERRED.
;
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
;AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
;
UNIVERSAL DTSUNV - DTS SYMBOL AND MACRO DEFINITIONS
;*****************************************************************************
;* DTS SYMBOL AND MACRO DEFINITION MODULE
;*****************************************************************************
SEARCH MACSYM,MONSYM
SALL
;ACCUMULATOR DEFINITIONS FOR DTS
F=0 ;FLAGS
T1=1 ;TEMPORARY
T2=2 ;TEMPORARY
T3=3 ;TEMPORARY
T4=4 ;TEMPORARY
Q1=5 ;PRESERVED
Q2=6 ;PRESERVED
Q3=7 ;PRESERVED
P1=10 ;PRESERVED
P2=11 ;PRESERVED
P3=12 ;PRESERVED
P4=13 ;PRESERVED
P5=14 ;PRESERVED
P6=15 ;PRESERVED (CAUTION, USED BY MACSYM MACROS)
CX=16 ;RESERVED FOR SUPPORT CODE
P=17 ;PUSH-DOWN POINTER
PAGE
SUBTTL LCB MACRO TO GENERATE ENTRIES IN LINK CONTROL BLOCK
;MACRO TO GENERATE ENTRIES IN LINK CONTROL BLOCK
; THIS MACRO ELIMINATES THE NECESSITY OF HARD CODING
; THE WORD OFFSET WITHIN THE LINK CONTROL BLOCK OF
; EACH WORD WHICH IS DEFINED WITH THE DEFSTR OR MSKSTR MACRO
;PROTOTYPE: LCB (NAME,POS,SIZE,WORDS,TYPE)
;WHERE NAME = THREE CHARACTER NAME OF FIELD
; POS = POSITION OF FIELD WITHIN THE WORD
; SIZE = SIZE OF THE FIELD IN BITS
; WORDS = LENGTH OF THE FIELD IN WORDS
; TYPE = TYPE OF ENTRY EITHER "DEF" OR "MSK"
DEFINE LCB (NAME,POS<35>,SIZE<36>,WORDS<1>,TYPE<DEF>,%LOC,%ORG),<
%ORG==. ;;SAVE CURRENT LOCATION COUNTER
LOC ;;SET LAST ABSOLUTE ADDRESS
%LOC==. ;;GET CURRENT ABSOLUTE LOCATION
BLOCK WORDS ;;RESERVE STORAGE & BUMP ABSOLUTE
;; LOCATION COUNTER
.ORG %ORG ;;RESTORE LOCATION COUNTER
LCBSIZ==LCBSIZ+WORDS ;;UPDATE SIZE OF LCB
DEFINE %STR (A),<
DEFINE XXXSTR (TYP,PS),<TYP'STR (LCB'NAME,<A'(LCBPTR)>,PS)>>
%STR (\%LOC) ;;GET OFFSET AS OCTAL STRING
IFB <TYPE>,<
XXXSTR (DEF,<POS,SIZE>)>
IFNB <TYPE>,<
IFIDN <TYPE><DEF>,<
XXXSTR (DEF,<POS,SIZE>)>
IFIDN <TYPE><MSK>,<
XXXSTR (MSK,POS)>
IFDIF <TYPE><DEF>,<
IFDIF <TYPE><MSK>,<
IF1 <PRINTX ?LCB MACRO TYPE INVALID>>>>
IF2 <PURGE %LOC,%LOC> ;;PURGE SYMBOLS
IF2 <PURGE %ORG,%ORG>>
PAGE
SUBTTL LCB MASKS AND CONSTANTS DEFINITIONS
;GENERAL CONSTANTS FOR LINK CONTROL BLOCK
LCBPTR=Q1 ;POINTER TO LCB
PURGE Q1,Q1
LCBSIZ==0 ;INITIALIZE SIZE OF LCB
;MASKS FOR USE WITH LINK CONTROL BLOCK
LCB%RJ==1B7 ;FLAG TO NOT RELEASE JFN
LCB%AB==1B8 ;FLAG TO ABORT ON CLOSE
LCB%RM==1B10 ;FLAG TO RECEIVE MESSAGE
LCB%SM==1B11 ;FLAG TO SEND MESSAGE
LCB%BS==MASKB(12,17) ;LINK BYTE SIZE
PAGE
SUBTTL LCB - LINK CONTROL BLOCK DEFINITION
;LINK CONTROL BLOCK - CONTAINS DATA SPECIFIC TO EACH LOGICAL LINK
; ENTRIES ARE ACCESSED USING LOAD & STOR IN MACSYM
LCB (ID) ;LCB IDENTIFIER
LCB (CHN,35,36) ;CHAIN TO NEXT LINK CONTROL BLOCK
LCB (JFN,35,36) ;LINK JOB FILE NUMBER
LCB (CID,35,36) ;CONNECT INTERRUPT DISPATCH ADDRESS
LCB (DID,35,36) ;DATA EVENT DISPATCH ADDRESS
LCB (IID,35,36) ;INTERRUPT EVENT DISPATCH ADDRESS
LCB (TID,35,36) ;TIMER INTERRUPT DISPATCH ADDRESS
LCB (FLG,35,36,0) ;LCB CONTROL FLAGS
LCB (BSZ,LCB%BS,,0,MSK) ;LINK BYTE SIZE
LCB (RJF,LCB%RJ,,0,MSK) ;RELEASE JFN ON CLOSE OR ABORT
LCB (SLM,LCB%SM,,0,MSK) ;SEND MESSAGE
LCB (RLM,LCB%RM,,0,MSK) ;RECEIVE MESSAGE
LCB (ABT,LCB%AB,,1,MSK) ;ABORT LINK ON CLOSE
LCB (SND,35,36) ;MESSAGE SEND COUNT
LCB (RCV,35,36) ;MESSAGE RECEIVE COUNT
LCB (SBC,35,36) ;SEND BYTE COUNT
LCB (RBC,35,36) ;RECEIVE BYTE COUNT
LCB (ISC,35,36) ;INTERRUPT MESSAGE SEND COUNT
LCB (IRC,35,36) ;INTERRUPT MESSAGE RECEIVE COUNT
LCB (SMB,35,36) ;SEND MESSAGE BUFFER POINTER
LCB (RMB,35,36) ;RECEIVE MESSAGE BUFFER POINTER
LCB (PIM,35,36) ;INTERRUPT MESSAGE BUFFER POINTER
LCB (OSP,35,36) ;POINTER TO OPTIONAL DATA SENT
LCB (SOC,17,18) ;SEND OPTIONAL DATA BYTE COUNT
LCB (SZI,35,36) ;SIZE OF INTERRUPT MESSAGE
LCB (LER,35,18,0) ;LAST (TOPS-20) ERROR CODE
LCB (DER,17,18) ;LAST DTS ERROR NUMBER
LCB (RSN,35,18,0) ;ABORT REASON CODE
LCB (STS,35,36) ;LINK STATUS & REASON CODE
LCB (MSZ,35,18,0) ;MAXIMUM MESSAGE SIZE
LCB (CSZ,17,18) ;CURRENT MESSAGE SIZE
LCB (ERR,35,36) ;TOTAL ERROR COUNT
LCB (NMS,35,36) ;NUMBER OF MESSAGES TO SEND
LCB (WAT,35,36) ;TIME TO WAIT BETWEEN SENDING
LCB (HST,35,36) ;LINK DATA - POINTER TO HOST NAME
LCB (TSK,35,36) ;LINK DATA - POINTER TO TASK NAME
LCB (SGS,35,36) ;LINK DATA - SEGMENT SIZE FOR LINK
LCB (ODS,35,36) ;LINK DATA - POINTER TO OBJECT-DESCRIPTOR
LCB (GPU,35,36) ;LINK DATA - GROUP/USER
LCB (USE,35,36) ;LINK DATA - POINTER TO USER ID
LCB (PAS,35,36) ;LINK DATA - POINTER TO PASSWORD
LCB (PWC,35,18) ;LINK DATA - PASSWORD BYTE COUNT
LCB (ACT,35,36) ;LINK DATA - POINTER TO ACCOUNT
LCB (OPT,35,36) ;LINK DATA - POINTER TO RECEIVED OPTIONAL DATA
LCB (ROC,35,18) ;LINK DATA - RECEIVED OPTIONAL DATA BYTE COUNT
LCB (CON,35,36) ;LINK DATA - CONNECT OBJECT NUMBER
LCB (LLA,35,36,0) ;LINK DATA - LOGICAL LINK ADDRESSES
LCB (SRC,17,18,0) ; - SOURCE
LCB (DST,35,18) ; - DESTINATION
PAGE
SUBTTL DTS TEST CONTROL BLOCK DEFINITION
;OFFSETS INTO DTS TEST CONTROL BLOCK DEFINITION
LOC 0
.DTTCB:! ;DTS TEST CONTROL BLOCK
.DTTIM:! BLOCK 1 ;TIME TO TEST
.DTBUF:! BLOCK 1 ;NUMBER OF MESSAGE BUFFERS TO SEND
.DTBAU:! BLOCK 1 ;BAUD RATE OF LINK
.DTNOD:! BLOCK 1 ;POINTER TO NODE NAME
.DTCNT:! BLOCK 1 ;COUNT OF WORDS FOLLOWING
.DTTYP:! BLOCK 1 ;TEST TYPE + PRINT OPTION
.DTSUB:! BLOCK 1 ;SUBTYPE
.DTEXT:! BLOCK 1 ;TEST SPECIFIC EXTENSIONS
;TEST SPECIFIC SWITCHES
LOC .DTEXT ;DATA TEST EXTENSIONS
.DTFCO:! BLOCK 1 ;FLOW CONTROL OPTION
.DTFCV:! BLOCK 1 ;FLOW CONTROL VALUE
.DTNAK:! BLOCK 1 ;NAK VALUE
.DTBPV:! BLOCK 1 ;BACK PRESSURE VALUE
.DTMSG:! BLOCK 1 ;MESSAGE LENGTH BYTE 0
BLOCK 1 ;MESSAGE LENGTH BYTE 1
LOC .DTEXT ;INTERRUPT TEST EXTENSIONS
.DTFOP:! BLOCK 1 ;FLOW OPTION
.DTSIZ==.-.DTTCB ;SIZE OF THE DTSTCB
RELOC
PAGE
SUBTTL EXTERNAL SYMBOL DEFINITIONS
;EXTERNALS FROM DTSCMD
EXTERN TSTCOL ;TEST NEW LINE ROUTINE
EXTERN SNDMSG ;SEND MESSAGE ROUTINE
EXTERN SNDSTR ;SEND STRING ROUTINE
;EXTERNALS FROM DTSSUP
EXTERN JSERRM
EXTERN PRWARN,PRERRN,PRERRJ,PRINFN
EXTERN IHBLK
EXTERN LCBLST
EXTERN IHCONN
EXTERN IHDATA
EXTERN IHIMSG
EXTERN IHTIME
EXTERN PRDCXE
;EXTERNALS FROM DTSNSP
EXTERN OPNLNK
EXTERN ACPLNK
EXTERN RLSLNK,RLDLNK,RHNLNK,RODLNK,RTNLNK,RUSLNK,RPWLNK,RACLNK,RDALNK
EXTERN RCNLNK,RSSLNK
EXTERN SNDLNK,RCVLNK,CLZLNK,REJLNK,SIMLNK,RIMLNK
EXTERN STCICS,STCICT,STDACS,STDACT,STIMCS,STIMCT
EXTERN CLCICS,CLCICT,CLDACS,CLDACT,CLIMCS,CLIMCT
EXTERN SETCLR
EXTERN DCXERR
EXTERN PRTOBJ
EXTERN PRTACC,PRTOPD,PRTRSN,PRTSGS
EXTERN ERXLNK
EXTERN LOAD11
;EXTERNALS FROM DTSJFN
EXTERN DTSJFN
;EXTERNALS FROM DTSPSI
EXTERN PSIINI
EXTERN SLEEP
EXTERN PION,PIOFF
EXTERN PSISV1,PSISV2,PSISV3
EXTERN TIMOUT,AWOKEN
;EXTERNAL FROM DTSPRT
EXTERN DTSPRT,PRNUMV
;THE TEST MODULE ENTRY POINTS
EXTERN DTSCON,DTSDAT,DTSDIS,DTSINT
PAGE
SUBTTL MISCELLANEOUS SYMBOL DEFINITIONS
NWLKDA==^D29 ;NUMBER OF WORDS IN LINK DATA AREA
NWLKHN==2 ;NUMBER OF WORDS FOR LINKS HOST NAME
NWLKTS==4 ;NUMBER OF WORDS FOR LINKS TASK NAME
NWLKUI==4 ;NUMBER OF WORDS FOR LINKS USER ID
NWLKPW==4 ;NUMBER OF WORDS FOR LINKS PASSWORD
NWLKAC==4 ;NUMBER OF WORDS FOR LINKS ACCOUNT
NWLKOP==4 ;NUMBER OF WORDS FOR LINKS OPTIONAL DATA
NWLKOD==7 ;NUMBER OF WORDS FOR LINKS OBJECT-DESCRIPTOR
COCHNS==^D23 ;CONNECT REQUEST INTERRUPT CHANNEL FOR SERVER
COCHNT==^D26 ;CONNECT REQUEST INTERRUPT CHANNEL FOR TARGET
COINTL==3 ;INTERRUPT LEVEL FOR CONNECT REQUESTS
COINSL==3 ;INTERRUPT LEVEL FOR CONNECT REQUESTS
DACHNS==^D24 ;DATA AVAILABLE INTERRUPT CHANNEL FOR SERVERS
DACHNT==^D27 ;DATA AVAILABLE INTERRUPT CHANNEL FOR TARGETS
DAINTL==3 ;INTERRUPT LEVEL FOR DATA AVAILABLE
DAINSL==3 ;INTERRUPT LEVEL FOR DATA AVAILABLE
IMCHNS==^D25 ;INTERRUPT MESSAGE INTERRUPT CHANNEL FOR SERVERS
IMCHNT==^D28 ;INTERRUPT MESSAGE INTERRUPT CHANNEL FOR TARGETS
IMINTL==2 ;INTERRUPT LEVEL FOR INTERRUPT MESSAGE
IMINSL==2 ;INTERRUPT LEVEL FOR INTERRUPT MESSAGE
PDLEN==^D200 ;PUSH-DOWN STACK LENGTH
PAGE
SUBTTL GLOBAL MACRO DEFINITIONS
;PRTINF - PRINT DTS INFORMATIOM MESSAGE
DEFINE PRTINF (TEXT,ALT<JRST .+1>,KEYLST),<
DEFINE $GOTO (ARG),<DEFINE .$TRANSFER <JRST ARG> >
DEFINE $CALL (ARG),<DEFINE .$TRANSFER <CALL ARG> >
DEFINE $RET <DEFINE .$TRANSFER <RET> >
DEFINE .$TRANSFER <>
IRP KEYLST,<KEYLST>
JRST [JSP P5,PRINFN
SKIP 0,[ASCIZ\TEXT\]
.$TRANSFER
ALT]
> ;;END OF PRTINF MACRO
;PRTWRN - PRINT DTS WARNING MESSAGE
DEFINE PRTWRN (TEXT,ALT<JRST .+1>,KEYLST),<
DEFINE $GOTO (ARG),<DEFINE .$TRANSFER <JRST ARG> >
DEFINE $CALL (ARG),<DEFINE .$TRANSFER <CALL ARG> >
DEFINE $RET <DEFINE .$TRANSFER <RET> >
DEFINE .$TRANSFER <>
IRP KEYLST,<KEYLST>
JRST [JSP P5,PRWARN
SKIP 0,[ASCIZ\TEXT\]
.$TRANSFER
ALT]
> ;;END OF PRTWRN MACRO DEFINITION
;PRTERR - PRINT DTS ERROR MESSAGE
;
;MACRO TO PRINT DTS ERROR MESSAGE WITH FORMAT - -
; "? DTS: TEXT-STRING"
DEFINE PRTERR (TEXT,ALT<JRST .+1>,KEYLST),<
DEFINE $GOTO (ARG),<DEFINE .$TRANSFER <JRST ARG> >
DEFINE $CALL (ARG),<DEFINE .$TRANSFER <CALL ARG> >
DEFINE $RET <DEFINE .$TRANSFER <RET> >
DEFINE .$TRANSFER <>
IRP KEYLST,<KEYLST>
JRST [JSP P5,PRERRN
SKIP 0,[ASCIZ\TEXT\]
.$TRANSFER
ALT]
> ;;END OF PRTERR MACRO DEFINITION
DEFINE RETBAD (ROUTN),<
CALLRET ROUTN
>
DEFINE PRTDCX (AC,TEXT,ALT<JRST .+1>,KEYLST),<
DEFINE $GOTO (ARG),<DEFINE .$TRANSFER <JRST ARG> >
DEFINE $CALL (ARG),<DEFINE .$TRANSFER <CALL ARG> >
DEFINE $RET <DEFINE .$TRANSFER <RET> >
DEFINE .$TRANSFER <>
IRP KEYLST,<KEYLST>
JRST [PUSH P,T1
PUSH P,AC
MOVE T1,AC
JSP P5,PRDCXE
SKIP 0,[ASCIZ\TEXT\]
POP P,AC
POP P,T1
.$TRANSFER
ALT]
> ;;END OF PRTWRN MACRO DEFINITION
PAGE
SUBTTL JSYS ERROR MACROS
DEFINE JSRET (TEXT),< ;;MACRO TO PRINT JSYS ERROR MESSAGE & RETURN
ERCAL [EXCH T1,(P) ;;GET ADDRESS WE'RE CALLED FROM AND SAVE T1
CALL PRERRJ ;;GO PRINT PC & ERROR MESSAGE
SKIP 0,[ASCIZ\TEXT\] ;;ADDRESS OF TEXT
POP P,T1 ;;RESTORE T1
RET]> ;;AND RETURN
DEFINE JSCONT (TEXT),< ;;MACRO TO PRINT JSYS ERROR MESSAGE & CONTINUE
ERCAL [EXCH T1,(P) ;;GET ADDRESS WE'RE CALLED FROM AND SAVE T1
CALL PRERRJ ;;GO PRINT PC & ERROR MESSAGE
SKIP 0,[ASCIZ\TEXT\] ;;ADDRESS OF TEXT
POP P,T1 ;;RESTORE T1
JRST .+1]> ;;RETURN TO JSYS+2
DEFINE JSHLT (TEXT),< ;;MACRO TO PRINT JSYS ERROR MESSAGE & HALT
ERCAL [EXCH T1,(P) ;;GET ADDRESS WE'RE CALLED FROM AND SAVE T1
CALL PRERRJ ;;GO PRINT PC & ERROR MESSAGE
SKIP 0,[ASCIZ\TEXT\] ;;ADDRESS OF TEXT
POP P,T1 ;;RESTORE T1
HALTF ;;HALT
JRST .+1]> ;;CONTINUE
DEFINE JSGOTO (TEXT,%GOTO<.+1>),< ;;MACRO TO PRINT JSYS ERROR MESSAGE
;; & JUMP TO ROUTINE
ERCAL [EXCH T1,(P) ;;GET ADDRESS WE'RE CALLED FROM AND SAVE T1
CALL PRERRJ ;;GO PRINT PC & ERROR MESSAGE
SKIP 0,[ASCIZ\TEXT\] ;;ADDRESS OF TEXT
POP P,T1 ;;RESTORE T1
JRST %GOTO] ;;GO TO LABEL
; IF2 <PURGE %GOTO>> ;;PURGE CREATED SYMBOLS, END JSGOTO MACRO
PAGE
SUBTTL PSI MACROS
;MACRO TO ESTABLISH INTERRUPT ENVIRONMENT, SAVE AC'S AND
; SET UP CO-ROUTINE TO RESTORE AC'S AND CAUSE WAKEUP AT EXIT
DEFINE $ISAVE (LEVEL),< ;;MACRO TO ESTABLISH INTERRUPT ENVIRONMENT
IFLE LEVEL,<PRINTX $ISAVE - INVALID INTERRUPT LEVEL>
IFE LEVEL-1,<JSR PSISV1>
IFE LEVEL-2,<JSR PSISV2>
IFE LEVEL-3,<JSR PSISV3>
IFG LEVEL-3,<PRINTX $ISAVE - INVALID INTERRUPT LEVEL>
>;;END OF $ISAVE MACRO
;MACRO TO TURN INTERRUPT SYSTEM ON
DEFINE $PION <CALL PION>
;MACRO TO TURN INTERRUPT SYSTEM OFF
DEFINE $PIOFF <CALL PIOFF>
PAGE
SUBTTL MISCELLANEOUS MACROS
;MACRO TO BUILD A TABLE OF 8 BIT BYTES
DEFINE TABLE8 (%BB),<
%BB==0
DEFINE B8 (DD),<BYTE (8)'DD,DD+1,DD+2,DD+3>
REPEAT <^D256/4>,<B8(\%BB)
%BB==%BB+4>>
END