Google
 

Trailing-Edge - PDP-10 Archives - steco_19840320_1er_E35 - 10,5676/teco/source/teccdc.mac
There are 3 other files named teccdc.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(CDC,<TECO CDC(?) Terminal support>)	; Generate the TITLE and other stuff

	$CODE			; Put into code PSECT
	SUBTTL	Table of Contents

;+
;.pag.lit

;		Table of Contents for TECCDC - CDC terminal support
;
;
;			   Section			      Page
;   1. Introduction . . . . . . . . . . . . . . . . . . . . .    1
;   2. Table of Contents. . . . . . . . . . . . . . . . . . .    2
;   3. Revision History . . . . . . . . . . . . . . . . . . .    3
;   4. Tables
;        4.1.   CDC . . . . . . . . . . . . . . . . . . . . .    5
;   5. Support routines
;        5.1.   CDC
;             5.1.1.     Delete a line feed . . . . . . . . .    6
;             5.1.2.     Delete a vertical tab. . . . . . . .    7
;             5.1.3.     Delete a form feed . . . . . . . . .    8
;   6. Low segment. . . . . . . . . . . . . . . . . . . . . .    9
;   7. End of TECCDC. . . . . . . . . . . . . . . . . . . . .   10

;.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>


; Args to TS macro are:
;	STR  - $STRING type string to perform function
;	BASE - Base cost for multiple use
;	USE  - Per use cost for multiple use

	DEFINE	TS(STR,BASE<0>,USE<0>)<[$STRING(<STR'^N>)]>

	SUBTTL	Tables -- CDC

	CRTINI	VCDC
	CRTENT	BCK,<TB(.CHCNH)>
	CRTENT	SPC,<TB(.CHCNU)>
	CRTENT	DBS,<TB(" ",.CHCNH)>
	CRTENT	DLF,<PUSHJ P,CDCDLF>
	CRTENT	DVT,<PUSHJ P,CDCDVT>
	CRTENT	DFF,<PUSHJ P,CDCDFF>
	CRTENT	CRB,<TB(.CHCNH," ",.CHCNH,.CHCNH)>
	CRTEND
	SUBTTL	Support routines -- CDC -- Delete a line feed

;+
;.HL1 CDCDLF
;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
;-

CDCDLF:	MOVX	T1,.CHCNZ	; Get the character
	PJRST	SC$IMG		; Output it
	SUBTTL	Support routines -- CDC -- Delete a vertical tab

;+
;.HL1 CDCDVT
;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
;-


CDCDVT:	MOVX	T1,4		; Get the number to delete

CDCD.0:	MOVX	CH,.CHCNZ	; Get the character to do an up-cursor
	PUSHJ	P,SC$IMG	; Output it
	SOJG	T1,.-1		; Loop for all of them
	POPJ	P,		; And return

	SUBTTL	Support routines -- CDC -- Delete a form feed

;+
;.HL1 CDCDFF
;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
;-

CDCDFF:	MOVX	T1,^D8		; Delete 8 line feeds
	PJRST	CDCD.0		;  .  .  .

	SUBTTL	Low segment

	$IMPURE			; Put in correct place

CDCBEG:!

	LOWVER(CDC,<.-CDCBEG>); Define the version number
	SUBTTL	End of TECCDC

	END			; End of TECCDC