Trailing-Edge
-
PDP-10 Archives
-
BB-P363B-SM_1985
-
mcb/cex/c5ta.lst
There are 2 other files named c5ta.lst in the archive. Click here to see a list.
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 1
30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (1)
; 0001 MODULE C5TA ( !Convert RAD50 to ASCII
; 0002 IDENT = '001010',
; 0003 LANGUAGE (BLISS16, BLISS36) %BLISS36 (, ENTRY ($C5TA))
; 0004 ) =
; 0005 BEGIN
; 0006 !
; 0007 !
; 0008 !
; 0009 ! COPYRIGHT (c) 1980, 1981, 1982
; 0010 ! DIGITAL EQUIPMENT CORPORATION
; 0011 ! Maynard, Massachusetts
; 0012 !
; 0013 ! This software is furnished under a license and may be used
; 0014 ! and copied only in accordance with the terms of such license
; 0015 ! and with the inclusion of the above copyright notice. This
; 0016 ! software or any other copies thereof may not be provided or
; 0017 ! otherwise made available to any other person. No title to
; 0018 ! and ownership of the software is hereby transferred.
; 0019 !
; 0020 ! The information in this software is subject to change
; 0021 ! without notice and should not be construed as a commitment
; 0022 ! by DIGITAL EQUIPMENT CORPORATION.
; 0023 !
; 0024 ! DIGITAL assumes no responsibility for the use or reliability
; 0025 ! of its software on equipment which is not supplied by
; 0026 ! DIGITAL.
; 0027 !
; 0028
; 0029 !++
; 0030 ! FACILITY: SYSTEM LIBRARY
; 0031 !
; 0032 ! ABSTRACT:
; 0033 !
; 0034 !
; 0035 ! THIS MODULE CONTAINS RAD50 TO ASCII CONVERION.
; 0036 !
; 0037 !
; 0038 ! ENVIRONMENT: ANY
; 0039 !
; 0040 ! AUTHOR: ALAN D. PECKHAM, CREATION DATE: 25-AUG-78
; 0041 !
; 0042 ! MODIFIED BY:
; 0043 !
; 0044 ! , : VERSION
; 0045 ! 01 -
; 0046 !--
; 0047
; 0048 !
; 0049 ! TABLE OF CONTENTS:
; 0050 !
; 0051
; 0052 FORWARD ROUTINE
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 2
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (1)
; 0053 $C5TA, !Convert RAD50 to 3-character ASCII
; 0054 CVTC; !RAD50 conversion sub-routine
; 0055
; 0056 !
; 0057 ! INCLUDE FILES
; 0058 !
; 0059 ! NONE
; 0060 !
; 0061 ! MACROS:
; 0062 !
; 0063 ! NONE
; 0064 !
; 0065 ! EQUATED SYMBOLS:
; 0066 !
; 0067 ! NONE
; 0068 !
; 0069 ! OWN STORAGE:
; 0070 !
; 0071 ! NONE
; 0072 !
; 0073 ! EXTERNAL REFERENCES:
; 0074 !
; 0075 ! NONE
; 0076 !
; 0077 !<BLF/PAGE>
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 3
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (2)
; 0078
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 4
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (3)
; 0079 GLOBAL ROUTINE $C5TA (BUF_PTR_ADR, VALUE) =
; 0080
; 0081 !++
; 0082 ! FUNCTIONAL DESCRIPTION:
; 0083 !
; 0084 !
; 0085 !
; 0086 !
; 0087 ! FORMAL PARAMETERS:
; 0088 !
; 0089 ! .BUF_PTR_ADR !Address of character sequence
; 0090 ! !pointer to buffer to receive
; 0091 ! !text.
; 0092 ! .VALUE !The value to convert.
; 0093 !
; 0094 ! IMPLICIT INPUTS:
; 0095 !
; 0096 ! NONE
; 0097 !
; 0098 ! IMPLICIT OUTPUTS:
; 0099 !
; 0100 ! The buffer pointer ..BUF_PTR_ADR is updated to point past
; 0101 ! the information inserted.
; 0102 !
; 0103 ! ROUTINE VALUE:
; 0104 !
; 0105 ! A count of the number of characters inserted is returned.
; 0106 !
; 0107 ! SIDE EFFECTS
; 0108 !
; 0109 ! NONE
; 0110 !
; 0111 !--
; 0112
; 0113 BEGIN
; 0114
; 0115 LOCAL
; 0116 BUF_PTR,
; 0117 CHAR : VECTOR [3], !Temporary holding area for characters
; 0118 CHAR_ADR, !Current character being worked on
; 0119 WORKING_VALUE;
; 0120
; 0121 BUF_PTR = ..BUF_PTR_ADR;
; 0122 WORKING_VALUE = .VALUE;
; 0123
; 0124 INCRA CHAR_ADR FROM CHAR [0] TO CHAR [2] DO !Extract 3 characters
; 0125 .CHAR_ADR = CVTC (WORKING_VALUE); !from the given binary word
; 0126
; 0127 DECRA CHAR_ADR FROM CHAR [2] TO CHAR [0] DO !and place them in the output buffer
; 0128 CH$WCHAR_A (..CHAR_ADR, BUF_PTR); !in reverse order.
; 0129
; 0130 .BUF_PTR_ADR = .BUF_PTR; !Return updated buffer pointer
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 5
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (3)
; 0131 3 !and number of characters converted.
; 0132 END; !OF $C5TA
.TITLE C5TA
.IDENT /001010/
.SBTTL $C5TA
000000 .PSECT $CODE$, RO
000000 004167 000000G $C5TA:: JSR R1,$SAVE3 ; 0079
000004 162706 000006 SUB #6,SP
000010 017603 000022 MOV @22(SP),R3 ; BUF.PTR.ADR,BUF.PTR 0121
000014 016646 000020 MOV 20(SP),-(SP) ; VALUE,WORKING.VALUE 0122
000020 012702 000002 MOV #2,R2 ; 0124
000024 060602 ADD SP,R2 ; CHAR,*
000026 012701 000006 MOV #6,R1
000032 060601 ADD SP,R1 ; CHAR+4,*
000034 000410 BR 2$
000036 012746 000002 1$: MOV #2,-(SP) ; 0125
000042 060616 ADD SP,(SP) ; WORKING.VALUE,*
000044 004767 000000V JSR PC,CVTC
000050 010012 MOV R0,(R2) ; *,CHAR.ADR
000052 005726 TST (SP)+
000054 005202 INC R2 ; CHAR.ADR 0124
000056 020201 2$: CMP R2,R1 ; CHAR.ADR,*
000060 101766 BLOS 1$
000062 012702 000006 MOV #6,R2 ; 0127
000066 060602 ADD SP,R2 ; CHAR+4,*
000070 012700 000002 MOV #2,R0
000074 060600 ADD SP,R0 ; CHAR,*
000076 000402 BR 4$
000100 111223 3$: MOVB (R2),(R3)+ ; CHAR.ADR,BUF.PTR 0128
000102 005302 DEC R2 ; CHAR.ADR 0127
000104 020200 4$: CMP R2,R0 ; CHAR.ADR,*
000106 103374 BHIS 3$
000110 010376 000024 MOV R3,@24(SP) ; BUF.PTR,BUF.PTR.ADR 0130
000114 012700 000003 MOV #3,R0 ; 0079
000120 062706 000010 ADD #10,SP
000124 000207 RTS PC
; Routine Size: 43 words, Routine Base: $CODE$ + 0000
; Maximum stack depth per invocation: 10 words
; 0133
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 6
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (4)
; 0134 ROUTINE CVTC (VALUE_ADR) = !Reduce RAD50 value to components
; 0135
; 0136 !++
; 0137 ! FUNCTIONAL DESCRIPTION:
; 0138 !
; 0139 !
; 0140 !
; 0141 !
; 0142 ! FORMAL PARAMETERS:
; 0143 !
; 0144 ! .VALUE_ADR !Address of RAD50 value to reduce
; 0145 !
; 0146 ! IMPLICIT INPUTS:
; 0147 !
; 0148 ! NONE
; 0149 !
; 0150 ! IMPLICIT OUTPUTS:
; 0151 !
; 0152 ! ..VALUE_ADR !Returned with one character removed
; 0153 !
; 0154 ! ROUTINE VALUE:
; 0155 !
; 0156 ! The next character extracted from ..VALUE_ADR
; 0157 !
; 0158 ! SIDE EFFECTS
; 0159 !
; 0160 ! NONE
; 0161 !
; 0162 !--
; 0163
; 0164 BEGIN
; 0165
; 0166 LOCAL
; 0167 CHAR; !Intermidediate character value
; 0168
; 0169 CHAR = ..VALUE_ADR MOD 40; !Pull the next character
; 0170 .VALUE_ADR = ..VALUE_ADR/40; !And divide it out.
; 0171
; 0172 SELECTONE .CHAR OF
; 0173 SET
; 0174
; 0175 [0] :
; 0176 %C' ';
; 0177
; 0178 [1 TO 26] :
; 0179 %C'A' + .CHAR - 1;
; 0180
; 0181 [27] :
; 0182 %C'$';
; 0183
; 0184 [28] :
; 0185 %C'.';
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 7
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (4)
; 0186
; 0187 [30 TO 39] :
; 0188 %C'0' + .CHAR - 30;
; 0189
; 0190 [OTHERWISE] :
; 0191 %C'_';
; 0192 TES
; 0193
; 0194 END; !OF CVTC
.SBTTL CVTC
000000 004167 000000G CVTC: JSR R1,$SAVE2 ; 0134
000004 017601 000010 MOV @10(SP),R1 ; VALUE.ADR,* 0169
000010 006700 SXT R0
000012 071027 000050 DIV #50,R0
000016 010102 MOV R1,R2 ; *,CHAR
000020 017601 000010 MOV @10(SP),R1 ; VALUE.ADR,* 0170
000024 006700 SXT R0
000026 071027 000050 DIV #50,R0
000032 010076 000010 MOV R0,@10(SP) ; *,VALUE.ADR
000036 005702 TST R2 ; CHAR 0172
000040 001003 BNE 1$
000042 012700 000040 MOV #40,R0
000046 000207 RTS PC
000050 003407 1$: BLE 2$
000052 020227 000032 CMP R2,#32 ; CHAR,*
000056 003004 BGT 2$
000060 010200 MOV R2,R0 ; CHAR,* 0179
000062 062700 000100 ADD #100,R0
000066 000207 RTS PC ; 0172
000070 020227 000033 2$: CMP R2,#33 ; CHAR,*
000074 001003 BNE 3$
000076 012700 000044 MOV #44,R0
000102 000207 RTS PC
000104 020227 000034 3$: CMP R2,#34 ; CHAR,*
000110 001003 BNE 4$
000112 012700 000056 MOV #56,R0
000116 000207 RTS PC
000120 020227 000036 4$: CMP R2,#36 ; CHAR,*
000124 002407 BLT 5$
000126 020227 000047 CMP R2,#47 ; CHAR,*
000132 003004 BGT 5$
000134 062702 000022 ADD #22,R2 ; *,CHAR 0188
000140 010200 MOV R2,R0 ; 0172
000142 000207 RTS PC
000144 012700 000137 5$: MOV #137,R0
000150 000207 RTS PC ; 0134
; Routine Size: 53 words, Routine Base: $CODE$ + 0126
; Maximum stack depth per invocation: 4 words
; 0195 END
C5TA 28-May-1985 14:28:56 TOPS-20 Bliss-16 2A(530) Page 8
001010 30-Dec-1982 17:28:05 DNET61:<MCB.UTILITIES>C5TA.BLI.1 (4)
; 0196
; 0197 ELUDOM
; OTS external references
.GLOBL $SAVE3, $SAVE2
; PSECT SUMMARY
;
; Psect Name Words Attributes
; $CODE$ 96 RO , I , LCL, REL, CON
; Size: 96 code + 0 data words
; Run Time: 00:01.5
; Elapsed Time: 00:25.5
; Memory Used: 6 pages
; Compilation Complete