Minicomputers and Large Scale Computations - American Chemical

within the context of APL as the computer language driving each level of a hierarchy. The significance of our report is the demonstration that such a ...
0 downloads 9 Views 2MB Size
4 APL

L e v e l L a n g u a g e s in A n a l y s i s

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

A Host-Microcomputer-Instrument Hierarchy in L i g h t Scattering Spectroscopy J. ADIN MANN, ROBERT V. EDWARDS, THOMAS GALL, H. M. CHEUNG, F. COFFIELD, C. HAVENS, and P. WAGNER Department of Chemical Engineering, Case Western Reserve University, Cleveland, OH 44106 So far as we know this is the first report in the open literature of a laboratory experiment instrumented totally within the context of APL as the computer language driving each level of a hierarchy. The significance of our report is the demonstration that such a high level language improves by orders of magnitude the effort required to implement complicated experiments involving elements of control, data acquisition, data processing, and modelling of complex phenomena. It i s especially easy to retain the degree of human interaction required by the experiment. A l l of these desirable results can be accomplished by persons with no formal training in computer science. Certainly other languages and combination of languages have been used to write interactive systems for data collection and analysis. We have had considerable experience with FORTRAN and BASIC as well as assembly languages. Our experience with operating systems for experimental work has been limited to the DEC PDP 11/40 DOS and the DEC PDP11/45 RSX11D operating systems. Unequivocally, APL and our hierarchy has proved to be an order of magnitude more effective in reducing f i r s t concepts to producing results with experimental equipment. The APL language and the concepts of the APLSV or VSAPL implementations have provided an integrity of design and ease of coding that from our experience is far ahead of FORTRAN and BASIC oriented systems. Certainly the human engineering that has gone into APL implementations, e.g. the IBM 5100, is a factor in such a significant improvement, but the major element is that the structure of the language i t s e l f and the notation is much closer to the mathematics involved in experimental work than any computer language known to us. The penalty one pays in using a high level language is that of execution times for certain operations and, perhaps, cost of the hardware. These disadvantages were more than balanced by reduction in the time necessary to integrate the hierarchy into the experiment. Should the measurements become routine, i t may 41 Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

42

MINICOMPUTERS

A N DLARGE

SCALE

COMPUTATIONS

be u s e f u l to have p r o f e s s i o n a l hardware and software t e c h n i c i a n s implement the APL algorithms i n the appropriate assembly language. In that case, the APL functions serve as an unequivocal d e s c r i p t i o n of the "operating system" needed for the experiment. We have chosen to describe our methods i n the context of automating a s p e c i f i c experiment i n v o l v i n g the determination of the d i f f u s i o n c o e f f i c i e n t of p a r t i c l e s i n a f l u i d by the a n a l y s i s of fluctuations i n scattered light. A d e s c r i p t i o n of the p h y s i c s of the experiment i s r e q u i r e d i n order to put the instrumental a n a l y s i s i n context. The d e t a i l s of the i n t e r c o n n e c t i o n of the h i e r a r c h y w i l l be described and excerpts of code w i l l be given to illustrate methods. F i n a l l y , performance w i l l be o u t l i n e d . L i g h t S c a t t e r i n g Spectroscopy:

Particle

Diffusion

Only a b r i e f i n t r o d u c t i o n w i l l be given here to a c l a s s of experiments that i n v o l v e the time s e r i e s a n a l y s i s of scattered light. Consult the books by Chu [1] and by Berne and Pecora [2] for d e t a i l s . The object of the experiment i s the study of the response of a system to small f l u c t u a t i o n s over a l a r g e frequency range. When the frequency region i s below perhaps 1MHz, the "response function" w i l l y i e l d measures of macroscopic c o n s t i t u t i v e c o e f f i c i e n t s such as diffusion coefficients, viscosity coefficients, elastic c o e f f i c i e n t s , r a t e constants and o t h e r s . For frequencies l a r g e r than about 10GHz we observe r e l a x a t i o n effects a s s o c i a t e d with molecular d i s t o r t i o n s . We w i l l s p e c i a l i z e to the low frequency region below 1MHz and further outline only the problem of determining the d i f f u s i o n coefficient of macroscopic p a r t i c l e s i n s o l u t i o n . The d i f f u s i o n c o e f f i c i e n t s of macroscopic p a r t i c l e s (lOé-nm d ^ 2000 nm, d i s the diameter of a p a r t i c l e ) are of interest for a number of p r a c t i c a l and t h e o r e t i c a l reasons. D i s p e r s i o n s of p a r t i c l e s are used by the medical p r o f e s s i o n , paint i n d u s t r y , the p r i n t i n g i n d u s t r y as w e l l as analyzed i n the context of environmental safety and i n human medicine. The theory of c o l l o i d s t a b i l i t y can be s t u d i e d d i r e c t l y as can the i m p l i c a t i o n s of the theory of f l u i d s [3]. Consider a suspension of small p a r t i c l e s , d 200 nm, each p a r t i c l e w i l l execute Brownian random motion that r e s u l t s from the very frequent c o l l i s i o n s of the Brownian p a r t i c l e with the small molecules of the surrounding s o l v e n t . When the number density of the Brownian p a r t i c l e i s s m a l l , the p a r t i c l e s can be treated as i n d i v i d u a l s so that c o l l i s i o n s between these l a r g e p a r t i c l e s can be i g n o r e d . The d e s i r e d information about d i f f u s i o n can be c a l c u l a t e d from the s c a t t e r i n g function

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

4.

M A N N

43

APL Level Languages

E T A L .

where p(D) i s the d i s t r i b u t i o n of d i f f u s i o n coefficients, D and q i s the s c a t t e r i n g v e c t o r . A c o m p l i c a t i o n due to the v a r i a t i o n of s c a t t e r i n g c r o s s - s e c t i o n with s i z e i s included as part of the data analysis. The intermediate s c a t t e r i n g function i s r e l a t a b l e to the results of a l i g h t s c a t t e r i n g measurement i n the f o l l o w i n g way. When the i n c i d e n t beam has an e l e c t r i c f i e l d E the scattered beam, Tf^ w i l l be modulated by the p a r t i c l e motion so that at the detector the i n t e n s i t y w i l l be i = β |E.1 and the current autocorrelation f u n c t i o n produced by the detector w i l l be c

3

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

Rji-rt -

- Afitf

+ Β F (q,y) + C

(1A)

A

where A , Β and C are constants for a given experiment. Experimentally, R^(l) computed from a time s e r i e s produced by the detector that i s e s s e n t i a l l y the photocurrent as a function of time. When the i n c i d e n t f l u x of the s c a t t e r e d light is s u f f i c i e n t l y h i g h , the photocurrent i s put through an analog to d i g i t a l conversion before the computation of the correlation f u n c t i o n by the r u l e that i

s

*i< *« = - k \ n

vy+

(

n

I

B

)

When the i n c i d e n t f l u x i s s m a l l , photon counting i s done d i r e c t l y but a s i m i l a r formula holds with the d e f i n i t i o n that 1i s the number of photoelectrons detected during a period T^rAy around j x A T · computer i s used for these c a l c u l a t i o n s . In p r a c t i c e , the r e l a x a t i o n times i n range between a few tenths of microseconds to a few tens of milliseconds'. R e l a x a t i o n times shorter than l^«.sec r e q u i r e measurements of the time s e r i e s i n the 10 to 100/usee range. The accuracy requirement for i ^ ± } modest, eight b i t s i s often s u f f i c i e n t , but averaging must be done with respect to a l a r g e number of time s e r i e s . Even when d i r e c t memory access i s f a s t enough the memory of a conventional computer w i l l be f i l l e d before a large enough time s e r i e s has been c o l l e c t e d . We have been using the SAICOR Mod 42 and 43 machines for preprocessing the time s e r i e s data. While they are not programmable, c o n t r o l of f u n c t i o n can be done by a host computer. The r e s u l t of a determination of R£ i s a set of 16 b i t numbers, one for each correlator channel. As the d e v i c e ' s memory i s read, these b i t s are a v a i l a b l e i n two's complement code on 16 pins mounted on the back panel of the correlator. The a n a l y s i s can take a number of forms and a convenient one involves the computation of cumulants. Essentially, A

i

log

s

F(q,7) = C

+ £

C

where the power s e r i e s i s truncated a f t e r

-^T

(

the Mth term.

(

2

A

)

Then

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

44

MINICOMPUTERS A N D LARGE SCALE

Dp(D)dD

K, = q

COMPUTATIONS

=

(2B)

Ο

q^(D

-

Since f o r Ύ > 0

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

log(R^)

- C) = 2 log F ( q , J ) + constant

(3)

i t i s obvious that a polynomial must be f i t to what amounts to the l o g of the c o r r e l a t i o n f u n c t i o n produced by the SAICOR hardware. The c o e f f i c i e n t s of the polynomial can be i n t e r p r e t e d p h y s i c a l l y as the cumulants of the d i f f u s i o n c o e f f i c i e n t of polydispersed p a r t i c l e s . The determination must be repeated often i n the course of an experiment. The sequence of events must be: 1.

2.

3. 4. 5. 6. 7.

Computation of R^ goes on i n r e a l time for a s e l e c t e d period of time and may i n v o l v e 10M bytes of information on the photocurrent. The 100 to 400, 16 b i t R^ vector must be sent to a computer and transformed to numbers from a two's compliment code. The R{ vector must be subjected to a l e a s t squares a n a l y s i s and the cumulants c a l c u l a t e d . The R^ vector must be archived with ID data and the cumulants made a v a i l a b l e for a n a l y s i s . Repeat t h i s sequence many times for each experiment. The data f i l e s for the experiment must be catalogued. Repeat t h i s e n t i r e sequence for many experiments by d i f f e r e n t u s e r s .

We have found that VSAPL or APLVS l e v e l of APL implementations to be h i g h l y f a c i l e for handling these tasks effectively. A hierarchy with an APL host was devised for performing the data a c q u i s i t i o n , computations and c o n t r o l required. Before the d e t a i l s are d e s c r i b e d , a d e s c r i p t i o n of APL i s necessary. APL

(A Programming Language)

APL i s an array processing language for manipulating sets of numbers or sets of characters of quite general shapes. The formal syntax of APL i s based on the mathematical concepts of f u n c t i o n and functions of functions or o p e r a t o r s . Much of the power of the language derives from the extensive set of

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

4.

M A N N

E T AL.

APL Level Languages

45

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

p r i m i t i v e functions and operators as w e l l as the notation that represents t h e i r behavior. Defined functions can be constructed simply by w r i t i n g sequences of p r i m i t i v e functions that lead to the d e s i r e d result. The defined f u n c t i o n has the same syntax as the primitive functions. Several examples w i l l be s u f f i c i e n t to i l l u s t r a t e the use of the language. Suppose that the f o l l o w i n g double summation must be evaluated.

In APL:

y+.xB+.xJ

The l i n e a r l e a s t - s q u a r e s algorithm or one step i n an i t e r a t i v e nonlinear l e a s t - s q u a r e s algorithm would require e v a l u a t i o n of the f o l l o w i n g matrix problem:

the

While FORTRAN requires DO looping and a c a l l to a subroutine for computing the inverse m a t r i x , APL does the e n t i r e operation as follows: K+cm It has been our experience that i n general APL code i s more compact by a f a c t o r of ten to 100 than the equivalent FORTRAN code and takes roughly a tenth of the time to produce and debug on a computer. The large set of p r i m i t i v e s as w e l l as the syntax of the language allows for a s u r p r i s i n g l y large redundancy i n the ways one may code a p a r t i c u l a r c a l c u l a t i o n . This i s an advantage for a number of reasons, not the l e a s t of which i s that the language i s very f o r g i v i n g for the inexperienced programmer. A simple subset of the p r i m i t i v e s i s s u f f i c i e n t for handling most computations that an inexperienced programmer may want to do. As he gains experience, he w i l l n a t u r a l l y take to e x p l o r i n g some of the s o p h i s t i c a t e d p r i m i t i v e s allowed i n the language. In our experience, APL has been far e a s i e r to teach to inexperienced programmers than any of the other languages commonly i n use. The APL language i t s e l f i s i n d i f f e r e n t to i t s implementation. The language has most often been implemented for t i m e - s h a r i n g , but there i s no reason to exclude a r e a l - t i m e implementation. Since about 1972, new APL systems based on the shared v a r i a b l e concept, have been w r i t t e n for the IBM 370 s e r i e s computers. This approach allowed the APL processor to communicate to the e x t e r n a l world e a s i l y . Since shared v a r i a b l e s have e x a c t l y the same s t r u c t u r e as any other v a r i a b l e i n APL, defined functions could be w r i t t e n that use

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

46

MINICOMPUTERS A N D LARGE

SCALE

COMPUTATIONS

data passed back and f o r t h between the APL processor and external processors e a s i l y . It i s possible, therefore, to consider an experimental apparatus as an e x t e r n a l processor that communicates with the APL processor through shared variables. The d i f f e r e n c e between implementations centers on whether or not shared v a r i a b l e s are used and whether or not c e r t a i n systems functions and systems v a r i a b l e s are d e f i n e d . In practice, there i s a degree of p o r t a b i l i t y i n user functions that i s beyond most other languages. The Appendix includes a t a b l e of a number of APL systems that are supported on l a r g e r machines. The l i s t i s probably not complete. We are of the o p i n i o n that a small a d d i t i o n to the set of systems functions and systems v a r i a b l e s would provide a l l of the resources needed for doing r e a l time operation e n t i r e l y w i t h i n the context of an APL machine. The implementation of such a proposal i s beyond the e x p e r t i s e that we have w i t h i n the department. However, we have found an a t t r a c t i v e a l t e r n a t i v e to a f u l l APL r e a l - t i m e machine. A block diagram of the i n t e r f a c i n g schemes that have been used s u c c e s s f u l l y i n our laboratory for the l a s t year i s shown and described i n a l a t e r s e c t i o n as Figures 2 and 3. The Hosts The APL h i e r a r c h y i s s t r u c t u r e d so that any machine running with the equivalent of APLSV can be attached as an e f f i c i e n t host. See t a b l e (1) i n the Appendix. In p a r t i c u l a r , the IBM 5100 and the Xerox Sigma 7 machines have been used as hosts extensively. The IBM 5100 with APLSV features was considerably e a s i e r to use than the Xerox APL. However, the Xerox APL i s s u f f i c i e n t for the purpose even though awkward by modern standards. The various IBM 370 machines running e i t h e r VSAPL or APLSV are e n t i r e l y able to handle the host r e s p o n s i b i l i t i e s . The most e f f e c t i v e i n t e r a c t i o n of the host with the h i e r a r c h y does r e q u i r e communication rates above 300 baud. Since the IBM 5100 can transmit and then r e c e i v e at rates programmable up to 9600 baud, i t was a superior h o s t . Although our experience i s l i m i t e d , our t r i a l s show that the Hewlett Packard 3000 Series I I machines are a l s o s u i t a b l e as h o s t s . In f a c t , the terminal ports for the HP 3000II can work to 2400 baud and the I/O bus to ca 300KBytes/sec or f a s t e r . Use of that I/O bus for the hierarchy r e q u i r e s both hardware and software that does not e x i s t . The IBM 5100 a r c h i t e c t u r e was described by Roberson [ 4 ] and w i l l not be repeated here. This APL system i s small and p o r t a b l e and includes a CRT d i s p l a y as w e l l as a tape c a r t r i d g e d r i v e . The c a r t r i d g e s have a c a p a c i t y of about 220,000 bytes and the system performs tape w r i t e and checking at about 900 bytes/sec and tape read at about 2500 bytes/sec. Our work required a p r i n t e r as w e l l as the a u x i l i a r y tape d r i v e f o r e f f i c i e n c y . It

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

4.

M A N N

E T AL.

47

APL Level Languages

was necessary to use the maximum memory storage of 64K bytes which gives an a c t u a l workspace s i z e of about 57K b y t e s . The serial I/O adapter was r e q u i r e d i n order to a t t a c h the IBM 5100 to the h i e r a r c h y . The cost of t h i s system i s about $23,000. The IBM 5100 was p h y s i c a l l y attached to the h i e r a r c h y through i t s S e r i a l I/O p o r t . The APL processor allows the d e f i n i t i o n of shared v a r i a b l e s that "appear" i n both the APL workspace and the I/O i n t e r f a c e . This i s done by invoking an APL systems f u n c t i o n for generating a shared v a r i a b l e o f f e r , JJSVO, s i n the expression 1 QSVO ' MICRO' where the v a r i a b l e MICRO i s now shared with the s e r i a l I/O processor so that a s s i g n i n g MICRO to another APL v a r i a b l e w i l l cause information to be t r a n s f e r r e d from the I/O processor i n t o the APL p r o c e s s o r . A s s i g n i n g to MICRO w i l l cause information to be t r a n s f e r r e d from the APL processor to the I/O p r o c e s s o r . One or more v a r i a b l e s can be declared as "shared" by £7SV0. The I/O processor must have some information about the data to be t r a n s f e r r e d and that i s given by a s s i g n i n g l i t e r a l s t r i n g s of c o n t r o l information to the shared v a r i a b l e . Three c l a s s e s of s t r i n g s must be assigned to the shared v a r i a b l e before I/O communications o c c u r . F i r s t l y , when the l i t e r a l s t r i n g 'OUT 31001 TYPE=I' i s assigned to the shared v a r i a b l e , the s e r i a l I/O processor i s put i n t o command mode as designated by the ' d e v i c e number' 31001. I f t h i s i s i n f a c t done the vector 0 0 i s assigned to the shared v a r i a b l e by the S e r i a l I/O p r o c e s s o r . A non-zero value i m p l i e s an e r r o r and that c o n d i t i o n can be checked by simple APL code. S i m i l a r l y , ' I N 33001' when assigned to the shared v a r i a b l e informs the I/O processor to prepare f o r input from device address 33 ( i n p u t ) , f i l e 001. L a s t l y , the assignment of 'OUT 32001 TYPE=I' s t a t e s that an output operation w i l l occur for device 32, f i l e 001 and the data type i s s p e c i f i e d . A f t e r the command device i s opened by a s s i g n i n g 'OUT 31001 TYPE=I' to the shared v a r i a b l e , the next assignment to the shared v a r i a b l e i s the s p e c i f i c a t i o n of the device c h a r a c t e r i s t i c s i n the form of a character s t r i n g . The input and output buffer s i z e s may be s p e c i f i e d along with the data r a t e (0.5 baud s t e p s ) . Such aspects as the prompting c h a r a c t e r , new-line c h a r a c t e r , end-of-buffer c h a r a c t e r , p a r i t y , number of stop b i t s and changes i n the I/O t r a n s l a t i o n t a b l e s can be s p e c i f i e d at any time i n c l u d i n g during the execution of defined f u n c t i o n s . The device c h a r a c t e r i s t i c s that can be i n c l u d e d are s u f f i c i e n t to handle any handshake p r o t o c o l of the machines we have used. In f a c t , one may use 5, 6, 7 or 8 b i t I/O code so t h a t , f o r example, the IBM 5100 can be i n t e r f a c e d to EBCDIC or ASCII devices e a s i l y . I t i s convenient to define a small set of f u n c t i o n s that handle the opening and c l o s i n g of the S e r i a l I/O "devices" a u t o m a t i c a l l y . The monadic f u n c t i o n ^COMMAND r e q u i r e s as a r i g h t argument the l i t e r a l s t r i n g of device s p e c i f i c a t i o n s , AOUT outputs a l i t e r a l s t r i n g r i g h t argument, while A l N does not r e q u i r e an argument but can be used to a s s i g n whatever i s i n the input buffer to a

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

a

American Chemical Society Library 1155 16th St. N. W. Lykos; Minicomputers andD. Large Computations Washington, C.Scale 20036 ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

48

MINICOMPUTERS AND LARGE

variable. Each f u n c t i o n checks the r e t u r n c o n d i t i o n s i n d e t a i l . The ease with which the communication p r o t o c o l could be b u i l t was an important f a c t o r i n producing code

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

The

SCALE

COMPUTATIONS

code and reports e r r o r the d e t a i l s of i n t o defined functions quickly.

Device C o n t r o l Processor

The microcomputer chosen for t h i s study was the Motorola 6800 b u i l t up with the components l i s t e d on Figure 1. The microprocessing u n i t (MPU) was b u i l t up on one card with the MC 6800 as the processor. Off of the common address bus and data bus l e a d i n g to the MPU were s e v e r a l types of I/O adapters. These chips provided I/O for two modes of terminal operation as w e l l as i n t e r f a c i n g to the APL h o s t . The t h i r d mode of operation i s that of asynchronous communications through a s p e c i a l chip c a l l e d the MIKBUG ROM. This ROM provides an asynchronous program, a loader program, and a d i a g n o s t i c program for use with the MPU. Two Kbytes of memory were b u i l t up from ICs on a memory card attached to the address bus and the data b u s . Memory could be expanded simply by adding a d d i t i o n a l cards to the b u s . Communications to the instruments required i n t e r f a c i n g , part of which was organized on a channel card as shown i n Figure 1. The p e r i p h e r a l i n t e r f a c e adapter (PIA) was used for t h i s purpose. The PIA allows eight b i t b i d i r e c t i o n a l communication with the MPU and two b i d i r e c t i o n a l eight b i t buses for i n t e r f a c i n g to p e r i p h e r a l s . Handshake c o n t r o l l o g i c for input and output p e r i p h e r a l operation i s also included i n the chip. We used the two e i g h t - b i t buses together for the input of 16-bit p a r a l l e l I/O from the lowest l e v e l of the hierarchy, the SAI 42 or 43 c o r r e l a t o r s (Honeywell - SAICOR). The channel card of the DCP had a simple layout based on the Motorola PIA c h i p . We designed each channel to be of s i m i l a r s t r u c t u r e and only small adaptions, i f any, had to be made i n order to complete the i n t e r f a c e . Our i n t e n t i s to place a l l of the s p e c i a l i n t e r f a c i n g i n the instrument and keep the channel card as clean and ubiquitous as p o s s i b l e . The s p e c i f i c a t i o n of s i x channels does not represent a design r e s t r i c t i o n , but r e f l e c t s our estimate of what i s needed for the l a s e r l i g h t s c a t t e r i n g experiment. The boards and power supply of the DCP were b u i l t up by Hexagram, I n c . , C l e v e l a n d , Ohio f o r a t o t a l cost of about $2,000 i n c l u d i n g l a b o r . Software development for t h i s p a r t i c u l a r v e r s i o n of our system was done by Hexagram, I n c . and brought the e n t i r e cost of the microcomputer to $4,000. Hexagram, I n c . produced a competent design and implementation f o r us and i n the process taught us a f a i r amount of the technology needed for c o n s t r u c t i n g the systems. We are planning to implement a d d i t i o n a l microcomputer systems i n house at a savings. P h y s i c a l l y , a terminal and instruments are plugged i n t o the various channels using conventional telecommunication connectors.

Lykos; Minicomputers and Large Scale Computations ACS Symposium Series; American Chemical Society: Washington, DC, 1977.

Downloaded by EAST CAROLINA UNIV on January 2, 2018 | http://pubs.acs.org Publication Date: June 1, 1977 | doi: 10.1021/bk-1977-0057.ch004

4.

M A N N

E T AL.

49

APL Level Languages

The host i s connected i n t o e i t h e r the MIKBUG channel or the asynchronous communications i n t e r f a c e adapter (ACIA) depending on whether the purpose i s to load object code i n c l u d i n g the i n i t i a l i z a t i o n of the program for the operating system. Once the operating system has been i n i t i a l i z e d , then the host i s switched i n t o an ACIA channel for the remainder of the s e s s i o n . Of course, the program for the operating system could be entered through other media but we very q u i c k l y learned that i t was easy and f a s t to download a processing module as a hexadecimal character a r r a y . This was e s p e c i a l l y convenient to do with the IBM 5100 as the host s i n c e one could i n i t i a t e a program load through assignment of the character vector to the shared variable. Transfer was accomplished at r a t e s of 1200 baud and could be done considerably f a s t e r than that i f d e s i r e d . The f i r s t operating system w r i t t e n for the device c o n t r o l processor was based on a set of commands for i n t e r a c t i n g with the c o r r e l a t o r . The system was to be compatible with APL r u l e s . This was easy to do once an APL f u n c t i o n was w r i t t e n to emulate the behavior expected of the DCP. The )) i s executed by the DCP while ) i s executed by the APL processor. The f o l l o w i n g f u n c t i o n defines the DCP. DCPLP \STR% CMNAME ; CVAR «EMULATION OF THE DEVICE CONTROL PROCESSOR OF FIG 1. η ΝΑΜΕΔΡ IS A PROCESSOR ft ΝΑΜΕΔΡ IS A FUNCTION fl BLANKSkF STRIPS OFF BLANKS AND : ,6p η NAME IS A VARIABLE OR LABEL fi CM IS SHORT FOR COMMAND η CMARG IS THE ARGUMENT OF A COMMAND fl • REPRESENTS THE TERMINAL I/O TO THE DCP. f

f

η

LI: STR+BLMKSbF CUPr^ : , 6 p +(*/'))'=2+STR)/MPU STR+APLbJ? STR + ( Λ / ' ) ) » = 2t,STR) /MPU a Pj S > · Η

42 çd ο çu cd S β & β 43 ο Ο Ο Ό 43 CO β τΗ cd eu β β eu PQ ο β Ρ£ί ^ £ μ

43 cd β

ο ο ο

eu

S

(0

Χ)

00

> •H

Μ

ο eu ο

μ

•H

ιΗ

Ο Ο

P.

CO

ΡΗ · Η

β P μ

u

Pu co

PL, μ ΐ Q ΡΜ ΡΗ