Trailing-Edge
-
PDP-10 Archives
-
steco_19840320_1er_E35
-
10,5676/teco/source/tecadm.mac
There are 3 other files named tecadm.mac in the archive. Click here to see a list.
SUBTTL Introduction
; Copyright (c) 1980 Stevens Institute of Technology, Hoboken, New Jersey
; 07030.
; This software may be used and copied provided that this copyright notice
;is included, and provided that copies of all modifications are sent to:
;
; TECO Project
; Computer Center
; Stevens Institute of Technology
; Castle Point Station
; Hoboken, New Jersey 07030
;
;
; The information in this software is subject to change without notice
; and should not be construed as a commitment by Stevens Institute of
; Technology.
; Search needed universals
SEARCH TECUNV ; TECO universal file
; Generate the prologue
TECVER==200 ; Major version number
TECMIN==1 ; Minor version number
TECEDT==1126 ; Edit level
TECWHO==0 ; Last editor
PROLOGUE(ADM,<TECO ADM terminal support>) ; Generate the TITLE and other stuff
$CODE ; Put into code PSECT
SUBTTL Table of Contents
;+
;.pag.lit
; Table of Contents for TECADM - ADM (LSI) terminal support
;
;
; Section Page
; 1. Introduction . . . . . . . . . . . . . . . . . . . . . 1
; 2. Table of Contents. . . . . . . . . . . . . . . . . . . 2
; 3. Revision History . . . . . . . . . . . . . . . . . . . 3
; 4. Tables
; 4.1. ADM-2 . . . . . . . . . . . . . . . . . . . . 5
; 4.2. ADM-3 . . . . . . . . . . . . . . . . . . . . 6
; 4.3. ADM-3A. . . . . . . . . . . . . . . . . . . . 7
; 5. Support routines
; 5.1. ADM-2
; 5.1.1. XY positioning . . . . . . . . . . . 8
; 5.1.2. Control U. . . . . . . . . . . . . . 9
; 5.1.3. Delete a line feed . . . . . . . . . 10
; 5.1.4. Delete a vertical tab. . . . . . . . 11
; 5.1.5. Delete a form feed . . . . . . . . . 12
; 5.2. ADM-3A
; 5.2.1. XY positioning . . . . . . . . . . . 13
; 5.2.2. Delete a line feed . . . . . . . . . 14
; 5.2.3. Delete a vertical tab. . . . . . . . 15
; 5.2.4. Delete a form feed . . . . . . . . . 16
; 6. Low segment. . . . . . . . . . . . . . . . . . . . . . 17
; 7. End of TECADM. . . . . . . . . . . . . . . . . . . . . 18
;.end lit.pag
;-
SUBTTL Revision History
COMMENT |
1000 Start of this version
Start of Version 200A(1126)
|
; Macro to define a word of five characters
DEFINE TB(A<.CHNUL>,B<.CHNUL>,C<.CHNUL>,D<.CHNUL>,E<.CHNUL>)
< BYTE (7)A,B,C,D,E>
SUBTTL Tables -- ADM-2
CRTINI VADM2
CRTENT WFF,1
CRTENT BCK,<TB(.CHCNH)>
CRTENT SPC,<TB(" ")>
CRTENT DBS,<TB(" ",.CHCNH)>
CRTENT DLF,<PUSHJ P,AD2DLF> ; Delete a line feed
CRTENT DVT,<PUSHJ P,AD2DVT> ; Delete a vertical tab
CRTENT DFF,<PUSHJ P,AD2DFF> ; Delete a form feed
CRTENT CRB,<TB(.CHCNH)>
CRTENT CTU,<PUSHJ P,AD2CTU>
CRTENT XYP,<PUSHJ P,AD2XY>
CRTENT TCH,<PUSHJ P,SC$CHR> ; Type a character
CRTEND
SUBTTL Tables -- ADM-3
CRTINI VADM3
CRTENT BCK,<TB(.CHCNH)>
CRTENT SPC,<TB(" ")>
CRTENT DBS,<TB(" ",.CHCNH)>
CRTENT CRB,<TB(.CHCNH)>
CRTEND
SUBTTL Tables -- ADM-3A
CRTINI vad3a
CRTENT WFF,1
CRTENT BCK,<TB(.CHCNH)>
CRTENT SPC,<TB(" ")>
CRTENT DBS,<TB(" ",.CHCNH)>
CRTENT DLF,<PUSHJ P,A3ADLF> ; Delete a line feed
CRTENT DVT,<PUSHJ P,A3ADVT> ; Delete a vertical tab
CRTENT DFF,<PUSHJ P,A3ADFF> ; Delete a form feed
CRTENT CRB,<TB(.CHCNH)>
CRTENT LIN,^D24
CRTENT WID,^D79
CRTENT ERS,<TB(.CHCNZ)>
CRTENT DSP," "
CRTENT XYP,<PUSHJ P,A3AXY>
CRTENT CIN,<MOVX T1,.INFIN> ; Initial cost
CRTENT CIC,<MOVX T1,.INFIN> ; Cost to insert a character
CRTENT CDC,<MOVX T1,.INFIN> ; Cost to delete a character
CRTENT CRP,<MOVX T1,.INFIN> ; Cost to replace a character
CRTENT CIL,<MOVX T1,.INFIN> ; Cost to insert a line
CRTENT CDL,<MOVX T1,.INFIN> ; Cost to delete a line
CRTENT TCH,<PUSHJ P,SC$CHR> ; Delete to end of line
CRTENT CPP,<MOVX T1,3> ; Cost to move from point A to B
CRTENT DEL,<PUSHJ P,SC$DEL> ; Delete to the end of line
CRTEND
SUBTTL Support routines -- ADM-2 -- XY positioning
;+
;.HL AD2XY
;This routine will do the positioning for the ADM-2 terminal.
;.literal
;
; Usage:
; MOVE X,X.postion
; MOVE Y,Y.postion
; MOVE CRT,CRT.block.index
; PUSHJ P,@$CRXYP(CRT)
; (Return)
;
;.end literal
;-
AD2XY: POPJ P, ; Return for now
SUBTTL Support routines -- ADM-2 -- Control U
;+
;.HL1 AD2CTU
;This routine will process the control U in the command parser. It
;may be called without CRT being set up.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,@$CRCTU(CRT)
; (Return)
;
;.end literal
;-
AD2CTU: MOVX T1,<BYTE(7).CHCRT,.CHESC,"T"> ; Get the string
PUSHJ P,SC$STR ; Output the string
MOVX CH,.CHCRT ; Get a carriage return
PJRST T$OCHR ; And make sure monitor knows where we are
SUBTTL Support routines -- ADM-2 -- Delete a line feed
;+
;.HL1 AD2DLF
;This routine will send the character string to delete a line feed.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,@$CRDLF(CRT)
; (Return)
;.end literal
;-
AD2DLF: MOVX CH,.CHVTB ; Get the character to send
PJRST SC$IMG ; Output the character
SUBTTL Support routines -- ADM-2 -- Delete a vertical tab
;+
;.HL1 AD2DVT
;This routine will send the character string to delete a vertical tab.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,@$CRDVT(CRT)
; (Return)
;
;.end literal
;-
AD2DVT: MOVX T1,4 ; Get the number to send
AD2CMN: MOVX CH,.CHVTB ; Get the character to send
PUSHJ P,SC$IMG ; Output it
SOJG T1,.-1 ; Loop for all of them
POPJ P, ; Return to the caller
SUBTTL Support routines -- ADM-2 -- Delete a form feed
;+
;.HL1 AD2DFF
;This routine will send the character string to delete a form feed.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,$CRDFF(CRT)
; (Return)
;
;.end literal
;-
AD2DFF: MOVX T1,10 ; Get the number of times to loop
PJRST AD2CMN ; Join the common code
SUBTTL Support routines -- ADM-3A -- XY positioning
;+
;.HL A3AXY
;This routine will do the positioning for the aaa terminal.
;.literal
;
; Usage:
; MOVE X,X.postion
; MOVE Y,Y.postion
; MOVE CRT,CRT.block.index
; PUSHJ P,@$CRXYP(CRT)
; (Return)
;
;.end literal
;-
A3AXY: $SAVE <CH> ; Save CH, since most routine will smash it
DMOVE T1,CURPOS ; Get the current position
DMOVEM X,CURPOS ; Save the current position
SUB T1+$OFSX,X ; Determine if it is an up/down/right/left by one
SUB T1+$OFSY,Y ; movement
SKIPE T1+$OFSX ; Is the X zero ?
SKIPN T1+$OFSY ; Or the Y ?
SKIPA ; Yes - Handle differently
JRST A3AXYA ; No - Handle normally
SKIPN T1+$OFSY ; No change in the Y offset ?
JUMPE X,A3AXYC ; Yes - Only need a CR
MOVM T3,T1+$OFSX ; Get the X offset
SOJE T3,A3AXYX ; Just X by one
MOVM T3,T1+$OFSY ; Get the Y offset
SOJE T3,A3AXYY ; Just the Y by one
A3AXYA: SKIPN X ; Is this non-zero ?
JUMPE Y,A3AXYH ; Just home it
ADDX X," " ; Convert to the correct string
ADDX Y," " ; . . .
MOVEI T1,[$STRING(<=^8/Y/^8/X/>)] ; Get the string
PJRST SC$STR ; Outpt the string
; Here to just home the cursor
A3AXYH: MOVX CH,.CHCCF ; Get the home character
PJRST SC$IMG ; Output it
; Here to just output a CR
A3AXYC: MOVX CH,.CHCRT ; Just output a CR
PJRST SC$IMG ; . . .
; Here to move in the X direction by one
A3AXYX: SKIPGE T1+$OFSX ; Is this negative ?
SKIPA CH,[EXP .CHFFD] ; Move the cursor right
MOVX CH,.CHCNH ; Back the cursor up
PJRST SC$IMG ; Output the string
; Here to move in the Y direction by one
A3AXYY: SKIPL T1+$OFSY ; Is this negative ?
SKIPA CH,[EXP .CHVTB] ; Move the cursor up one line
MOVX CH,.CHLFD ; Move the cursor down one ine
PJRST SC$IMG ; Output the character
SUBTTL Support routines -- ADM-3A -- Delete a line feed
;+
;.HL1 A3ADLF
;This routine will send the character string to delete a line feed.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,@$CRDLF(CRT)
; (Return)
;.end literal
;-
A3ADLF==AD2DLF ; Same routine as ADM-2
SUBTTL Support routines -- ADM-3A -- Delete a vertical tab
;+
;.HL1 A3ADVT
;This routine will send the character string to delete a vertical tab.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,@$CRDVT(CRT)
; (Return)
;
;.end literal
;-
A3ADVT==AD2DVT ; Same as ADM-2
SUBTTL Support routines -- ADM-3A -- Delete a form feed
;+
;.HL1 A3ADFF
;This routine will send the character string to delete a form feed.
;.literal
;
; Usage:
; MOVE CRT,CRT.block.address
; PUSHJ P,$CRDFF(CRT)
; (Return)
;
;.end literal
;-
A3ADFF==AD2DFF ; Same as an ADM-2
SUBTTL Low segment
$IMPURE ; Put in correct place
ADMBEG:!
LOWVER(ADM,<.-ADMBEG>) ; Define the version number
SUBTTL End of TECADM
END ; End of TECADM