Trailing-Edge
-
PDP-10 Archives
-
BB-L014X-BM_1990
-
t20src/dpydef.mac
There are 23 other files named dpydef.mac in the archive. Click here to see a list.
; UPD ID= 20, RIP:<7.TOOLS-TAPE>DPYDEF.MAC.3, 26-Feb-88 13:40:21 by GSCOTT
;TCO 7.1236 - Update copyright notice.
; UPD ID= 13, RIP:<7.TOOLS-TAPE>DPYDEF.MAC.2, 9-Feb-88 10:49:08 by MCCOLLUM
;TCO 7.1217 - Add .NOBIN directive
;<4.UTILITIES>DPYDEF.MAC.4, 3-Jan-80 15:25:28, EDIT BY R.ACE
;UPDATE COPYRIGHT DATE
; COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1976, 1988.
; 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 THAT IS NOT SUPPLIED BY DIGITAL.
UNIVERSAL DPYDEF DEFINITIONS FOR DPY MODULE
.DIRECTIVE .NOBIN ;[7.1217]
;THIS IS THE DEFINITION FILE FOR DPY. THE DPY MODULE IS CALLED BY LUUOS.
;A STACK POINTER MUST EXIST IN AC 17. THE FOLLOWING INSTRUCTIONS SHOW
;HOW TO BEGIN TO USE DPY:
;
; SEARCH DPYDEF ;GET DEFINITIONS
;
; MOVE T1,[PUSHJ P,DPYUUO] ;GET CALLING INSTRUCTION
; MOVEM T1,.JB41 ;AND SET UP LUUO DISATCH
;
;THEN ANY OF THE LUUOS CAN BE USED. THE INI$ LUUO MUST BE DONE FIRST.
;GLOBAL SYMBOLS USED TO COMMUNICATE BETWEEN DPY AND OUTSIDE PROGS:
EXTERN DPYUUO ;ADDRESS OF ROUTINE TO ENTER DPY
EXTERN DPYTAB ;ADDRESS OF TABLE OF VARIABLES
;LUUO DEFINITIONS:
OPDEF INI$ [ 1B8] ;INITIALIZE DPY
OPDEF STR$ [ INI$ 1,] ;GIVE ASCIZ STRING TO DPY
OPDEF CHR$ [ INI$ 2,] ;GIVE SINGLE CHARACTER TO DPY
OPDEF CHI$ [ INI$ 3,] ;GIVE IMMEDIATE CHARACTER TO DPY
OPDEF SIZ$ [ INI$ 4,] ;SET WINDOW BOUNDARIES
OPDEF TAB$ [ INI$ 5,] ;SET TAB STOPS
OPDEF REF$ [ INI$ 6,] ;REFRESH THE SCREEN
OPDEF DPY$ [ INI$ 7,] ;SHOW CHANGES TO SCREEN
OPDEF SET$ [ INI$ 10,] ;SET VARIOUS PARAMETERS
OPDEF TTY$ [ INI$ 11,] ;DO VARIOUS TTY ACTIONS
OPDEF LOC$ [ INI$ 12,] ;RETURN ADDRESS OF NEXT OUTPUT TO DPY
OPDEF ADR$ [ INI$ 13,] ;MOVE CURSER TO GIVEN SCREEN LOCATION
;OFFSETS INTO THE INI$ ARGUMENT BLOCK:
$INCNT==0 ;ARGUMENTS FOLLOWING AND FLAGS
$INADR==1 ;ADDRESS OF STORAGE FOR DPY'S DATA
$INERR==2 ;LOCATION TO GO TO ON ERRORS
$INTTY==3 ;TERMINAL TYPE CODE OR POINTER
$INJFN==4 ;JFN OR BUFFER,,CHANNEL FOR OUTPUT
$INMAX==4 ;HIGHEST ARGUMENT
;FLAGS AND FIELDS DEFINED FOR THE VARIOUS LUUOS:
IN$NCL==400000 ;FOR INI$ - DON'T CLEAR SCREEN
RE$CLR==000001 ;FOR REF$ - CLEAR SCREEN FIRST
RE$NOH==000002 ;FOR REF$ - DON'T HOME UP WHEN DONE
DP$NOH==000002 ;FOR DPY$ - DON'T HOME UP WHEN DONE
AD$NOM==400000 ;FOR ADR$ - DON'T MOVE CURSER
;FUNCTIONS FOR SET$ LUUO:
$SEACR==1 ;DO AUTOMATIC CRLFS AT END OF LINE
$SEDCW==2 ;DON'T CLEAR END OF WINDOWS
$SEUDA==3 ;KEEP DPY'S ACS WHEN GIVING CHARS TO USER
$SECHR==4 ;SET OUTPUT ROUTINE FOR GETTING CHARS
$SEERR==5 ;SET ERROR ROUTINE HANDLER
$SEWND==6 ;SET MULTIPLE WINDOWS
$SEUOK==7 ;UPDATING SAME LOCATION TWICE IS OK
$SEEAT==10 ;SET NUMBER OF LINES TO IGNORE
;FUNCTIONS FOR TTY$ LUUO:
$TTHOM==0 ;HOME TO TOP LEFT CORNER
$TTCLR==1 ;HOME UP AND CLEAR SCREEN
;OFFSETS IN DPYTAB TABLE:
$DPLEN==0 ;POINTER TO TERMINAL'S LENGTH
$DPWID==1 ;POINTER TO TERMINAL'S WIDTH
$DPSIZ==2 ;POINTER TO 4 WORDS GIVING CURRENT WINDOW
$DPWCT==3 ;POINTER TO CURRENT WINDOW COUNTER
$DPDTL==4 ;LENGTH OF RELOCATABLE DATA
$DPADR==5 ;POINTER TO ADDRESS OF RELOCATABLE DATA
$DPSCR==6 ;POINTER TO SCREEN STORAGE
$DPERR==7 ;HIGHEST ERROR,,ADDRESS OF ERROR TABLE
$DPTTY==10 ;ADDRESS OF TERMINAL TYPE TABLE
$DPJFN==11 ;POINTER TO JFN USED FOR TTY
$DPEAT==12 ;POINTER TO NUMBER OF LINES LEFT TO EAT
$DPMAX==12 ;HIGHEST LEGAL OFFSET
;ERROR CODES RETURNED FROM DPY:
$ERUKE==0 ;UNKNOWN ERROR
$ERILR==1 ;ILLEGAL LUUO RECEIVED
$ERUSL==2 ;UPDATED SAME LOCATION TWICE
$ERIWS==3 ;ILLEGAL WINDOW SIZE GIVEN
$ERISF==4 ;ILLEGAL SET FUNCTION GIVEN
$ERITF==5 ;ILLEGAL TTY FUNCTION GIVEN
$ERCDS==6 ;CANNOT OUTPUT DESIRED SEQUENCE
$EROPF==7 ;OUTPUT FAILURE OCCURRED
$ERIPG==10 ;ILLEGAL TERMINAL ADDRESS GIVEN
$ERING==11 ;INITIALIZE FUNCTION NOT GIVEN
$ERIFF==12 ;INITIALIZE FUNCTION FAILED
;MACRO TO GENERATE TAB STOPS. MAKES 4 WORDS OF DATA, WHERE BIT N
;MEANS SET A TAB STOP AT COLUMN N. ALL QUANTITIES ARE IN DECIMAL.
DEFINE $TABS(COLS),<
$TAB$1==0 ;;INITIALIZE ALL 4 WORDS
$TAB$2==0
$TAB$3==0
$TAB$4==0
IRP <COLS>,< ;;LOOP OVER ALL DESIRED COLUMNS
$TAB$N==^D<COLS>/^D36 ;;FIND WHICH WORD TO PUT BIT IN
$TAB$B==1B0_<$TAB$N*^D36-^D<COLS>> ;;AND BIT VALUE
IFE <$TAB$N-0>,<$TAB$1==$TAB$1!$TAB$B>
IFE <$TAB$N-1>,<$TAB$2==$TAB$2!$TAB$B>
IFE <$TAB$N-2>,<$TAB$3==$TAB$3!$TAB$B>
IFE <$TAB$N-3>,<$TAB$4==$TAB$4!$TAB$B>
>
EXP $TAB$1 ;;DUMP THE FOUR DATA WORDS NOW
EXP $TAB$2
EXP $TAB$3
EXP $TAB$4
>
END