Google
 

Trailing-Edge - PDP-10 Archives - bb-jr93k-bb - 10,7/initia/intcus.mac
There are 5 other files named intcus.mac in the archive. Click here to see a list.
SUBTTL	SPIDER/RCB	04-FEB-89


;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1987,1989. 
;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.

	SALL				; CLEAN ASSEMBLY LISTINGS

	SEARCH	INTPRM

	PROLOG	(INTCUS)

ND	FTDECDEVELOPMENT,0	;TURN ON FOR DAS21A SUPPORT
ND	FTSUDS,0		;TURN ON FOR SUPPORT OF SUDS TERMINALS
ND	FTANNARBOR,0		;ON FOR (SOME) SUPPORT OF ANN ARBOR TERMINALS
RELOC	0			;FOR A DATA SEGMENT

INTCUS::!

RELOC				;BACK TO CODE SPACE

;TOP-LEVEL CUSTOMER CHECKING.
; THIS IS THE TABLE OF BEGINNING INTERROGATION SEQUENCES, THEIR POSSIBLE
; INITIAL REPONSE CHARACTERS, AND THE CORRESPONDING PROCESSOR ROUTINES.
; SEE AROUND CHKLOP & CHK.1 IN INITIA.MAC FOR USAGE.

CHKTB2::			;TABLE OF EPASCC STRINGS TO TYPE
CHKNM2==:.-CHKTB2		;LENGTH OF TABLE

CHKAC2::			;TABLE OF AOBJN POINTERS TO RESPONSE TABLES

;FORMAT OF A RESPONSE TABLE:
; 1)	CHARACTER,,ADDRESS
;   TO MATCH "CHARACTER" EXACTLY (IN 8-BIT) AND DISPATCH TO ADDRESS
; 2)	400!CHARACTER,,ADDRESS
;   TO MATCH "CHARACTER" IN 7-BIT AND DISPATCH TO ADDRESS
;RESPONSE TABLE FOR CHARACTERS WHICH MIGHT FOLLOW THE ESCAPE IN THE
; ANSWER TO A DECID QUERY ("<ESC>Z").

IFN FTESCZ,<
ESCZT::				;STANDARD (INITIA) RESPONSE TABLE
IFN FTSUDS,< "\"+400,,SUDS >	;SUDS TERMINALS
ESCZL==:.-ESCZT			;LENGTH OF TABLE
> ;END OF IFN FTESCZ

IFN FTSUDS,<
SUDS:	PIMGET	CH		;READ THE NEXT CHARACTER
	  POPJ	P,		;C'EST LA VIE
	MOVE	T6,[-SUDS.L,,SUDS.T] ;RESPONSE TABLE POINTER
	PUSHJ	P,RSPFND##	;LOCATE IT
	  POPJ	P,		;NOT PRESENT
	PJRST	(T1)		;SET IT UP

SUDS.T:	"\"+400,,DAS21		;OLD DAS21 RESPONSE
	"A"+400,,GT4X		;GT40, WIDE, VT05
	"B"+400,,GT4X		;GT62, WIDE, VT05
	"C"+400,,GT4X		;GT40, WIDE, VT52
	"D"+400,,GT4X		;GT62, WIDE, VT52
	"E"+400,,GT4X		;GT40, NARROW, VT05
	"F"+400,,GT4X		;GT62, NARROW, VT05
	"G"+400,,GT4X		;GT40, NARROW, VT52
	"H"+400,,GT4X		;GT62, NARROW, VT52
SUDS.L==.-SUDS.T		;LENGTH OF TABLE

DAS21:	HRROI	T1,['DAS21 ']	;TYPE TO SET
	MOVE	T2,(T1)		;AND MODEL
	JRST	CPOPJ1##	;SUCCEED

GT4X:	SUBI	CH,"A"		;REARRANGE FOR BIT-MASK TESTING
	HRROI	T1,2		;NO UC
	MOVEM	T1,LC##		;REMEMBER THAT
	TRNE	CH,2		;IS IT A VT52-CLASS TTY?
	SETO	T1,		;YES
	MOVEM	T1,ATRV52##	;SET THAT LATER
	MOVE	T2,['GT40  ']	;BASIC TERMINAL TYPE
	MOVEI	T1,^D31		;TTY LENGTH
	TRNE	CH,1		;UNLESS VS60 LOGIC
	MOVEI	T1,^D42		;THEN IT'S LONGER
	MOVEM	T1,LENGTH##	;SET IT LATER
	MOVEI	T1,^D73		;WIDTH
	TRNN	CH,4		;UNLESS IT'S IN WIDE MODE,
	MOVEI	T1,^D86		;THEN IT'S WIDER
	MOVEM	T1,WIDTH##	;SET IT LATER
	TRNE	CH,1		;IF VS60 LOGIC,
	TLO	T2,2		;CHANGE GT40 TO GT60
	TRNE	CH,2		;IF IN VT52-EMULATION,
	TROA	T2,'2  '	;CHANGE GT?0 TO GT?2
	SKIPA	T1,['VT05  ']	;BASE SUPPORTED TYPE
	MOVE	T1,['VT52  ']	;EXTENDED SUPPORTED TYPE
	MOVEM	T1,TYPE2	;SAVE AS SECOND VALUE
	MOVEM	T2,TYPE1	;SAVE AS FIRST VALUE
	MOVE	T1,[-2,,TYPE1]	;TYPE LIST TO TRY
	JRST	CPOPJ1##	;SUCCEED

	RELOC			;TO DATA SEGMENT

TYPE1:	BLOCK	1		;MODEL NAME
TYPE2:	BLOCK	1		;BACKUP TYPE NAME

	RELOC			;BACK TO CODE SEGMENT

> ;END IFN FTSUDS
;RESPONSE TABLE FOR CHARACTERS WHICH MIGHT FOLLOW THE "<ESC>/" IN THE
; ANSWER TO A DECID QUERY ("<ESC>Z").

IFN FTESCZ,<
SLASHT::			;STANDARD (INITIA) RESPONSE TABLE
SLASHL==:.-SLASHT		;LENGTH OF TABLE
> ;END IFN FTESCZ
;ROUTINE TO HANDLE ANSI-REGISTERED DA RESPONSES (I.E., NON-PRIVATE).

CSIANS==:CPOPJ##		;NONE YET

;ANY HANDLER SHOULD RETURN CPOPJ TO INDICATE TIMEOUT OR UTTER FAILURE,
;OR CPOPJ1 WITH AN AOBJN POINTER IN T1 FOR A LIST OF TERMINAL TYPES
;TO TRY TO SET (IN ORDER) AND THE MODEL NAME TO SET IN T2.
;ROUTINE TO HANDLE DA RESPONSES BEGINNING WITH LEFT-ANGLE (LESS-THAN)

CSILAB==:CPOPJ##		;NONE YET
;ROUTINE TO HANDLE DA RESPONSES BEGINNING WITH "="

CSIEQL==:CPOPJ##		;NONE YET
;ROUTINE TO HANDLE DA RESPONSES BEGINNING WITH RIGHT-ANGLE

CSIRAB::MOVE	T1,PRMLST##	;GET THE MODEL NUMBER
	SKIPGE	T6,[-AA.L,,AA.T] ;DISPATCH TABLE POINTER
	PUSHJ	P,DSPFND##	;LOOK IT UP
	  POPJ	P,		;UNKNOWN
	PJRST	(T1)		;PASS THE BUCK

AA.T:				;DISPATCH TABLE
IFN FTANNA,<
	1,,AAA			;AMBASSADOR
	5,,GENIE		;GENIE
	6,,GENIEP		;GENIE-PLUS
	^D11,,AAXL		;XL-SERIES
> ;END IFN FTANNA
AA.L==.-AA.T			;LENGTH OF TABLE

IFN FTANNA,<
GENIEP:	SKIPA	T1,[-4,,[EXP 'GENIEP','GENIE ','AA    ','VT102 ']] ;TYPE LIST
GENIE:	MOVE	T1,[-3,,[EXP 'GENIE ','AA    ','VT102 ']] ;TYPE LIST
	PJRST	AA.1		;COMMON EXIT CODE

AAA:	SKIPA	T1,[-3,,[EXP 'AAA   ','AA    ','VT102 ']] ;TYPE LIST
AAXL:	MOVE	T1,[-4,,[EXP 'AAXL  ','XL    ','AA    ','VT102 ']] ;TYPE LIST
AA.1:	MOVE	T2,(T1)		;MODEL NAME
	SETOM	ATRBMT##	;BLOCK MODE
	SETOM	ATRBTA##	;ANSI-STYLE
	SETOM	ATRVFL##	;VARIABLE LENGTH
	SETOM	ATRESL##	;CAN BE SET TO HAVE A STATUS LINE
	SETOM	ATRGAT##	;GUARDED AREA TRANSFER
	SETOM	ATRAVO##	;DOES CORRECT SGR
	SETOM	ATRPPO##	;ACCEPTS MEDIA CONTROL
	SETOM	ATRCID##	;EDITING FEATURES
	SETOM	ATRLID##	;OF BOTH KINDS
	HRROI	T3,2		;'NO' VALUE
	MOVEM	T3,ATRVFW##	;SEEMS NOT TO HAVE VARIABLE WIDTH
	MOVEM	T3,ATRSRM##	;AND NO DEC SCROLLING REGIONS
	PJRST	VSIZE##		;HANDLES $7 & $8, BESIDES ITS OWN STUFF
> ;END IFN FTANNARBOR
;DISPATCH TABLE FOR INITIAL PARAMETERS IN DA RESPONSES IN DEC FORMAT
;(I.E., STARTING WITH "?").

CSID.T::			;DISPATCH TABLE
CSID.L==:.-CSID.T		;LENGTH OF TABLE

;DISPATCH TABLE FORMAT:
;	VALUE,,ADDRESS
; WHERE <VALUE> WILL BE MATCHED EXACTLY (IN A HALFWORD), AND DISPATCH
; WILL BE TO ADDRESS IF <VALUE> IS A MATCH.
;"DISPATCH" TABLE FOR DEC/DA2 RESPONSES TO SET TYPE NAMES

;THIS DISPATCH TABLE CONTAINS SIXBIT TYPE NAMES IN THE "DISPATCH" ADDRESSES,
;RATHER THAN SUBROUTINE ENTRY POINTS

DA2T.T::			;TYPE TABLE
IFN FTDECD,< ^D255,,['DAS21A'] >
DA2T.L==:.-DA2T.T		;LENGTH OF TABLE


;DISPATCH TABLE FOR SPECIAL PROCESSING BY DEC/DA2 DEVICE-TYPE CODE

;THIS DISPATCH TABLE IS USED TO PERFORM ANY SPECIAL SET-UP NEEDED
;BY ANY BIZARRE DEVICE THAT OTHERWISE LOOKS LIKE A DEC LEVEL-2 OR BETTER
;TERMINAL

DA2D.T::			;STANDARD (INITIA) DISPATCH TABLE
IFN FTDECD,< ^D255,,DAS21A >
DA2D.L==:.-DA2D.T		;LENGTH OF TABLE

IFN FTDECD,<
DAS21A:	MOVEI	T1,2		;'OFF' CODE
	MOVEM	T1,ATRSRM##	;NO SCROLLING REGION SUPPORT
	MOVE	T1,[-2,,[EXP 'DAS21A','VT220 ']] ;TYPE LIST
	MOVEM	T1,DA2DEF##	;SET THE LIST FOR END OF PROCESSING
	POPJ	P,		;RETURN TO DISP2L
> ;END FTDECDEVELOPMENT
	END