Google
 

Trailing-Edge - PDP-10 Archives - tops10_tools_bb-fp64b-sb - 10,7/mcbda/mdatas.bli
There is 1 other file named mdatas.bli in the archive. Click here to see a list.
MODULE TASK (					!Display task memory.
		IDENT = '003010',
		LANGUAGE (BLISS16, BLISS36)
		) =
BEGIN
!
!			  COPYRIGHT (c) 1977, 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.
!

!++
! FACILITY: MCBDA - MCB Dump Analyzer
!
! ABSTRACT:
!
!	Display the task image for given TCB.
!
! ENVIRONMENT: ANY
!
! AUTHOR: ALAN D. PECKHAM	, CREATION DATE: 19-SEP-78
!
! MODIFIED BY:
!
! 	Alan D. Peckham, 10-Jul-80: VERSION 3
! 01	- Update RSX symbol references.
!--

!
! TABLE OF CONTENTS:
!

FORWARD ROUTINE
    TASK : NOVALUE;				!Dump a task.

!
! INCLUDE FILES:
!

LIBRARY 'MDACOM';				!MDA common definitions.

LIBRARY 'RSXLIB';				!RSX definitions.

!
! MACROS:
!
!
! EQUATED SYMBOLS:
!
!	None
!
! OWN STORAGE:
!
!
! EXTERNAL REFERENCES:
!

EXTERNAL ROUTINE
    GETBYT,					!Get a byte from the dump file.
    GETWRD,					!Get a word from the dump file.
    PUTWND : NOVALUE,				!Display the window blocks.
    PHYAD : NOVALUE,				!Display an 18 bit address.
    MEMDMP : NOVALUE,				!Display a window into memory.
    SKIP : NOVALUE,				!Put a blank line on the listing file.
    SBTTL : NOVALUE;				!Set the listing sub-title.

GLOBAL ROUTINE TASK (TASK_NAME) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
!	NONE
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    MAP
	TASK_NAME : REF VECTOR [2];

    LOCAL
	ENTRY_COUNT,
	TCB_ADDRESS;

    BIND
	NAME_0 = .TASK_NAME [0],
	NAME_1 = .TASK_NAME [1];

    SBTTL (CH$ASCIZ ('TASK DUMP'));

    IF NOT SYMBOL_TABLE ('RSX11S') THEN RETURN;

    ENTRY_COUNT = RSX_MAX_STD;
    TCB_ADDRESS = SYMBOL ($TSKHD) - FL$OFFSET (T_TCBL);

    WHILE GETWRD ((TCB_ADDRESS = GETWRD (.TCB_ADDRESS + FL$OFFSET (T_TCBL))) + FL$OFFSET (T_TCBL)) NEQ 0 DO
	BEGIN

	IF (ENTRY_COUNT = .ENTRY_COUNT - 1) LSS 0
	THEN
	    RETURN PUTLN (1,
		    CH$ASCIZ (WARNING,
			'TCB LIST TOO LONG'));

	IF GETWRD (.TCB_ADDRESS + FL$OFFSET (T_NAM) + 0) EQL NAME_0 AND GETWRD (.TCB_ADDRESS + FL$OFFSET (
		    T_NAM) + 2) EQL NAME_1
	THEN
	    BEGIN

	    IF NOT FL$SET (GETWRD (.TCB_ADDRESS + FL$OFFSET (T_STAT)), TS_OUT)
	    THEN
		BEGIN

		LOCAL
		    HEADER,
		    WINDOW_BLK_ADR,
		    NUM_WINDOWS,
		    WINDOW_NUM;

		HEADER = GETWRD (GETWRD (.TCB_ADDRESS + FL$OFFSET (T_PCB)) + SYMBOL ('P.HDR'));
		PUTLN (3, CH$ASCIZ ('%29STASK DUMP OF %2R'), NAME_0, NAME_1);
		PUTLN (0, CH$ASCIZ ('%29S-------------------'));
		PUTLN (2, CH$ASCIZ ('%14STCB ADDRESS = %P      HEADER ADDRESS = %P'), .TCB_ADDRESS, .HEADER);
		PUTWND (2, .HEADER);
		WINDOW_BLK_ADR = GETWRD (.HEADER + FL$OFFSET (H_WND)) + 2;

		IF (.WINDOW_BLK_ADR NEQ 2) AND ((NUM_WINDOWS = MINU (GETWRD (.WINDOW_BLK_ADR - 2),
			RSX_MAX_WND)) NEQ 0)
		THEN

		    INCR WINDOW_NUM FROM 1 TO .NUM_WINDOWS DO
			BEGIN

			LOCAL
			    PCB_ADDRESS;

			IF (PCB_ADDRESS = GETWRD (.WINDOW_BLK_ADR + FL$OFFSET (W_BPCB))) NEQ 0
			THEN
			    BEGIN

			    LOCAL
				WBLVR,
				WBHVR,
				BIAS,
				SIZE,
				VIRTUAL_ADDRESS : VECTOR [2],
				LOW_PHYSICAL : VECTOR [2],
				HIGH_PHYSICAL : VECTOR [2];

			    WBLVR = GETWRD (.WINDOW_BLK_ADR + FL$OFFSET (W_BLVR));
			    WBHVR = GETWRD (.WINDOW_BLK_ADR + FL$OFFSET (W_BHVR));
			    PUTLN (2, CH$ASCIZ ('%4SWINDOW #%D -- TASK VIRTUAL LIMITS %P-%P'), .WINDOW_NUM,
				.WBLVR, .WBHVR);
			    PUTLN (0, CH$ASCIZ ('%4S----------------------------------------------'));
			    VIRTUAL_ADDRESS [0] = 0;
			    VIRTUAL_ADDRESS [1] = .WBLVR;
			    BIAS = GETWRD (.PCB_ADDRESS + FL$OFFSET (P_REL)) + GETWRD (.WINDOW_BLK_ADR +
				FL$OFFSET (W_BOFF));
			    LOW_PHYSICAL [0] = .BIAS<10, 2>;
			    LOW_PHYSICAL [1] = .BIAS<0, 10>^6;
			    BIAS = .BIAS + (SIZE = .WBHVR - .WBLVR)^-6;
			    HIGH_PHYSICAL [0] = .BIAS<10, 2>;
			    HIGH_PHYSICAL [1] = .BIAS<0, 10>^6 + .SIZE<0, 6>;
			    PUTLN (1, CH$ASCIZ ('%6SPHYSICAL STARTING ADDRESS = %@'), PHYAD, LOW_PHYSICAL);
			    PUTLN (0, CH$ASCIZ ('%6S----------------------------------'));
			    SKIP (2);
			    MEMDMP (VIRTUAL_ADDRESS, LOW_PHYSICAL, HIGH_PHYSICAL);
			    END;

			WINDOW_BLK_ADR = .WINDOW_BLK_ADR + W_BLGH^1;
			END;

		END
	    ELSE
		PUTLN (5, CH$ASCIZ ('%6S> > > > >  TASK "%2R" NOT IN MEMORY'), NAME_0, NAME_1);

	    EXITLOOP;
	    END;

	END;

    END;					!End of TASK

END						!End of module

ELUDOM