Trailing-Edge
-
PDP-10 Archives
-
ap-c800d-sb
-
ebcasc.mac
There are 7 other files named ebcasc.mac in the archive. Click here to see a list.
TITLE EBCASC EBCDIC TO ASCII CONVERSION TABLE.
SUBTTL /ACK
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1975, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH P
%%P==:%%P
DEBUG==:DEBUG
SEARCH CHREQV ;DEFINE THE CHARACTER EQUIVALENCES.
;EDITS:
;V10********************
;NAME DATE COMMENTS
;ACK 22-APR-75 CREATION.
;***********************
HISEG
SALL
.XCREF
ENTRY EBASC.
COMMENT \
THIS MODULE CONTAINS THE CONVERSION TABLE FOR CONVERTING EBCDIC
CHARACTERS TO ASCII.
THE TABLE IS STRUCTURD AS FOLLOWS:
WORD EBASC.+N CONTAINS:
IN BITS THE EBCDIC CHARACTER EQUIVALENT TO THE
ASCII CHARACTER WHOSE VALUE IS
0-8 N*4
9-17 N*4+1
18-26 N*4+2
27-35 N*4+3
GIVEN AN EBCDIC CHARACTER IN TAC1 THE FOLLOWING CODE COULD BE
USED TO CONVERT IT TO ASCII:
ROT TAC1, -2
JUMPL TAC1, .+3
HLR TAC1, EBASC.##(TAC1)
CAIA
HRL TAC1, EBASC.##(TAC1)
TLNN TAC1, (1B1)
LSH TAC1, -^D9
\
;MACROS USED TO GENERATE THE TABLE.
DEFINE X0 (I)<
I0=I
I1==I+1
I2==I+2
I3==I+3
X1 \I0,\I1,\I2,\I3
> ;END OF DEFINITION OF X0.
DEFINE X1 (I0,I1,I2,I3)<BYTE (9)EA%'I0,EA%'I1,EA%'I2,EA%'I3>
DEFINE TBLGEN<
IFE DEBUG,<XLIST> ;;DON'T LIST THE TABLE UNLESS WE
;; ARE DEBUGGING IT.
I==0
REPEAT 100,<
X0 I
I==I+4
> ;END OF REPEAT 40.
LIST
> ;END OF DEFINITION OF TBLGEN.
;GENERATE THE TABLE.
.CREF
EBASC.: BLOCK 0
.XCREF
TBLGEN
END