Google
 

Trailing-Edge - PDP-10 Archives - CFS_TSU04_19910205_1of1 - update/ftncsr/numio1.bli
There are 12 other files named numio1.bli in the archive. Click here to see a list.
!COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1976, 1987
!ALL RIGHTS RESERVED.
!
!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.

! Author: *

MODULE NUMIO(HISEG)=
BEGIN

GLOBAL BIND NUMIOV = #11^24 + 0^18 + 0;		! Version Date: 11-Jun-81

%(

***** Begin Revision History *****

***** End Revision History *****

)%

FORWARD NUMOUT;
EXTERNAL WRITE;
GLOBAL ROUTINE DECOUT(CHNL,WIDTH,VAL)=NUMOUT(.CHNL,.WIDTH,.VAL,10);

GLOBAL ROUTINE OCTOUT(CHNL,WIDTH,VAL)=NUMOUT(.CHNL,.WIDTH,.VAL,8);

GLOBAL ROUTINE BINOUT(CHNL,WIDTH,VAL)=NUMOUT(.CHNL,.WIDTH,.VAL,2);

GLOBAL ROUTINE NUMOUT(CHNL,WIDTH,DATA,BASE)=
%(
       THIS ROUTINE PERFORMS A  NUMERIC-TO-ASCII  CONVERSION  OF  THE
    GIVEN DATA ITEM, WRITING THE VALUE ON THE SPECIFIED CHANNEL. THIS
    IS A SUBSET OF NUMIO0, AND ACCEPTS ONLY ZERO WIDTH SPECIFICATION.
    ANY OTHER WILL BE TREATED AS IF IT WERE ZERO
)%
BEGIN
	LOCAL S;
	IF .DATA LSS 0 THEN (WRITE (.CHNL,"-"); DATA_-.DATA);
	IF .DATA EQL 0 THEN RETURN (WRITE (.CHNL,"0"));
	S_ .DATA MOD .BASE;
	IF (DATA_.DATA/.BASE) NEQ 0 THEN NUMOUT(.CHNL,0,.DATA,.BASE);
	WRITE (.CHNL,.S+"0");
    END;
END ELUDOM