Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/debugging-tools/dts/dtsjfn.mac
There are no other files named dtsjfn.mac in the archive.
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1978 BY DIGITAL EQUIPMENT CORPORATION
;
TITLE DTSJFN - GETS A DTS JFN TO DTR IN ANOTHER NODE
SUBTTL SYMBOL DEFINITIONS AND MACROS
SEARCH DTSUNV,MACSYM,MONSYM
SALL
ENTRY DTSJFN ;EXTERNAL ENTRY POINT
ARBSIZ==5 ;SIZE OF ARBITRARY ATTRIBUTE BLOCK
AROPSZ==<<<^D16>*3>/5> ;BUFFER SIZE FOR OPTIONAL DATA STRING
; IN ARBITRARY ATTRIBUTE BLOCK
; MAXIMUM TO ALLOW FOR 16 OCTAL TRIPLETS
ARUISZ==^D16/5 ;NUMBER OF WORDS FOR USER-ID STRING
ARACSZ==^D16/5 ;NUMBER OF WORDS FOR ACCOUNT STRING
ARPWSZ==AROPSZ ;NUMBER OF WORDS FOR PASSWORD STRING
OPDMAX==13 ;MAXIMUM NUMBER OF OPT DATA BYTES
DEFINE CLEAR (ADDR,COUNT),<
SETZM ADDR
MOVE T1,[ADDR,,ADDR+1]
BLT T1,ADDR+COUNT-1
>
PAGE
SUBTTL DTSJFN - MAIN ENTRY POINT AND ROUTINE
;
;ACCEPTS: T1/ ARGUMENT BLOCK ADDRESS
;
; ADDR/ NODE NAME POINTER
; OPT DATA BYTE COUNT
; OPT DATA BYTES
;
; CALL DTSJFN
;
;RETURNS+1: ALWAYS, JFN IN T1
;
DTSJFN: ;MAIN ENTRY POINT
ACVAR <ARGPTR>
MOVE ARGPTR,T1
CLEAR (NODNAM,10)
CLEAR (ARBOPT+1,AROPSZ)
MOVE T2,1(ARGPTR) ;GET OPTIONAL DATA BYTE COUNT
CAIL T2,0
CAILE T2,OPDMAX ;RANGE CHECK THE BYTE COUNT
PRTERR <TOO MANY OPTIONAL DATA BYTES, LIMIT IS 13>,<RET>
MOVE T2,(ARGPTR) ;GET NODE NAME POINTER
HRROI T1,NODNAM
CALL DTSFIL ;MAKE FILE NAME OF FORM "NODE-63"
MOVE T1,[POINT 7,ARBOPT+1] ;MAKE BINARY OPT DATA STRING
SETCM T2,1(ARGPTR)
HRLI ARGPTR,(T2) ;NEG COUNT-1 IN LH
HRRI ARGPTR,1(ARGPTR) ;ADDRESS OF FIRST OPT DATA
GETJF1: ;TOP OF LOOP FOR EACH OPT DATA BYTE
AOBJP ARGPTR,GETJF2 ;DO COUNT TIMES
MOVE T2,(ARGPTR) ;GET NEXT 8 BIT BYTE
CALL BLD8O3 ;MAKE IT OCTAL TRIPLET IN ARB BLOCK
JRST GETJF1
GETJF2:
MOVEI T1,GJFBLK ;GET ADDRESS OF GTJFN ARG BLOCK
SETZI T2,0 ;NO FILE SPEC STRING
GTJFN ;GET A JFN
JSRET (<COULD NOT GET JFN>)
RET ;DONE, RETURN
PAGE
SUBTTL DTSFIL - SET UP NETWORK FILE SPEC FOR DTS
;
;ACCEPTS: T1/ DESTINATION POINTER
; T2/ POINTER TO NODE NAME
;
; CALL DTSFIL
;
;RETURNS+1: ALWAYS, T1 UPDATED, T2 POINTER TO DTR FILE SPEC
;
DTSFIL: ;ENTRY
SETZI T3,0 ;OUTPUT TO NULL
SOUT
HRROI T2,[ASCIZ\-63\] ;PUT IN OBJECT TYPE FOR DTR
SOUT
RET
PAGE
SUBTTL BLD8O3 - BUILD EIGHT BIT OCTAL TRIPLETS
;ACCEPTS: T1/ BYTE POINTER TO DESTINATION
; T2/ 8-BIT VALUE
BLD8O3: ;ENTRY
MOVE T4,[POINT 8,T3,7] ;POINTER TO 8 BIT BYTE LEFT JUSTIFIED IN T3
SETZI T3,0 ;CLEAR WORK SPACE
DPB T2,T4 ;BYTE LEFT JUSTIFIED IN T3
LSH T3,-1 ;NOW 3 OCTAL DIGITS
MOVEI T4,3 ;LOOP COUNT FOR 3 DIGITS
BLD8O1: ;TOP OF LOOP FOR EACH OCTAL DIGIT
SETZI T2,0 ;CLEAR T2
LSHC T2,3 ;GET AN OCTAL DIGIT
ADDI T2,60 ;MAKE IT ASCII
IDPB T2,T1 ;STORE IT
SOJG T4,BLD8O1 ;DONE ?; NO, DO ANOTHER DIGIT
RET ;YES, RETURN
PAGE
SUBTTL LITERAL POOL AND CONSTANTS
LTPOOL: LIT ;BEGINNING OF LITERAL POOL
PAGE
SUBTTL VARIABLE DATA STORAGE
VAR
GJFBLK: ;GTJFN BLOCK
EXP <GJ%XTN> ;FLAGS, EXTENDED BLOCK
EXP <.NULIO,,.NULIO> ;SOURCE, NULL
POINT 7,[ASCIZ\DCN:\] ;DEFAULT DEVICE, DCN:
EXP <0> ;DEFAULT DIRECTORY, NONE
POINT 7,NODNAM ;DEFAULT NAME, LOCAL DTR
EXP <0> ;DEFAULT EXTENSION, NONE
EXP <0> ;DEFAULT PROTECTION, NONE
EXP <0> ;DEFAULT ACCOUNT, NONE
EXP <0> ;JFN TO ASSOCIATE IF GJ%JFN ON
EXP <5> ;EXTENDED ARG BLOCK
EXP <0> ;EXACT COPY POINTER
EXP <0> ;COUNT OF EXACT COPY BYTES
EXP <0> ;CTRL/R POINTER
EXP <0> ;BUFFER POINTER
EXP <ARBBLK> ;ADDRESS OF ARBITRARY ATTRIBUTE BLOCK
ARBBLK: ;ARBITRARY ATTRIBUTE BLOCK
<ARBSIZ> ;LENGTH OF THIS ARBITRARY ATTRIBUTE BLOCK
POINT 7,ARBOPT ;POINTER TO OPTIONAL DATA
POINT 7,ARBUID ;POINTER TO USER ID
POINT 7,ARBACT ;POINTER TO ACCOUNT
POINT 7,ARBPWD ;POINTER TO PASSWORD
NODNAM: BLOCK ^D40/5 ;BUFFER FOR NETWORK NAME
ARBOPT: ASCII/BDAT:/ ;HEADER
BLOCK AROPSZ ;BUFFER FOR OPTIONAL DATA
ARBUID: ASCIZ/USER:DTS/
BLOCK ARUISZ ;BUFFER FOR USER ID
ARBACT: ASCIZ/CHAR:DTS/
BLOCK ARACSZ ;BUFFER FOR ACCOUNT
ARBPWD: ASCIZ/PASS:DTS/
BLOCK ARPWSZ ;BUFFER FOR PASSWORD
END