Google
 

Trailing-Edge - PDP-10 Archives - BB-X117B-SB_1986 - 10,7/nml/nmuutl.bli
There are 2 other files named nmuutl.bli in the archive. Click here to see a list.
module NMUUTL	(
		ident = 'X03.00'
		) =
begin

!
!			  COPYRIGHT (c) 1981 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:	
!
! ABSTRACT:
!
!	This module contains miscellaneous utility routines which may be
!	called anywhere within NCP, NML, or NMU.
!
! ENVIRONMENT:	
!
! AUTHOR: Dale C. Gunn , CREATION DATE:  2-Jul-81
!
! MODIFIED BY:
!
!	, : VERSION
! 01	-
!--
!
! INCLUDE FILES:
!

library 'NMULIB' ;

!
! TABLE OF CONTENTS
!

forward routine
	NMU$UTILITY_BUFFER_TEXT : novalue;

!
! MACROS:
!

!
! EQUATED SYMBOLS:
!

!
! OWN STORAGE:
!

!
! EXTERNAL REFERENCES:
!

%global_routine ('NMU$UTILITY_BUFFER_TEXT', BIAS, PTR, LNG) : novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This module produces a formatted text string of the contents
!       of an 8 bit message buffer. Eight 8 bit bytes are produced
!       per text line. The byte offset into the buffer is printed
!       as six octal characters at the start of each line. The contents
!       of the buffer are then printed as both octal triplets and
!       converted to ASCII text. Unprintable characters are printed as
!       spaces in the text portion. The text portion of the line is
!       enclosed in asterisks (*).
!
! FORMAL PARAMETERS:
!
!	BIAS ->	A BLISS value which represents a byte offset into the 
!		beginning of the buffer to be displayed.
!
!	PTR ->	A character string pointer to the buffer to be displayed
!
!	LNG ->	A BLISS value which represents the number of bytes
!		to be displayed.
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS
!
!	NONE
!
!--

    BEGIN

    external
            TRACE_BUFFER ;

    external routine
             SS_MESSAGE,                ! System specific message output
             NMU$TEXT;                  ! Text utility routine

    local
        TEXT_POINTER,                   ! Pointer to TRACE text buffer
	COUNT;                          ! Number of bytes for this line.

    while (COUNT = min (.LNG, 8)) gtr 0 do
	begin
        TEXT_POINTER = ch$ptr (TRACE_BUFFER);
	$NMU$TEXT (TEXT_POINTER,
                   TRACE_BUFFER_LENGTH,
                   '%(6)P  %#(32L)B%2-  *%#(8L)E*',
                   .BIAS,
                   .COUNT,
                   .PTR) ;
        SS_MESSAGE (ch$ptr(TRACE_BUFFER));      ! Write the trace text
	PTR = ch$plus(.PTR,.COUNT) ;    ! Bump pointer
	BIAS = .BIAS + .COUNT ;
	LNG = .LNG - .COUNT;
	end;

    end;                        !End of NMU$UTILITY_BUFFER_TEXT
END				!End of Module NMUUTL
ELUDOM