Google
 

Trailing-Edge - PDP-10 Archives - BB-X140B-BB_1986 - 10,7/703anf/dn2741.p11
There are 2 other files named dn2741.p11 in the archive. Click here to see a list.
.SBTTL	DN2741 - 2741 ROUTINES  28 MAR 79

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1984 BY DIGITAL EQUIPMENT CORP., MAYNARD, MASS.

VR2741=007			;FILE EDIT NUMBER

.SBTTL	2741 TRANSLATION TABLES

.IF NE FT2741
;TRANSLATION TABLES
; BIT 200 MEANS SPECIAL ACTION FOR TIDY CASE
; BIT 100 IS UPSHIFT
; BITS 77 ARE CHARACTER
	STDALT=033	;STANDARD VALUE FOR ALTMODE
	QUOTE=47	;ASCII CODE FOR A SINGLE QUOTE
	BELL=7		;ASCII CODE FOR BELL
	ARROW=136	;ASCII CODE FOR UP ARROW
	BCDEOT=174	;END OF MESSAGE
	BCDEOA=64	;END OF ADDRESS(START OF MESSAGE)
	BCDUCS=034	;UP SHIFT
	BCDLCS=037	;DOWN SHIFT
	BCDCRL=155	;CARRIAGE RETURN
	BCDSPC=000	;SPACE

;THE FOLLOWING DEFINES SOME BCD CODES
; OTHERS COULD BE SUBSTITUTED
;
; COLUMN 1 IS ASCII EQUIVALENT
; COLUMN 2 IS APL(CORRESPONDENCE) - ELEMENT 987
; COLUMN 3 IS CORRESPONDENCE - ELEMENT 029
; COLUMN 4 IS CALL 360 BASIC - ELEMENT 087
; COLUMN 5 IS EBCD - ELEMENT 963
; COLUMN 6 IS APL(EBCD) - ELEMENT 988
; COLUMN 7 IS BCD - ELEMENT 938
; COLUMN 8 IS RESERVED FOR CUSTOMER DEFINITION

.MACRO	BCDOU
X 000,075,075,075,075,075,075,075	;NULL OR BREAK
X 001,275,275,275,275,275,275,275	; ^A
X 002,264,264,264,264,264,264,264	;EOA START OF TEXT
X 003,275,275,275,275,275,275,275	; ^C
X 004,275,275,275,275,275,275,275	;EOT
X 005,275,275,275,275,275,275,275	; ^E
X 006,275,275,275,275,275,275,275	; ^F
X 007,275,275,275,275,275,275,275	; ^G
X 010,035,035,035,035,035,035,035	; ^H BACKSPACE
X 011,057,057,057,057,057,057,057	; TAB
X 012,056,056,056,056,056,056,056	;LF - INDEX
X 013,275,275,275,275,275,275,275	; ^K
X 014,275,275,275,275,275,275,275	; ^L
X 015,055,055,055,055,055,055,055	;CR
X 016,275,275,275,275,275,275,275	; ^N
X 017,275,275,275,275,275,275,275	; ^O
X 020,275,275,275,275,275,275,275	; ^P
X 021,275,275,275,275,275,275,275	; ^Q
X 022,275,275,275,275,275,275,275	; ^R
X 023,275,275,275,275,275,275,275	; ^S
X 024,275,275,275,275,275,275,275	; ^T
X 025,275,275,275,275,275,275,275	; ^U
X 026,275,275,275,275,275,275,275	; ^V
X 027,275,275,275,275,275,275,275	; ^W
X 030,275,275,275,275,275,275,275	; ^X
X 031,275,275,275,275,275,275,275	; ^Y
X 032,275,275,275,275,275,275,275	; ^Z
X 033,275,275,275,275,275,275,321	;ALTMODE
X 034,275,275,275,275,275,275,275	; ^\
X 035,275,275,275,275,275,275,275	;^]
X 036,275,275,275,275,275,275,275	; ^^
X 037,275,275,275,275,275,275,275	;^_
X 040,000,000,000,000,000,000,000	;SPACE
X 041,141,001,142,165,111,165,153	;"!" (APL-BALL SHIFT M)
X 042,140,111,120,164,140,170,111	; DOUBLE QUOTE
X 043,130,160,145,064,130,164,011	;"#"
X 044,170,104,152,065,104,065,053	;"$"
X 045,123,110,124,150,103,110,110	;"%"
X 046,101,150,144,003,102,164,023	;"&"
X 047,132,011,140,130,121,002,130	;APOSTROPHE(APL-BALL SHIFT K)
X 050,153,164,053,144,165,150,364	;"("
X 051,111,144,011,124,164,120,344	;")"
X 052,113,170,023,104,171,104,170	;"*" (APL-BALL SHIFT P)
X 053,067,123,067,103,001,003,123	;"+"
X 054,073,073,073,066,066,066,073	;"COMMA"
X 055,167,067,167,001,101,001,067	;"-"
X 056,021,021,021,067,067,067,021	;"."
X 057,007,007,123,042,042,042,007	;"/"
X 060,044,044,044,024,024,024,044	;"0"
X 061,040,040,040,040,040,040,040	;"1"
X 062,020,020,020,020,020,020,020	;"2"
X 063,060,060,060,060,060,060,060	;"3"
X 064,004,004,004,010,010,010,004	;"4"
X 065,010,010,010,050,050,050,010	;"5"
X 066,030,030,030,030,030,030,030	;"6"
X 067,050,050,050,070,070,070,050	;"7"
X 070,070,070,070,004,004,004,070	;"8"
X 071,064,064,064,044,044,044,064	;"9"
X 072,121,153,121,110,167,130,104	;":"
X 073,173,053,173,160,166,160,160	;";"
X 074,160,330,160,120,160,103,320	; LEFT ANGLE BRACKET
X 075,110,023,001,140,150,064,140	;"="
X 076,150,301,150,170,170,140,350	; RIGHT ANGLE BRACKET
X 077,133,107,161,142,105,142,107	;"?"(APL-BALL SHIFT Q)
X 100,171,120,171,002,143,043,001	;"@"(APL-BALL IS ALPHA)
X 101,071,171,071,143,043,143,171	;"A"
X 102,066,166,066,123,023,123,166	;"B"
X 103,072,172,072,163,063,163,172	;"C"
X 104,052,152,052,113,013,113,152	;"D"
X 105,012,112,012,153,053,153,112	;"E"
X 106,063,163,063,133,033,133,163	;"F"
X 107,043,143,043,173,073,173,143	;"G"
X 110,046,146,046,107,007,107,146	;"H"
X 111,031,131,031,147,047,147,131	;"I"
X 112,003,103,003,141,041,141,103	;"J"
X 113,032,132,032,121,021,121,132	;"K"
X 114,006,106,006,161,061,161,106	;"L"
X 115,041,141,041,111,011,111,141	;"M"
X 116,022,122,022,151,051,151,122	;"N"
X 117,005,105,005,131,031,131,105	;"O"
X 120,013,113,013,171,071,171,113	;"P"
X 121,033,133,033,105,005,105,133	;"Q"
X 122,051,151,051,145,045,145,151	;"R"
X 123,045,145,045,122,022,122,145	;"S"
X 124,002,102,002,162,062,162,102	;"T"
X 125,062,162,062,112,012,112,162	;"U"
X 126,061,161,061,152,052,152,161	;"V"
X 127,065,165,065,132,032,132,165	;"W"
X 130,042,142,042,172,072,172,142	;"X"
X 131,047,147,047,106,006,106,147	;"Y"
X 132,024,124,024,146,046,146,124	;"Z"
X 133,053,130,304,320,065,144,330	;"["
X 134,107,207,364,102,142,101,207	;"\"
X 135,011,101,330,370,064,124,301	;"]"
X 136,347,340,313,167,306,302,373	;"^"(APL-BALL SHIFT Y)
X 137,001,167,163,101,002,164,167	;"_"
X 140,225,211,303,330,341,202,301	; ACCENT GRAVE
X 141,301,071,071,043,302,043,071	;LC "A"(APL-BALL IS RT ARROW)
X 142,366,066,066,023,323,023,066	;LC "B"
X 143,372,072,072,063,363,063,072	;LC "C"
X 144,352,052,052,013,313,013,052	;LC "D"
X 145,312,012,012,053,353,053,012	;LC "E"
X 146,363,063,063,033,333,033,063	;LC "F"
X 147,343,043,043,073,373,073,043	;LC "G"
X 150,346,046,046,007,307,007,046	;LC "H"
X 151,331,031,031,047,347,047,031	;LC "I"
X 152,303,003,003,041,341,041,003	;LC "J"
X 153,304,032,032,021,310,021,032	;LC "K"(APL-BALL SHIFT 4)
X 154,306,006,006,061,361,061,006	;LC "L"
X 155,320,041,041,011,320,011,041	;LC "M"(APL-BALL SHIFT 2)
X 156,322,022,022,051,351,051,022	;LC "N"
X 157,305,005,005,031,331,031,005	;LC "O"
X 160,223,013,013,071,203,071,013	;LC "P"(APL-BALL MULTIPLY SIGN
X 161,364,033,033,005,344,005,033	;LC "Q"(APL BALL SHIFT 9)
X 162,351,051,051,045,345,045,051	;LC "R"
X 163,345,045,045,022,322,022,045	;LC "S"
X 164,302,002,002,062,362,062,002	;LC "T"
X 165,362,062,062,012,312,012,062	;LC "U"
X 166,361,061,061,052,352,052,061	;LC "V"
X 167,365,065,065,032,332,032,065	;LC "W"
X 170,342,042,042,072,372,072,042	;LC "X"
X 171,344,047,047,006,324,006,047	;LC "Y"(APL-BALL IS TEEPEE)
X 172,324,024,024,046,346,046,024	;LC "Z"
X 173,275,275,275,275,275,275,275	;173 - LEFT BRACE
X 174,275,275,275,166,275,275,275	;174 - VERTICAL BAR
X 175,275,275,275,275,275,275,275	;175 = ALTMODE - RIGHT BRACE
X 176,275,275,275,275,275,275,275	;176 = ALTMODE - TILDE
X 177,075,075,075,075,075,075,035	;RUBOUT - BECOMES IDLE
.ENDM	BCDOU
;THE FOLLOWING DEFINES THE TRANSLATION OF CHARACTERS ON INPUT FROM A BCD LINE
;
; INDEX INTO TABLE WITH 6BIT CHAR(OR 6BIT CHAR+100 IF UPPER SHIFT)

.MACRO	BCDIN
X 000,040,040,040,040,040,040,040	;SPACE
X 001,137,041,075,055,053,055,100
X 002,124,164,124,100,137,047,164
X 003,112,152,112,046,160,053,152
X 004,064,064,064,070,070,070,064
X 005,117,157,117,161,121,161,157
X 006,114,154,114,171,131,171,154
X 007,057,057,000,150,110,150,057
X 010,065,065,065,064,064,064,065
X 011,135,047,051,155,115,155,043
X 012,105,145,105,165,125,165,145
X 013,120,160,120,144,104,144,160
X 014,000,000,000,000,000,000,000
X 015,000,000,000,000,000,000,000
X 016,000,000,000,000,000,000,000
X 017,000,000,000,000,000,000,000
X 020,062,062,062,062,062,062,062
X 021,056,056,056,153,113,153,056
X 022,116,156,116,163,123,163,156
X 023,160,075,052,142,102,142,046
X 024,132,172,132,060,060,060,172
X 025,000,000,000,000,000,000,000
X 026,000,000,000,000,000,000,000
X 027,000,000,000,000,000,000,000
X 030,066,066,066,066,066,066,066
X 031,111,151,111,157,117,157,151
X 032,113,153,113,167,127,167,153
X 033,121,161,121,146,106,146,161
X 034,000,000,000,000,000,000,000	;UC SHIFT
X 035,010,010,010,010,010,010,010	;BACKSPACE
X 036,000,000,000,000,000,000,000
X 037,000,000,000,000,000,000,000	;LC SHIFT
X 040,061,061,061,061,061,061,061
X 041,115,155,115,152,112,152,155
X 042,130,170,130,057,057,057,170
X 043,107,147,107,141,101,141,147
X 044,060,060,060,071,071,071,060
X 045,123,163,123,162,122,162,163
X 046,110,150,110,172,132,172,150
X 047,131,171,131,151,111,151,171
X 050,067,067,067,065,065,065,067
X 051,122,162,122,156,116,156,162
X 052,104,144,104,166,126,166,144
X 053,133,073,050,145,105,145,044
X 054,000,000,000,000,000,000,000
X 055,015,015,015,015,015,015,015	;CARRIAGE RETURN/LF
X 056,012,012,012,012,012,012,012	;LINE FEED
X 057,011,011,011,011,011,011,011	;TAB
X 060,063,063,063,063,063,063,063
X 061,126,166,126,154,114,154,000
X 062,125,165,125,164,124,164,000
X 063,106,146,106,143,103,143,000
X 064,071,071,071,043,135,075,000
X 065,127,167,127,044,133,044,000
X 066,102,142,102,054,054,054,000
X 067,053,055,053,056,056,056,000
X 070,070,070,070,067,067,067,000
X 071,101,141,101,160,120,160,000
X 072,103,143,103,170,130,170,000
X 073,054,054,054,147,107,147,000
X 074,000,000,000,000,000,000,000	;EOT
X 075,000,000,000,000,000,000,000	;IDLE
X 076,000,000,000,000,000,000,000
X 077,000,000,000,000,000,000,000	;CD
X 100,040,040,040,040,040,040,040	;SPACE
X 101,141,135,000,137,055,134,000
X 102,164,124,000,133,141,136,000
X 103,152,112,140,053,045,074,000
X 104,153,044,133,052,044,052,072
X 105,157,117,000,121,077,121,117
X 106,154,114,000,131,136,131,114
X 107,134,077,000,110,150,110,077
X 110,075,045,075,072,153,000,045
X 111,051,042,000,115,041,115,042
X 112,145,105,000,125,165,125,105
X 113,052,120,136,104,144,104,120
X 114,000,000,000,000,000,000,000
X 115,000,000,000,000,000,000,000
X 116,000,000,000,000,000,000,000
X 117,000,000,000,000,000,000,000
X 120,155,100,042,074,155,051,074
X 121,072,056,072,113,047,113,033
X 122,156,116,000,123,163,123,116
X 123,045,053,057,102,142,102,053
X 124,172,132,045,051,171,135,132
X 125,000,000,000,000,000,000,000
X 126,000,000,000,000,000,000,000
X 127,000,000,000,000,000,000,000
X 130,043,133,135,047,043,072,047
X 131,151,111,000,117,157,117,111
X 132,047,113,000,127,167,127,113
X 133,077,121,000,106,146,106,121
X 134,000,000,000,000,000,000,000
X 135,010,010,010,010,010,010,010
X 136,000,000,000,000,000,000,000
X 137,000,000,000,000,000,000,000
X 140,042,136,047,075,042,076,075
X 141,041,115,000,112,152,112,115
X 142,170,130,041,077,134,077,130
X 143,147,107,000,101,100,101,107
X 144,171,051,046,050,161,133,051
X 145,163,123,043,122,162,122,123
X 146,150,110,000,132,172,132,110
X 147,136,131,000,111,151,111,131
X 150,076,046,076,045,075,050,076
X 151,162,122,000,116,156,116,122
X 152,144,104,044,126,166,126,104
X 153,050,072,000,105,145,105,041
X 154,000,000,000,000,000,000,000
X 155,015,015,015,015,015,015,015	;CARRIAGE RETURN/LF
X 156,012,012,012,012,012,012,012	;LINE FEED
X 157,011,011,011,011,011,011,011	;TAB
X 160,074,043,074,073,074,073,073
X 161,166,126,077,114,154,114,126
X 162,165,125,000,124,164,124,125
X 163,146,106,137,103,143,103,106
X 164,161,050,134,042,051,043,050
X 165,167,127,000,041,050,041,127
X 166,142,102,000,174,073,054,102
X 167,055,137,055,136,072,056,137
X 170,044,052,044,076,076,042,052
X 171,100,101,100,120,052,120,101
X 172,143,103,143,130,170,130,103
X 173,073,054,073,107,147,107,136
X 174,000,000,000,000,000,000,000	;EOT
X 175,000,000,000,000,000,000,000	;IDLE
X 176,000,000,000,000,000,000,000
X 177,000,000,000,000,000,000,000	;CD
.ENDM	BCDIN
ELETAB:
	.IIF NE FTE029,	.WORD	^D029
	.IIF NE FTE087,	.WORD	^D087
	.IIF NE FTE938,	.WORD	^D938
	.IIF NE FTE963,	.WORD	^D963
	.IIF NE FTE987,	.WORD	^D987
	.IIF NE FTE988,	.WORD	^D988

.MACRO	XX	A
.IF EQ <PASS-1>
.IIF EQ <A-DEFBCD>,BCDVRG=BCDVRG!<.-BCDXIN>	;DO THIS ONLY ON PASS 1
.=.+400
.IFF
	BCDIN
	BCDOU
.ENDC;.IF EQ <PASS-1>
.ENDM	XX

;CORRESPONDENCE - ELEMENT 029
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	C
.ENDM	X
BCDXOU=.+200
BCDXIN:
	.IIF NE FTE029,	XX	<^D029>

;CALL 360 BASIC(CORRESPONDENCE) - ELEMENT 087
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	D
.ENDM	X
	.IIF NE FTE087,	XX	<^D087>

;BCD - ELEMENT 938
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	G
.ENDM	X
	.IIF NE FTE938,	XX	<^D938>

;BCD - ELEMENT 963
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	E
.ENDM	X
	.IIF NE FTE963,	XX	<^D963>

;APL CORRESPONDENCE - ELEMENT 987
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	B
.ENDM	X
	.IIF NE FTE987,	XX	<^D987>

;APL BCD - ELEMENT 988
.MACRO	X	A,B,C,D,E,F,G,H
	.BYTE	F
.ENDM	X
	.IIF NE FTE988,	XX	<^D988>
;TRANSLATION TABLE FOR CHARACTERS FOLLOWING AN UP-ARROW CHARACTER

ARRTAB:	.BYTE	040,174,042,043,STDALT,045,046,140	;40-47
	.BYTE	133,135,052,053,054,176,056,135	;50-57
	.BYTE	060,061,175,173,034,035,036,037	;60-67
	.BYTE	070,071,072,073,133,075,135,077	;70-77
	.BYTE	100,001,002,003,004,005,006,007	;100-107
	.BYTE	010,011,012,013,014,015,016,017	;110-117
	.BYTE	020,021,022,023,024,025,026,027	;120-127
	.BYTE	030,031,032,074,057,076,136,137	;130-137
	.BYTE	140,001,002,003,004,005,006,007	;140-147
	.BYTE	010,011,012,013,014,015,016,017	;150-157
	.BYTE	020,021,022,023,024,025,026,027	;160-167
	.BYTE	030,031,032,173,174,175,176,177	;170-177
;TRANSLATION TABLE FOR CHARACTERS WHEN TIDY IS SET
; INDEX INTO TABLE WITH ORIGINAL ASCII VALUE
; BIT 200 MEANS PRECEDE WITH A ' RATHER THAN A ^
; BITS 177 ARE ASCII CHAR TO TYPE

TDYTAB:	.BYTE	000,101,102,103,104,105,106,107	;000-007
	.BYTE	110,111,112,113,114,115,116,117	;010-017
	.BYTE	120,121,122,123,124,125,126,127	;020-027
	.BYTE	130,131,132,044,064,065,066,067	;030-037
	.BYTE	040,041,042,043,044,045,046,140	;040-047
	.BYTE	050,051,052,053,054,055,056,057	;050-057
	.BYTE	060,061,062,063,064,065,066,067	;060-067
	.BYTE	070,071,072,073,133,075,135,077	;070-077
	.BYTE	100,101,102,103,104,105,106,107	;100-107
	.BYTE	110,111,112,113,114,115,116,117	;110-117
	.BYTE	120,121,122,123,124,125,126,127	;120-127
	.BYTE	130,131,132,074,134,076,136,137	;130-137
	.BYTE	047,301,302,303,304,305,306,307	;140-147
	.BYTE	310,311,312,313,314,315,316,317	;150-157
	.BYTE	320,321,322,323,324,325,326,327	;160-167
	.BYTE	330,331,332,063,041,062,055,177	;170-177

.ENDC;.IF NE FT2741

	.EVEN
.IF NE FT2741
TCLK02:	BIC	#BCDXRB!BCDRCR!BCDPRL!BCDUPS,DB.BCD(J)	;CLEAR PRINTER LOCKED, SNDING REV BREAK
	BIS	#BCDKBL,DB.BCD(J)	;SET KEYBOARD LOCKED
	MOV	#BCDEOA,R0
TCLK01:	JINDEX	JMP,DB.TYP(J),R1,DEVTYP
TCLK06:	JINDEX	JSR,DB.TYP(J),R3,DEVBKF	;CALL DRIVER TO TURN OFF BREAK
	MOV	#<10*400>+5,DB.TIM(J)	;TIME FOR 2741 TO SETTLE
	RTS	PC
TCLK10:	BIC	#BCDBRK,DB.BCD(J)	;FLUSH RCVBRK FLAG
	MOV	#BCDEOT,R0		;SEND HIM AN EOT
	JMP	TCLK01

;HERE WHEN 2741 LINE TYPES A BREAK
RCVBRK:	BIT	#BCDAPL,DB.BCD(J)	;CHECK FOR LINE IS APL
	BEQ	10$			;BRANCH IF NOT APL
	MOV	#3,R1
	JMP	REC.60
10$:	BIT	#BCDBRK,DB.BCD(J)	;ALREADY PROCESSING A RECEIVED BREAK?
	BNE	99$			;IF SO IGNORE FOR NOW
	MOV	#<4*400>+^D16,DB.FTM(J)	;WAKE UP AGAIN IN A LITTLE WHILE
	BIS	#BCDPRL!BCDBRK,DB.BCD(J);SET PRINTER LOCKED
	BIC	#BCDCDB,DB.BCD(J)	;SET USER INSISTED
	JMP	BEGXMT			;MAKE SURE POINTER IS GOING
99$:	RTS	PC
TCLK04:	BIT	#BCDUPS,DB.BCD(J)	;IS TERMINAL IN UPPER SHIFT ?
	BEQ	TCLK10			;IF NOT PROCEED
	BIC	#BCDUPS,DB.BCD(J)	;CLEAR UPPER SHIFT BIT
	MOV	#<10*400>+6,DB.FTM(J)	;ENTER REQUEST IN CLOCK QUEUE AFTER LCS DONE
	MOV	#BCDLCS,R0		;GET A DOWN SHIFT CHAR
	JMP	TCLK01
.ENDC;.IF NE FT2741