Trailing-Edge
-
PDP-10 Archives
-
bb-x130a-sb
-
rnxprt.for
There are 4 other files named rnxprt.for in the archive. Click here to see a list.
PROGRAM RNXPRT
C G.M. UHLER/GMU
C
C PROGRAM TO READ THE FILE PRODUCED BY RNXTRC AND PRODUCE A READABLE
C LISTING OF THE DATA. READS DSK:RNXTRC.BIN[-] AND PRODUCES
C DSK:RNXPRT.LOG[-].
C
C COPYRIGHT (C) 1980,1981,1982,1983 BY
C DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
C
C THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
C ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
C INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
C COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
C OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
C TRANSFERRED.
C
C THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
C AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
C CORPORATION.
C
C DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
C SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
IMPLICIT INTEGER (A-Z)
C
PARAMETER RNPVER=1 !MAJOR EDIT NUMBER
PARAMETER RNPMIN=0 !MINOR EDIT NUMBER
PARAMETER RNPEDT=5 !EDIT NUMBER
PARAMETER RNPWHO=0 !WHO LAST EDITED
C
C PARAMETER DEFINITIONS
C
PARAMETER IN=1 !INPUT FILE UNIT
PARAMETER OUT=2 !OUTPUT FILE UNIT
PARAMETER PAGLEN=53 !LENGTH OF A REPORT PAGE
C
C ENTRY HEADER AND BODY OFFSET DEFINITIONS
C
PARAMETER HDRLEN=3 !LENGTH OF ENTRY HEADER
PARAMETER BDYLEN=4 !LENGTH OF LONGEST ENTRY BODY
PARAMETER BPNUM=6 !NUMBER OF BREAKPOINTS (NOT INCLUDING BP77)
PARAMETER BPNTYP=1 !OFFSET OF ENTRY TYPE,,SEQUENCE NUMBER
PARAMETER BPNTIM=2 !OFFSET OF RDTIME VALUE IN MICROSECONDS
PARAMETER BPNCKU=3 !OFFSET OF CPU NUMBER,,KONTROLLER NUMBER
C
DIMENSION HEADER(HDRLEN)
DIMENSION BODY(BDYLEN)
DOUBLE PRECISION OPTEXT
DATA FF/12/ !CODE FOR FORM FEED
C OPEN INPUT AND OUTPUT FILES AND DO INITIALIZATION
OPEN(UNIT=IN,DEVICE='DSK',FILE='RNXTRC.BIN',
1 ACCESS='SEQIN',MODE='IMAGE')
OPEN(UNIT=OUT,DEVICE='DSK',FILE='RNXPRT.LOG',
1 ACCESS='SEQOUT')
LASTIM = 0 !INITIALIZE LAST TIME
PTR = -1 !INITIALIZE ENTRY COUNT
LINCNT = PAGLEN !FORCE INITIAL PAGE HEADER
C READ ONE ENTRY FROM THE INPUT FILE, DO SOME RUDIMENTARY CONSISTENCY
C CHECKS AND DISPATCH TO THE APPROPRIATE ROUTINE FOR THE ENTRY TYPE.
10 READ(IN,END=99999) HEADER, BODY
PTR = PTR + 1
DELTAT = HEADER(BPNTIM) - LASTIM !COMPUTE TIME BETWEEN EVENTS
LASTIM = HEADER(BPNTIM) !UPDATE LAST TIME
KON = HEADER(BPNCKU) .AND. "777777 !ISOLATE THE KONTROLLER NUMBER
CPU = HEADER(BPNCKU) / 2**18 !AND CPU NUMBER
SEQ = HEADER(BPNTYP) .AND. "777777 !ISOLATE SEQUENCE NUMBER
TYPE = HEADER(BPNTYP) / 2**18 !AND TYPE OF ENTRY
IF ((TYPE .LE. 0 .OR. TYPE .GT. BPNUM) .AND.
1 (TYPE .NE. 99)) GOTO 30
LINCNT = LINCNT + 1 !INCREMENT LINE COUNT
IF (LINCNT .LE. PAGLEN) GOTO 20 !IF WE DON'T NEED A HEADER
WRITE(OUT,60000) FF !PUT OUT THE HEADER
LINCNT = 0 !AND RESET THE LINE COUNT
20 IF (TYPE .EQ. 99) GOTO 9900 !GO IF SNOOP. LEVEL DETECTED EXIT
GOTO (100,200,300,400,
1 500,600) TYPE !DISPATCH TO PROCESSING ROUTINE
C HERE IF TYPE IS UNKNOWN
30 TYPE 10000, TYPE, PTR !TELL OF ERROR IN INPUT FILE
GOTO 10 !AND LOOP FOR NEXT
C HERE TO PROCESS A START OPERATION ENTRY WITH THE FOLLOWING SETUP:
C BODY(1) - DATAO TO CONTROL REGISTER OR STCR
C BODY(2) - PHYSICAL BLOCK ON UNIT
C BODY(3) - PHYSICAL UNIT NUMBER
100 OPTEXT = 'Unknown' !ASSUME UNKNOWN OPERATION
OP = BODY(1) .AND. "77 !RIGHT 6 BITS CONTAIN THE OPERATION
IF (OP .EQ. "01) OPTEXT = 'No-op'
IF (OP .EQ. "07) OPTEXT = 'Recal'
IF (OP .EQ. "31) OPTEXT = 'Search'
IF (OP .EQ. "61) OPTEXT = 'Write'
IF (OP .EQ. "63) OPTEXT = 'Write fmt'
IF (OP .EQ. "71) OPTEXT = 'Read'
IF (OP .EQ. "73) OPTEXT = 'Read fmt'
BLKCNT = -(((BODY(1) .AND. "177700)/2**6) .OR.
1 "777777776000) !ISOLATE BLOCK COUNT FROM STCR
IF (OP .LT. "61) BLKCNT = 0 !SET TO 0 IF NOT A TRANSFER
CYL = BODY(2) / 750 !COMPUTE CYLINDER FROM BLOCK
SCT = (MOD(MOD(BODY(2),750),25)) !PLUS SECTOR NUMBER
WRITE (OUT,20000) SEQ, DELTAT, CPU, KON, OPTEXT, BODY(1),
1 BODY(3), BODY(2), CYL, SCT, BLKCNT
GOTO 10
C HERE TO PROCESS AN ASYNCHRONOUS STATUS ENTRY WITH THE FOLLOWING
C SETUP:
C BODY(1) - ASYNCHRONOUS STATUS REGISTER
C BODY(2) - ENDING STATUS,,ERROR REGISTER
C BODY(3) - CHANNEL STATUS,,CONI
C BODY(4) - RNXKON FLAGS WORD
200 UNIT = BODY(1) .AND. "17 !ISOLATE UNIT NUMBER
CONTRL = (BODY(1) .AND. "360)/2**4 !AND CONTROLLER NUMBER
WRITE(OUT,30000) SEQ, DELTAT, CPU, KON, BODY(1), BODY(2),
1 BODY(3), BODY(4), CONTRL, UNIT
GOTO 10
C HERE TO PROCESS AN INTERRUPT ENTRY WITH THE FOLLOWING SETUP:
C BODY(1) - COMMUNICATIONS WORD BETWEEN RNXKON AND FILIO
C BODY(2) - RNXKON FLAGS WORD
C BODY(3) - ENDING STATUS,,ERROR REGISTER
C BODY(4) - CHANNEL STATUS,,CONI
300 OPTEXT = 'Unknown' !ASSUME AN UNKNOWN OPERATION
OP = BODY(1) .AND. "77 !ISOLATE CODE
IF (OP .EQ. 0) OPTEXT = 'Read'
IF (OP .EQ. 1) OPTEXT = 'Write'
IF (OP .EQ. 4) OPTEXT = 'Position'
WRITE(OUT,40000) SEQ, DELTAT, CPU, KON, OPTEXT, BODY(1),
1 BODY(2), BODY(3), BODY(4)
GOTO 10
C HERE TO PROCESS A CONECT STACK ENTRY WITH THE FOLLOWING SETUP:
C BODY(1) - FUNCTION FOR CURRENT OPERATION
C BODY(2) - FLAGS FOR OPERATION CURRENTLY IN PROGRESS
C BODY(3) - PHYSICAL UNIT NUMBER
400 OPTEXT = 'stack' !Assume that this is a stack
IF (BODY(2) .LT. 0 .AND.
1 (BODY(1) .AND. "40) .EQ. 0) OPTEXT = 'toss'
IF (BODY(2) .LT. 0 .AND.
1 (BODY(1) .AND. "40) .NE. 0) OPTEXT = 'crash'
WRITE(OUT,50000) SEQ, DELTAT, CPU, KON, OPTEXT, BODY(1),
1 BODY(3), BODY(2)
GOTO 10
C HERE TO PROCESS A CONECT ERROR RETURN ENTRY WITH THE FOLLOWING
C SETUP:
C BODY(1) - ERROR BITS (KOP???)
C BODY(2) - CONI
C BODY(3) - ENDING STATUS,,ERROR REGISTERS
C BODY(4) - PHYSICAL UNIT NUMBER
500 WRITE(OUT,70000) SEQ, DELTAT, CPU, KON, BODY(1),
1 BODY(2), BODY(3), BODY(4)
GOTO 10
C HERE TO PROCESS A STOP TRANSFER FOR HUNG RECOVERY ENTRY WITH THE
C FOLLOWING SETUP:
C BODY(1) - CONI
600 WRITE(OUT,80000) SEQ, DELTAT, CPU, KON, BODY(1)
GOTO 10
C HERE ON A SNOOP. LEVEL EXIT DETECTED ENTRY. THIS ENTRY IS GENERATED
C WHEN THE SPECIAL BREAKPOINT RNXBPX IS INSERTED TO REQUEST AUTOMATIC
C EXIT OF THE PROGRAM BY THE BACKGROUND TASK. NO FIXED DATA IS
C DEFINED FOR THIS ENTRY, SO WE JUST PRINT THE BODY OF THE ENTRY IN
C OCTAL FOR THIS ONE.
9900 WRITE(OUT,90000) SEQ, DELTAT, CPU, KON, BODY(1),
1 BODY(2), BODY(3), BODY(4)
GOTO 10
C HERE AT END OF INPUT FILE TO WRAP IT UP
99999 CLOSE(UNIT=IN)
CLOSE(UNIT=OUT)
STOP
C FORMATS
10000 FORMAT(' ?Unknown entry type ',I6,', entry number ',I5)
20000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' Sta:',A10,' DATAO: ',O12,
1 ' Unit:',O1,' Blk:',O7,' Cyl:',I4,' Sct:',
1 I2,' Blk cnt:',I4)
30000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' Asy status ASY:',O6,
1 ' ES,,ER:',O12,' CS,,CI:',O12,' Flg:',O12,' Kon:',O2,
2 ' Unit:',O2)
40000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' Int:',A10,' Comm:',O12,' Flg:',
1 O12,' ES,,ER:'O12,' CS,,CI:',O12)
50000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' CONECT ',A7,
1 ' Fnc:',O12,' Unit:',O1,' Flg:',O12)
60000 FORMAT(R1,/,' Seq DeltaT C KN Event ',27X,
1 'Event specific data',/
2 ' ------ ------ - -- --------------',
3 ' --------------------',
4 '------------------------------------------------------')
70000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' CONECT error Bits:',O6,
1 ' CI:',O6,' ES,,ER:',O12,' Unit:',O1)
80000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' Stop transfer CI:',O6)
90000 FORMAT(1X,I6,1X,I6,1X,O1,1X,O2,' RNXBPX exit Data:',
1 4(O12,1X))
END