NBSIR 74-540

Interactive Graphics on tlie Sound

Laboratory Data Acquisition System

A. James Baroody, Jr.

Mechanics Division

Institute for Basic Standards

National Bureau of Standards

Washington, D. C. 20234

August 1974

Final

U. S. DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS

NBSiR 74-540

INTERACTIVE GRAPHICS ON THE SOUND

LABORATORY DATA ACQUISITION SYSTEM

A. James Baroody, Jr.

Mechanics Division

Institute for Basic Standards

National Bureau of Standards

Washington, D. C. 20234

August 1974

Final

U. S. DEPARTMENT OF COMMERCE. Frederick B. Dent. Secretary

NATIONAL BUREAU OF STANDARDS. Richard W. Roberts. Director

Disclaimer

Certain commercial equipment, instruments, or materials

are identified in this paper in order to adequately specify

the experimental procedure. In no case does such identification imply recommendation or endorsement by the National

Bureau of Standards, nor does it imply that the material

or equipment identified is necessarily the best • available

for the purpose.

1
PREFACE

This report is intended to assist in the use of the Tektronix 4010-1

graphics display 161*1111031 interfaced to the Sound Laboratory Data Acquisition

System. The report aims to compile documentation which is peculiar to

the Sound Laboratory Data Acquisition System and which is not widely

available fron other sources.

The author is deeply indebted to Roy Stehle for his substantial

contributions to the development of the Access Level Software. The

author, is also indebted to Will Gallant for his contributions to the

modifications of the Tektronix PLOT- 10 Terminal Control System.

ii
TABLE OF CONTENTS

1. INTRODUCTION 1

2. FEATURES OF THE INTERACTIVE GRAPHICS SYSTEM 2

2A. The Tektronix 4010-1 Graphics Display Terminal 2

2B. Tektronix PLOT- 10 Advanced Graphing II 3

2C. Tektronix PLOT- 10 Terminal Control System 3

2D. Access Level Software 3

3. ACCESS LEVEL SOFTWARE 4

3A. TPLOT 4

3B. CURS IS 14

3C. TOUTPT 20

3D. TINPUT 25

3E. PSWMOD 30

4. MODIFICATIONS TO THE TEKTRONIX PLOT- 10 TERMINAL CONTROL SYSTEM FOR

OPERATION AT 9600 BAUD 34

4A. A listing of the Modifications to TCS 34

REFERENCES 37

iii

1. INTRODUCTION

The objective of laboratory automation is to aid the scientist in the

transfer of data from the laboratory measurement to the finished report.

To achieve this objective it is necessary for the scientist to properly

relate his understanding of scientific principles to the process occurring

in the laboratory. To aid the scientist, the computer system must provide

information in a compact, descriptive, and understandable form. Computer

graphics allows the scientist to communicate conveniently and in his own

terms

.

This report describes the implementation of an interactive graphics

display system on the Sound Laboratory Data Acquisition System. A brief

description of the hardware and the software which supports it is presented.

A detailed description of computer system-dependent programs required to

support this graphics system follows.
- 2 -

2. FEATURES OF THE INTERACTIVE GRAPHICS SYSTEM

Introduction

The key subsystem of the Sound Laboratory Data Acquisition System

Is an Interdata Model 70 minicomputer. The graphics display, a Tektronix

40i0-l Graphics Display Terminal, is interfaced to the Interdata Model 70

via the Interdata programmable asynchronous line system.

Three levels of software are implemented for support of the Tektronix

4010-1 Graphics Display Terminal under the Interdata Basic Operating System

(BOSS) and the Interdata Disc Operating System (DOS). The software

Implemented includes the Tektronix PLOT- 10 Advanced Graphing II, the

Tektronix PLOT- 10 Terminal Control System, and the Access Level Software.

2A. The Tektronix 4010-1 Graphics Display Terminal

The 4010-1 terminal consists of a keyboard and a viewing screen. The

viewing screen incorporates a direct-view storage tube, which in outward

appearance behaves like a CRT with an extremely long-persistence phosphor.

Two separate principles are involved in the creation of a display. The

first is the storage of an image on a gird mounted just behind the screen.

This image is then transferred to the screen by means of a flood of

electrons.

The 4010-1 operates in three modes as follows:

1) Alphanumeric Modes Characters entered via the keyboard or received

from the Interdata Model 70 are displayed using an internal character

generator.

2) Graphic Plot Mode. In the graphic plot mode, the 4010-1 divides

the display into a matrix of 1024 addressable points on both the

horizontal (X) and the vertical (Y) axis. Only 780 of these

points are visible on the Y axis. Using an internal vector generator,

the 4010-1 draws vectors under control of the Interdata Model 70.

3) Graphic Input Mode. In this mode the Interdata Model 70 activates

the cross-hair cursor. The cursor can be positioned to the

desired intersect point by the operator using the thumbwheel

cursor controls. When positioned at the appropriate location,

the cross-hair coordinates are transmitted to the Interdata Model

70 by an operator command.
- 3

-

2B. Tektronix PLOT- 10 Advanced Graphing II (AG- II)

The Tektronix Advanced Graphing II (AG- II) package is a high-level

graphics language written in FORTRAN IV (ANSI X3. 9-1966 compatible). This

language permits the user with a basic understanding of graphics, in

general, and of the Tektronix 4010-1 to perform plotting on the Tektronix

4010-1. All that is required is the creation of a program containing

call's to the appropriate routines. Routines are provided to perform

functions such as data manipulation, scaling, axis generation, labeling,

and plotting. A minimum of three CALL's are required to generate a full

screen plot. For further details, see the PLOT- 10 Advanced Graphing II User's

Manual.

Note: The Terminal Control System (Section 2C) is required for the

operation of Advanced Graphing II.

2C. Tektronix PLOT- 10 Terminal Control System (TCS)

The Tektronix PLOT- 10 Terminal Control System (TCS) is a set of

FORTRAN IV (ANSI X3. 9-^1966 compatible) terminal control primitives for

the Tektronix' 4010'>1 . These primitives, through subroutine calls, provide

the user with full control of all features of the Tektronix 4010-1.

TCS provides the user with graphic functions such as vector generation,

windowing, clipping and rotation. For further details see the Tektronix

Terminal Control System User's Manual.

Note: The Access Level Software (Section 2D) is required for the operation

of TCS.

2D. Access Level Software (ALS)

The Access Level Software (ALS) implements four primitives to provide

the FORTRAN or assembly language programmer with support for graphic

input and output via the Interdata multiplexor bus. The cursor is supported

in addition to the terminal. The software includes basic routines for

plotting, graphic input, the input of any ASCII character, and the output

of any ASCII character.
- 4 -

3. ACCESS LEVEL SOFTWARE

The Access Level Software (ALS) has been written to facilitate the use of the 4010-1 with the Interdata Model 70. ALS includes four assembly

language routines. These four routines perform the basic functions of

the Tektronix 4002A Access Level Software, but have been rewritten to

conform to the conventions of the Interdata OS Library Loader. For details

on the 4002A Access Level Software refer to the Minicomputer-4002A Interdata

3 and 4 User's Manual.

All of the ALS routines are written in assembly language. If calls

are made from other assembly language routines, the entries to the

required routines should be defined with an EXTRN statement, i.e.,

EXTRN, TINPUT, TOUPUT, TPLOT, CURSIS. The ALS routines are also FORTRANcallable, but not re-entrant. Registers 13, 14, and 15 are saved, used,

and then restored.

All of the routines assume the 4010-1 graphics display is interfaced

to the Interdata PALS system port at address X'33'.

The ALS routines are written using sense status loops and privileged

instructions. As a result, interrupts should be disabled as should the

Protect Mode. To insure proper execution using all versions of the Basic

Operating System (BOSS) and the Disc Operating System (DOS), a program

called PSWMOD is included as an assistance to implementing these functions.

3A. TPLOT

Function: Performs plotting as specified in either a linear interpolation or point plotting mode.

FORTRAN Usage: CALL mOT(MODE, IX, lY)

Assembly Usage: BAL 15, TPLOT

DC 8

(ADDRESS OF MODE)

(ADDRESS OF IX)

(ADDRESS OF lY)

(RETUl^ HERE)

Description: MODE defines the type of plotting to be performed.

If MODE = 0 Initialize and dark vector to IX, lY

> 0 Bright vector to IX, lY

< 0 Point plot at IX, lY

IX and lY are integers in the range 0,1023. The plotting

position is determined by the parameters IX and lY. If

IS or lY is negative, the value used in plotting will be zero. IF IX and lY is greater than 1023, a value of 1023

will be used for plotting.
- 5 -

Dark Vector If MODE =0, the terminal is set to

linear interpolation mode and the graphics cursor

is initialized to the specified (IX, lY) position.

Bright Vector If MODE > 0, the terminal is assumed

to be in linear interpolation mode and a vector is

drawn from the previous (IX, lY) coordinate to the

specified (IX, lY) coordinate. A call to TPLOT in

dark vector mode must precede plotting in bright

vector mode in order to effect proper initialization of the 4010-1.

Point Plot If MODE < 0, an intensified point is

plotted at the specified (IX, lY) position.

For linear interpolation and point plot modes, the

coordinate values (IX, lY) are decoded into four

5-bit bytes. The four resulting bytes are then sent

to the terminal through TOUTPT in this order: High

Order lY, Low Order lY, High Order IX, and Low Order

IX with flag bits 6 and 7 configured to Table 1.

Positions taken by the 5 coordinate value bits are

represented by W.

Control

Bits Data

High Order lY 0 1 w w w w w

Low Order lY 1 1 w w w w w

High Order IX 0 1 w w w w w

Low Order IX 1 0 w w w w w

Table 1

The point (100,200) would be decoded as:

lY IX

200j^Q = (0011001000)^ ; lOO^Q = (0001100100)

High Order lY = 0100110 High Order IX = 0100011

Low Order lY = 1101000 Low Order IX 1000100

Subroutines Called: TOUTPT
- 6 -

FLOW CHART: TPLOT

EKJTER T?LoT

RecrrsTtRS.

FETCH AND
- > -

FLOW CHART: IPLOT

FfcTCH XX

IX = IOZ3

O XX i loZ3

s^v£ XX

FETCH XY

XV = O XY < O XY > loZ3 XV = »oi3

o < XY £ lota

•SAVfe XY

o^T?MT

XY VALut

- 9

-

OO0D

0O0E

000F

TPLQT(MODE. IX, lY)

0000R

O0O0R .

' *

" *

*

R13

Ri4

RTN *

*

*

*

*

*

*

*

0OO0R 2300 IPLOT

00O2R D0DO TPLOT

0QFAR

0O06R 4OF0

0OF2R

OOOflR 43EF

0004

00OER 43DE

0000

0O12R 401)0

O0F4R

0016R 48EF

0006

OOlflR 43DE

0009

SUBROUTINE

ENTRY TPLOT, IPLOT

EXTRN CHOUT

THE FOLLOWING PftCKfiGE IS DESIGNED TO

OPERfiTE ON THE INTERDATft MODEL 70 COMPUTER

INTERFACED TO THE TEKTRONIX 4010-1 USING THE

PROGRftNMflBLE ASYNCHRONOUS LINE SYSTEM (PALS).

THIS PACKAGE USES REGISTERS 13,14, AND 15

EQU 13

EQU 14

EQU 15

TPLOT

THIS ROUTINE IS CALLED TO PLOT IN VECTOR, POINT. OR INCREMENTAL PLOT ." MODE, DEPENDING ON THE VALUE OF MODE

AS DESCRIBED BELOU.

CALL TPLOT (MODE, IX, lY)

IX, lY ARE INTEGERS

IN RANGE .0, 1023

TO CALL

BAL RTT^, TPLOT

DC 8

(ADDRESS OF MODE^

(ADDRESS OF X)

(ADDRESS OF Y)

(RETURN HERE)

IF MODE = 0 INITIALIZE AND DARK VECTOR

TO X,Y

MODE > 0 BRIGHT VECTOR TO X.Y

MODE < 0 POINT PLOT AT X,Y

BFFS

STM

0,0

R13,RSAVE

DUMMY ENTRY FOR

SAVE REGISTERS

STH RTN,RADD SAVE RETN ADD

LH R14,4(RTN) ADD OF X

LH R13,0(R14) X

STH R13,TPTX SAVE X

LH R14,6(RTN) ADD OF Y

LH R13,0(R14) Y
TPLOTCMQDE. rX, lY) SUBROUTINE

OOIER 40DO

00F6R

STH R13,TPTY

0Q22R 48EF

0002

LH R14,2(RTN)

eei26R 48DE

0000

LH R13,0<R14)

B02AR 4330

0OE8R V>

.B2 TPTDV

002ER 4220

0Q44R

BP TPTNRM

e032R 4300

00E8R

B TPTBV

0036R 43F0

00F2R

PPLQT LH RTN-RftDD

0O3ftR 43EF

0002

LH R14.2(RTN)

0O3ER 24D1 LIS R13.

O04OR 40DE

0000

STH R13,0(R14)

0044R 48D0

00F4R

TPTNRM LH R13.TPTX

0048R 4310

0O50R

BNM TPT10

G04CR C8D0

0000

LHI R13,0

0O50R C5D0

0400

TPT10 CLHI R13, 1024

0054R 4280

0O5CR

BL TPT20

0O58R C8D0

03FF

LHI R13, 1023

0O5CR 40 DO

00F4R

TPT20 STH R13,TPTX

0060R 48D0

0OF6R

LH R13,TPTY

0O64R 4310

006CR

BNIi TPT30

0068R C3D0

0000

LHI R13,0

0O6CR C5D0

0400

TPT30 CLHI R13, 1024

007OR 4280

0078R

BL TPT40

0074n C3D0

03FF

LHI R13,1023

oorsR 48D0

OOFbR

TPT40 STH R13,TPTY

007CR CCDO SRHL R13,5

SAVE Y

ADD OF MODE

MODE

ZERO GO IN IT AND DV

+ NORMAL

(POINT PLOT)

RETURN ADDRESS

MODE ADDRESS

CHANGE M0DE=1

GET X

JUMP IF POSITIVE

SET TO EDGE FOR NEG X

CHECK BOUhfDS "

JUMP IF OK

SET TO EDGE OF SCREEN

SAVE NEU X

GET Y

SET TO LOU EDGE

CHECK BOUNDS

JUMP IF OK

SET TO EDGE OF FIELD

SAVE Y

GET UPPER 5 BITS
- 11 -

TPLOTCmDE, IX, lY) SUBROUTINE

0005

rto on o 0Q8uR p ^ Ts n 0020

Un 1 01*2 V'^O' DflT TKI UT V Trir rU 1 in HI T IHb

ft n o ,'1 o 4ULltJ 00F8R

CTU b 1 n CQUc oHVt crno rUK niiTDiiT UUIrUt

/I i CO

0000F

DHL DThJ f*uni IT niUuITDI 1 rUIT> Un

T

i VY

uUoLK utjr bK H V, 1 tnr }

003ER 48D0 LH R13,TPTY GET Y

001F

nrt I D 1 "3 V 1 C MQCi/ Tn 1 ni 1 ^ nHoN. lU LUU O

0096R LbDu

0060

Klo*A bo \ n\ i V TAr LUU Y 1 HU

009hR 4QD0

00F8R

STH TEnP

o r" 009ER 41F0

00SftR

BhL RTN*CHuUT OUTPUT LuU Y

^

00fl2R 0QF8R DC R(TEnP)

00A4R 48D0

00F4R , LH R13,TPTX GET X

00H3R CCD0

0005

It SRHL R 13^ 5 GET HIGH 5

UUHLK

0020

nu T Un i Klo,?s da bt 1 in HIbH IHEi

00F8R

CTU

C\C\CAD /I 1 CO

o'uAQR

DHL DTFJ PUni IT K 1 ri» LnuU 1 ni ITDI IT urpu V

OnDOD UtJtioK 1>L O ('TCMD'l H\ 1 cl ir J 00BflR 48D0

vur Hri LH R13.TPTX

OubbK L4LJU

091F

KlU T iSH 1 Moof Tn 1 ni 1 c; nHoN lu Luy a

LbUu

0040

nu T Un 1 DK 11 "2o , VA 4cJ 1LUUni 1 V TAP A IHb

UuLbK 4UUU

00F8R

CTU b 1 n OOP AD 4 1 r U

UUDbK

dHL DTKi rum IT nt ITDI IT 1 nil vy UU 1 rU 1 LUW A

0eiCER OOFSR DC A (TEMP)

0OD9R 43 F0

00F2R

TPTRTN LH RTO^RADD GET RETURN ADDRESS

00D4R 48EF

0002

LH R14,2(RTN) ADD OF MODE

0ODSR 48EE

0000

LH R14,0(R14) MODE

0ODCR 4210 BM PPLOT BRANCH FOR POINT PLOT
- 12 -

.TPLOTCMODE, IX. lY) SUBROUTINE

0OEQR DIDO

08FAR

Lli R13,RSftVE RESTORE REGISTERS

0OE4R 43 OF

0008

B 8(RTN) EXIT

eOESR 4iF0

0OCCR

TPTDV BAL RTN,CHOUT GS TO START

00ECR O10OR DC ftCGS)

OOEER 4300

QQ44R

B TPTNRri

0OF2R RftDD DS 2

0OF4R TPTX DS 2

0OF6R TPTY DS 2

0OF8R TEMP DS 2

OOFAR RSAVE DS 6 REGISTER STORAGE AREA

01OGR 001D GS DC X' ID' GRAPHIC nODE

0I02R END

I
- 13 -

TPLOT(MODE.IX.IY) SUBROUTINE

NO ERRORS

UUCnr\

n 1 nnp

•V in nT UUUUK

PPl flT r 1 LU 1

ri I

J

tlUuU

D i A UUtJt D("> Ti r> UUr dri KbtHVb Utlr RK

Kin yoor

TEllP eeFQR * TPLOT 00O2R

TPTIQ 0O59R

TPT2e) 005CR

TPT30 : 006CR

TPT49 0O78R

TPTDV 00E8R

TPTIIRM 0Q44R

TPTRTN 0ODOR

TPTX 00F4R

TPTY 00F6R

1

i
- 14 -

3B. CURS IS

Function: Enable input of graphic data by reading the cursor

position and a keyboard character

FORTRAN Usage: CALL CURSIS(ICHAR, IX, lY)

Assembly Usage: BAL 15,CURSIS

, DC 8

(ADDRESS OF ICHAR)

(ADDRESS OF IX)

(ADDRESS OF lY)

(RETURN HERE)

Description: ICHAR is the decimal equivalent of the first keyboard

character struck following the enabling of the cursor

IX is the coordinate of the vertical crosshair when

the character was typed (abscissa)

lY is the coordinate of the horizontal crosshair when

the character was typed (ordinate)

CURSIS enables the graphics cursor by outputting the

" ASCII characters US, ESC, and SUB. With the cursor

enabled, CURSIS waits for the next keyboard character

to be struck which will allow CURSIS to read the keyboard character and four additional characters representative of the cursor's position. Parity is stripped

from all characters. The keyboard character is returned

as the integer ICHAR. The next four characters contain

coordinate information in the 5 least significant bits

of each character. These represent High Order IX,

Low Order IX, High Order lY, and Low Order IX.

Subroutines Called: TINPUT, TOUTPT

Notes: CURSIS expects only five ASCII characters back from the

terminal. If the Graphic Input Terminators on the terminal

board TC-2 append a carriage return or a carriage return

and EOT, these will be ignored if the terminal is hard-wired

through the teletype port. If character transmission is

at a slow rate (e.g. 300 baud), the subroutine TINPUT may

be necessary to accept these characters.
- 15 -

FLOW CHART: CURS IS

To

4

Mo

>

r ourpiAT us

To SbT

OUTpvXT

To eA;A^L6 3Z

Key softR.T>

R6ftt>

VALue

7A*C.K To -FoRr^

To US£R.

I ^.eTUB.M 1
00 6 D OOOE

000F

CURSISCICHAR, IX,

OOOOR

OOQOR

>K

R13

R14

RTN

*

>K

>K

>»{

*

**

*

*

*

*

- 16 - y) SUBROUTIHE

EMTRY CURS IS

EXTRN CH0UT,CHIHI,CHIH2

THE FOLLOIJING PftCKAGE IS DESIGNED TO

OPERATE OM THE INTERDATft MODEL 73 COnPUTER

INTERFACED TO THE TEKTRONIX' 4910-1 USING THE

PROGRAMMABLE ASYNCHRONOUS LINE SYSTEM (PALS),

THIS PACKAGE USES REGISTERS 13,14, AND 15

EQJ 13

EQU 14

EQU 15

CURS IS

THIS ROUTINE IS USED FOR GRAPHICS

INPUT IF THE INTERACTIVE GRAPHIC

UNIT AND JOY STICK ARE AVAILABLE

CALL CURS1S(ICHAR,I>C, lY)

IX, lY ARE INTEGERS

IN RANGE 0,1 G23

OOOOR DODO CURS IS STM R13,RSAVE

0032R

0On4R 4nF0 STH RTN,RADD

007CR

0008R 41F0 BAL RTN,CH0UT

OQOOF

00OCR 007AR DC ACUS)

OOOER 41F0 BAL RTN,CHOUT

000AR

0012R 0073R DC A(CURS)

TO CALL

BAL RTN, CURS IS . DC 8

(ADDRESS OF CHARACTER UORD)

(ADDRESS OF X)

(ADDRESS OF Y)

(RETURN HERE)

THE CHARACTER IS STORED IN THE RIGHT BYTE

OF THE UORD

CURSIS FIRST SETS THE 4010-1 TO ALPHA

MODE THEN TO GRAPHICS INPUT MODE UHICH

TURNS ON THE CURSOR.

UHEN A CHARACTER IS TYPED THE CHARACTER

IS RETURNED AS UELL AS THE X AND Y COORDINATES

OF THE CURSOR. ALL CHARACTERS AFTER LOU X ARE

NOT READ (AND.. GENERALLY, NEED NOT BE),

SAVE REGISTERS

SAVE RETN ADD

RESET TERMINAL

TURN ON CURSOR (ESC)
CURS IS ( ICHAR, IX, lY) SUBROUTINE

0014R 41F0

0O10R

BRL RTN,CHOUT •

','

0018R 0O77R . DC A(CURS-n (SUB)

OOIPIR 41F0

0OOOF

BAL RThhCHINl GET THE CHAR

001ER CSEO • 0003LHI R14,3 LOOP COUNTER

0022R 40E0

0O7ER ' STH R14,TPTY . SAVE IN COUNTER

0O26R 4300

O048R

B CUR20 GO TO LOOP

O02AR 41F0

00OOF

CUR 10 BflL RTN,CHIN2 : GET HI VAL

D02ER 40D0

0O8OR

STH R13,TEMP SAVE HI VALUE

• 0032R 41F0

002CR

BAL

• RTN,CHIN2 LOU VAL

0O36R C4D0 . O01FNHI R13,X' IF' . LEAVE LOUER 5 ABITS

0O3AR 48E0 • 0O8OR

LH R 14, TEMP GET HIGH VALUE

003ER CDEO

0005

SLHL R14,5 SHIFT UP 5 BITS

0O42R 0bDE OHR R13,R14 PUT TOGETHER

0O44R C4D0

03FF

NHI R13,X'3FF' MASK TO 10 BITS'

0048R 4SF0

0O7CR

CUR20 LH RTN,RADD . GET ADDRESS

0O4CR 43EF

0002

LH R14,2<RTN) PARAMETER ADDR

eosoR 40 DE

0000

STH R13,0<R14) STORE DATA

0n54R CfiFO

0002

AH I RTH,2 COUNT UP ADDRESS

005SR 4gD0

0U7ER

LH R13,TPTY GET COUNTER

0O5CR CBDO

0001

SHI R13,

COUNT DOUN LOOP

0O(dOR 4330

0070R

BZ CURRTT^ RETURN

0n64R 40 FO

0O7CR

STH RTN,RADD

OOGSR 40D0

nR7ER

STH R13/TPTY STORE COUNTER TOO

OObCR 4300

002hR

B CUR10

0O7OR DIDO

0082R

CURRTN LM R13.RSAVE RESTORE REGISTERS
-18-

CURSISCICHAR. IX. lY) SUBROUTIKE

0074R 430F

0009

B oCRTN) EXIT

S07SR lAlB CURS DC X' IftlB' CURSOR (ESC, SUB)

0u7hlR 00 IF US DC X' IF' RESET CONTROL SHIFT 0

ei07CR RADD DS 2

0O7ER TPTY DS 2

eosoR TEMP DS -} 0032R RSAVE DS 6 REGISTER STORAGE fiREfi 0O88R END

.It;

ll

"I

I

i;

i
CURS IS C ICHAR, IX, lY) SUBROUTIHE

'}' Ln 1 11

1

dU ILK

Ln 1 \\d (?) D "7 /ID LHUU 1 Uu IfaK r 1 ID 1 r> IT) n O A D (ju^yR

CURRTH Q07QR

CURb i"i 1^ n CURS IS n n n o 0U00R

R13 000D

R14 0O0E

0Q7CR

rshve 0O82R

RTN 0QOF

TEMP SQSOR

TPTY 087ER

US e07AR
20 -

3C. TOUTPT

Function: Outputs an 8-bit character to the 4010.

FORTRAN Usage: CALL TOUTPT(ICHAR)

Assembly Usage: BAL 15, TOUTPT

DC 2

(ADDRESS OF ICHAR)

(RETURN HERE)

Description: ICHAR is the decimal equivalent of the ASCII

character to be sent to the 4010.

TOUTPT will output the 8-bit character at location

ICHAR. Normally only the lower-order 7 bits are used for the 128 ASCII characters.

Notes: The assembly language programmer is given the option of

calling the routine CHOUT to retain some similarity to

earlier Tektronix software. The programmer is referred

to the program listing for more information. If used,

he must LINK TOUTPT rather than using EDIT.
T. 21 -

FLOWCHART: TouxpT ; -..

^' '••'V.wV '

' 'W

( EWTCRTOUTFr* )

\ /

^

Oun?uT

/

\ /
- 22 -

TOUTPT( ICHAR) SUBROUTINE

0OO0R

OOOD

OOOE

0OOF

0009

*

R13

R14

RTH

BUSY

* .

*

***

ENTRY TOUTPT,CHOUT

THE FOLLOUING PflCKAGE IS DESIGMED TO

OPERftTC ON THE INTERDATfl MODEL 3,4,5, OR 70

COMPUTER.

THIS PPICKAGE USES REGISTERS 13,14, fiND 15

EQU

EQU

EQU

EQU

13

14

15

9 BUSY 8. DEV. UNAVAIL,

TOUTPT

THIS ROUTINE IS CALLED TO OUTPUT

AN ASCII CHARACTER TO THE 4010-1

GRAPHIC COMPUTER TERMINAL (ADDRESS X'33').

TO CALL

BAL RTTn TOUTPT

DC 2

(ADDRESS OF CHAR)

(RETURN HERE)

CALL TOUTPTCICHAR)

ICHAR IS DEC. VALUE

OF CHARACTER

REGISTERS 13-15 ARE RESTORED

0OOOR D0D0

001AR

TOUTPT STM R13, SAVREG SAVE REGISTERS .

O004R 48 EF

0002

LH R14,2(RTN) GET CHAR ADDR

OOOSR 40E0

001 OR

STH R 14, CHADD TRANSFER CHAR ADDR

000CR 41F0

0O2OR

BAL RTN^CHOUT OUTPUT CHAR

O0inR CHADD DS 2 CHAR ADDR

0012R DIDO

001AR

LM R 13, SAVREG RESTORE REGISTERS

0016R 430F

0004

B 4(RTN) RETURN

001AR SAVREG DS 6 REGISTER SAVE AREA

*

*

*

CHOUT

CHARACTER OUTPUT SUBROUTINE FROM ASSEMBLY LA

TO CALL

BAL RTl], CHOUT

(ADDRESS OF DATA UuRD)

(RETURN HERE)
- 23 -

TOUTPK ICHPlR) SUBROUTINE

>K THE CHARACTER SHOULD BE IN THE RIGHT BYTE * REGISTERS 13-15 ARE NOT RESTORED

B02OR CSDQ CHOUT LHI RI3^DEV GET DEVICE CODE

0044R

OOZ^R DEDO OC R13^PRATE SEND RATE INFO

604bR

O028R DEDQ oc R 13. SNDCMD SEND OUT MODE

6047R

002CR 9DDE CHOUTl SSR R13,R14 STATUS TO RI4

0O2ER 4290 BTC BUSY, CHOUT

I

JUMP IF BUSY

092CR

ei032R 4SEF LH R14,0(RTrO GET ADDR OF CHAR

0Q00

0036R DADE L)D R13, 1(R14) URITE LOU BYTE

0001

003AR 9DDE CH0UT2 SSR R13,R14 R14 GETS STATUS

0O3CR 4290 BTC BU3Y,CH0UT2

0O3AR

0040R 430F B 2<RTN) RETURN

0002

0O44R 0033 DEV DC X'33'

0046R FO PRATE DB X'FO'

O047R 00A3 SNDCMD DC X'ft3'

0049R END
- 24 -

TOUTPT(ICHfiR) SUBROUTINE

Q ERRORS

BUSY

CHAPD

CHCiUT

CHOUTl

CH0UT2

DEV

PRPITE R13

R14

RTH

SAVREG

SMDCMD

TOUTPT

0009

0010R

OOZBR

0O2CR

0O3flR

0044R

0046R

00OD

0O0E

0O0F

O01AR

0047R

QQ00R
- 25 -

3D. TINPUT

Function: Inputs an 8-bit ASCII character from the 4010.

FORTRAN Usage: CALL TINPUT (ICHAR)

Assembly Usage: BAL 15, TINPUT

DC 2

(ADDRESS OF ICHAR)

(RETURN HERE)

Description: TINPUT will receive any of the 128^^ ASCII characters

generated by the terminal and store its value in

ICHAR. The parity bit is stripped from the character.

Notes: The assembly languare programmer is given the option

of calling the routines CHIN and CHINl to retain some similarity to earlier Tektronix software. The programmer

is referred to the program listing for more information.

If used, he must LINK TINPUT rather than using EDIT.
FLOW CHART: TINPUT

26 -

\ /

\ /

\ /
- 27 -

TIMPUT(ICHfiR) SUBROUTINE

BOGQR

oeoD

eooE

0009

.ceoQR 2300

D002R DODO

OOlER

0O06R 41F0

0924R

OOOhR 43F0

0022R

0OOER 43 EF

0002

0012R 4QDE

0008

0016R D1D0

OOIER

001AR 43 OF

0004

OOIER

*

*.

R13

R14

RTH

BUSY

*

*

*

CHIN

ENTRY. TINPUT. CHIN. CH IN 1,CHIM2

THE FOLLOUING PfiCKfiGE IS DESIGNED TO

OPERfiTE ON THE INTERDATft MODEL 3,4,5, OR 7B

COMPUTER.

THIS PACKAGE USES REGISTERS 13,14, AND 15

EQU

EQU

EQU

EQU

13

14

15

9 BUSY & DEV. UNAVAIL.

TINPUT

THIS ROUTINE IS CALLED TO INPUT

AN ASCII CHARACTER FROM THE 4Q1Q-I

GRAPHIC COMPUTER TERMINAL (ADDRESS X'33').

•TO CALL

BAL RTN, TINPUT

DC 2

(ADDRESS OF CHARACTER)

(RETURN HERE)

CALL TINPUT(ICHAR)

ICHAR IS DEC. VALUE

OF INPUT CHARACTER

REGISTERS 13-15 ARE RESTORED

*

BFFS

STM

0,0

R13,REGSAV

DUMMY ENTRY FOR DIFF. PROG

SAVE REGISTERS

BAL RTN,CHIN1 GET CHARACTER

LH RTN, REGS AV+4 GET RETURN ADDR

LH R 14, 2 (RTN) GET CHAR ADDR

STW R13,0(R14) STORE CHARACTER

LM R,13,REGSAV RESTORE REGISTERS

B 4(RTN) RETURN

DS 6 REGISTER SAVE AREA

CHI HI

SUBROUTINE CALL FROM ASSEMBLY LANGUAGE

TO CALL

BAL RTH, CH INI (RETURN HERE)
- 28 -

TIHPUTCICHAR) SUBROUTINE

>fc CHftRflCTER IS RETURNED IN LOWER BYTE OF REG 13.

>K REGISTERS 13-15 ARE NOT RESTORED

L- "_' C w PH IN 1 1 HT p 1 4. DFV

i' c c u nr PI 4 PPATF

C' •J «— I-/ r\ i u c u P 1 4. PrVCMD c^FND PFfF T v'F MnDF

1,' --J U IN '_' u uniii^ L.ni P 1 4. DFV

U fj Is

t-t rj ^ Mf\ i' c L/ 3 3 Is 9036R 429Q BTC BUSY,CHIN2 LOOP IF BUSY OR UHAVftIL

003QR

0G3fiR 9BED RDR R14,R13 READ CHAR

003CR C4D3 NHI R13,><'7F' STRIP PARITY

0O7F

004nR 43eiF B . QCRTN) RETURN

0000

0033 DEV DC X'33' ; . 8046R FO PRATE DB X'FO'

0O47R Al RCVCMD DB X' A

1

0048R END
TIHPUT(ICHAR) SUBROUTINE

>\0 ERRORS

BUSY 0009

ii'^ CHIli 0OOOR

W CHIMl QQ24R

CHIN2 0O3QR

' DEV 0044R

PRATE 0O46R

P13 GOOD

R14 QQQE

RCVCMD ei047R

FEGSAV G01ER

RTH 000F

T INPUT 0002R
- 30 -

3E. PSWMOD

Function: Enables the FORTRAN Programmer to change the current

PSW in real time.

Description: FORTRAN Call Statement:

FORTRAN Call Statement:

FORTRAN Call Statement:

FORTRAN Call Statement:

Note: This routine modifies the current PSW via a SVC 2 type 4,

the Set Status Supervisor Call. Both the Basic Operating

; System and the Disc Operating System require modification

to permit the user to perform a Set Status Supervisor Call

which disables the protect mode. The reader is referred to

the Basic Operating System Reference Manual and the Disc

Operating System Reference Manual for further details.

CALL ENIOI

This entry sets the external

interrupt bit of the current PSW.

CALL DISIOI

This entry resets the external

interrupt bit of the current PSW.

CALL ENPM

This entry sets the protect mode

bit of the current PSW.

CALL DISPM

This entry resets the protect

mode bit of the PSW.
...^-31 -

PSU STATUS nODIFIER PAGE

000F

DGOOR 49FQ

0064R

e004R El 10

00b2R

00O8R 43F0

ri n Q C C6F0

4000

0010F: 4OF0

00bQR

El 20

005EI5

001SR 43 F0

00b4R

001CR 4AFF

0000

D02OR 03 OF

0022R 40 FO

0Ub4R

D026R El 10

00b2R

ei02ftR 43 FO

0O9S

002 ER C4F0

EFFF

0032R 4300

0010R

0036R 40 FO

0nb4R

0O3AR El 10

006215

003ER 43F0

0036

0O42R C6F0

0100

*THIS PROGRAM CONTAINS FORTRAN-CALLABLE ENTRY POINTS

HiTHAT MODIFY THE BIT PATTERN IN THE CURRENT STATUS

5KPSU AS FOLLOUS: * CALL EN 10 1 - ENABLE EXTERNAL INTHRPUPTS * CALL D IS 10 1 - DISABLES EXTERNAL INTERRUPTS

*. CALL ENPM - ENABLES PROTECT hODE

* CALL DlSPIi - DISABLES PROTECT MODE

^-5t<CHANGE THE FOLLOUiNG BOSS LQCATIDNS^K (FQ3-019ROn

* LOC. FROn TO

>« 1E0 NHI ADR,X'3D0F' NHI ADR,X'7500' * 1E4 OHI ADR,X'2900* OHI ADR,X'2300'

RTN

EMIOI

FINIS

DISIOI

ENPM

EQU 15

ENTRY ENlOl, DISIOI, ENPM,DISPM

o 1 n K 1 H » K O H V C SHVt K 1

J

UUt iny LHLL

LH RTN, X' 96' GET CURRENT PSU STATUS

OHI RTN, X' 4000' ADD ENABLE 10 BIT

STH RTN,STAT+2 STORE SVC 2 CALL

SVC 2, STAT GET PSU STATUS

LH RTN,RSAVE RESTORE R15

AH RTN, 0 (RTN) INC FOR HQ. OF ARCS

BR RTN RETURN

STH RT^^,RSftV£ SAVE RIS

SVC 1,UIAIT DUMMY CALL

LH RTN, X' 96' GET CURRENT PSU STATUS

NHI RTN,X'BFFF' DISABLE 10 BIT

B FINIS •

STH RTN,RSAV£ SAVE RIS

SVC 1,UAIT DUMMY CALL

LH RTN,X' 9b' GET CURRENT PSU STATUS

OHI RTN,X'0100' ADD ENABLE PM BIT
- 32 -

PSU STATUS MODIFIER PAGE

46R 4303 B FINIS

eei0R

i4ftR 4riF0 disph sth RTN,RSAVE SAVE R15

6Ub4R

O V m iMMV rci 1 yUl 11 1 T LhLU

0Gfa2R

52R 48F0 LH RTN,K'95' GET CURRENT PSU STATUS

0096 - 5GR C4F0 NHI RTN,X'FEFF' DISABLE PM BIT .

1 FEFF

SflR 4300 B FINIS

1 kJ010h:

'SER 6004 STAT DC 4,0

Tiki 00

'S2R 6800 UfilT DC X'0S09'

I64R RSAVE DS 2

66R END
- 33 - D IS 10 

* DISPM

!h EN 101 1 1 FINIS ) 3 fH i LJAIT

STATUS nOBIFI'ER

e022R

0OOOR

0036R

OOlOR

0064R

UU5ER

PAGE 3
- 34 -

4. MODIFICATIONS TO THE TEKTRONIX PLOT- 10 TERMINAL CONTROL SYSTEM FOR

OPERATION AT 9600 BAUD

When operating the 4010-1 with the Terminal Control System (TCS)

at data transmission rates above 4000 baud certain changes to TCS are

required to eliminate the occasional appearance of short or warped

vectors

.

The modifications fall into two general categories:

1. Preventing the terminal from leaving the linear interpolate

(line drawing) mode before the terminal has completed drawing

the vector.

2. Preventing the start of a new vector before the completion

of the current vector.

The following is a list of the functions which require modification

at 9600 Baud.

1. Activating the bell - BEL (7)

2. Requesting dark vector - GS (29)

3. Requesting a hard copy - ESC, ETB (27, 23)

4. Bringing up the cross hair cursor - ESC, SUB (27, 26)

5. Switching from vector to alpha mode - US (31)

6. Switching to vector mode (same as 2 above) - GS (29)

7. Erasing the screen - FF (12)

4A. A Listing of the Modifications to TCS

Standard Code Modified Code

in Subroutine BELL

SUBROUTINE BELL SUBROUTINE BELL

C* OUTPUT (BEL) C* OUTPUT (BEL)

CALL TOUTPT (7) CALL TOUTPT (22)

RETURN CALL TOUTPT (22)

END CALL TOUTPT (7)

RETURN

END
- 35 -

in Subroutine TKDASH

If (DTABL (I)) 21,21,22

C* OUTPUT A GS FOR A DARK VECTOR

21 CALL TOUTPT (29)

22 CALL SYCNVT

• • • 18 IF (DTABL (I)) 29,29,24

29 CALL TOUTPT (29) -

11 IF (N)) 26,26,25

26 CALL TOUTPT (29)

If (DTABL (I))21,21,22

C* OUTPUT A GAS FOR A DARK VECTOR

21 CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (29)

22 CALL XYCNYT

18

29

IF (DTABL (I)) 29,29,24

CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (29)

11 IF (NO) 26,26,25

CALL TOUTPT

CALL TOUTPT

26 CALL TOUTPT (29)

in Subroutine VECMOD

5 TREALX, TREALY, TIMAGX, ... IF (KKMODE.EQ.l)GO TO 10

5 TREALX, TREALY, TIMAGX, ... CALL TOUTPT (22)

CALL TOUTPT (22)

IF(KKM0DE.EQ.1)G0 TO 10

in Subroutine HDCOPY

C* OUTPUT (ESC) (ETB)

CALL TOUTPT (27)

CALL TOUTPT (23)

to START C* OUTPUT (EST) (ETB) to START

CALL TOUTPT (22)

CALL TOUTPT (2?)

CALL TOUTPT (27)

CALL TOUTPT (23)

in Subroutine DCURSR

C* OUTPUT (ESC) (SUB) to TURN

CALL TOUTPT (27)

CALL TOUTPT (26)

C* OUTPUT (ESC) (SUB) to TURN

CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (27)

CALL TOUTPT (26)

• • fl
- 36 -

in Subroutine ALMODE

• . • • . • C* SET ALPHA MODE OUTPUT (US) C* SET ALPHA MODE OUTPUT (US)

CALL TOUTPT (31) CALL TOUTPT (22)

... CALL TOUTPT (22)

CALL TOUTPT (31)

in Subroutine PNTMOD

I C* CANCEL PREVIOUS MODES- OUTPUT (US)

l(. CALL TOUTPT (31)

C* CANCEL PREVIOUS MODES -OUTPUT (US)

CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (31)

in Subroutine XYCNVT

C* OUTPUT (GS) TO ENTER VECTOR MODE

CALL TOUTPT (29)

C* OUTPUT (GS) TO ENTER VECTOR MODE

CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (29)

30 CALL TOUTPT (LOY)

IF(IH0X.EQ.KPCHAR(3) GO TO 40

KPCHAR(3) = IHOX

30 CALL TOUTPT (LOY)

KPCHAR(3) = IHOX

41 IF(L0X.NE.KPCHAR(4) GO TO 40

IF(KKM0DE,EQ.2)G0 TO 44

IF(KM0VEF.EQ.1)G0 TO 42

IF(IFLAG.EQ.O)GO TO 42

GO TO 100

40 KPCHAR(4)=L0X

42 CALL TOUTPT (LOX)

IF(KKM0DE.NE.2)G0 TO 43

44 . CALL TOUTPT (LOX)

V GO TO 100

41 IF(L0X.NE.KPCHAR(4) GO TO 38

IF(KKM0DE.EQ.2)G0 TO 44

IF(KM0VEF.EQ.1)G0 TO 38

IF(IFLAG.EQ.0)GO TO 38

GO TO 100

38 CALL TOUTPT (22)

CALL T0UTPT(22)

40 KPCHAR(4)=L0X

CALL TOUTPT (LOX)

IF(KKI^I0DE.NE.2)G0 TO 43

44 CALL TOUTPT (22)

CALL TOUTPT (22)

CALL TOUTPT (LOX)

GO TO 100

« « •
- 37 -

REFERENCES

1. Newman, W.M. and Sproull, R.F., Principles of Interactive Computer

Graphics. McGraw-Hill Book Co., Inc. New York. 1973

.

2. 4010 and 4010-1 User's Manual, Tektronix, Inc. Document No. 070-1225-000.

1972.

3. PLOT- 10 Advanced Graphing II User's Manual, Tektronix, Inc. Document

No. 062-1530-00. 1^73.

4. PLOT- 10 Terminal Control System User's Manual, Tektronix, Inc.

Document No. 062-1474-00. 1972.

5. PLOT- 10 Minicomputer-40002A Interdata 3 and 4 User's Manual, Tektronix

Inc. Document No. 062-1406-00. 1972.

6. Personal Communications, Roy Stehle, Stanford Research Institute, 1973.

7. Personal Communications, Will Gallant, Tektronix, Inc. 1974.

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

SHEET

1. PUBLICATION OR REPORT NO.

NBSIR 74-540

2. Gov't Accession

No.

3. Recipient's Acccs.sion No.

4. TITLE AND SUBTITLE

Interactive Graphics on the Sound Laboratory Data

Acquisition System

5. Publication Date August 1974

6. Performing Organization Code

^ AUTHOR(S)

A. James Baroody, Jr.

8. Performing Organ. Report No. NBSIR 74-540

1

PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE ,

, WASHINGTON, D.C. 20234

10. Project/Task/Work Unit No.

11. Contract/Grant No.

2. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

Same as No. 9

13. Type of Report & Period

Covered

Final

14. Sponsoring Agency Code

If

5; SUPPLEMENTARY NOTES :• I-;

6. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here.)

. This report describes the implementation of an interactive graphics display

.1.! system on the Sound Laboratory Data Acquisition System. A brief description

.j.vcof the hardware and the software which supports it is presented. A detailed

description of computer system-dependent programs required to support this

graphics system follows.

II

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name; separated by semicolons)

interactive graphics"; data acquisition system* graphics display terminalf

minicomputer.

18. AVAILABILITY (~' Unlimited 19. SECURITY CLASS

(THIS REPORT)

21. NO. OF PAGES

1 CX For Official Distribution, Do Not Release to NTIS

UNCLASSIFIED

41

1

' Order From Sup. of Doc, U.S. Government Printing Office

Washineton. D.C. 20402. SD Cat. No. CU

20. SECURITY CLASS

(THIS PAGE)

22. Price

j Order From National Technical Information Service (NTIS)

J Springfield, Virginia 22151 UNCLASSIFIED

USCOMM-DC 29042-P74
I'
I