Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/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) 1980, 1981, 1982
!                    DIGITAL EQUIPMENT CORPORATION
!                        Maynard, Massachusetts
!
!     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