Google
 

Trailing-Edge - PDP-10 Archives - TOPS-20_V6.1_DECnetSrc_7-23-85 - mcb/utilities/c5ta.lst
There are 2 other files named c5ta.lst in the archive. Click here to see a list.
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   1
								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (1)

;   0001  0	MODULE C5TA (					!Convert RAD50 to ASCII
;   0002  0			IDENT = '001010',
;   0003  0			LANGUAGE (BLISS16, BLISS36) %BLISS36 (, ENTRY ($C5TA))
;   0004  0			) =
;   0005  1	BEGIN
;   0006  1	!
;   0007  1	!
;   0008  1	!
;   0009  1	!                    COPYRIGHT (c) 1980, 1981, 1982
;   0010  1	!                    DIGITAL EQUIPMENT CORPORATION
;   0011  1	!                        Maynard, Massachusetts
;   0012  1	!
;   0013  1	!     This software is furnished under a license and may  be  used
;   0014  1	!     and copied only in accordance with the terms of such license
;   0015  1	!     and with the inclusion of the above copyright notice.   This
;   0016  1	!     software  or any other copies thereof may not be provided or
;   0017  1	!     otherwise made available to any other person.  No  title  to
;   0018  1	!     and ownership of the software is hereby transferred.
;   0019  1	!
;   0020  1	!     The information  in  this  software  is  subject  to  change
;   0021  1	!     without  notice  and should not be construed as a commitment
;   0022  1	!     by DIGITAL EQUIPMENT CORPORATION.
;   0023  1	!
;   0024  1	!     DIGITAL assumes no responsibility for the use or reliability
;   0025  1	!     of  its  software  on  equipment  which  is  not supplied by
;   0026  1	!     DIGITAL.
;   0027  1	!
;   0028  1	
;   0029  1	!++
;   0030  1	! FACILITY: SYSTEM LIBRARY
;   0031  1	!
;   0032  1	! ABSTRACT:
;   0033  1	!
;   0034  1	!
;   0035  1	! THIS MODULE CONTAINS RAD50 TO ASCII CONVERION.
;   0036  1	!
;   0037  1	!
;   0038  1	! ENVIRONMENT: ANY
;   0039  1	!
;   0040  1	! AUTHOR: ALAN D. PECKHAM, CREATION DATE: 25-AUG-78
;   0041  1	!
;   0042  1	! MODIFIED BY:
;   0043  1	!
;   0044  1	!	, : VERSION
;   0045  1	! 01	-
;   0046  1	!--
;   0047  1	
;   0048  1	!
;   0049  1	! TABLE OF CONTENTS:
;   0050  1	!
;   0051  1	
;   0052  1	FORWARD ROUTINE
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   2
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (1)

;   0053  1	    $C5TA,					!Convert RAD50 to 3-character ASCII
;   0054  1	    CVTC;					!RAD50 conversion sub-routine
;   0055  1	
;   0056  1	!
;   0057  1	! INCLUDE FILES
;   0058  1	!
;   0059  1	!	NONE
;   0060  1	!
;   0061  1	! MACROS:
;   0062  1	!
;   0063  1	!	NONE
;   0064  1	!
;   0065  1	! EQUATED SYMBOLS:
;   0066  1	!
;   0067  1	!	NONE
;   0068  1	!
;   0069  1	! OWN STORAGE:
;   0070  1	!
;   0071  1	!	NONE
;   0072  1	!
;   0073  1	! EXTERNAL REFERENCES:
;   0074  1	!
;   0075  1	!	NONE
;   0076  1	!
;   0077  1	!<BLF/PAGE>
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   3
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (2)

;   0078  1	
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   4
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (3)

;   0079  1	GLOBAL ROUTINE $C5TA (BUF_PTR_ADR, VALUE) =
;   0080  1	
;   0081  1	!++
;   0082  1	! FUNCTIONAL DESCRIPTION:
;   0083  1	!
;   0084  1	!
;   0085  1	!
;   0086  1	!
;   0087  1	! FORMAL PARAMETERS:
;   0088  1	!
;   0089  1	!	.BUF_PTR_ADR				!Address of character sequence
;   0090  1	!						!pointer to buffer to receive
;   0091  1	!						!text.
;   0092  1	!	.VALUE					!The value to convert.
;   0093  1	!
;   0094  1	! IMPLICIT INPUTS:
;   0095  1	!
;   0096  1	!	NONE
;   0097  1	!
;   0098  1	! IMPLICIT OUTPUTS:
;   0099  1	!
;   0100  1	!	The buffer pointer ..BUF_PTR_ADR is updated to point past
;   0101  1	!	the information inserted.
;   0102  1	!
;   0103  1	! ROUTINE VALUE:
;   0104  1	!
;   0105  1	!	A count of the number of characters inserted is returned.
;   0106  1	!
;   0107  1	! SIDE EFFECTS
;   0108  1	!
;   0109  1	!	NONE
;   0110  1	!
;   0111  1	!--
;   0112  1	
;   0113  2	    BEGIN
;   0114  2	
;   0115  2	    LOCAL
;   0116  2		BUF_PTR,
;   0117  2		CHAR : VECTOR [3],			!Temporary holding area for characters
;   0118  2		CHAR_ADR,				!Current character being worked on
;   0119  2		WORKING_VALUE;
;   0120  2	
;   0121  2	    BUF_PTR = ..BUF_PTR_ADR;
;   0122  2	    WORKING_VALUE = .VALUE;
;   0123  2	
;   0124  2	    INCRA CHAR_ADR FROM CHAR [0] TO CHAR [2] DO 	!Extract 3 characters
;   0125  2		.CHAR_ADR = CVTC (WORKING_VALUE);	!from the given binary word
;   0126  2	
;   0127  2	    DECRA CHAR_ADR FROM CHAR [2] TO CHAR [0] DO 	!and place them in the output buffer
;   0128  2		CH$WCHAR_A (..CHAR_ADR, BUF_PTR);	!in reverse order.
;   0129  2	
;   0130  2	    .BUF_PTR_ADR = .BUF_PTR;			!Return updated buffer pointer
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   5
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (3)

;   0131  2	    3						!and number of characters converted.
;   0132  1	    END;					!OF $C5TA


	TITLE	C5TA
	TWOSEG


	ENTRY	$C5TA


	.REQUEST  SYS:B362LB.REL


AC0=	0
AC1=	1
AC2=	2
AC3=	3
AC4=	4
AC5=	5
AC6=	6
AC7=	7
AC10=	10
AC11=	11
AC12=	12
AC13=	13
AC14=	14
FP=	15
AC16=	16
SP=	17


	RELOC	400000				;					400000'
$C5TA:: PUSH	SP,AC13				; SP,AC13				400000' 261 17 0 00 000013		0079
	PUSH	SP,AC14				; SP,AC14				400001' 261 17 0 00 000014
	PUSH	SP,AC16				; SP,AC16				400002' 261 17 0 00 000016
	ADJSP	SP,4				; SP,4					400003' 105 17 0 00 000004
	MOVE	AC1,-11(SP)			; AC1,BUF_PTR_ADR			400004' 200 01 0 17 777767		0121
	MOVE	AC13,0(AC1)			; BUF_PTR,0(AC1)			400005' 200 13 0 01 000000
	MOVE	AC1,-10(SP)			; AC1,VALUE				400006' 200 01 0 17 777770		0122
	MOVEM	AC1,0(SP)			; AC1,WORKING_VALUE			400007' 202 01 0 17 000000
	MOVEI	AC16,-3(SP)			; AC16,CHAR				400010' 201 16 0 17 777775		0124
	MOVEI	AC1,-3(SP)			; AC1,CHAR				400011' 201 01 0 17 777775
	MOVE	AC14,AC1			; AC14,AC1				400012' 200 14 0 00 000001
	ADDI	AC14,2				; AC14,2				400013' 271 14 0 00 000002
	JRST	L.2				; L.2					400014' 254 00 0 00 400023'
L.1:	MOVEI	AC1,0(SP)			; AC1,WORKING_VALUE			400015' 201 01 0 17 000000		0125
	PUSH	SP,AC1				; SP,AC1				400016' 261 17 0 00 000001
	PUSHJ	SP,CVTC				; SP,CVTC				400017' 260 17 0 00 000000V
	MOVEM	AC1,0(AC16)			; AC1,0(CHAR_ADR)			400020' 202 01 0 16 000000
	ADJSP	SP,-1				; SP,-1					400021' 105 17 0 00 777777
	ADDI	AC16,1				; CHAR_ADR,1				400022' 271 16 0 00 000001		0124
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   6
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (3)

L.2:	CAMG	AC16,AC14			; CHAR_ADR,AC14				400023' 317 16 0 00 000014
	JRST	L.1				; L.1					400024' 254 00 0 00 400015'
	MOVEI	AC3,-3(SP)			; AC3,CHAR				400025' 201 03 0 17 777775		0127
	MOVE	AC1,AC14			; CHAR_ADR,AC14				400026' 200 01 0 00 000014
	JRST	L.4				; L.4					400027' 254 00 0 00 400033'
L.3:	MOVE	AC2,0(AC1)			; AC2,0(CHAR_ADR)			400030' 200 02 0 01 000000		0128
	IDPB	AC2,AC13			; AC2,BUF_PTR				400031' 136 02 0 00 000013
	SUBI	AC1,1				; CHAR_ADR,1				400032' 275 01 0 00 000001		0127
L.4:	CAML	AC1,AC3				; CHAR_ADR,AC3				400033' 311 01 0 00 000003
	JRST	L.3				; L.3					400034' 254 00 0 00 400030'
	MOVE	AC1,-11(SP)			; AC1,BUF_PTR_ADR			400035' 200 01 0 17 777767		0130
	MOVEM	AC13,0(AC1)			; BUF_PTR,0(AC1)			400036' 202 13 0 01 000000
	MOVEI	AC1,3				; AC1,3					400037' 201 01 0 00 000003		0079
	ADJSP	SP,-4				; SP,-4					400040' 105 17 0 00 777774
	POP	SP,AC16				; SP,AC16				400041' 262 17 0 00 000016
	POP	SP,AC14				; SP,AC14				400042' 262 17 0 00 000014
	POP	SP,AC13				; SP,AC13				400043' 262 17 0 00 000013
	POPJ	SP,				; SP,					400044' 263 17 0 00 000000

; Routine Size:  37 words


;   0133  1	
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   7
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (4)

;   0134  1	ROUTINE CVTC (VALUE_ADR) = 			!Reduce RAD50 value to components
;   0135  1	
;   0136  1	!++
;   0137  1	! FUNCTIONAL DESCRIPTION:
;   0138  1	!
;   0139  1	!
;   0140  1	!
;   0141  1	!
;   0142  1	! FORMAL PARAMETERS:
;   0143  1	!
;   0144  1	!	.VALUE_ADR				!Address of RAD50 value to reduce
;   0145  1	!
;   0146  1	! IMPLICIT INPUTS:
;   0147  1	!
;   0148  1	!	NONE
;   0149  1	!
;   0150  1	! IMPLICIT OUTPUTS:
;   0151  1	!
;   0152  1	!	..VALUE_ADR				!Returned with one character removed
;   0153  1	!
;   0154  1	! ROUTINE VALUE:
;   0155  1	!
;   0156  1	!	The next character extracted from ..VALUE_ADR
;   0157  1	!
;   0158  1	! SIDE EFFECTS
;   0159  1	!
;   0160  1	!	NONE
;   0161  1	!
;   0162  1	!--
;   0163  1	
;   0164  2	    BEGIN
;   0165  2	
;   0166  2	    LOCAL
;   0167  2		CHAR;					!Intermidediate character value
;   0168  2	
;   0169  2	    CHAR = ..VALUE_ADR MOD 40;			!Pull the next character
;   0170  2	    .VALUE_ADR = ..VALUE_ADR/40;		!And divide it out.
;   0171  2	
;   0172  2	    SELECTONE .CHAR OF
;   0173  2		SET
;   0174  2	
;   0175  2		[0] :
;   0176  2		    %C' ';
;   0177  2	
;   0178  2		[1 TO 26] :
;   0179  2		    %C'A' + .CHAR - 1;
;   0180  2	
;   0181  2		[27] :
;   0182  2		    %C'$';
;   0183  2	
;   0184  2		[28] :
;   0185  2		    %C'.';
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   8
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (4)

;   0186  2	
;   0187  2		[30 TO 39] :
;   0188  2		    %C'0' + .CHAR - 30;
;   0189  2	
;   0190  2		[OTHERWISE] :
;   0191  2		    %C'_';
;   0192  2		TES
;   0193  2	
;   0194  1	    END;					!OF CVTC


CVTC:	MOVE	AC4,-1(SP)			; AC4,VALUE_ADR				400045' 200 04 0 17 777777		0169
	MOVE	AC1,0(AC4)			; AC1,0(AC4)				400046' 200 01 0 04 000000
	IDIVI	AC1,50				; AC1,50				400047' 231 01 0 00 000050
	MOVE	AC3,AC2				; CHAR,AC2				400050' 200 03 0 00 000002
	MOVE	AC1,0(AC4)			; AC1,0(AC4)				400051' 200 01 0 04 000000		0170
	IDIVI	AC1,50				; AC1,50				400052' 231 01 0 00 000050
	MOVEM	AC1,0(AC4)			; AC1,0(AC4)				400053' 202 01 0 04 000000
	JUMPN	AC3,L.5				; CHAR,L.5				400054' 326 03 0 00 400057'		0175
	MOVEI	AC1,40				; AC1,40				400055' 201 01 0 00 000040		0172
	POPJ	SP,				; SP,					400056' 263 17 0 00 000000
L.5:	JUMPLE	AC3,L.6				; CHAR,L.6				400057' 323 03 0 00 400065'		0178
	CAILE	AC3,32				; CHAR,32				400060' 303 03 0 00 000032
	JRST	L.6				; L.6					400061' 254 00 0 00 400065'
	MOVE	AC1,AC3				; AC1,CHAR				400062' 200 01 0 00 000003		0179
	ADDI	AC1,100				; AC1,100				400063' 271 01 0 00 000100
	POPJ	SP,				; SP,					400064' 263 17 0 00 000000		0172
L.6:	CAIE	AC3,33				; CHAR,33				400065' 302 03 0 00 000033		0181
	JRST	L.7				; L.7					400066' 254 00 0 00 400071'
	MOVEI	AC1,44				; AC1,44				400067' 201 01 0 00 000044		0172
	POPJ	SP,				; SP,					400070' 263 17 0 00 000000
L.7:	CAIE	AC3,34				; CHAR,34				400071' 302 03 0 00 000034		0184
	JRST	L.8				; L.8					400072' 254 00 0 00 400075'
	MOVEI	AC1,56				; AC1,56				400073' 201 01 0 00 000056		0172
	POPJ	SP,				; SP,					400074' 263 17 0 00 000000
L.8:	CAIL	AC3,36				; CHAR,36				400075' 301 03 0 00 000036		0187
	CAILE	AC3,47				; CHAR,47				400076' 303 03 0 00 000047
	JRST	L.9				; L.9					400077' 254 00 0 00 400103'
	MOVE	AC1,AC3				; AC1,CHAR				400100' 200 01 0 00 000003		0188
	ADDI	AC1,22				; AC1,22				400101' 271 01 0 00 000022
	POPJ	SP,				; SP,					400102' 263 17 0 00 000000		0172
L.9:	MOVEI	AC1,137				; AC1,137				400103' 201 01 0 00 000137
	POPJ	SP,				; SP,					400104' 263 17 0 00 000000		0134

; Routine Size:  32 words


;   0195  1	END
;   0196  1	
;   0197  0	ELUDOM
C5TA								12-Apr-1985 07:08:58	TOPS-20 Bliss-36 4A(225)	    Page   9
001010								30-Dec-1982 17:28:05	DNET61:<DECNET.UTILITIES>C5TA.BLI.1 (4)



; Low  segment length:       0 words
; High segment length:      69 words





; Size:		69 code + 0 data words
; Run Time:	   00:01.5
; Elapsed Time:	   00:05.4
; Lines/CPU Min:    7981
; Lexemes/CPU-Min: 13693
; Memory Used:	5 pages
; Compilation Complete