260

Intelligent terminal software flowcharts

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Intelligent terminal software flowcharts
Page 2: Intelligent terminal software flowcharts

UNIVERSITY OFILLINOIS LIBRARY

AT UR3ANA-CHAMPAIGN.ENGINEERING

Page 3: Intelligent terminal software flowcharts

NOTICE: Return or renew all Library Materials! The Minimum Fee for

each Lost Book is $50.00. 1111f\ O innn

The person charging this materiaris responsible for

its return to the library from which it was withdrawnon or before the Latest Date stajjiSJclk below.

Theft, mutilation, and underlining of books bw nitons for discipli-

nary actien and may *esuK In dr«h1i»sa1 wftnThWjniversity.

To renew call Telephone Center, 333-8400

UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN

Page 4: Intelligent terminal software flowcharts
Page 5: Intelligent terminal software flowcharts

_ ENGINEERING LIBRARY U^vt^UNIVERSITY OF ILLINOIS

, , o c-7 URBANA, ILLINOIS

/ E ROM

Page 6: Intelligent terminal software flowcharts

The person charging this material is re-

sponsible for its return to the library fromwhich it was withdrawn on or before the

Latest Date stamped below.

Theft, mutilation, and underlining of books

are reasons for disciplinary action and mayresult in dismissal from the University.

UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN

P n' ~ 1

9G2

MiAk X W9J2

-

L161— O-1096

Page 7: Intelligent terminal software flowcharts

CAC Document Number 252

CCTC-WAD Document Number 7523

Intelligent TerminalSoftware Flowcharts

Deborah S. BrownBetty KasprzyckiJohn R. Mullen

David A. Willcox

Prepared for the

Command and Control Technical CenterWWMCCS ADP Directorate

Defense Communication AgencyWashington, D.C.

under contractDCA100-76-C-0088

Center for Advanced ComputationUniversity of Illinois at Urbana-Champaign

Urbana, Illinois 61801

October 31, 1977

>/Approved for release: /CmAMqu ( I fJfjfA^i^/Ja?mes F. Bailey, Principal Investigator

Page 8: Intelligent terminal software flowcharts

Digitized by the Internet Archive

in 2012 with funding from

University of Illinois Urbana-Champaign

http://archive.org/details/intelligenttermi252brow

Page 9: Intelligent terminal software flowcharts

INTRODUCTION

ORGANIZATION

This document contains Nassi-Schneiderman flow charts for the software

comprising the operating system and standard support package for the

Intelligent Terminal operating system. Readers should refer to the

Intelligent Terminal Programmer's Manual (CCTC-WAD document //7616) for

a description of how these routines interact, and for descriptions

of the proper usage of these routines.

The flow charts on the following pages are arranged alphabetically

by routine name. In most cases there is one chart for each routine.

However, some charts are too complex to be presented legibly on a single

page. In each of these cases, one or more sections of the chart have been

broken out and placed on a following page. If a notation such as

"See ph_driver: read_type" appears in a chart, then a sub-chart labeled

"ph_driver: read_type" will appear on one of the immediately following

pages.

There are two implementations of the Intelligent Terminal software.

One of these runs on a Digital Equipment Corporation LSI-11 minicomputer, and

the other runs on Honeywell Level 6 minicomputers. Most routines are

identical in the two implementations. A few routines are implemented differently

on the two machines, primarily due to fundamental differences in the

structure of the hardware base. Each of these routines has two charts,

one for the LSI-11 version and one for the Level 6 implementation.

Page 10: Intelligent terminal software flowcharts
Page 11: Intelligent terminal software flowcharts

NASSI-SHNEIDERMAN DIAGRAMS

The diagramming technique developed by I. Nassi and B. Shneiderraan

(cf. SIGPLAN Notices, August 1973) provides four basic visual structures

corresponding to the four basic constructs of a program:

1. process,

2. decision,

3. multi-case decision, and

4. iteration.

The Nassi-Shneiderman visual structures corresponding to these program

constructs are described below.

Process

A process (meaning any computation) is represented by a box as

follows:

compute <a>

The box is usually named, or some English phrase or some equa-

tion is written in the box to indicate the nature of the process or compu-

tation. The box may represent any process or computation, from the whole

of an operating system to a single statement of the kind "a = b + c". An

empty box represents the null process: "do nothing".

Decision

The two most common decisions are represented by the if statement

and the if... else statement. These two decisions are represented as follows

1. if statement:

Page 12: Intelligent terminal software flowcharts
Page 13: Intelligent terminal software flowcharts

2. if ... else statement:

compute <a> compute <b>

Multi-case Decision

The representation of a multi-case decision is a simple extension

of the previous visual structure for representing simple decisions:

Case 1 Case 2 Case. .

.

Case N Default

compute<a>

compute<b>

compute compute<n>

compute<default>

Iteration

The two most common forms of iteration are those with a top

test and those with a bottom test. These two forms of iteration are

represented as follows:

1. top test:

loop <test>

compute <a>

bottom test:

compute <a>

lc op <test>

Page 14: Intelligent terminal software flowcharts
Page 15: Intelligent terminal software flowcharts

Combination

The visual structures presented above may be combined to any

degree to represent a computational structure, e.g.:

Page 16: Intelligent terminal software flowcharts
Page 17: Intelligent terminal software flowcharts

alloc(size)

For every used entry in CORETAB.

Is the size of this entryreater than or equalto size?

YES

Remember the address of this entry,

Move the beginning of the entryto after this piece.

Decrement the size of the entryby the size of the piece beingallocated.

Is size of entry now 0?

YES

Delete this empty entry bycopying rest of CORETAB upone slot.

Return the remembered address,

Return -1.

Page 18: Intelligent terminal software flowcharts
Page 19: Intelligent terminal software flowcharts

area lite(xl,yl,x2,y2,mode)

Is this a lite or an erase'

LITE ERASE

Do while there are at least 16 dots high

to lite

Light a row 16 dots high using put

Do while there are at least 16 dots

high to erase

Erase a row of dots 16 dots

high using erase

Is there still a partial row to do

Lite or erase the last partial row using put or erase

NOTE: This version of area lite is specific to the LSI-11 IT.

area lite

Write an appropriately formatted message to the Z80 panel controller.

HOTE: This veraion of area lite ia specific to the L6 IT.

Page 20: Intelligent terminal software flowcharts
Page 21: Intelligent terminal software flowcharts

blk_alloc(drv)

Por every word In the free up

Are any of the bits In this word of the free-HO ^^^«ep not set?

Set this bit to I.

blk » nuaber of block corresponding to this bit.

Is blk out of range, or did leroing»0 ^-N^Mock fall? YES

Return (-1).

Return (blk).

Return (-1).

blk free(drv, blk)

NO X.

blk « 0? -

' YES

Return (0).

"""Is drv valid?

NO —• _ y^ YES

Return (-1)

Reset the bit in the free map for drive drv that corresponds to block blk.

Return (0).

Page 22: Intelligent terminal software flowcharts
Page 23: Intelligent terminal software flowcharts

block ()

Save incoming registers.

Update stack ptr and environment linkage registers.

Store environment linkage and return address registers in stack base.

Stack overflow or destroyed guardword?

NO

frst block:

while (READY_Q is empty)

Wait for entry on READY_Q.

Dequeue id of next process, and store it in ME.

Put return address from stack base in a register.

Restore other registers from environment linkage section.

Return to new process.

Page 24: Intelligent terminal software flowcharts
Page 25: Intelligent terminal software flowcharts

buflu(«v, bill, o, tisi-rbuf, 1, fen)

Page 26: Intelligent terminal software flowcharts
Page 27: Intelligent terminal software flowcharts

10

clear io()

Do for each device.

YESIs thla device In use?

NO

Do n times where n Is the number of elements In the requestor queue.

Deq one value from requestor queue.

Is the requestor just deq'd this process?

NO

Re-queue the element.

Close the device.

NOTE: This version of cleario is specific to the LSI 11 IT.

clear io()

Do for each device.

— _^^^ Is this device in use?YES " >^N0

Do ii times where n is the number of elements In the requestor queue.

Deq one value from requestor queue.

**Is the requestor just deq'd this process?

NO " -__ >4es

Re-queue the element.

~_ Is this process the owner of the device?

YES Sm

Close the device.

NOTE: This version of cleario Is specific to the Level 6 IT.

Page 28: Intelligent terminal software flowcharts
Page 29: Intelligent terminal software flowcharts

11

elose(devlce_ld, istatua)

Write a flush message to the handler process.

Pee the request semaphore.

Write a close message to the handler process.

Pee the request semaphore.

Flag device as being ownerless.

Do for each disk entry In DEV TAB

Set atatus for return from that returned from handler process close request,

Is "catastrophic" bit on In status?NO

YES

Return error Indication.Return with no error indication.

Page 30: Intelligent terminal software flowcharts
Page 31: Intelligent terminal software flowcharts

12

cmp (a, b, length)

Page 32: Intelligent terminal software flowcharts
Page 33: Intelligent terminal software flowcharts

13

crcntc(nam«, atac ptr)

Update uaerflb for file to indicate length and out-of-date directory information.

Return (Id)

Temporarily terminate name at end of name of containing directory

Open the containing directory and store results in id.

Seek in directory to beginning of empty directory.

Create a directory entry structure by copying the file name into it and setting the flaga and lengthsto Indicate a zero length new file.

Allocate a disk block to use as index block.

Page 34: Intelligent terminal software flowcharts
Page 35: Intelligent terminal software flowcharts

Ik

creep(stack_size, proc, pann, priority)

Get pointer to the bottom of the stack.

Store parm in the last word of the stack.

Set up a register save area just above the bottom of thestack; put dummy values in the stack and environment regs;make it look like the process was called by suicide, andzero all the other regs.

Set up the stack base: set the guardwork, priority andstack size; point the B7 entry at the register save areaat the bottom of the stack, point the B5 entry at themain procedure for the process.

Put the new process on the READY Q.

Return the value returned by alloc.

NOTE: This version of creep is specific to the Level 6.

Page 36: Intelligent terminal software flowcharts
Page 37: Intelligent terminal software flowcharts

15

cvb(ptr, length, value ptr)

Value - 0.

Doea the string to be converted atart witha minus sign?

Reaet the neg flag. Set the neg flag.

Skip the minus sign.

Decrease the length by 1

For every character that is a digit, up to length chars

value - the previous value multiplied by the base and the valuecorresponding to the next digit of the string.

Page 38: Intelligent terminal software flowcharts
Page 39: Intelligent terminal software flowcharts

delete (filename, status)

16

Open the file.

Did open succeed?NO /yes

Return error.

Send a delete request to device handler.

Pee the request semaphore.

Set status from that returned by device handler.

*"*"—"-^^^^^^ Catestrophlc bit on in status? ^—"""

YES"*""" ^ ^^-

""""""~"

NO

Return error. Return success.

Page 40: Intelligent terminal software flowcharts
Page 41: Intelligent terminal software flowcharts

17

determine (name)

Page 42: Intelligent terminal software flowcharts
Page 43: Intelligent terminal software flowcharts

18

deq(q_ptr)

Remove the oldest element from the queue.

Cet the value from that element,

Return element to the list of free elements.

Did this empty the queue?

NO

Mark queue head as empty.

Restore initial processor priority.

Return (value)

Page 44: Intelligent terminal software flowcharts
Page 45: Intelligent terminal software flowcharts

19

dir open(ev, fib, index b)

Inic file info block for file.

Read directory entry for file.

X^ Did read fail or is this not a file? ——***"**"

N0\ ^ "YES

Put impossible values in file info block.

Return (-1).

Finiah opening directory.

Position read/write pointer after directory's entry for itself.

Return (0).

dlaablo lo(chan)

Send stopio channel control to indicated channel.

Return results of this.

Page 46: Intelligent terminal software flowcharts
Page 47: Intelligent terminal software flowcharts

20

u41

>

U

ki•H 3A kl

<Ueo woi au

|CBki -o kl

41 4)•-> i-4

1 k1 «—

I =

01 -4k, a

o1 « *jI U.

o) e1 * CO -H1 "°

uo aki c -ki -H U CO

u 01 ^v 01 01 3•-* kl ^V. H <Ji-t

01 >y^ U U H g»*4 0) "H CO U

/ ** 01 *- ^V c/3 js cj a1 ^f 01

1 *""*

0)

4-1

0)

a ih >•V CO -»«**^

*«\ f * 4)

a1-1 ^*^^^^^

c 1 "°

SK kiB ki O CO

o ki c -N^ e

01ki t\ U CO

0) 41 3£ B. X ^v. a) i-t ucj J CO ^v kl kl rH RJ

kl

1 ft

cH •

k>

JZ 41

3 \.-4 C- >*.<4-l .-4 \T3 10 ^*>^^

co x cj a

1 31 —t

Ifcl

3 «-> 1-1 »4- _^^^^<-l 3 a^^" ^'^

J<01

Va

oS w ki

o o akl kl ki c - •ik4 01 ki t4 ki CO

1*4 01 01 3«J "4-1 01 ^*. 01 H Uw 3 4J ^-^ U ii H 4c4 J3 H ^V- 01 -H CO kl•o ki c- ^v W JS O CO

41

•J1-1

lteer

's

le.

3 ~l 3T3 CO _-»««"^1H 4-1 ^^^

kl CO -H3 3 X-.

1 0)a .-1 3

a uE ki kl O CO

01 kiki a) kl C 0)u-i 3 ki -H

01 COCO O >w n - •

4J *J CO >v kl kl kieg e • 01 >v 01 -H 01TJ 1H kl ki <^ ^v CO J3 .-1

49

41

ki

0)

13 « fa(0 --« u-i T4 <o ^^.^.-""^4) -H 3 Q ***0***"^

a OS Wi .O

uo 1

f-t 01

« -O kl kl

O" * CO

2 kl o W cCO • ki "r* CO

p t)

3ou

41i-H

41 >vCO ^v

01

CO ki •

a o- 1* O >v 4-1 kl 01 CO

4) •o **4 (—4 ^^^ 0) -H CO 3 •

u ki u 01 cj c- >. CO .£> 3 kl CO

<He 5

CD01

a)i-4 ^

T3 -H ^00-*CO

01

kl «H O 1-1<fl ^^^^"^ CJ

i* a CJt-4 Q **^^^^ o

« <M 3 CJ u3

•o <8

aV e u ooki

iCO a

•J i a kl

X o • CO

4» u ki 01

e41

41 3er

kl •o 3 41

u 3 ki

m a u u> c 01 41 c 41

« M a CO 01 «u a >

oM

i

Page 48: Intelligent terminal software flowcharts
Page 49: Intelligent terminal software flowcharts

21

enable io(chan, dev)

^^""""^^^.^^^Is this an output channel?t

_—

"~~~^

NO ^^^ ^ YES

In_out - 0. In out " 1.

Addr - starting address In MLCP of the CCP for this channel.

Flag - results of sending first byte of addr to the appropriate LCT byte.

** Flag Indicates error?y'YES

Flag - results of sending second byte of addr to the appropriate LCT byte.

Flag Indicates error?y'YES

Flag • results of sending start lo channel control word to the channel.

Return (flag).

Page 50: Intelligent terminal software flowcharts
Page 51: Intelligent terminal software flowcharts

22

enq(q_ptr, value)

^^^^^^ Is there a free queue element?

NO ^N,",,,

^»^^^ t0000 '^

YES

Call error.

Become non-interruptable.

Remove a queue element from the free list.

Store value In the element.

^^^^^ Is the queue empty?

NO ^*^**^,^^^t

^ "^

YES

Add the queue element to theend of the queue element list.

Make the queuelist.

a one-element

Point the queue head at the new element.

Restore initial processor priority.

Page 52: Intelligent terminal software flowcharts
Page 53: Intelligent terminal software flowcharts

23

*uq_RQ(proc_ld, priority)

^^**«*^^^ Is there a free queue element?

NO ^^^ ^^0^"000'

YES

Call error.

Make us non-lnterruptable.

Remove a queue element from the free list.

Store proc_id in the value field of the element.

'Is the READY_Q empty'

^^^""^ YES

Find first entry in READY Q whose priorityvalue is less than priority.

Hake the queue a 1-element list.

Insert new element Just before the old element. Point READY_Q at new element.

^^ Did this add new element at end ^<-**""""'^

>w of list? ^^ * ^

NO >w ^)0t ^000 'YES

Point READY Q at new element.

Restore initial processor priority.

Page 54: Intelligent terminal software flowcharts
Page 55: Intelligent terminal software flowcharts

2k

entry

Compute the high end of usable memory,

Set up the stack registers.

Put address of high end of memory onto stack.

Jump to start up.

erase(x> y, vector, count, flag)

Compute any shifting required to do addressing on 16-dot boundaries.

,, la it a single vector written many times?™

YES —»>_______^

"""""•^^^^^ Is shifting required? ^-~~~~~'^^ Rsrv_pnl.

"" ——~Js_shlf ting required? ^^Write top part ofvector.

Write out the vector.

Copy vectors into local buffer and writeout 18 at a time, shifting to write lowerparts of vectors.

Write bottom part ofvector.

Copy vectors into local buffer and write out 18 at

a time, shifting to write upper parts of vectors(or all of vectors).

Rls_pnl.

NOTE: This version of erase is specific to the Level 6 IT.

Page 56: Intelligent terminal software flowcharts
Page 57: Intelligent terminal software flowcharts

25

\ V

'

w \ \4> \ j-^ \ &•H \ £.' \

£ \ £s 4-? \a \ a5 \3 I \O \ T< \a3

\VP \

+5 \ c \ h-«

o 1 H \ OTJ \ O \ i>

1\

a. Ih

4*"• \

c-J

eg

c \ K rS \ Vo -p 1 * O 0) / JC

*' I •P *- 1 G ,-•

to p \ 4-> i) •H / CD

a; ^. \ K CJ 2 / a.' cw \ cy > °* 1

^;05 11

\c 0) /

m 1—t 1 M / w zcy I!

W) / actf

V •H 1 a) c / a,c to 1 +5 •H / fd•P

aJ \a5 -P /

Cm / "nJ

-

Q 1 •H / _,_? f-T>

CO 1

a? pO-P 0) CO /

- ncu

to H / h >Tl aJ 1 O to

0) fi 1 4.3 .— wh <v 1 CJ Vh a'•H

c /0)

>O

•go« a) / H •d0) Cm t—

i

cS

M cy

w-p /•H /

O a5 Hbfl a P M CDc * CO / V, c C•H-P

(V M/ &

s— aJa,

Cm h •p•H o M

o3X

.C Cm (VCO

CO H>O

0,

Cm H O rH u PO 0) j

•»

CO-p O 0) Cu -P

+3 CO CV & a cc •H J> p 3 cy

3 U / w »so a) II / u Cy cy cu

E H w/ ^ to ca ^

a) 0) 05 a) aJi-i e 1 w -P %, H c

cy 0) •H 1 &> 05 W W Hx: c -P / ^ -d-p a5

CU P0) C-p3

CU2

3O

Cu VE -Po V £

Page 58: Intelligent terminal software flowcharts
Page 59: Intelligent terminal software flowcharts

error (err no)

Become non-lnterrupCable.

Print an error message, depending on the value of err_no.

halt().

fclose(ev, fib)

Flush the In memory Index block for the file.

Has the file gotten bigger?

Update directory to Indicate new size.

Flush the ln_memory data buffer.

Mark ev and fib as unused,

Return (0).

Page 60: Intelligent terminal software flowcharts
Page 61: Intelligent terminal software flowcharts

27

fdelete(ev, fib)

Flush lnuemory copy of file's Index block.

Did flueh fall, or Is thle the root directory?

Return(-l).

Mark all blocks used by the file as free.

Restore lnjnetnory copy of freereap.

Return(-l).

Mark index block for file as free.

Flag - false.

Flag - results of opening directory containing file.

Flag - results of seeking to directory entry for file.

Mark directory entry on disk for file as empty

Restore inmemory copy of freenap.

Return(-l),

Clean up inmemory data buffer.

Page 62: Intelligent terminal software flowcharts
Page 63: Intelligent terminal software flowcharts

28

first block

Jump into the middle of block - to the point

where it picks up a process from the ready

queue.

Page 64: Intelligent terminal software flowcharts
Page 65: Intelligent terminal software flowcharts

29

fl<i<fv, flh, imiTbiil. I, l.n)

Page 66: Intelligent terminal software flowcharts
Page 67: Intelligent terminal software flowcharts

30

flxup (reserve size)

Save Initial values of R5, R6, and memory location 4.

Put the address of trap_catcher In memory location 4

For (RO - 0;j R0 -+1024)

Try accessing memory location whose address is in RO (will goto trap_catcherwhen try to access a non-existent location).

Count_down:Decrement RO and try accessing that location.

Decrement RO by 1.

Subtract reserve size from RO.

Copy RO to R5.

R6 - RO - the initial difference between R6 and R5.

Restore the initial value in memory location 4.

Make lnterruptable.

Clean up the stack.

Return to caller.

Trap_catcher:Put the address of count down on the stack.

Return from trap.

Page 68: Intelligent terminal software flowcharts
Page 69: Intelligent terminal software flowcharts

31

flush (device_id, st_ptr)

Send a flush message Co Che device handler process.

Pee Che request semaphore.

Sec sCaCus for return.

Return error.

Is catastrophic bit on in status?

Return no error.

Page 70: Intelligent terminal software flowcharts
Page 71: Intelligent terminal software flowcharts

fopen(ruitne, lib, drv, root)

Dev • dddrcsa of buffer structure t.<r (IiIh drive

Loop forever

Open file whose Index block Is root an a directory.

NOOld dlr open, fall?

YES

Return(-l).

NOHave we reached the end of the n.irae?

YES

Set file offset In fib to 0.

Return(O)

.

For (off • size of a dtr_entry structure;;off ~+ size of dlr entry structure)

Read next directory from directory.

Did read fall?

NO YES

Return(-l).

Is this directory entry empty?

JESS.

Continue.

New • results of using pathname to compare name to name for this entry.

Return(-l).

Update name to point to character after delimiter.

Update root to be index block for this entry.

Break.

Update root to he index block for this entry.

Update nunc tu pMnt to end of name.

Return result* of dolnp, xopen on this entry.

Page 72: Intelligent terminal software flowcharts
Page 73: Intelligent terminal software flowcharts

33

free(slze, addr)

Find the first entry in CORETAB whose address is less than addr.This may be the entry after the last used entry.

NO

Is the entry being freed con-tiguous with the succeed-

ing one?

Is the preceeding entry contiguouswith the one being freed?

NO YES

Copy the succeed-

entries down a

slot.

Insert the pieceto be freed intothe table.

Move address. of this

entry to the begin-ning of the freedpiece.

Add size to the size

of this entry.

Add size to size of previous entry.

Does this make previous entrycontiguous with this one?

YES

Add size of this entry to

previous one.

Move rest of table up oneslot to delete this entry.

Page 74: Intelligent terminal software flowcharts
Page 75: Intelligent terminal software flowcharts

3^

fseek(fib, off, type)

o - 0. Treating off as a signed integer,convert it to a number of blocksb and an offset o into the lastblock.

b - -1

Add block size to o tomake it positive.

Treating off as an unsignedinteger, convert it to a num-ber of blocks b and offset oin the last block.

0,3 1,4

Switch (type)

2,5

Set the read/write pointerfor this file to block of b,offset of o.

Move read/write pointer to endof file.

Add block offset of b and byte offset of o to read/write pointer.

Page 76: Intelligent terminal software flowcharts
Page 77: Intelligent terminal software flowcharts

35

ftrunc(ev, fib)

Write out the index block for this file.

Max • number of blocks in file.

Has the last block been allocated?

Decrement max.

Indx - number of disk block that is disk block for this file.

For every block in file:

Read in the number of disk block for this block.

Free the disk block with this number.

Zero the index block.

Set size of file to 0.

Set necessary flags in fib.

Retum(O).

Page 78: Intelligent terminal software flowcharts
Page 79: Intelligent terminal software flowcharts

36

get charset()

Return (CS ID)

get_cursor(x_ptr, y_ptr)

Convert current cursor position from dots to characters,

using the sire of characters in the current char set.

Assign dimensions into *x_ptr and *y_ptr.

NOTE: This version of get_cursor is specific to the LSI- 11 IT.

get_cursor (xptr, y_ptr)

Read cursor from the display head.

Convert values returned to character offsets.

NOTE: This version of get_cursor is specific to the Level 6 IT.

Page 80: Intelligent terminal software flowcharts
Page 81: Intelligent terminal software flowcharts

37

get env (env_ptr)

Call get_charset and save pointer to charset.

Call get_cursor and aave cursor values.

Call get_pg and save page descriptor.

"* "——...^^^ Is this the Level 6 version?

YES """"""^^-^^^^ /no

Call ge»t^pnl and save panel flags.

get_page_size(w_ptr, h_ptr)

Convert current page size from dots into characters, using the

size of characters in the current char set.

Assign values into *y_ptr and *h_ptr.

get_pg(pg_ptr)

Copy values in PAGE to structure pointed to by pgptr.

get_Bize_chars(v_ptr, h_ptr)

Copy character size froa CS_ID structure to *w_j>tr and *h_ptr.

Page 82: Intelligent terminal software flowcharts
Page 83: Intelligent terminal software flowcharts

38

halt

Do forever

Execute a HLT Instruction.

Return Co caller.

NOTE: The procedure will never return by Itself.The user will have to externally change thePC to get out of the HLT - loop.

l_freemap(drv)

lnit_ccb(chan, buf, buf_slze, cntrl)

Flag - results of doing lold to set up buffer.

^*^ Flag Indicates error?NO ^V. _———"" """" YES

Flag - results of sending cntrl to CCB control word.

Return(flag).

Page 84: Intelligent terminal software flowcharts
Page 85: Intelligent terminal software flowcharts

39

get_token(buf_ptr, tok_ptr, della_ptr)

Get index of first char in buf chat Is not a delimiter, and store it In count

For every char In buffer, starting with first delimiter

For every char in delimiter string

Char in buffer « char in delimiter?

NO YES

Terminate outermost for loop,

Copy character from buffer to token.

Increment count,

Null terminate token buffer.

Return count of characters in token and count of delimiter characters scanned at beginning.

Page 86: Intelligent terminal software flowcharts
Page 87: Intelligent terminal software flowcharts

ko

init drlve(drv)

Set up dib entry for drive to Indicate that drive is open.

Open root directory of drive.

Read entry in root directory describing itself.

Read freemap for disk.

Did either of the reads fail?

Indicate disk, is off line,

Return (-1)

Return (0).

Page 88: Intelligent terminal software flowcharts
Page 89: Intelligent terminal software flowcharts

ill

inlt_flb(fib. index b. off)

Assign appropr late values to elements of file information block.

Return (0).

io init()

Put the address of each device's handler's input queue into DEV TAB.

Do for each device

Put the address of this device's request semaphore into the request block for this device.

Init pnl()

Call Z80 LD to get a pointer to the Z80 microcode

Set up so that writes go to all remote display heads

Write the microcode to the Z80 panel controller

Free the space occupied by the microcode in the Level 6

memory.

Initialize the Z80's internal variables.

Page 90: Intelligent terminal software flowcharts
Page 91: Intelligent terminal software flowcharts

42

index(ln atr, of str)

lth of - length of "of" string.

Point pi at ln_string and p2 at of_str.

For every character In "in" string

Does char in "in" string « char in "of" string?

YES

Is next char of "of" string ending null?

NO

Increment pi.

Return (-1).

YES

Point pi and p3 into "in" string, where match wouldstart to end here.

Compare the characters pointed at by p2 and pi, endingwhen they differ, or when hit end of "of" string.

Did all chars match?

NO YES

pi - P 3.

p2 • beginning of of_str.

Return Index into in_string

of beginning of match.

Page 92: Intelligent terminal software flowcharts
Page 93: Intelligent terminal software flowcharts

h3

b driver ()

K>TE: ThU vtr»lon of kb_driver 1* specific to the LSI 11 IT.

Page 94: Intelligent terminal software flowcharts
Page 95: Intelligent terminal software flowcharts

hk

kb driver

NOTE: Thla version of kb driver 1* apeclflc to the Level 6.

Page 96: Intelligent terminal software flowcharts
Page 97: Intelligent terminal software flowcharts

1+5

kb driver: data typo*

YES_ Is the keyboard open?

NO

In there a saved u p read? """

Ring bell.

Put Input character Into user'a buffer. ^**""""*^l s there apace In buffer? /

YES ""^-^^^ /NOVee user'a semaphore.

Reset "saved read' flag. Put the character Into the buffer.

YESAre wc echoing? ^r

- X NO

Print the character using put ascll.

This Is not s procedure. It Is one case In kb_drlver.

kb driver: flush_type

Empty the Input buffer.

^""^"""»»»_>ii>^ Is a read pending?

YES -^^_^^ jf NO

Sat data length to zero and reject the saved read request.

Vee the user's semaphore.

NOTE: This Is not a procedure. It Is one case In kb driver.

kb_driver: resd_type*

Is the buffer empty? ^""""""

NO ' ___^- ' " YES

Compute length to give the user. Save the read request.

Copy characters Into user's buffer.

Vee user's semaphore.

•This Is not a procedure. It Is one case In kb_drlver.

kb_drlver: set mode type

Switch on type of setmode.

•cho_on set_xy echooff ^~~*^. / defsult

Sat "echoing" flag on. Set "echoing" flag off. Set "rejectrequest" In

requestblock.

Set x - y coordinates.

Vee user's semaphore.

Page 98: Intelligent terminal software flowcharts
Page 99: Intelligent terminal software flowcharts

46

klll(proc_id)

^^m^^ Does Id indicate a valid process? ^^^

NO ^s^»s>^ ^0**^ YES

Return(-l).

Set the guardword to indicate that the processshould be killed the next time it is scheduled.

Return(O).

Id cs()

Isthis charset resident in the display head?

Rsrv_pnl

.

Allocate space for the effector table as "variable" number 3.

Write the effector table.

Allocate space for the characters as "variable" number 2,

Write the characters (the bytes of each word must be swaped before writing them).

Flag the current character set as the currently loaded alternate.

RIs pnl.

Write out a new charset descriptor (specifying the size of the characters and which"variables" to use for the effector and character tables).

ld_page()

Has the page been changed since last time we were here^^

YES /NO

Format a page descriptor for the Z80.

Write it out.

Page 100: Intelligent terminal software flowcharts
Page 101: Intelligent terminal software flowcharts

4T

ldlv(hl, lo, d)

Copy the pa ir (hi, lo) to reglaters RO and Rl.

Do a double word divide on (RO, Rl) by d.

quotient.

NOTE: This version of ldiv is specific to the LSI 11 IT.

ldiv(hi, lo, d)

Copy the pair (hi, lo) to registers R6 and R7.

Do a double word divide or > (R6, R7) by d.

Return the quotient.

NOTE: This version of ldiv is specific to the L6 IT.

Page 102: Intelligent terminal software flowcharts
Page 103: Intelligent terminal software flowcharts

kS

ln_xpand(out. In, pi, p2, p3, . . .)

Length - 0.

Nextparm - address of first parameter (pi).

While there Is still something in the input format specification

Copy the char from the input bufferto the output buffer.

ptr parm_xpand (pointer to formatspecifier, and next_parm, andskipped)

.

Move the input buffer over onecharacter.

Increment in pointer by skipped,

Increment length by one. Copy the string pointed to by ptrinto the output buffer, and incre-ment length by the length of thisstring.

Null terminate the output string.

Increment length to include the trailing null.

Return length.

Page 104: Intelligent terminal software flowcharts
Page 105: Intelligent terminal software flowcharts

h9

lrea(hl, lo, d)

Copy the pa lr (hi, lo) to registers RO and Rl.

Do a double word divide on (RO, RD by d.

Return the remainder.

NOTE: This version of lrem is specific to the LSI 11 IT.

lrea(hi, lo, d)

Copy the pa ir (hi , lo) to register: i R6 and R7.

Do a double word dlvis ion on (R6, R7) by d •

Return the remain der.

NOTE: This version of lrem Is specific to the L6 IT.

Page 106: Intelligent terminal software flowcharts
Page 107: Intelligent terminal software flowcharts

50

mfps()

Return Che value of Che PSW.

NOTE: This version of mfps is specific Co Che LSI 11 IT.

fps()

Pick up Che syscem status word.

Decode the currenc level number from it.

^*^«i«Sn^ Is chis level greacer Chan^"**s«>1>^ able level for Che L6?

NO ^-V^^

the non-interrupt-,^***^

^00^^ YES

lev - Che non-inCerruptablestatus word for LSI 11.

lev - 0.

Return (lev).

NOTE: This version of mfps is specific to the L6 IT.

Page 108: Intelligent terminal software flowcharts
Page 109: Intelligent terminal software flowcharts

51

k_page(p ptr, left, bottom, width, height)

Copy parameters to corresponding positions instructure pointed to by p_ptr.

itps(prio)

"—"-—^•.^^^ Does prio have the LSI 11 non-lnterruptable~~~~~

bit set?

Pick up the hardware status word.Do a LEV that will leave the activitybit set for the current level, andswitch us to be working at the non-lnterruptable level.

Decode the current level.

^**'*«««Vsi^ Are we currently interupt- ^^^^^**--^^ able? ^-^

NO ^*^v^||||^ ^**^ YES

Do a LEV that resetsthe activity bit for

the non-interruptablelevel and schedulesthe next ready level.

Leave us at ourcurrent level.

NOTE: This version of mtps is specific to the L6 IT.

itps(prlo)

Copy prio into the PSV.

NOTE: This version of mtps Is specific to the LSI 11 IT.

Page 110: Intelligent terminal software flowcharts
Page 111: Intelligent terminal software flowcharts

open(name, flag iatatus)

52

Determine (name)

,

NO Is device name ok?

Return error.

Does some other process own this device?

YES

Did the caller ask to wait for the device?

Pee the requestor semaphore.

Make this process owner of the device.

NO

NO

Vee any outstanding pee's on the delvce semaphore.

Send a flush request to the handler process.

Pee the devtce semaphore.

Send an open request to the handler process.

Pee the device semaphore.

Set status for caller from status returned from device handler for open request.

Close the device.

Return error.

Return success.

Page 112: Intelligent terminal software flowcharts
Page 113: Intelligent terminal software flowcharts

53

41 wa e>-* •

pH u b9 U 4)

q 41 4) <M<M X w im

"V «l u u 9^V "^

<0 X.

a a 4i

X £U U u

1

3 «*-t •

X 4i e uX 41

41 w 4) IMX 01 IMw e a 3

e X Xe

•H *!I "x•

c a,x w• e X «

1W -<

/ * 4J k W« a

ee a c

<n / *» - e"1a. f o. u uX X 1 >> 3 41 3 a 2uM

V

wf w a. —

I

IN41

IM3

IM41 •

eo £ X X t-

w 41 41»« u 41 00 «-4J X P <xa e w 0X3

o Xu e e au x ^4 3 V• u ex x« AJ | *J W•o M a U -H

» / ° u 3u cn 00 w

2/ 41

r a.

aW U

• e

E"f >N 3 41 "J -

IM

•W a. **-i a an

X 41" a 1

e O X 3v4 X•

— 3 5"oU C,X M• 41 41 h-> c

u £2 41

a U 4J auaX

-o u3X^*s"^_ o " E- M

u CD ^"»»w. Z O q <m tl •H00 ^^^^ Q CL «M H V

IM 41 ^^»w^ 41 00 u

o SIMIM M

nau

B c / • UE i-

| u <w 3 41 09

V 1 «> M -H O X M

1TJ <g a ,^ax >^

4J ^^ « 3

B 41

CL U4J 9 4J •

a c 4i c bO • a -h 4i

41Xau

uoS

e 4* ^r ^ >. 6) CL 03 <frJ

a M ^r V3 •j a u sex •>«O 3 41 O 3

c 41

• > -/^ W 3 C o c e <H XX u ^^ >• ft. —

I

U -H a c u a - x *H Mu

UM41 IM

«l "3 iH 4-1

X 4> Uu 4) 3

41

S ooo C **-« X e*l H <H u *!

*i 9 41 a e

ea x 5

Q. c*4

3 u a 4i £ u 40e a X u X 4>

u u x 9 n C41C

Xss >. 09

-4 41

X 41 SS X Ji h XQ a. u hi w M>4J

o o oU w S V

4Je

o

« M t-j —-i*u M

w OJ «w x <a u a 41

e « 41 (J a4JC

a u X * oS . u 3u vO

o

t)X o X

E

am C u 41 «rt u X a

>• O.TJ

3 4) i •* 41

41 8 01 £w ?

Ew 41 ji e * u a m - •H 4) 30) a U *4 4 <J n u u •H > «ui/j >

4J•m Xa. as c n 41

t-H 4J a. r^ jl £ 241

Page 114: Intelligent terminal software flowcharts
Page 115: Intelligent terminal software flowcharts

pause ()

Enqueue this process on the READY Q.

Call block ().

Return.

pathname (your, dir)

Remember where your string begins.

Compare characters In your and dlr strings up to the end of dir and as long as the two strings match.

Did the strings differ before the end of the dir string,or did the comparison end pointing at something otherthan a NUL or delimiter in your string?

Return pointer to beginning of your string.

Return pointer to your stlrng where comparison ended.

Page 116: Intelligent terminal software flowcharts
Page 117: Intelligent terminal software flowcharts

55

pee(sem)

Become non- interrupt able.

Decrement the count for this semaphore.

^^^ Is count less than 0? ^0****^

NO ^S,. ^ ^***~**' YES

Enqueue this process on the queue for

Chls semaphore.

Call blockO.

Restore initial priority.

peek (device_id , (status)

Is d evice id out of range?

YES " " " - _ ^^NOReturn error.

.Does this process own the

NO — device?

^/YESReturn error.

Send peek request to device handler.

Pee the request semaphore. , ._^^

Set status from that returned by handler process for peek request.

""Is "catastrophic" bit on in status?

NO

Return error.

Page 118: Intelligent terminal software flowcharts
Page 119: Intelligent terminal software flowcharts

56

1u•*-> 9.o *-*

1

01

01 •DCe

>« 01

at

a01 •

1/ 5

IT.u

01

/ *- 01 b1 ">1 u1 *"

/ 4

/T > a

a/ °/ c

1 / *

1

1 -c1 <j (»8u»qj inn jt a*A;jp qd a»s)

3 TJ / aO c / 3

1

3

s / **

a o / m1 uI •M

**

X a^ o a> W >s4 cV e —

eha * D V <0

1 wto / —. 3 II o

1 4 1*>

tj

w

1^

— •*- *

g

«w

1 -c* L hi

•c c-t 0| (Q a,^ a c * - -o -a ac

1« 5u

b 0>

u *>

e •>«4

a * U

0)

3O"V

o 01

3

353Set

wr

amount transm

S

««>

U

«c/l

u

01 9A- 1H /

h.• 1

>4

1

*/ _

w 1 ;(»J»P :a»Ajap qd »»s)

• j

•3

3 3

J.

11 (adX]~q«nxj jaAijp~qd a»s)

01ite

amount

i

In

ourIncluding

ig

null

if

Is

not

0) T)

3 •-!

—* ig

>CD

0* -

w 01

c X- UJ

« »j x-\w o « Xtz c — XTJ — X

2 5OSchi

V3 •

er

6

3a.e

0)

3

BOU

CO

01

3o*Vu

Calcula

of

datd

buf

fer

,

tral]

lr

buffer

empty.

c ~<

—•: Um c<o o;< W -H

01 ns XC > _^>

U) & u 1 01 »U 41

U«41 hi

> a•

• "Oc Of

(adXi~3JTJ« :jaA[jp~~qd »»$)w Ih* <U o u

W c J

». C1

g wio

TT

• IIus

<0 01 (9dA]~pVdJ JOAjjp'qd aaj)

2> V > u

m

u•i

•31*

ca

n6

M

1M

c

1

/ °(adXj

-*aoj :> j3A[jp~qd »«s)

>m

1

41

y1

•o41

>•

at m u c0)

a(»dAj

—uado j»A[jp~qd »»s)

S a i

Page 120: Intelligent terminal software flowcharts
Page 121: Intelligent terminal software flowcharts

57

adX; *;»p :^a/.;jp nd »»s

ad/^Uar-tj: JSA-jjp qd aas

C B

C V

I

ad/1% p«3j:u9A;jcp t,d as.-

ft) ft)

Page 122: Intelligent terminal software flowcharts
Page 123: Intelligent terminal software flowcharts

58

ph_driver: data*

While there is a pending read, and there is more data in our buffer.

Copy the next character from our buffer into the reader's.

Put a null after char just copied.

Increment the reader's count of data in the buffer.

Is the buffer full, or was the last char copied a newline?

YES

Vee reading process,

Set saved read to 0.

Increment the next character index by 1, module our buffer size.

This is not a procedure. It is one case in ph_driver.

ph_driver: close_type*

\Js the phone available? —

NO \. ^ YES

Flag » results of disabling phone input.

^vls phone not available, or is flag set?

NO N. .

"

YES

Set catastrophic and reject req bits in caller's status word.

Vee requesting semaphore.

*This is not a procedure. It is one case in ph_driver and is specific to the

Level 6 IT.

Page 124: Intelligent terminal software flowcharts
Page 125: Intelligent terminal software flowcharts

59

ph driver: flush type*

Stop any current output operation

Eapty the input buffer

" — _ Is there a saved read?

y/m

Reject the saved read

' - Is there a saved write?

YES " '

-^________^ ^€Reject the saved write.

—,

Is the phone line down?Sm

Set error flag in request block.

Vee user's semaphore.

NOTE: This is not a procedure. It is one case in ph_driver, and

is specific to the LSI-11 IT.

Page 126: Intelligent terminal software flowcharts
Page 127: Intelligent terminal software flowcharts

6o

ph_drlver: flushtype*

Beset PH_next and PH free to 0.

Set lo error flag to false.

Set aborted bit In reader's status word.

Vee reading process.

Reset saved read to 0.

Flag - results of disabling output.

Flag - results of getting status word for CCB Just completed.

Flag • results of getting count of characters not sent.

Set the writer's data count to the nuaber of characters sent.

Set aborted bit In writer's status word.

Vee writing process.

Reset active write to 0.

Vee requesting process.

•This Is not a procedure. It Is one case In ph_drlver and is specific to the Level 6 IT.

Page 128: Intelligent terminal software flowcharts
Page 129: Intelligent terminal software flowcharts

61

ph_driver: open_type*

Flag - results of resecting CCB list for phone input

For each buffer used by phrint, as long as flag 0.

Flag results of initializing CCB to use this buffer.

Reset buffer index used by phrint.

Flag results of enabling input for phone

Set catestrophic and reject request bits in user's status word.

Vee requesting process.

•This is not a procedure. It is one case in ph_driver and is specific to the Level 6 IT.

Page 130: Intelligent terminal software flowcharts
Page 131: Intelligent terminal software flowcharts

62

Page 132: Intelligent terminal software flowcharts
Page 133: Intelligent terminal software flowcharts

63

ph_driver: status_change*

Complement th * phone available flag,

Set catastrophic and aborted bits in reader's status.

Vee reading process.

Set saved read to 0.

Turn off output

Input status for CCB just completed,

Input number of chars not transmitted,

Set catestrophic and aborted bits in writer's status.

Set writer's data_len to count of chars actually sent

Vee writing process.

Reset active write to 0.

*This is not a procedure. It is one case in ph_driver and is specificto the Level 6 IT.

Page 134: Intelligent terminal software flowcharts
Page 135: Intelligent terminal software flowcharts

Gh

0)

a

>-4

uat

>

Ja

\ " \ „\ w \ ^

\^^

4-1

3a CO

3 134JO c- 1CQ

o4-1 1

at 14JCO

4J CO 1

•o 00 / CO o> /CO

c CO / 3 4-1 /

011 «fl

CO rH 1

<4H 1 oat 1

CO I CO1 w g 4J W ^H

1>4 o CO 1 00 / >> fH

ca

CJCJ M 1 CQ co /

CJ *H I4-1

VCO

1CJ 1+4

13a c

H 1 4-1 CO / 4-1 •H

fH 1 3 M 1 3CO1 a o

PQ 1 4-14-1

CJ J3* 0) •H

CJ / o co

fl

u I c J=ai

0) 1 cd a c- |

OS 1 4-1

a> f 00 00 at ,,l• u 1 e c CO 4-1

u 1 •H •H CJ

4-1 00 1 iH 4-1 00 0)

°1 cH /«3

•H •

l-i

CO

CO •

o1~>

at

.* 13 I 4-1 t- 4-> <4-l MiH C • 1 •H CU CO oUQ 01 !-) 1 C <4-4 at CO 4-1

c•

a at 1 •H <4-( m •H CO

1 c 1 3 CU CO CO

«M C I *4h 43 VM u 4J at

0) O (0 1 o o H CJ CJ

e» 1 4J J2 1

CO -M «H o

a> 1 •H ca a I CO 01 *. JS Mi-H U u 1 4J U 4-1 rH o. a.-° 1 S iH CO 1 r-i 0) .-1 43 at o<d 1 3 C / o 3 -i / o 3 CO > 1-1 00iH 1 at CO O 1 z CO .H,

JZ CO i-t •H 4-1 c

•H 1 > a) jr at cc CD •H 4-1 CO •Hm 1 •H w a. 1 S-i u P CO CJ CO t-l

> l 4-1 1 > (0 4J r-l

to 1 CJ

«0ll

1 II H CO

c 4-1

CQ

aCO

CJ

0) 60 I 00 00 3 at

c 4-1 CO 1 CO CO a 4J CU

o 0) iH 1 »H .-t at at at 0)

jC CO fo 1 PL. u* c OS w >a I o

08 >

7 CO

A O

/2 z

01

J=

o4-1

O

CJ

CU

aCO

73cCO

u01

>

a

at

co

CO

CJ

cu

eo

0)

Id

3•aat

CJ

oua.

co

o H

CO \0

oo at

T! >

ex

Page 136: Intelligent terminal software flowcharts
Page 137: Intelligent terminal software flowcharts

65

phriocO

Get Che status for the CCB that just completed.

Does status indicate change in the data set status?

NO YES

Send status_change message to phone process.

Return.

For every character in our data buffer

Initialize a new CCB using the buffer Just emptied.

Increment our buffer index by 1 modulo the number of buffers we have

NOTE: This version of phrint Is specific to the Level 6 IT.

Page 138: Intelligent terminal software flowcharts
Page 139: Intelligent terminal software flowcharts

66

phxintO

Input status for CCB that just finished.

Input CCB range to get count of characters not transmitted and store in global PH count.

~^______^ CCB status indicates an error? ^^^-~~"~~^

NO "—-~^__^^ ^ —" ""YES

Send message to phone process thatthe write has finished.

Send message to phone process thatthe write failed.

NOTE: This version of phxint is specific to the Level 6 IT.

Page 140: Intelligent terminal software flowcharts
Page 141: Intelligent terminal software flowcharts

67

01

<4H

3

•o

1 J2n V) eg

ii \ o Id U kl

\ zD. \.3 >ki

kl c^-

OJ -Ci-i 01

C rHH J3

CO

o c

>"

Make

the

processo

Interrup

«3CO

ft.

1

I 00 01

*<Z** O

z

iz

€»-• 14J 1

kl 1

(0 /4JHI 1

"O /CO 141 1ki 1

01 /-C 1

hi 1

O /

Q 1

\ o\ z

C" \"0 \41 \

•° \CO \C \41 \

CO

c

HrHMklCO

CO

*H

-oCO

41 0)

ki en

01

01 ki

i-l IKi*

3z

1

kl

01

kl

e*H

ki

a0001

CI

kl

a.

V 01

£ rHkl Si

CO

01 kl

.* aCO 3

u

1

Q.3 •

ki 41e— i • ki |

rHa 1 •o 01 1 JB01 CO kl f CO

Ol 1 Ol C / kl •

'- 1 hi H / a 41

00 1 1 kl 3 ki

° 1 to o / a ii

ll CO / 3 ki JCa. 1 01

hiN 1 ki

ki

41- kl

aCO

c 1 CO 1 01 C E^H 1 H

l-l1

kl

cH 01

go

"O •H 1 H ki

CO e / O rHOl •H / kl 09 01

ki 11 W1 " 1 o

U-l

co

4)

cCO

1-11 u

1 >" 1 O & I ^4) 1 1 oc • N—

'

c 1 l-l / CO 01 ki 41 r4•

ra 1 a 1 •-I c a JS c co. e

01 / wU-l -i-l

4J 41

ki al

v.

3J= i-i / UJ ki 3 M 41 D kl

u u / *" Ol CO 41 <H 41

3 < W ki X ft. ec a:/

6 01

l-l

u

rHL. 01 -O

U-t >4)

CO

kl 1 41•a l-l a <0 / r-ltn 3 o / kl JO •

0) 4J l-i •° / a. CO 41k. o. U >^ 1 3 u kl •

3 01 41 1 hi a 01 4)O hi u "* / hi 3 rH ki•u u c 01 kl a

41 •H * / 4-1 ki E j:rH kl 1 c • 41 a1) c c IB / H O. kl o COS •H l-H I 3 C 64 c 01 •H «a u

41 l-l

-* COki

kl eg

a> r-l o E a rH> -H CD 41 CO CO 41H 0) -* as 41 ekl U 01 hi CO 41 ki COu u u S U a<0 C ee o ki.

l-l / C/J <0 01 kl 01

ca

cum

u a / U -H C<*-l -H

a Vm jCki

CO > •o 01 hi 01 klai <0 -* *-» 3 .* H (1

l-l u. 01 (fl 01 a) c« 01

>' U1) <4-l

ce: r , CO hi £ 3 ft.

'- HU) V

.OS -n

Page 142: Intelligent terminal software flowcharts
Page 143: Intelligent terminal software flowcharts

68

pp_write() (code, buffer, count)

Rsrv_pnl

.

Do for each display head.

Turn off "must wale" for thla head.

Is thla panel selected?

YES

Do "forever"

Read display head interrupt level.

Disable Interrupts.

Is a kb or tp read in progress from this head?

YES NO

Set flag to makeinterrupt routine

wake us up.

Enable interrupts

Attempt to start the write.

While read still

in progress

Null.

Enable inter-

rupts to cp.

Pause.

Pee the head'ssemaphore.

Do until success

Read panelstatus.

Set flag so inter-

rupt routine will

wake us up

.

Turn on "must wait"

flag for this head.

Enable interrupts to cp.

Break.

Do for each display head that has "must wait" flag set.

CERls pnl.

Pee the head's semaphore.

NO

Page 144: Intelligent terminal software flowcharts
Page 145: Intelligent terminal software flowcharts

69

print f (format, pi, p2,.

Start a pointer at first character of format string.

Do while there are atill characters In the format string.

Is the next character in the format a 'Z'?

NO YES

Call put_ascii to print the character. Use parm_xpand to expand the next parameter.

Increment format string pointer past thecharacter.

Increment format string pointer past formatdescriptor.

Do for each character in the expanded string

Use put_ascli to print the character.

NOTE: This version of prlntf is specific to the LSI 11 IT.

prlntf (fmt, pi, p2 )

Set s to point to this characterIn the format string.

Print the string from s up to here,

using putstring.

Advance to next format string character.Use parm expand to expand the next parameter.

Print expanded parameter.

Advance past format in format string.

"s" » null.

NOTE: This version of prlntf is specific to the Level 6 IT.

Page 146: Intelligent terminal software flowcharts
Page 147: Intelligent terminal software flowcharts

70

put (x, y, vector, count, flag)

Compute any shifting required to do addressing on 16-dot boundaries.

** T ° it a single vector written many times? .. ""

YES ' " , — '

^"^^--^^^^^ Is shifting required? ^TES -^^^ ^^^-"-^ no

Rsrv pnl.

" Is shifting required? /YES

" ""-"-—-^_ /N°Write top part ofvector.

Write out the vector.

Copy vectors into local buffer and writeout 18 at a time, shifting to write lowerparts of vectors.

Write bottom part ofvector.

Copy vectors into local buffer and write out 18 atat a time, shifting to write upper parts of vectors

(or all of vectors).

Rls pnl.

NOTE: This version of put is specific to the Level 6 IT.

put (X , Y, vector, count, flag)

Compute amount of shirting required to do the puts on 16-dot boundrles

Set up panel registers for write

Do count times

"*"""—«^^^ Is it a put of a single vector? ^"""""""^

Yes ""——-*«^__^ ^—

"

No

data = vector data = next word pointed at by

vector

' " Is shifting required? yS

Put lower part of vector "data" on the screen

Put upper part (or all of) vector "data on the screen

Increment the X panel address

NOTE: This version of put is specific to the LSI- 11 IT.

Page 148: Intelligent terminal software flowcharts
Page 149: Intelligent terminal software flowcharts

71

Page 150: Intelligent terminal software flowcharts
Page 151: Intelligent terminal software flowcharts

72

Page 152: Intelligent terminal software flowcharts
Page 153: Intelligent terminal software flowcharts

73

putstring (buffer. count)

Ld_page

.

Ld cs.

Write the string.

putchar(x, y. ch)

Get a pointer to the vectors for this character In the current character set.

Use put to VT ite the vectors.

NOTE: This version of putchar is specific to the LSI 11 IT.

putdot

Write an appropriately formatted message to the Z80 panel controller.

NOTE: This version of putdot is specific to the L6 IT.

putdot (X,Y,3iode)

Set panel registers to write or erase the dot at X,Y.

NOTE: This version of putdot is specific to the LSI-11 IT.

Page 154: Intelligent terminal software flowcharts
Page 155: Intelligent terminal software flowcharts

lh

putlinet'Xa, Ya, Xr, Yr, mode)

NOTE: This version of putline is specific to the LSI 11 IT.

putline

Write an appropriately formatted message to the Z80 panel controller.

NOTE: This version of putline is specific to the L6 IT.

Page 156: Intelligent terminal software flowcharts
Page 157: Intelligent terminal software flowcharts

lb

read(device_id, buf_ptr, length, (status)

Does this process own the device?

YES

Return error.

Send read request to device handler.

Pee the request semaphore.

Set status from that returned by handler process for read request.

Is "catastrophic" bit on in status?

YESNO

Return error. Return success.

read_q(q_ptr)

Pee the semaphore for this queue.

Deq an element from this queue.

Return the value returned by deq.

Page 158: Intelligent terminal software flowcharts
Page 159: Intelligent terminal software flowcharts

76

reatart_io(chan, it_ld)

Offset - in_out * the number of LCT bytes per channel.

Ptr - the address of the LCT bytes for this channel In the initial MLCP image.

Flag - false.

For every LCT byte for this channel

Write this byte to the corresponding LCT byte for this channel.

Flag • true.

Break.

Flag - results of enabling lo on this channel,

Return (flag).

Page 160: Intelligent terminal software flowcharts
Page 161: Intelligent terminal software flowcharts

77

ringbelK)

NOTE: This version of ringbell is specific to the LSI11 IT.

ring bellO

Write an appropriately formatted message to the Z80 panel controller.

NOTE: This version of ringbell is specific to the L6 IT.

Page 162: Intelligent terminal software flowcharts
Page 163: Intelligent terminal software flowcharts

T8

Rls pnl()

rsrv pnl()

NO

This process owns the panels?

y'YES

pee (pp_access).

pp_owner ME.

Increment pp_res_level.

Page 164: Intelligent terminal software flowcharts
Page 165: Intelligent terminal software flowcharts

79

s_read(drive, lector, buffer)

Compute bus address of disk.

Compute physical track and sector number for the sector.

Do up the maximum number of retries

Loop forever

Try to do an IOLD to load the buffer address and size Into the Interface

Have we exceeded the maximum number of attempts?

YES

Return error.

Write track and sector numbers to the interface.

Start a seek.

Do until status is read

Try to read disk status (success implies that the seek is done).

Do until status is read

Try to read disk status (success implies that read is done).

n*"TE: This version of s read Is specif!-- to *-h» I,e\-el 6 IT.

NO

Page 166: Intelligent terminal software flowcharts
Page 167: Intelligent terminal software flowcharts

Nll'IK: l,l|,j *"' rr ' ' "" '•' • r. 1. 1 Is *).,.. | r 1 . 1,. Mi,- I.Sl II II

Page 168: Intelligent terminal software flowcharts
Page 169: Intelligent terminal software flowcharts

81

•_wrlte(drtve, sector, buffer)

Computer bus address of disk.

Compute physical track and sector number for the sector.

Do up to the maximum number of retries.

Loop forever

Try to do an IOLD to load the buffer address and size into the interface.

Have we exceeded maximum number of attempts.

YES

Return error.

Write track and sector numbers to the Interface.

Start a seek.

Do until status Is read:

Try to read disk status (success Implies that the seek Is done).

Do until status Is read:

Try to read disk status (success Imp lies that the write Is done).

HOTE: Thl • version of s_wrlte Is specific to the Level 6 IT.

Page 170: Intelligent terminal software flowcharts
Page 171: Intelligent terminal software flowcharts

wr lt«'(Jr lw, Hi-iiiir, biitHT)

Drv » drive number less than 11.

Trk • number of track containing sector.

Sect number of sector on track.

For the maximum number of attempts:

Send drv and sect numbers to disk.

Walt for the disk to be ready.

Set disk's address.

Send track number and write command to disk.

Walt for the disk to be ready.

Swab (l he il.it. i ri'.id).

Return (0).

K.-iurn (-1).

Mini. ii, i„ „.. r „|„„ ,,i Hwrll.- Is Miifiilii I • I In- LSI II IT.

Page 172: Intelligent terminal software flowcharts
Page 173: Intelligent terminal software flowcharts

83

save free(drv)

Is drive number (drv) out of range?

Return(-l)

Write the injnemory copy of freemap to disk.

Return results of write.

screen clear

Write an appropriately formatted message to the Z80 panel controller.

NOTE: This version of screen_clear is specific to the L6 IT.

screen clear()

Set panel control register to clear the screen.

NOTE: This version of screen clear is specific to the LSI-11 IT.

Page 174: Intelligent terminal software flowcharts
Page 175: Intelligent terminal software flowcharts

84

s crunch(ptr, size, num)

For size times

*ptr - *(ptr + num).

Increment ptr.

seek(4evice_id, length, type)

Page 176: Intelligent terminal software flowcharts
Page 177: Intelligent terminal software flowcharts

85

set_charset(cs)

CS ID - CS

•et_cur8or(x,y)

Convert x and y from character to dot coordinates.

Assign values to curs_x and curs_y.

NOTE: This version of set_cursor is specific to the

LSI-11 IT.

•et_cursor (x_addr, yaddr)

Convert parameters to dot offsets.

Write offsets to display head controller.

NOTE: This version of set_cursor Is specific to the Level 6 IT.

Page 178: Intelligent terminal software flowcharts
Page 179: Intelligent terminal software flowcharts

86

••«._•:.v (env_ptr)

Sec_charaet.

S«t_cursor.

Set_page

.

YES

_^^ Is this the Level 6 version?

NO

Set_pnl.

••t_s»de(devlce_ld, buf_ptr, length, istatus)

-— ___ Is devlce_ld out of range?

YES . ^X'NOReturn error.

" ———________^^^ Does this process own the device?NO ' —

. .X^ES

Return error.

Send set mode request to device handler.

Set status from that returned by handler process for set node request.

" Is "catastrophic" bit on In status?

Return error.

Page 180: Intelligent terminal software flowcharts
Page 181: Intelligent terminal software flowcharts

87

•etpage (pageptr)

Move parameters from the new page descriptor to the "current" one.

"""*——^^^^^ Is this the Level 6 version? /

YES ""^""*~'~—*^^ /»^^^^ / NO

Set the "nev page" flag.

startupO

Size maximum address of available memory.

Zero memory from the end of the program to the end of memory.

Set up CORETAB to indicate all of free memory.

Clear the panel.

Allocate space for the free queue elements.

Initialize the list of free queue elements.

Set the default page, character set, and cursor position to usefor plasma panel printing.

Set up the READYQ as empty.

Create all the processes specified in PROCTAB.

Initialize the I/O system.

Call first block.

NOTE: This version of startup is specific to the LSI 11 IT.

Page 182: Intelligent terminal software flowcharts
Page 183: Intelligent terminal software flowcharts

88

startup fhigh^

Set up C0F.ETA5 to indicate all of memory.

Allocate spaje for the Cr@e queue.

Initialize the list of free queue elements.

Disable interrupts from all of the remote display heads.

Set up READY Q as empty.

Initialize the remote display heads.

Set default page, character set, and sursor position far plasmapanel printing.

Create all processes specified in FROCTAB.

Load the MLCP.

Initialize the I/O system.

Enable interrupts from all remote display heads._

Call first block.

NOTE: This version of startup is specific to the Level 6 IT.

Page 184: Intelligent terminal software flowcharts
Page 185: Intelligent terminal software flowcharts

89

str num(num, base, place)

^V^ Is base valid (i.e., greater than 1 and

^V^ less than 16)?

NO >w ^ ^ YES

Put a »*' in

place.

next quotient of unsigned division of nun bybase.

\ next ! * 0? ^^^**

NO \ ^^t^ *00* YES

Recursively call str num with parametersnext, base, and place.

next remainder of unsigned division of numby base.

Convert next to the ASCII character representing

its value, and put that char where indicated

by *place.

Increment *place by one character.

Page 186: Intelligent terminal software flowcharts
Page 187: Intelligent terminal software flowcharts

90

suicide ()

Clean up any pending I/O .issocla ted v 1th this process.

Return the process' stack to the pool of free memory.

Do a process switch.

tiod(token, separator)

Get_cur8or.

Get_page_size.

Compute length of token string.

Compute length of separator string.

*

— ta (length of token string) + (length of separator string) more than the/__

space left on this line? /YES ' —-_. / NO

Print a newline using printf.

Print the token and separator strings using printf.

Page 188: Intelligent terminal software flowcharts
Page 189: Intelligent terminal software flowcharts

91

t<*_prtn,(d«ll„, .ep.rator. text. panna)

»- t^, find Mr.t Pa ra^£^=I-:-

, ,|

-

YES

Page 190: Intelligent terminal software flowcharts
Page 191: Intelligent terminal software flowcharts

92

01

a

uHs

Page 192: Intelligent terminal software flowcharts
Page 193: Intelligent terminal software flowcharts

93

tp_driver: data_type*

YES— ________

>^^^^ Is the touch panel open? y^wYES """

Is there a read saved up?"* """

NO

Copy the touch Into the user a buffer."^^--.^^Is there space in buffer?

f NOVee user's semaphore.

Reset "read pending" flag.Copy the touch into the internalbuffer. 1

*This is not a procedure. It is one case in tp driver.

tp_driver: read type*

Is there data available? ^ ""

YES " „ NO

Compute number of touches to give to user. Save the read request.

Copy touches into user's buffer.

Vee user's semaphore.

This is not a procedure. It is one case in tp driver.

Page 194: Intelligent terminal software flowcharts
Page 195: Intelligent terminal software flowcharts

9U

Page 196: Intelligent terminal software flowcharts
Page 197: Intelligent terminal software flowcharts

95

tt activate(t)

For every slot in tt_current

Is this slot empty?

tt current (slot) - t,

Display the target,

Return(slot)

Return (-1)

YES

Page 198: Intelligent terminal software flowcharts
Page 199: Intelligent terminal software flowcharts

96

tt_arranger(ltat, nua, valuea, labels, c», flag*, area, t width, t height, mode)

Copy valuea in area to left, bottom, width, and height.

Max_p«r_rov • sax number of targeta t_wldth dota wide that will fit In one torn.

1 • height of final block of targets.

Move bottom up by half of difference between 1 and available area.

height • 1.

1 * width of row of targets.

Move left over by half the difference between 1 and available area.

width - i.

y height of area.

For nun descriptions

Move y down the height of one target.

Move x back to 0.

la this the last row and are we centering horlzontall

Cet width of this row.

Move left over by h.ilf the difference between this width andwl'llh of .irii.

Create a target at x+left, y+hottom having the attributes specified In parameters.

Move x over one target width.

Page 200: Intelligent terminal software flowcharts
Page 201: Intelligent terminal software flowcharts

97

tt cleanupO

For every slot in tt_current

Delete the target pointed to by the entry in that slot.

tt_create(t, x, y, width, height, value, label, cs, flag)

Copy the parameters into the appropriate fields of the target structure.

Reset the in use flag.

"~"-—^^^stflags set so that the target would appear on no remote

*"**—-^.^^ display heads?

YES " ^^^ / NO

Set tflags so the target will appear on head 0, only.

NOTE: This version of tt create is specific to the Level 6 IT.

tt create(t, x, y, width, height, value, label, cs, flag)

Copy the parameters into the appropriate fields of the target structure.

Reset the in use flag.

NOTE: This version of tt create is specific to the LSI-11 IT.

Page 202: Intelligent terminal software flowcharts
Page 203: Intelligent terminal software flowcharts

98

tt deactlvate(slot)

Erase the target Identified by slot.

Delete the target.

Return the results of erasing and delet Ing.

tt_delete(slot)

""""--—-—^^Does slot Indicate an active target?

NO *-*—^^^^ v' YES

Return (-1).

Turn off In use flag in target indicated by slot.

Zero tt current (slot).

Return (0).

tt flash(slot)

*"«^^^_^ Does slot indicate an active target?

NO "* — yr YES

Return (-1).

NO

Is this target flashable?

YES

Lite all the dots in the target.

Erase then all.

Display the target.

Return (0).

Page 204: Intelligent terminal software flowcharts
Page 205: Intelligent terminal software flowcharts

99

\ *f>

\ *"

1>

c^-

M•MUmu«>nHkl

u« *

c• 1 ^ ki

* 1 at 01w 1 c •«• 1 a uv I a o•* XTl oi

a 4J 01•M •a

0140 u m 00O a c •a—

*

01

ex 01 01• & u X* 1 10 4J

£

*>•

c

oV>>CO

&nNo01

X

>

4J«l

00kl

CO

01

kl

5

SOc>as

01

kl01

00ki

10

01

c

01

uCOaCO

01

Xs

00c

>CO

01

4101ocMCO

W01Xkl

e

X

3

b01ki

uCO

M(0

w00u

440100w

II

a

at

4J

aki

ti

Xuk>CO

ki

01

eCou

klUN01

kl

01

00kl

CO

w01X

kl01

00kl

01CO

kl

ea

XgUN

01

e«-N

5

at

JZuc

3

01

00COa

jw o 4J O NN kl CO X to 01c e co kl u at JZt* 01 m IM bo 4>O 3 1 I a 01 o 01 CO X CO

<*-. •2 c oe 5 Xa

Ho|O 3 a 01 kl X 01 oz V O M rH N 4J •H C01

u JZ *H M IN kl CO X a.3 CO > U IM CO o c M oi

*-j e O IM H kl uu 4J ti B 01 01 at o3 «Q a OB X 01 CO kl JD 01 ki*- £ M u 01 kl c M c x

•VI c o 01 01 O w >V o 10 o u <w c£ kl a e kl 01 u uat e u X eg o at nV on c •o u kl u u 00 00

c00 h c M j> b X CO ea h <—

1

u (B 3 a. o 00 a X X a o at<9 W w X kl u kl CO x 4J4-> 0) u u 01 o 00 u to e4 oc c H X kl IM c 3 •HV J 01 o 3 u Lj

1 ,

*-» MIn

kl

eCO

CO

01

N•ae

cat a

**N U X i 3 c S". <0V

w ot41 w / u a. X CO h ol JZ

1

t

C « / H In1w c

X u CO

Xa

p ctol o

H *"* / c 01 01 <0 •n 01 01 at at , t

1

e3

SL

ai

w / o/ Z 2

Xa9eoj

M

to

10

u

Mkl

01

V)

1

01

C/>

Xkl

kl

01

X4J

kl

01

XnN

1r

JZ

•jat

U3 A*o

b<

o

«

e

s

eIn

3M01

M

,

*

s e

Page 206: Intelligent terminal software flowcharts
Page 207: Intelligent terminal software flowcharts

100

ttlabel(slot)

Return (-1),

Does slot indicate an active target?

t pointer to target structure for target.

Is this a target that should not be labeled?

NO

Return (0),

Remember current printing environment.

Set x and y to coordinates of lower left corner of target, leaving white spaceInside border.

Set width and height to the size of the target, leaving white space inside the edges.

Set the charset to the one for the target.

Get the size of characters in this charset.

Modify x and width to center a maximum line of characters within the target.

Set the printing page to be this area within the target.

Position the cursor at the top of the page.

Tok_print the label.

Restore the printing environment.

Return (0).

NOTE: This version of tt_label is specific to the LSI-11 IT.

Page 208: Intelligent terminal software flowcharts
Page 209: Intelligent terminal software flowcharts

101

tt_llte(slot, mode)

Get the coordinates of the lower left corner of the targetIn x and y.

Get the size of the target in width and height.

Area_lite(x, y, x + width -1, y + height -1, mode),

Return (0)

NOTE: This version of tt_lite is specific to the LSI-11 IT.

tt_lite(slot, mode)

• "" Does slot indicate an active target?

^S^ YES

Return (-1).

^S^ Is this a flashable target?

Get the coordinates of the lower left corner of the target in x and i-

Get the size of the target in width and height.

Rsrv_pul.

Get_pul (&pul).

Use set_pnl to set from tflags the set of display heads to write on.

Area_lite (x, y, x+width -1, y+height -1, mode).

Set pnl (pnl).

Rls pnl.

Return (0).

This version of tt_lite is specific to the Level 6.

Page 210: Intelligent terminal software flowcharts
Page 211: Intelligent terminal software flowcharts

102

tt mark(slot, mode)

"" Does slot indicate an active target?

YES

Return (-1).

^"~"—-—»^^^^ Is this a markable target?

NO""

.^^ jT YES

Return (0) .

Get coordinates of lower right corner of target, offset tobe inside boarder, in x2, yl.

Get coordinate of left edge of mark in xl.

Get coordinate of top edge of mark in y2.

Area lite (xl, yl, x2, y2, ).

Return (0).

NOTE: This version cvf tt mark is specific to the LSI 11 IT.

Page 212: Intelligent terminal software flowcharts
Page 213: Intelligent terminal software flowcharts

m

.

103* | .- S»

tt_mark(slot, mode)

Does slot indicate an active target?

^ YES

Return (-1).

Is this a markable target?NO ^^YES

Return (0).

Get coordinates of lower right corner of target, offset to be inside border, in x2, yl.

Get coordinate of left edge of mark in xl.

Get coordinate of top edge of mark in y2.

Rsrv_pnl.

Get_pnl(&pnl).

Use set_pnl to set from tflags the set of remote display heads to be written on.

Area_lite(xl, yl, x2, y2, mode).

Set_pnl(pnl).

Return (0).

NOTE: This version of ttmark is specific to the Level 6 IT.

Page 214: Intelligent terminal software flowcharts
Page 215: Intelligent terminal software flowcharts

104

ttjsove(t, newx, new_y)

Set tx and ty entries in target structure t to nevjc and new^y.

tt_outline(slot, node)

Cet coordinates of lover left corner of target in xl and yl,

Get coordinates of upper right corner of target in x2 and y2.

Hove xl, yl, x2, and y2 to the inside of the target to leave white spacearound it.

Use putllne to display or erase the four lines connecting (xl, yl) to

(xl, y2) to (x2, y2) to (x2, yl) and back.

Return (0).

NOTE: This version of tt_outllne is specific to the LSI-11 IT.

Page 216: Intelligent terminal software flowcharts
Page 217: Intelligent terminal software flowcharts

105

tt_out line (slot , mode)

Return (-1),

Does slot Indicate an active target?

t tt current (slot).

Get coordinates of lower left corner of target in xl and yl.

Get coordinates of upper right corner of target in x2 and y2.

Hove xl, x2, and y2 to the inside of the target to leave white space around it.

Rsrv_pnl.

Use get_pnl to save the set of currently selected remote display heads.

Use set_pnl to set the set of selected heads to those specified in tflags.

Use pucline to display or erase the four lines connecting (xl, yl) to (xl,y2) to (x2, y2) to

(x2, yl) and back.

Use set_pnl to put the set of selected heads back.

Rla_pnl.

Return (0)

.

NOTE: This version of tt outline is specific to the Level 6 IT.

Page 218: Intelligent terminal software flowcharts
Page 219: Intelligent terminal software flowcharts

io6

tt_read (touch)

Flush input from the touch panel.

While (true)

Read the coordinates of a touch.

tx - the x coordinate, in dots.

ty the y coordinate, in dots.

For every slot in tt current

Does this slot describe an active target located on the.display head from which this touch came?

Flash this target.

Return (slot).

NOTE: This version of tt read is specific to the Level 6 IT.

Page 220: Intelligent terminal software flowcharts
Page 221: Intelligent terminal software flowcharts

107

CC read (touch)

Flush input from the touch panel.

While (true)

Read the coordinates of a touch.

tx » the x coordinate, in dots.

ty - the y coordinate, in dots.

For every slot in tt current.

NOTE: This version of ttread is specific to the LSI 11 IT.

tt_relabel(t, str, value, mode)

^"""•^w^^ Is t an index into tt current?tat******

NO "^^^^^^ ^ -^YES

Use t as target pointer. Get pointer to target structure to

be relabeled.

Change tlabel and tvalue fields of target structure to be str and value.

Page 222: Intelligent terminal software flowcharts
Page 223: Intelligent terminal software flowcharts

108

tttelect lon«(toueh, max num ti-hs, num. ovrfl, v/tlues, (lots)

Page 224: Intelligent terminal software flowcharts
Page 225: Intelligent terminal software flowcharts

109

vee(sem)

Become non- interrupt able

.

^V^ Is the count for this semaphore less^^^*"^^^V than 0? 0l00i»

0000

NO >. ^^ 00*0000

YES

Dequeue the process waiting on thissemaphore.

Add that process to the READY Q.

Increment the count for this semaphore.

Restore the initial interruptable status.

verify(sl, s2)

Count - 0.

For every character in si string

For every character in s2.

^^>^ Does this char in s2 match the ^^^^"V^current char in si? ^^^

NO ^S^^ ^^^ YES

GO TO OK.

Return(count)

.

Peturn (count)

Or'.: Inirer.ent, ccunt

Rettjm (-1 ).

Page 226: Intelligent terminal software flowcharts
Page 227: Intelligent terminal software flowcharts

110

vlpproc

NOTE: This version of vlpproc Is specific to the LSI II IT.

Page 228: Intelligent terminal software flowcharts
Page 229: Intelligent terminal software flowcharts

Ill

vip_proc: vlp read*

-~"~""~~— —_____ Is this a read request and another read Is alre.idy pending?

YES " " __ <** NO

Reject the new read request.

B.eak.

~~"~~~"

~

-~— Is the buffer ?mpcy T

_/ NOYES

Save a pointer to this request block as a pending read.

Break.

While there are still input characters and the user's buffer is not exhausted.

Copy a character into the user's buffer.

Was the character an ETX?

Jr NOTES —

Break.

Hull terminate the user's buffer.

Vea the user's semaphore.

•This is not a procedure. It Is one case in vipproc.

vlp_proc : vip_wr i t e *

Vee user's request.

Set flag Indicating no write pending.

Break.

Construct an output messa.gu, using as much data from the current write request as will fit In the

output buffer. ———————

Set buffer pointer and count for the output interrupt handler.

Set flag for Input Interrupt processor indicating that an output message is available.

•This la not a procedure. It la one case in vlp_proc.

Page 230: Intelligent terminal software flowcharts
Page 231: Intelligent terminal software flowcharts

112

•^4u

uw• s w 4

1» 4 U «3 « 3W 4 i-l O"V •O 4 4b

•OC .

i e *••t* fcl U *H 4 b

\ ° e e 4 »• 41 z ^4

1 Jt a u e «* 4 w 4 "6 4X334 • £ 4*h

1'

J

/ °

U £ £ 4 J* w 44 U 4 3 U 3|J w b «J b O" C 4 O"

c 3 <M 4 3 C 4 X£ b a — b £

4 4

M

> k

u/ * Jl

U£• 1 4 4

• "S 1*""'*"«»^ O B 4 ,.

V9

u J 4 "-«»? wibw / 4 X *D X u W n

4U

3 /* > /4 X w 3 • « 54

•I

U«We

V Ji- 1

2 /w 1

«

>

4 4 X•/ «• >• as

44MCD

UBS4 4

w b Wn T> k-

B •« 3

>

44W

/aa •C /

4

4y Iti f^ 1

>>w

i

4

•*4 J! / 4

4 ;G

s

b3

^^^^ u^"»^> OS -rj

4 44 •

j< b e UO

s o <~- / 8 it"u 4 4 4 / H X • "1

H W4

b > /4 /

4 4/ J<

4J (Q— £ u00

a>

W 1* 1 Z/ o44

CU 3 ws

• f * hi

QQCS £ 3

1

*

° lc I*1 3

4C U 1)

•H 4 3i-l H b4

I a 4-1

*4 4 O.

a

I

> •1 3 *>

4 .. a.0. o ^>

uoaa

f> -4->.

£4

"vS1

4 J 33 -^d

i•a

m

lb

11

a>

4 O

1

444

u1£

4 C U 3e • <9 u 4 H•*4 TJ 3 4 C ibH c ° U

34 60 <

4 u• or 4 a. -< 3 U£ J a.

34 c " b b4 1 **- b

?u > 3

£

a

>Sec

line

flag

to

false.

e c b

u

•£WMa

8bM 1 ^

1 > «4)4

U.

w3

e^3 3

u3 J ' i

b 4b 44 3

w b4

a> •

4« a.4 >>(A w

V4

b

3

**

>M U T33 uAU3

a

ac

•M•

tu•>«bO

4VOS

os>w

e•a

IP>, v. <b

|

". !* .)

a u1 Vn <s

Page 232: Intelligent terminal software flowcharts
Page 233: Intelligent terminal software flowcharts

113

vlp_proc: ack

Is the count zero (i.e. Is the write now completed)?

YES NO

Set return to user to show successful write.

Vee user's request.

Break.

Format an output message, using as much of the user's data as will fit in the buffer.

Decrease current count and Increase current address by the number of user's characters put in message.

Set a flag so that the interrupt routine will initiate transmission of this message when the time comes.

•This is not a procedure. It is one case in vip_proc and is specific to the Level 6 IT.

vlp_proc : fluah_type*

TES

Is this a close or a flush?^/no

Empty the input buffer.

TES___^ Is a read saved up?

y/W)

Reject the saved read.

YES

, ___^^^^ Is a write saved up? ySm

Reject the write.

YES

Is this a close or a flush?y^W

Vea the request semaphore.

*Thla is not a procedure. It is one case in vipproc and is specific to

the Level 6 IT.

Page 234: Intelligent terminal software flowcharts
Page 235: Intelligent terminal software flowcharts

Ill*

vip_proc: open_type*

•This is not a procedure. It Is one case In vlpproc and Is specific to the Level 6 IT.

vip_proc: read_type*

YES^^ Is there already a read saved up?

^0

Reject the new read.

Break.

YESIs the input buffer empty?

'no

Save up the read request.

Break.

Copy data into user's buffer, stopping at

character, whichever is first.

end of buffer, end of input characters, or ETX

Null terminate the input.

Vee user's request.

*Thls is not a procedure. It is one case In vip_proc and is specific to the Level 6 IT.

Page 236: Intelligent terminal software flowcharts
Page 237: Intelligent terminal software flowcharts

115

viplntO

HOTK: Thl« version of viplnt t» •peciflc to the L*vel h IT.

Page 238: Intelligent terminal software flowcharts
Page 239: Intelligent terminal software flowcharts

116

vlpint: ACK*

Set up to send quiescent frame

•This is not a procedure. It is one case in vipint and specific to the Level 6 IT.

vipint: data*

Set up to send an ACK.

•This is not a procedure. It is one case in vipint and is

specific to the Level 6 IT.

vipint: NAK*

""** Is there user data to send?

"

Set up to resend user data. Set up to send quiescent frame.

•This Is not a procedure. It is one case in vipint and is specific to the Level 6 IT.

Page 240: Intelligent terminal software flowcharts
Page 241: Intelligent terminal software flowcharts

i r,

wfprlnl ()

Page 242: Intelligent terminal software flowcharts
Page 243: Intelligent terminal software flowcharts

118

adr wait*

Update longitudinal parity check.

^""^•.^Input - correct address?

YES^Sn>s^^ *

" NO

Inp_atate - stat_wait.

* ""-.^^ Input - EOT? ^^^f-"""^

YES ^^"^-^^ ^^-^ NO

Inp state got trans. Inp state - error flush.

I.e. transmission received ok. I.e. transmission receivedIn error.

•This Is not a procedure. It Is one case In vlprlnt.

bcc wait •

Is the Input character equal to the longitudinal parity check character?.

MO YES

Inp_state error_flush. Inpstate - SOH EOT wait.

•This la not a procedure. It Is one case in vlprlnt.

SOH EOT wait*

YES

Input - SOH? "

N^ ^^~~~~~~^ NO

Inp_stateadr_walt.

--»*^^ Input - EOT?

YES —-^^ /no

Inp_atate - got_trans.

I.e. transmission receivedok.

Initialize longitudinal parity check characteir.

•This la not a procedure. It Is one case In vlprlnt.

Page 244: Intelligent terminal software flowcharts
Page 245: Intelligent terminal software flowcharts

119

atat wait*

Update longitudinal p« rlty check.

YES ""-^^^Input » null?

Input_type 3.^"**^^^

t^ Input - ACK?

YES ****"»-^^^ _____'

NO

I.e. this la an Input

taxt message.Input_type - 1. """"""""•^^ Input - NAK? ^^0**^*

YES ^***^-^.^^ ^^"^ NO

Inp_atate - STXwalt.I.e. this is an ACK

message.Input type • 2. Inp_atate » error_fluah.

Inp state » null_STX_wait.

i.e. this Is a NAK mes-sage.

Inp_atate - null_STX_wait. Transmission is In error.

•This la not a procedure. It la one caae in viprlnt.

east rav *

Update longitudinal parity check.

^^"-^^^ Would thia character overflow the buffer? ^__—_——"""

TES ^,

^^-^^^^^_________

—— NO

Inp_etate - error_fluah. Insert the character into the input buffer.

^*v Was it an ETX? ^_____

NO ^S. 'YES

Inp state - bec wait.

•This la not a procedure. It la one case in viprlnt.

Page 246: Intelligent terminal software flowcharts
Page 247: Intelligent terminal software flowcharts

120

vipxlntO

^...^^^ Are there characters left to send? ^— """"""""

Send the next character. Disable the transmitter and set up for receiving.

vrlte(device id, &status)

Send write request to device handler.

Pee the request semaphore.

Set status from that returned by handler process for write request.

la "catastrophic" bit on in status?

YES

Return error. Return success.

NO

vrite_q(q_ptr, value)

Enqueue value on queue,

Vee the semaphore associated with this queue.

xopen(fib, lndexb, o, slot)

Assign appropriate values into file index block.

Return (0)

Page 248: Intelligent terminal software flowcharts
Page 249: Intelligent terminal software flowcharts

121

Z80 lnt

Page 250: Intelligent terminal software flowcharts
Page 251: Intelligent terminal software flowcharts

122

zero blk(ev, blk)

Plush this ev structure's buffer.

Zero the buffer.

For each sector in the block

Write out one sector's worth of zeros

zero_sim(dl , d2, o, userbuf, 1, fen)

^^ Is either 1 or o out of range, or does buffer>. cross a block boundary, or is fen not PFAn? —

NO \^ „__-. YES

Return (-1).

Fill user's buffer with O's.

Return (0).

Page 252: Intelligent terminal software flowcharts
Page 253: Intelligent terminal software flowcharts

UNCLASSIFIEDSECURITY CLASSIFICATION OF THIS PACE (Whin Data Entered)

REPORT DOCUMENTATION PAGE READ INSTRUCTIONSBEFORE COMPLETING FORM

' JJ?RO?LT NUMBER ™ . - _ -CAC Document Number 252

CCTC-WAD Document Number 7523

2. GOVT ACCESSION NO 3. RECIPIENT'S CATALOG NUMBER

4. TlTLt (and Subtitle)

Intelligent Terminal Software Flowcharts

S. TYPE OF REPORT * PERIOD COVERED

Research

6. PERFORMING ORG. REPORT NUMBERCAC #252

7. AUTHORS.)

Deborah S. BrownBetty KasprzyckiJohn R. Mullen

David A. Willcox

S. CONTRACT OR GRANT NUMBER(«)

DCA100-76-C-0088

9. PERFORMING ORGANIZATION NAME AND ADDRESS

Center for Advanced ComputationUniversity of IllinoisUrbana, Illinois 61801

10. PROGRAM ELEMENT. PROJECT, TASKAREA 4 WORK UNIT NUMBERS

It. CONTROLLING OFFICE NAME AND ADDRESSCommand and Control Technical Center11440 Isaac Newton Square, NorthReston, Virginia 22090

12. REPORT DATEOctober 31, 1977

13. NUMBER OF PAGES

14. MONITORING AGENCY NAME ft ADDRESSf// dllterent from Controlling Olflcei 15. SECURITY CLASS, (ol this report)

UNCLASSIFIED

15a. DECLASSIFI CATION/ DOWN GRADINGSCHEDULE

16. DISTRIBUTION STATEMENT (ol this Report)

Copies may be obtained from the address in 11 above.

17. DISTRIBUTION STATEMENT (ol the abstract entered In Block 20. II dllterent Irom Report)

No restriction on distribution.

18. SUPPLEMENTARY NOTES

None

19. KEY WORDS (Continue on reverse aide II necessary and Identity by block number)

Intelligent Terminal

Man-Machine Interface

20. ABSTRACT (Continue on reverse side II necessary and Identity by block number)

This document contains Nassi-Shneiderman flowcharts for the IntelligentTerminal system described in CAC document number 236 (CCTC-WAD DocumentNumber 7516), "Intelligent Terminal Programmer's Manual."

DO t JAN 73 1473 EDITION OF I NOV 65 IS OBSOLETE UNCLASSIFIED

SECURITY CLASSIFICATION OF THIS PAGE (Whan Data Entered)

Page 254: Intelligent terminal software flowcharts
Page 255: Intelligent terminal software flowcharts
Page 256: Intelligent terminal software flowcharts
Page 257: Intelligent terminal software flowcharts
Page 258: Intelligent terminal software flowcharts
Page 259: Intelligent terminal software flowcharts

m4

Page 260: Intelligent terminal software flowcharts