UNIVERSITY OF 
 
 ILLINOIS LIBRARY 
 
 AT UR3ANA-CHAMPAIGN. 
 
 ENGINEERING 
 
NOTICE: Return or renew all Library Materials! The Minimum Fee for 
 each Lost Book is $50.00. 1111 f\ O innn 
 
 The person charging this materiaris responsible for 
 its return to the library from which it was withdrawn 
 on 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 
 
_ ENGINEERING LIBRARY U^vt^ 
 
 UNIVERSITY OF ILLINOIS 
 
 , , o c-7 URBANA, ILLINOIS 
 
 / E ROM 
 
The person charging this material is re- 
 sponsible for its return to the library from 
 which it was withdrawn on or before the 
 Latest Date stamped below. 
 
 Theft, mutilation, and underlining of books 
 are reasons for disciplinary action and may 
 result in dismissal from the University. 
 
 UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN 
 
 P n ' ~ 1 9G2 
 
 M iAk X W9J2 
 - 
 
 
 L161 — O-1096 
 
CAC Document Number 252 
 CCTC-WAD Document Number 7523 
 
 Intelligent Terminal 
 Software Flowcharts 
 
 Deborah S. Brown 
 Betty Kasprzycki 
 
 John R. Mullen 
 David A. Willcox 
 
 Prepared for the 
 
 Command and Control Technical Center 
 
 WWMCCS ADP Directorate 
 
 Defense Communication Agency 
 
 Washington, D.C. 
 
 under contract 
 DCA100-76-C-0088 
 
 Center for Advanced Computation 
 University of Illinois at Urbana-Champaign 
 Urbana, Illinois 61801 
 
 October 31, 1977 
 
 >/ 
 
 Approved for release: /CmAMqu ( I fJfjfA^i^ 
 
 /Ja?mes F. Bailey, Principal Investigator 
 
Digitized by the Internet Archive 
 
 in 2012 with funding from 
 
 University of Illinois Urbana-Champaign 
 
 http://archive.org/details/intelligenttermi252brow 
 
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. 
 
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  
 
 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: 
 
2. if ... else statement: 
 
 compute  
 
 compute  
 
 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 
  
 
 compute 
  
 
 compute 
 
 compute 
  
 
 compute 
  
 
 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  
 
 
 compute  
 
 
 
 bottom test: 
 
 
 
 
 compute  
 
 lc 
 
 op  
 
Combination 
 
 The visual structures presented above may be combined to any 
 degree to represent a computational structure, e.g.: 
 
alloc(size) 
 
 For every used entry in CORETAB. 
 
 Is the size of this entry 
 reater than or equal 
 to size? 
 
 YES 
 
 Remember the address of this entry, 
 
 Move the beginning of the entry 
 to after this piece. 
 
 Decrement the size of the entry 
 by the size of the piece being 
 allocated. 
 
 Is size of entry now 0? 
 
 YES 
 
 Delete this empty entry by 
 copying rest of CORETAB up 
 one slot. 
 
 Return the remembered address, 
 
 Return -1. 
 
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. 
 
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). 
 
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. 
 
buflu(«v, bill, o, tisi-rbuf, 1, fen) 
 
10 
 
 clear io() 
 
 Do for each device. 
 
 YES 
 
 Is 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. 
 
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. 
 
12 
 
 cmp (a, b, length) 
 
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 lengths 
 to Indicate a zero length new file. 
 
 Allocate a disk block to use as index block. 
 
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 the 
 
 stack; put dummy values in the stack and environment regs; 
 
 make it look like the process was called by suicide, and 
 zero all the other regs. 
 
 Set up the stack base: set the guardwork, priority and 
 stack size; point the B7 entry at the register save area 
 at the bottom of the stack, point the B5 entry at the 
 main 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. 
 
15 
 
 cvb(ptr, length, value ptr) 
 
 Value - 0. 
 
 Doea the string to be converted atart with 
 a 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 value 
 corresponding to the next digit of the string. 
 
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. 
 
 
 
17 
 
 determine (name) 
 
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) 
 
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. 
 
20 
 
 u 
 
 41 
 
 > 
 
 U 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 ki ■ 
 
 
 
 
 
 
 
 
 
 
 
 •H 3 
 
 
 
 
 
 
 
 
 
 
 
 A kl 
 
 
 
 
 
 
 
 
 
 
 
  i-4 
 
 
 
 
 
 
 
 
 
 
 1 k 
 1 «— 
 I = 
 
 01 -4 
 
 k, a 
 o 
 
 
 
 
 
 
 
 
 
 
 1 « 
 
 *j 
 
 
 
 
 
 
 
 
 
 
 I U. 
 
 o) e 
 
 
 
 
 
 
 
 
 
 
 1 * 
 
 CO -H 
 
 
 
 
 
 
 
 
 
 
 1 "° 
 
 
 
 
 
 
 
 
 
 u 
 
 
 
 
 
 
 
 
 
 o a 
 
 
 
 
 
 
 
 
 
 
 
 ki c - 
 
 
 
 
 
 
 
 
 
 
 
 ki -H U CO 
 
 
 
 
 
 
 
 
 
 u 
 
 01 ^v 
 
 01 01 3 
 
 
 
 
 
 
 
 
 
 •-* 
 
 kl ^V. 
 
 ■ H y^ 
 
 U U H g 
 
 
 
 
 
 
 
 
 
 »*4 
 
 
 0) "H CO U 
 
 
 
 
 
 
 
 
 / ** 
 
 
 01 *- ^V 
 
 c/3 js cj a 
 
 
 
 
 
 
 
 
 1 ^ 
 f 01 
 
 1 *""* 
 
 0) 
 4-1 
 0) 
 
 ■a ih > 
 
 
 
 
 •V CO -»«**^ 
 
 
 
 
 
 
 *«\ 
 
 f * 
 
 4) 
 
 a 
 
 1-1 ^*^^^^^ 
 
 
 
 
 
 
 
 
 c 
 
 1 "° 
 
 
 
 
 
 
 SK 
 
 
 ki 
 
 
 
 
 
 B 
 
 
 ki 
 
 
 O CO 
 
 
 
 
 
 
 
 o 
 
 
 
 
 
 ki c - 
 
 
 
 
 
 
 
 N^ 
 
 
 e 
 
 01 
 
 
 ki t\ U CO 
 0) 41 3 
 
 
 
 
 
 
 
 £ 
 
 
 B. 
 
 X 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
 
 
 
 
 
 
 
 
 a u 
 
 
 
 
 
 
 
 
 
 E ki 
 
 
 kl O CO 
 
 
 
 
 
 
 
 
 
 01 
 
 
 ki 
 
 
 
 
 
 
 
 
 
 ki a) 
 
 
 kl C 0) 
 
 
 
 
 
 
 
 
 
 u-i 3 
 
 
 ki -H 
 01 CO 
 
 
 
 
 
 
 
 
 
 CO 
 
 ■O >w 
 
 n - • 
 
 
 
 
 
 
 
 
 
 4J *J 
 
 CO >v 
 
 kl kl ki 
 
 
 
 
 
 
 
 
 
 eg e • 
 
 01 >v 
 
 01 -H 01 
 
 
 
 
 
 
 
 
 
 TJ 1H kl 
 
 ki <^ ^v 
 
 CO J3 .-1 
 
 
 
 
 
 
 
 
 49 
 
 41 
 ki 
 
 0) 
 
 13 « fa 
 
 
 
 
 
 
 
 
 
 
 
 
 
 (0 --« u-i 
 
 T4 v 
 
 CO ^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 
 
 
 
  
 
 c 
 
 01 
 
 41 
 
 
 c 
 
 
 
 
 41 
 
 
 « 
 
 M 
 
 a 
 
 CO 
 
 
 01 
 
 
 
 
 « 
 
 
 u 
 
 
 
 
 
 a 
 
 
 
 
 > 
 
 
 
 
 
 
 
 
 o 
 
 
 
 
 
 
 ■M 
 
 
 
 
 
 
 
 
 
 
 
 i 
 
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). 
 
22 
 
 enq(q_ptr, value) 
 
 
 
 ^^^^^^ Is there a free queue element? 
 NO ^ N, " ,,, ^»^^^ ^ t00 ^ 00 ^'^ 
 
 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 the 
 end of the queue element list. 
 
 Make the queue 
 list. 
 
 a one-element 
 
 Point the queue head at the new element. 
 
 Restore initial processor priority. 
 
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 priority 
 value 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. 
 
 
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 req 
 
 uired 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 of 
 vector. 
 
 Write out the vector. 
 
 
 Copy vectors into local buffer and write 
 out 18 at a time, shifting to write lower 
 parts of vectors. 
 
 
 
 Write bottom part of 
 vector. 
 
 
 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. 
 
25 
 
 
 
 
 \ 
 
 
 V 
 
 ' 
 
 
 
 
 w 
 
 
 
 \ 
 
 
 \ 
 
 
 
 
 
 4> 
 
 
 
 \ 
 
 j-^ 
 
 \ & 
 
 
 
 
 
 •H 
 
 
 
 \ 
 
 £.' 
 
 \ 
 
 
 
 
 
 £ 
 
 
 
 \ £s 
 
 4-? 
 
 \ 
 
 
 
 
 
 a 
 
 
 
 \ 
 
 a5 
 
 \ 
 
 
 
 
 
 3 
 
 
 
 I 
 
 
 \ 
 
 
 
 
 
 O 
 
 
 
 \ 
 
 T< 
 
 \ 
 
 
 
 
 
 a3 
 
 
 
 \ 
 
 V 
 
 P 
 
 \ 
 
 
 
 
 
 +5 
 
 
 
 \ 
 
 c 
 
 \ 
 
 
 h-« 
 
 
 
 o 
 
 
 
 1 
 
 ■H 
 
 \ 
 
 
 O 
 
 
 
 TJ 
 
 
 
 \ 
 
 O 
 
 \ 
 
 
 i> 
 
 
 
 1 
 
 
 
 \ 
 
 a. 
 
 
 
 Ih 
 
 
 
 
 ■4 
 
 
 
 *"• \ 
 
 
 c- J 
 
 
 eg 
 
 
 
 c 
 
 
 
 \ 
 
 K 
 
 rS \ 
 
 
 V 
 
 
 
 o 
 
 
 
 -p 1 
 
 * O 
 
 0) / 
 
 
 JC 
 
 
 
 
 
 
 * ' I 
 
 •P 
 
 *- 1 
 
 G 
 
 ■,-■• 
 
 
 
 to 
 
 
 
 p \ 
 
 4-> i) 
 
 •H / 
 
 CD 
 
 
 
 
 a; 
 
 
 
 ^. \ 
 
 K CJ 
 
 2 / 
 
 a.' 
 
 c 
 
 
 
 w 
 
 
 
 \ 
 
 cy > 
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V 
 
 
 
 CO 
 
 CO 
 
 
 
 H 
 
 
 > 
 
 O 
 
 0, 
 
 
 
 Cm 
 
 H 
 
 
 
 O 
 
 
 rH 
 
 u 
 
 P 
 
 
 O 
 
 0) 
 
 
 
 j •» 
 
 
 
 CO 
 
 
 
 
 -p 
 
 
 
 O 
 
 
 0) 
 
 Cu 
 
 -P 
 
 
 +3 
 
 CO 
 
 
 
 CV 
 
 
 & 
 
 a 
 
 c 
 
 
 c 
 
 •H 
 
 
 
 J> 
 
 
 p 
 
 3 
 
 cy 
 
 
 3 
 
 U 
 
 
 
 
 / w 
 
 
 
 »s 
 
 
 o 
 
 a) 
 
 
 
 II 
 
 / u 
 
 Cy 
 
 cy 
 
 cu 
 
 
 E 
 
 H 
 
 w 
 
 
 
 / ^ 
 
 to 
 
 ca 
 
 ^ 
 
 
 a) 
 
 
 0) 
 
 
 05 
 
 
 a) 
 
 aJ 
 
 
 
 
 
 i-i 
 
 e 
 
 1 w 
 
 -P 
 
 
 %, 
 
 H 
 
 c 
 
 
 cy 
 
 0) 
 
 •H 
 
 1 &> 
 
 05 
 
 
 W 
 
 W 
 
 H 
 
 
 x: 
 
 c 
 
 -P 
 
 / ^ 
 
 -d 
 
 
 
 
 
 
 -p 
 
 a5 
 
 CU 
 
 P 
 
 
 
 
 
 
 
 
 0) 
 
 
 C 
 
 
 
 
 
 
 
 
 -p 
 
 3 
 
 CU 
 
 2 
 
 3 
 
 
 
 
 
 
 
 
 O 
 
 
 
 
 
 
 
 Cu 
 
 
 V 
 
 
 
 
 
 
 
 E 
 
 -P 
 
 
 
 
 
 
 
 
 o 
 
 V 
 
 £ 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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). 
 
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. 
 
28 
 
 first block 
 
 Jump into the middle of block - to the point 
 where it picks up a process from the ready 
 queue. 
 
29 
 
 fltr and *h_ptr. 
 
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 the 
 PC 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). 
 
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. 
 
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). 
 
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. 
 
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 would 
 start to end here. 
 
 Compare the characters pointed at by p2 and pi, ending 
 when 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. 
 
h3 
 
 b driver () 
 
 K>TE: ThU vtr»lon of kb_driver 1* specific to the LSI 11 IT. 
 
hk 
 
 kb driver 
 
 NOTE: Thla version of kb driver 1* apeclflc to the Level 6. 
 
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 ""^-^^^ /NO 
 
 Vee user'a semaphore. 
 
 Reset "saved read' flag. 
 
 Put the character Into the buffer. 
 
 
 YES 
 
 Are 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 "reject 
 request" In 
 request 
 block. 
 
 
 
 
 Set x - y coordinates. 
 
 
 
 
 
 
 Vee user's semaphore. 
 
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 process 
 should 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. 
 
4 T 
 
 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. 
 
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 buffer 
 to the output buffer. 
 
 ptr ■ parm_xpand (pointer to format 
 specifier, and next_parm, and 
 skipped) . 
 
 Move the input buffer over one 
 character. 
 
 Increment in pointer by skipped, 
 
 Increment length by one. 
 
 Copy the string pointed to by ptr 
 into the output buffer, and incre- 
 ment length by the length of this 
 string. 
 
 Null terminate the output string. 
 
 Increment length to include the trailing null. 
 
 Return length. 
 
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. 
 
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-inCerruptable 
 
 status word for LSI 11. 
 
 lev 
 
 - 0. 
 
 Return (lev). 
 
 NOTE: This version of mfps is specific to the L6 IT. 
 
51 
 
 ■k_page(p ptr, left, bottom, width, height) 
 
 Copy parameters to corresponding positions in 
 structure 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 activity 
 bit set for the current level, and 
 switch 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 resets 
 the activity bit for 
 the non-interruptable 
 level and schedules 
 the next ready level. 
 
 Leave us at our 
 current 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. 
 
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. 
 
53 
 
 
 
 
 
 
 
 
 
 
 
 
 41 w 
 
 
 
 
 
 
 
 a e 
 
 
 
 
 
 
 
 >-■* • 
 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
 
 e 
 
 ■• 
 
 ft. — I 
 
 U -H 
 
 a c u a -■ x 
 
 *H 
 
 
 M 
 
 u 
 
 
 
 
 
 
 
 U 
 
 M 
 
 41 
 
 IM 
 
 «l 
 
 
 
 "3 
 
 iH 
 
 4-1 
 
 
 
 X 
 
 
 
 4> U 
 
 u 4) 
 
 3 
 
 41 
 
 S 
 
 oo 
 
 o 
 
 
 
 C **-« 
 
 X 
 
 ■ 
 
 e 
 
 *l 
 
 
 
 H  
 
 u 
 
 
 u 
 
 x 9 n 
 
 C 
 
 41 
 
 C 
 
 X 
 
 ss 
 
 
 
 >. 09 
 
 ■-4 
 
 
 41 
 
 X 
 
 
 41 
 
 SS X Ji 
 
 h 
 
 
 
 X 
 
 
 
 Q 
 
 a. u 
 
 hi 
 
 w 
 
 M 
 
 
 
 
 > 
 
 4J 
 
 o o o 
 U w S 
 
 V 
 
 4J 
 
 e 
 
 o 
 
 « 
 
 
 
 M 
 
 t-j — -i 
 
 
 *u 
 
 
 
 M 
 
 w 
 
 
 
 OJ 
 
 «w x  
 
 
 • 
 
 O.TJ 
 3 4) 
 
 i •* 41 
 
 41 8 01 
 
 £ 
 
 w 
 
 ? 
 
 E 
 
 w 
 
 
 41 
 
 ji e *■ 
 
 u a m - 
 
 
 
 •H 
 
 4) 
 
 3 
 
 0) 
 
 
 a 
 
 U *4 4 
 
  
 
 «u 
 
 i/j 
 
 
 > 
 
 4J 
 
 •m X 
 
 a. as 
 
 c n 41 
 
 t-H 4J a. r^ 
 
 jl 
 
 £ 
 
 2 
 
 41 
 
 
 
 
 
 
 
 
 
 
 
 
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 other 
 than a NUL or delimiter in your string? 
 
 Return pointer to beginning of your string. 
 
 Return pointer to your stlrng where comparison ended. 
 
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 " " " - _ 
 
 
 ^^NO 
 
 Return error. 
 
 
 ■ . Does this process own the 
 
 NO ■ — ■ 
 
 device? 
 
 ^/YES 
 
 Return 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. 
 
 
 
 
 
 
56 
 
 
 
 
 
 1 
 
 
 
 
 
 u ■ 
 
 
 
 
 
 
 
 
 
 
 
 
 
 •*-> 9 
 
 
 
 
 
 
 
 
 
 
 
 
 
 .o *-* 
 
 
 
 
 
 
 
 
 1 
 
 
 
 
 
 01 
 01 • 
 
 DC 
 
 e 
 
 
 
 
 
 
 
 
 
 
 
 
 > 
 
 « 01 
 
 at 
 a ■ 
 
 01 • 
 
 
 
 
 
 
 
 1 
 
 
 
 
 / 5 
 
 IT. 
 
 u 
 
 01 
 
 
 
 
 
 
 
 
 
 
 
 / *- 
 
 
 01 b 
 
 
 
 
 
 
 
 1 "> 
 
 1 u 
 
 1 *" 
 
 
 
 
 / 4 
 / T 
 
 
 > a 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 a 
 
 
 
 
 
 
 
 
 
 
 
 
 
 / ° 
 
 
 
 
 
 
 
 
 
 
 
 
 
 / c 
 
 
 
 
 
 
 
 
 
 1 
 
 
 
 
 / * 
 
 
 
 
 
 
 
 
 
 1 
 
 ■ 
 
 
 
 1 -c 
 1  
 
 
 W >s 
 
 
 
 
 
 
 
 
 
 
 4 
 
 
 
 c 
 
 
 
 
 
 
 
 
 
 
 
 
 V 
 
 
 
 
 
 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
 
 
 
 
 • j 
 
 
 
 
 
 
 
 
 
 
 
 
 • 
 
 3 
 ■ 
 3 
 
 
 3 
 
 J. 
 
 
 
 11 
 
 
 
 (adX]~q«nxj 
 
 jaAijp~qd a»s) 
 
 
 01 
 
 ite amount 
 i In our 
 
 Including 
 ig null if 
 Is not 
 
 0) T) 
 3 •-! 
 
 — * ig 
 
 > 
 
 CD 
 0* - 
 
 w 01 
 
 
 c X- UJ 
 
 « »j x- \ 
 w o « X 
 tz c — X 
 
 TJ — ■ X 
 
 2 5 
 
 OS 
 
 c 
 
 hi 
 
 ■ 
 V 
 
 3 • 
 er ■ 
 
 
 6 
 
 
 3 
 
 a. 
 e 
 
 
 0) 
 
 3 
 
 B 
 O 
 U 
 
 CO 
 
 01 
 
 3 
 
 o* 
 
 V 
 
 u 
 
 
 
 Calcula 
 of datd 
 buf f er , 
 tral] lr 
 buffer 
 empty. 
 
 c ~< 
 
 — •: U ■ 
 m c 
  _^> 
 
 U) & u 1 
 
 01 » 
 U 41 
 U 
 « 
 41 hi 
 
 > a 
 
 
 
 • 
 
 • 
 
 
 ■ 
 
 
 
 
 "O 
 
 c 
 
 
 Of 
 
 
 
 (adXi~3JTJ« 
 
 :jaA[jp~~qd »»$) 
 
 
 w 
 
 
 Ih* 
 
 
  
 
 
 V 
 
 
 > 
 
 u 
 
 
 
 
 
 
 
 ■ 
 
 • 
 
 m 
 
 u 
 
 • 
 
 i 
 • 
 
 3 
 
 1* 
 
 c 
 a 
 
 n 
 6 
 
 
 M 
 
 1 
 
 M 
 
 c 
 
 1 
 
 
 
 / ° 
 
 
 
 (adXj - *aoj :> 
 
 j3A[jp~qd »«s) 
 
 
 
 
 
 
 
 > 
 
 m 
 
 1 
 
 41 
 
 y 
 1 
 
 •o 
 
 41 
 
 > 
 
 • 
 
 at 
 
 
 m 
 
 u 
 
 
 c 
 
 0) 
 
 a 
 
 
 
 
 
 (»dAj — uado 
 
 j»A[jp~qd »»s) 
 
 
 
 
 
 
 
 
 
 
 
 S 
 
 a 
 
 i 
 
 
 
 
 
 
 
 
 
 
 
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) 
 
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. 
 
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. 
 
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. 
 
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. 
 
62 
 
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 specific 
 to the Level 6 IT. 
 
Gh 
 
 0) 
 
 a 
 
 >-4 
 
 u 
 at 
 > 
 
 J 
 
 a 
 
 
 
 
 \ " 
 
 
 \ „ 
 
 
 
 
 
 
 
 
 
 
 \ w 
 
 
 \ ^ 
 
 
 
 
 
 
 
 
 
 
 \ 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 ^^ 
 
 
 
 
 
 
 
 
 4-1 
 
 
 
 
 
 
 
 
 
 
 
 
 3 
 
 
 
 
 
 
 
 
 
 
 
 
 a 
 
 
 
 
 
 
 
 
 CO 
 
 
 
 
 3 
 
 1 
 
 
 
 
 
 
 
 3 
 4J 
 
 
 
 
 O 
 
 c- 1 
 
 
 
 
 
 
 
 CQ 
 
 
 
 
 o 
 
 4-1 1 
 
 at 1 
 
 
 
 
 
 
 
 4J 
 CO 
 
 
 
 
 4J 
 
 CO 1 
 
 
 
 
 
 
 
 
 
 
 
 •o 
 
 00 / 
 
 C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H 
 
 w a. 
 
 1 
 
 S-i u 
 
 
 P 
 
 CO 
 
 
 CJ 
 
 CO 
 
 t-l 
 
 > l 
 
 4-1 
 
 
 1 
 
 
 
 
 > 
 
 
 (0 
 
 4J 
 
 r-l 
 
 to 1 
 
 CJ 
 «0 
 
 ll 
 
 1 
 
 II 
 
 
 H 
 
 CO 
 
 c 
 
 
 4-1 
 
 CQ 
 
 a 
 
 CO 
 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= 
 
 o 
 
 4-1 
 O 
 
 CJ 
 
 CU 
 a 
 
 CO 
 
 73 
 
 c 
 
 CO 
 u 
 
 01 
 
 > 
 a 
 
 at 
 co 
 
 CO 
 CJ 
 
 cu 
 
 e 
 o 
 
 0) 
 
 Id 
 
 3 
 
 •a 
 at 
 
 CJ 
 
 o 
 u 
 a. 
 
 co 
 
 o H 
 
 CO \0 
 
 oo at 
 
 T! > 
 
 ex 
 
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. 
 
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 that 
 the write has finished. 
 
 Send message to phone process that 
 the write failed. 
 
 NOTE: This version of phxint is specific to the Level 6 IT. 
 
67 
 
 01 
 
 <4H 
 
 3 
 
 •o 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 1 
 
 
 
 
 
 J2 
 
 
 
 
 
 
 
 
 
 n 
 
 
 
 
 V) 
 
 eg 
 
 
 
 
 
 
 
 
 
 ii 
 
 
 \ o 
 
 
 Id 
 
 U kl 
 
 
 
 
 
 
 
 
 
 
 
 \ z 
 
 D. \. 
 3 > 
 ki 
 kl c^- 
 
 OJ -C 
 
 i-i 01 
 
 C rH 
 
 ■H J3 
 
 CO 
 
 o c 
 
 >" 
 
 Make the 
 processo 
 Interrup 
 
 
 « 
 ■ 
 3 
 CO 
 ft. 
 
 
 
 
 
 
 
 1 
 
 
 
 
 
 
 
 
 
 
 
 
 
 I 
 
 
 
 00 01 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 * " 
 
 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 
 
 c 
 
 
 
 
 
 
 
 o. 
 
 e 
 
 01 
 
 
 / w 
 
 U-l -i-l 
 4J 
 
 41 
 
 
 ki 
 
 a l 
 
 v. 
 3 
 
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 41 
 
 CO 
 
 CO 
 
 41 
 
 
 
 
 
 ■H 
 
 
 
 
 0) 
 
 
 -* 
 
 as 
 
 41 
 
 e 
 
 
 
 
 
 kl 
 
 
 U 
 
 01 
 
 
 hi CO 
 
 41 
 
 ki 
 
 CO 
 
 
 
 
 
 u 
 
 
 u 
 
 u 
 
 
 S 
 
 U 
 
 
 a 
 
 
 
 
 
 <0 
 
 
 C 
 
 
 
 
 ee 
 
 o 
 
 ki. 
 
 
 
 
 
 
 
 
 
 
 l-l 
 
 / C/J 
 
 <0 01 
 
 kl 
 
 
 
 01 
 
 
 
 
 c 
 a 
 
 c 
 
 u 
 
 m 
 
 u 
 
 a 
 
 / U 
 
 -H C 
 <*-l -H 
 
 a 
 
 Vm 
 
 jC 
 ki 
 
 
 
 
 CO 
 
 > 
 
 •o 
 
 01 
 
 
 hi 
 
 01 
 
 kl 
 
 
 
 
 
 
 ai 
 
 <0 
 
 -* 
 
 
 *-» 3 
 
 .* 
 
 ■H 
 
 (1 
 
 
 
 
 l-l 
 
 u. 
 
 01 
 
 (fl 
 
 
 01 
 
 a) 
 
 c« 
 
 01 
 
 
 
 
 >' 
 
 U 
 
 1) 
 
 
 
 <4-l 
 
 ce: 
 
 r , 
 
 
 CO hi 
 
 £ 
 
 3 
 
 ft. 
 
 
 
 
 '- 
 
 ■H 
 
 
 
 
 
 
 
 
 
 
 
 
 U) 
 
 V 
 
 
 
 
 
 ■ 
 
 
 
 
 . 
 
 
 
 
 OS 
 
 -n 
 
 
 
 
 
 
 
 
 
 
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 make 
 interrupt 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's 
 semaphore. 
 
 Do until success 
 
 Read panel 
 status. 
 
 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. 
 
 CE 
 
 Rls pnl. 
 
 Pee the head's semaphore. 
 
 NO 
 
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 the 
 character. 
 
 Increment format string pointer past format 
 descriptor. 
 
 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 character 
 In 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. 
 
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 of 
 vector. 
 
 Write out the vector. 
 
 Copy vectors into local buffer and write 
 out 18 at a time, shifting to write lower 
 parts of vectors. 
 
 
 Write bottom part of 
 vector. 
 
 Copy vectors into local buffer and write out 18 at 
 at 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. 
 
71 
 
72 
 
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. 
 
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. 
 
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? 
 
 YES 
 
 NO 
 
 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. 
 
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). 
 
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. 
 
T 8 
 
 Rls pnl() 
 
 rsrv pnl() 
 
 NO 
 
 This process owns the panels? 
 
 y'YES 
 
 pee (pp_access). 
 
 
 pp_owner ■ ME. 
 
 Increment pp_res_level. 
 
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 
 
Nll'IK: l,l|,j *"' rr ' ' "" '•' •■ r. 1. 1 Is *).,.. | r 1 . 1,. Mi,- I.Sl II II 
 
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. 
 
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. 
 
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. 
 
84 
 
 s 
 
 crunch(ptr, size, num) 
 
 For 
 
 size times 
 
 
 *ptr - *(ptr + num). 
 
 Increment ptr. 
 
 
 seek(4evice_id, length, type) 
 
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. 
 
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'NO 
 
 Return 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. 
 
 
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 use 
 for 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. 
 
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 plasma 
 panel 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. 
 
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 by 
 base. 
 
 \ next ! * 0? ^^^** 
 NO \ ^^t^ * 00 * YES 
 
 
 Recursively call str num with parameters 
 next, base, and place. 
 
 next ■ remainder of unsigned division of num 
 by base. 
 
 Convert next to the ASCII character representing 
 its value, and put that char where indicated 
 by *place. 
 
 Increment *place by one character. 
 
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. 
 
 ■ 
 
91 
 
 t<*_prtn,(d«ll„, .ep.rator. text. panna) 
 
 »- t^, find Mr.t P a r a^£ ^=I- : - , , | ■ - 
 YES 
 
92 
 
 01 
 
 a 
 
 u 
 H 
 
 s 
 
93 
 
 tp_driver: data_type* 
 
 
 
 
 
 
 YES 
 
 
 — ________ > ^^^^ Is the touch panel open? 
 
 
 y^w 
 
 YES """ 
 
 Is there a read saved up? 
 
 "* ■ """ NO 
 
 
 
 Copy the touch Into the user 
 
 a buffer. 
 
 
 "^^--.^^Is there space in buffer? 
 
 f NO 
 
 Vee user's semaphore. 
 
 Reset "read pending" flag. 
 
 Copy the touch into the internal 
 buffer. 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. 
 
9U 
 
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 
 
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 and 
 wl'llh of .irii. 
 
 Create a target at x+left, y+hottom having the attributes specified In parameters. 
 
 Move x over one target width. 
 
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. 
 
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?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 Lj 
 
 
 
 
 1 
 
 , 
 
 *-» 
 
 ■ 
 
 
 
 M 
 
 In 
 
 
 kl 
 
 e 
 
 CO 
 
 CO 
 
 01 
 N 
 
 •a 
 e 
 
 c 
 
 
 at 
 
 a 
 
 
 
 
 
 **N 
 
 U 
 
 X i 
 
 
 
 3 
 
 c 
 
 S". 
 
 <0 
 
 V 
 
 w 
 
 ot 
 
 
 
 
 
 
 41 
 
 w / 
 
 
 
 u 
 
 a. 
 
 
 
 X 
 
 
 CO 
 
 h 
 
 ■ol 
 
 
 JZ 
 
 
 
 
 1 
 
 t 
 
 C 
 
 « / 
 
 
 H 
 
 In 
 
 1 
 w 
 
 c 
 
 X 
 
 u 
 
 CO 
 
 X 
 
 a 
 
 p 
 
 c 
 
 tol 
 
 
 o 
 
 
 
 
 ■H 
 
 *"* / 
 
 
 c 
 
 01 
 
 01 
 
 <0 
 
 •n 
 
 01 
 
 01 
 
 
 at 
 
 
 
 
 at 
 
 , t 
 
 
 1 
 
 
 e 
 
 3 
 
 SL 
 
 
 
 a 
 i 
 
 w 
 
 / o 
 
 / Z 
 
 
 2 
 
 X 
 
 a 
 9 
 e 
 oj 
 
 M 
 
 to 
 
 10 
 
 u 
 
 M 
 
 kl 
 
 01 
 V) 
 
 1 
 
 01 
 C/> 
 
 X 
 
 kl 
 
 kl 
 01 
 
 X 
 4J 
 
 kl 
 01 
 
 X 
 nN 
 1 
 
 r 
 
 JZ 
 
 •j 
 
 at 
 
 U3 
 
 
 A* 
 
 o 
 
 b< 
 o 
 
 « 
 
 e 
 
 ■ 
 s 
 
 e 
 
 In 
 3 
 M 
 01 
 
 M 
 
 
 
 , 
 
 
 * 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 s e 
 
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 space 
 Inside 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. 
 
101 
 
 tt_llte(slot, mode) 
 
 Get the coordinates of the lower left corner of the target 
 In 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. 
 
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 to 
 be 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. 
 
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. 
 
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 space 
 around 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. 
 
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. 
 
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. 
 
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. 
 
108 
 
 tttelect lon«(toueh, max num ti-hs, num. ovrfl, v/tlues, (lots) 
 
109 
 
 vee(sem) 
 
 
 Become non- interrupt able . 
 
 ^V^ Is the count for this semaphore less^^^*"^^ 
 ^V than 0? ^ 0l0 0i» 0000 ^ 
 
 NO >. ^^ 00* 0000 ^ YES 
 
 
 Dequeue the process waiting on this 
 semaphore. 
 
 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 
 
 
 
 Rett 
 
 jm (-1 
 
 ). 
 
 
110 
 
 vlpproc 
 
 NOTE: This version of vlpproc Is specific to the LSI II IT. 
 
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 
 
 _/ NO 
 
 
 YES 
 
 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 NO 
 
 TES — 
 
 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. 
 
112 
 
 
 
 
 
 
 • 
 
 
 
 
 
 
 
 
 
 
 
 
 ^ 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 4 
 
 
 
 
 
 
 
 
 
 u 
 
 
 u 
 
 
 
 
 
 
 
 
 
 
 
 
 
 w 
 
 
 
 
 
 
 
 
 
 • 
 
 
 s 
 
 w 4 
 
 
 
 
 
 
 
 
 
 1» 
 
 
 4 
 
 U « 
 
 
 
 
 
 
 
 
 
 3 
 
 
 
 « 3 
 
 
 
 
 
 
 
 
 
 W 
 
 
 4 
 
 i-l O" 
 
 
 
 
 
 
 
 
 
 V 
 
 
 •O 
 
 4 4 
 
 
 
 
 
 
 
 
 
 b 
 
 • 
 
 
 
 OC ►. 
 
 
 
 
 
 i e *•• 
 
 
 
 
 
 
 
 
 
 t* 
 
 
 
 fcl U *H 4 b 
 
 
 
 
 
 
 
 
 
 \ ° 
 
 e 
 
 
 
 e 4 »• 4 
 
 
 
 
 
 
 
 
 
 1 z 
 
 ^4 
 
 
 1 Jt 
 
 a u e «* 4 w 
 
 4 " 
 
 
 
 
 
 
 
 
 
 6 
 
 
 4X334 • 
 
 £ 4 
 
 
 
 
 
 
 
 
 
 *h 
 
 
 1 ' J 
 / ° 
 
 U £ £ 4 J* 
 
 w 4 
 
 
 
 
 
 
 
 
 
 4 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
 
 
 
 >, 
 
 v. 
 
 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 received 
 In 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_state 
 adr_walt. 
 
 
 --»*^^ Input - EOT? 
 YES — -^^ 
 
 /no 
 
 
 Inp_atate - got_trans. 
 
 
 
 I.e. transmission received 
 ok. 
 
 
 Initialize 
 
 longitudinal parity check charactei 
 
 r. 
 
 
 •This la not a procedure. It Is one case In vlprlnt. 
 
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. 
 
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) 
 
121 
 
 Z80 lnt 
 
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). 
 
UNCLASSIFIED 
 
 SECURITY CLASSIFICATION OF THIS PACE (Whin Data Entered) 
 
 REPORT DOCUMENTATION PAGE 
 
 READ INSTRUCTIONS 
 BEFORE COMPLETING FORM 
 
 '■ JJ?RO?L T 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 NUMBER 
 
 CAC #252 
 
 7. AUTHORS.) 
 
 Deborah S. Brown 
 Betty Kasprzycki 
 John R. Mullen 
 
 David A. Willcox 
 
 S. CONTRACT OR GRANT NUMBER(«) 
 
 DCA100-76-C-0088 
 
 9. PERFORMING ORGANIZATION NAME AND ADDRESS 
 
 Center for Advanced Computation 
 University of Illinois 
 Urbana, Illinois 61801 
 
 10. PROGRAM ELEMENT. PROJECT, TASK 
 AREA 4 WORK UNIT NUMBERS 
 
 It. CONTROLLING OFFICE NAME AND ADDRESS 
 
 Command and Control Technical Center 
 11440 Isaac Newton Square, North 
 Reston, Virginia 22090 
 
 12. REPORT DATE 
 
 October 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 GRADING 
 SCHEDULE 
 
 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 Intelligent 
 Terminal system described in CAC document number 236 (CCTC-WAD Document 
 Number 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) 
 
m4