UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Ionization of gases by slow monoenergetic electrons Tung, Selena C. W. 1988

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1988_A6_7 T86.pdf [ 11.32MB ]
Metadata
JSON: 831-1.0060350.json
JSON-LD: 831-1.0060350-ld.json
RDF/XML (Pretty): 831-1.0060350-rdf.xml
RDF/JSON: 831-1.0060350-rdf.json
Turtle: 831-1.0060350-turtle.txt
N-Triples: 831-1.0060350-rdf-ntriples.txt
Original Record: 831-1.0060350-source.json
Full Text
831-1.0060350-fulltext.txt
Citation
831-1.0060350.ris

Full Text

IONIZATION OF GASES BY SLOW MONOENERGETIC ELECTRONS by Selena C.W. TUNG B.Sc . Un ivers i ty of B r i t i s h Columbia, 1986 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE in THE FACULTY -OF GRADUATE STUDIES (Department of Chemistry) We accept t h i s thes i s as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA May, 1988 ® Selena C.W. Tung, 1988 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department The University of British Columbia Vancouver, Canada o DE-6 (2/88) ABSTRACT Electron impact ionization i s an important phenomenon touching many areas of science, and much research has been done over the years on various aspects of this process. Efforts to establish the precise variation of ionization cross section with energy were i n i t i a t e d in the early 1950's; however, severe disagreements between experimental data concerning fine structure observed in the electron impact ionization efficiency curves were reported from laboratory to laboratory. The work in t h i s thesis has been largely devoted to establishing the c r e d i b i l i t y of the method of electron impact ionization by monoenergetic electron beam in the study of such fine structure. The design and construction of an apparatus to study the ionization of atoms and molecules by an electron beam of narrow energy width are described, and preliminary data on krypton and argon near the ionization threshold energies discussed. A sound basis has been l a i d for further development in this f i e l d . i i i TABLE OF CONTENTS PAGE ABSTRACT i i TABLE OF CONTENTS i i i LIST OF TABLES v i i LIST OF FIGURES v i i i ACKNOWLEDGEMENT x i I INTRODUCTION 1 II THEORY 5 A. Electron Impact Ion Source Mass Spectrometry 5 B. Electron Impact Ionization 5 1. Pertinent C o l l i s i o n Processes 6 i . E l a s t i c C o l l i s i o n 7 i i . Inelastic C o l l i s i o n 7 i i i . Superelastic C o l l i s i o n And Electron Capture 8 2. Electron Impact Ionization 9 i . Mechanisms 9 i i . Franck-Condon Principle 10 i i i . Autoionization 11 i v . Temporary Negative Ion Formation 15 v. Postcollision Interaction 16 v i . Types Of Ions Produced 17 v i i . The Formation Of Negative Ions 20 iv C. Photon Impact Ionization 21 D. The Ionization Efficiency Curve And Its Interpretation 24 1. IE Curve Shape 24 i . Positive Ions 26 i i . Negative Ions 2 9 i i i . Ionization Near Threshold 30 2. IP And AP Determination 32 3. Fine Structure Interpretation 34 i . High Resolution IE Curves 34 i i . Mathematical Treatment Of IE Curves 37 4. Calibration 41 III INSTRUMENTAL METHODS IN ELECTRON IMPACT IONIZATION IN OBTAINING IE CURVE 43 A. Electron Source 43 B. Electron Monochromators 44 1. Semicircular Magnetic Selector 4 6 2. Retarding Potential Difference (RPD) 47 3. The Parallel-Plate Electrostatic Selector 48 4. 127° Cylindrical Electrostatic Selector 49 5. Wien F i l t e r 51 6. 180° Electrostatic Selector 53 7. Two-Stage Double Hemispherical Electron Energy Selector 55 8. Cylindrical Mirror Electron Energy Selector 56 V C. Electron Optics 57 D. Mass Spectrometers 58 E. Product Ion Collection 61 F. On-Line Computer Analysis And Data Processing 62 G. Vacuum System 63 IV DESCRIPTION OF THE APPARATUS AND EXPERIMENTAL TECHNIQUES 65 A. Monoenergetic Electron Beam Source 65 B. Electron Impact Ionization And Mass Discrimination 70 C. Data Processing Of Ionization Efficiency Curve 75 D. The Vacuum System 78 E. Operating Conditions And Signal Optimization 82 1. Electronic Circuits 82 2. Method Of Operation 82 V RESULTS AND DISCUSSION 87 A. Operational Tests 87 B. Results On Rare Gases 91 1. Argon 92 2. Krypton 98 C. Comparison With The Threshold Electron Impact Study" For Fine Structure Determination 110 VI CONCLUSION 111 VII BIBLIOGRAPHY 113 v i APPENDIX I. The LSI 11/03 Computer Control 1 1 9 II. F i r s t Derivative Ionization Efficiency Curves 177 v i i LIST OF TABLES Table Page 1 ' A Summary Of Structure Positions In Different Argon F i r s t Derivative IE Curves 96 2 Rydberg Energy Levels Of Krypton Converging On Kr + 2 ? 1 / 2 1 0 3 LIST OF FIGURES Figure . Page 1 Ionization Mechanisms 9 2 Some Hydrogen Potential Energy Curves 12 3 Autoionization Processes 13 4 Potential Energy Curves For Ion Pair Production 19 5 Potential Energy Curves For Electron Capture Processes 21 6 Photoionization Efficiency Curves 23 7 Ionization Efficiency Curves 25 8 Fine Structure In An Ionization Efficiency Curve 28 9 Negative Ion Ionization Efficiency Curve 30 10 Threshold Behavior Of Hydrogen 31 11 IE Curves For Hg Near Threshold 35 12 FWHM - The Electron Beam Energy Resolution 42 13 'Monoenergetic' Electron Beam Experiments 45 14 Nottingham's Semicircular Magnetic Selector 46 15 The Retarding Potential Difference Technique 4 8 16 The Parallel-Plate Electrostatic Selector 49 17 The 127° Cylindrical Electrostatic Electron Selector 50 18 Wien F i l t e r As An Energy Selector 52 ix 19 The 180 Electrostatic Hemispherical Monochromator 54 20 Two-Stage Double Hemispherical Selector 55 21 Cylindrical Mirror Electron Energy Analyzer 56 22 . The Quadrupole Mass Spectrometer 60 23 Electron Impact Mass Spectrometer System 66 24 The Two Characteristic Situations For Electron Beam Deflection Through An Einzel Lens 70 25 Ion Extraction Of QXK Mass Spectrometer 71 2 6 The QXK Quadrupole Mass Spectrometer 73 27 Electron Impact Spectrometer Output And Data Analysis System 76 28 Diagram Of The Electron Impact Spectrometer And Pumping System 7 9 29 The Ionization Gauge 80 30 Ion Current As A Function Of Gas Pressure 81 31 The Electronic Circuit Diagram Of The Electron Impact Spectrometer 83 32 Electron Impact QMS Operating Conditions 8 6 33 Background Spectrum For Argon, An Accumulation Of 80 Scans 88 34 Ionization Efficiency Curve For Argon 94 35 F i r s t Derivative IE Curves For Argon 95 36 A Summary Of Onsets Above Threshold For Argon 97 37 Ionization Efficiency Curve For Krypton 99 38 F i r s t Derivative IE Curves For Krypton 101 X 39 A Summary of Previous F i r s t Derivative IE Curves For Krypton Near The Ionization Threshold Energy 10 6 40 A Summary Of Previous F i r s t Derivative Minima On IE Curves For Kr Near The Ionization Threshold 10 7 41 Corresponding Photoionization Efficiency Curve For Krypton Near Threshold 109 ACKNOWLEDGEMENT I would l i k e to express my deepest appreciation to my supervisor, Professor David C. Frost, for his invaluable guidance, encouragement and support throughout the course of this work. His sense of humor and friendliness have made research a lot more enjoyable. I would also l i k e to thank Dr. Sharon Lawton and Dr. Krystyne Gorskelna for th e i r assistance in setting up the apparatus and the computer programs. I would wish to acknowledge gratefully the staffs of the Mechanical and Electronics Workshops of the Department of Chemistry, especially.-.Mr. .Charles .McCafferty, Mr. Brian Greene and Mr. Kam Sukul, for their expertise in the construction and maintenance of the instruments. In addition, I would l i k e to thank Dr. H.L. Hu, my colleagues, D. L i , W. Wu and W.F. Chan for their continued support, both in s p i r i t and in deeds. I am greatly indebt to my parents and would acknowledge them in particular for the i r love, understanding, concern and encouragement. Finally, and most -importantly, I thank God for everyone and everything leading to the completion of t h i s thesis. To Him be a l l the glory! 1 CHAPTER ONE  INTRODUCTION The interaction of electrons with gas phase species has received a great deal of attention since early in the twentieth century. Soon after the discovery of the electron by J.J. Thomson in 18 97, Lenard [1] bombarded atoms with beams of low energy electrons in 1903. In 1914, Franck and Hertz [2]. performed their well-known experiment and observed that an electron beam could suffer attenuation in i t s passage through a g a s - f i l l e d chamber. It was then known that effects such as fluorescence, ionization and molecular dissociation could be induced by electron impact. By 1930, Smyth [3] summarized a large store of accumulated observations and data obtained by the electron bombardment of hydrogen, which included consideration of the vibrational levels of the molecular ion, the shape of the ionization probability curve (also called the ionization efficiency, IE, curve), and the ionization potential. In a l l electron impact studies, one of the principal d i f f i c u l t i e s encountered i s the energy spread in the electron beam produced by emission from a thermal emitter. Attempts to produce monoenergetic electron beams have been made (e.g. Lawrence [4] i n 1926), and technological advances have taken 2 place. Along with various methods proposed for handling information obtained [5], this type of study has progressively become more f r u i t f u l , yielding data useful in many diverse areas. In 1951, Fox and his associates [6] f i r s t described the Retarding Potential Difference (RPD) method, which marked a breakthrough in effectively reducing the electron energy spread of the beams. At the same time, various kinds of electron selectors were being developed in the direct production of monoenergetic electron beam (see chapter III, section B). Moreover, the development of new ultra-high vacuum and electron beam technologies, low current measurement, pa r t i c l e counting, electron optics and d i g i t a l data analysis techniques a l l led to widespread a c t i v i t y in the electron impact f i e l d . With an electron impact ionization chamber / mass spectrometer combination, a plot of the positive or negative ion current as a function of the impacting electron energy (the ionization efficiency curve) may be produced and used to obtain accurate information on ionization potentials (IP's) of parent ions, appearance potentials (AP's) of fragment ions, energy levels and other phenomena. In the last three decades, ionization and fragmentation of atoms and molecules by low energy electron impact have been widely investigated, providing data for interpreting various - 3 phenomena in radiation physics, theoretical chemistry, plasma physics and related f i e l d s [7]. Actually, electron impact ionization studies have both fundamental and practical applications. Fine structure in the IE curves near the ionization threshold of many atoms and molecules has been observed with interpretations put forward [ 8 ] . For example, electron induced excitation of Rydberg states of rare gases below the ^ 1/2 limit can l i e above the f i r s t ionization potential, and their degeneracy with the ^ 3 / 2 continuum can lead to autoionization, in turn l i k e l y to produce structure in the IE curve. On the other hand, structure seen in the electron impact IE curve can be compared to the photoionization efficiency curve by photon impact as well as to spectral information obtained from other techniques in the same energy region. The purposes of this thesis are (1) to describe the design and construction of the apparatus used for our electron impact experiment, namely the 'monoenergetic' electron impact ion source mass spectrometer, and (2) to establish the c r e d i b i l i t y of low energy 'monoenergetic' electron impact technique to observe fine structure i n ionization efficiency curves. Some preliminary results of th i s study w i l l be presented, mainly on the IE curves for two atomic rare gases, krypton and argon. Since krypton has been studied by 'monoenergetic' electron impact technique in 4 •several other laboratories, a comparison of those results with ours w i l l be made, especially in fine structure seen between the 2 p3/2 a n c* 2 p l / 2 ionic states. Photon impact ionization w i l l also be discussed where appropriate. 5 CHAPTER TWO  THEORY A. ELECTRON IMPACT ION SOURCE MASS SPECTROMETRY In the broadest sense, electron impact spectroscopy includes a l l studies based on the variation of a signal with some energy dependent parameter produced by the action of electrons c o l l i d i n g with a target in the gas phase [9], and so the scope of electron impact studies i s extremely broad. Electron impact ion source mass spectrometry i s the name given to the detection of mass analyzed ions emerging after the c o l l i s i o n of a beam of monoenergetic electrons with atoms or molecules. Under high vacuum as in the cases studied here, only c o l l i s i o n s of an electron with a single atom or molecule in i t s electronic ground state need to be considered. The resulting ionization efficiency curve i s a plot of the mass analyzed ion current as a function of electron energy, and the energy range of the curve can be selected for particular information to be obtained. "6 B. IONIZATION BY ELECTRON IMPACT Electron impact ionization of atoms and molecules has been known for about 80 years. Only during the last three decades has detailed experimental and theoretical research been carried out with respect to different types of ionization processes. However, there exist large amounts of inconsistent and ambiguous results, generally acknowledged to be an underestimation of the experimental d i f f i c u l t i e s inherent in such measurements [10]. D i f f i c u l t i e s in the determination of different types of ionization processes result in the existence of l i t t l e or no r e l i a b l e data on fine structure in electron impact IE curves. Theoretically, in addition to direct ionization: A + e -> A + + 2e (1) other more complex mechanisms can make significant contributions to ionization cross section - a measure of ionization probability - and give r i s e to structure in the ionization efficiency curve [11]. These different ionization mechanisms w i l l be discussed below, after a b r i e f description of some c o l l i s i o n processes involved in electron impact. 1. Pertinent C o l l i s i o n Processes Basically, electron-atom and electron-molecule interactions can be c l a s s i f i e d into two major categories, e l a s t i c and i n e l a s t i c . Two other c o l l i s i o n processes, 'superelastic' and electron capture (to form negative ions of a wide range of lifetime), are also important. i) . E l a s t i c C o l l i s i o n If an electron collides e l a s t i c a l l y with a target gas, the net result of the c o l l i s i o n i s a change in direction of motion of the electron in which no energy i s transferred to the internal energy of the target. As the electron suffers a deflection, some translational energy must be imparted to the target and thus reducing the i n i t i a l kinetic energy of the electron. According to the conservation of momentum, this energy transfer of electron energy i s generally small, always less than IO--* eV [12], and may be neglected in most energy related calculations. i i ) . Inelastic C o l l i s i o n In an i n e l a s t i c c o l l i s i o n , energetic electrons lose some or a l l of their kinetic energy to cause excitation, ionization or dissociation of the target. Excitation occurs when the energy transferred i s not sufficient to lead to direct ionization. For 8 ionization and dissociation, the number and energy of the electrons ejected as well as the ions produced may be analyzed. Inelastic c o l l i s i o n processes have been the most widely studied of a l l electron c o l l i s i o n phenomena. Ionization induced by i n e l a s t i c c o l l i s i o n i s the process which gives r i s e to IE curves in which excitation to energy levels below the f i r s t ionization threshold i s not observed. Dissociative ionization, on the other hand, may be observed at somewhat higher electron energies [13]. i i i ) . Superelastic C o l l i s i o n and Electron Capture Superelastic c o l l i s i o n s can occur only between an electron and an excited atom or molecule, and are such that the electron gains energy from the internal energy of the target. Since superelastic c o l l i s i o n s are very d i f f i c u l t to study experiment-a l l y [14], r e l a t i v e l y l i t t l e i s known about this c o l l i s i o n process. An electron capture process takes place when the impacting electron i s captured by the target to form a negative ion. An example of t h i s process can be seen from SFg forming a negative ion (SFg -) by capturing an electron of near zero energy [15]: SFg + e -> S F 6 (2) 9 2. Electron Impact Ionization i) . Mechanisms Electrons c o l l i d i n g i n e l a s t i c a l l y with a gas phase target can result i n ion formation through different reaction channels, provided that the energy of this electron beam i s greater than a c r i t i c a l value (IP or AP). In the case of an atom, single or multiple ionization may occur. For a molecular target, ionized molecules may be produced through channels shown in Fig. 1, using a diatomic molecule (AB) as an example with e s 'scattered electron' and e e 'ejected electron'. However, more complex FIGURE 1. IONIZATION MECHANISMS AB + e -> A B + + e c + e -> A B 2 + + e s + 2e e -> A B n + + e s + n e e -> A B k + + e s + e e -> AB + e s -> A B + + e s + e e -> A B + * + e s + e e -> A + + B + e s + e e -> A B 2 + + e s + 2e e -> A B + + e s + e e + hv -> A + + B + e s + e e -> A + + B~ + e s single ionization (3) double ionization (4) multiple ionization (5) K shel l ionization (6) autoionization (7) fragmentation (8) autoionization (9) radiative ionization (10) dissociative ionization(11) ion pair formation (12) molecules are expected to undergo much more complicated c o l l i s i o n processes since intermediate states may participate in the c o l l i s i o n . i i ) . Franck-Condon Principle Electron impact ionization of an atom involves the transition between two electronic states, whereas vibrational or rotational excitation has to be considered also in case of molecular ionization. However, the energy losses of the impacting electron in the excitation of molecular vibration and rotation are r e l a t i v e l y small compared to the energy of electronic transition. For example, the f i r s t excited vibrational state of H2 +lies 0.27 eV above the ground ionic state at 15.426 eV [16]. The changes in the vibrational levels during the ionization event can be described in terms of the Franck-Condon principle. Qualitatively, the Franck-Condon principle may be stated as follows: no changes in the nuclear separation and velocity of the nuclei occur during ionization. Due to the usually large nuclear to electronic mass ratio and the short interaction time (~10-1^ s) [17], the point on the potential energy curve of the molecule representing the configuration before the transition l i e s d i r e c t l y below the point on the potential energy curve of the molecular ion representing the configuration after the t r a n s i t i o n (vertical transition). Depending on the relative shape of the potential energy curves in a sp e c i f i c system, different reaction channels may be possible (Fig. 2) [13]. Most electron impact IP and AP measurements for molecules are between th e i r v e r t i c a l and adiabatic (transition from ground atomic state to ground ionic state) values, and quite a large spread of reported values i s found in lit e r a t u r e in most cases. An example i s N,N-dimethylbenzenamine, with reported IP values ranging from 7.10 to 7.92 eV [18]. These 'discrepancies' arise from different experimental s e n s i t i v i t i e s and the particular method used to extract an IP or AP from the data [19]. i i i ) . Autoionization Most of the ionization mechanisms l i s t e d above (processes 3 through 6, 11 and 12 in Figure 1) can be c l a s s i f i e d as direct. However, alternate ionization channels can affect t o t a l ionization, when for instance, the ions are formed by ionization through autoionizing states of a neutral molecule or atom. This autoionization (processes 7 and 9) may be described as a two-step reaction represented in Fig. 3: a neutral molecule or atom i s f i r s t raised to an excited state lying above the minimum ionization threshold of the species (Fig. 3 i ) , followed by a radiationless transition of the system into an accessible ionization continuum (Fig. 3 i i ) . Some time delay i s involved, —I 1 I I 01 02 03 04 Nuclear Separation (nm) FIGURE 2. SOME HYDROGEN POTENTIAL ENERGY CURVES [13] 13 FIGURE 3. AUTOIONIZATION PROCESSES usually ~ 1 0 - 1 2 to 10~ 1 4 s [20]. In contrast, direct ionization produces excitation of an atom or a molecule d i r e c t l y into the ionization continuum (Fig. 3 i i i ) . Moreover, autoionization may involve an electron other than the valence electron, the simultaneous excitation of two electrons, or the formation of temporary negative ion, which results in access to discrete states above the ionic ground state. Structure in molecular IE curves i s thought to be caused for the most part by Rydberg autoionizing states converging to the 14 higher vibrational states as the role of temporary negative ionic states i s unclear yet. It i s known that the excitation cross section of a Rydberg series decreases as the quantum number 'n' for a given vibrational state increases to i n f i n i t y . Therefore, the excitation cross section leading to autoionization would be expected to decrease similarly, and the absence of autoionizing Rydberg states above n = oo would produce a discontinuity in the IE curve. The effects of autoionization are extremely varied and d i f f i c u l t to predict theoretically. One aid to identify and predict t h e i r properties i s the 'selection rules', f i r s t formu-lated by Shenstone [21] in 1931. Not a l l energy levels exhibit autoionizing properties even when a radiationless transition i s energetically possible. The a b i l i t y to exhibit such properties i s limited to those levels above the lowest ionization threshold which encounter a continuum with the same parity and t o t a l angular momentum as themselves, and with the same L and S values for L-S coupling. However, a departure from L-S coupling at low energies w i l l allow autoionization phenomena to occur between a discrete level and a continuum of different L and S values. Therefore, op t i c a l l y forbidden electronic transitions may be observed by low-energy electron impact, while these selection rules approximate the optical ones at high energies. 15 i v ) . Temporary Negative Ion Formation [22] The formation of a temporary negative ion(or "resonance") i s an alternative' channel to cause structure in the positive ion IE curve. Here, the impacting electron (with more or less well-defined energy) attaches i t s e l f to the target atom or molecule for some time which i s longer than the normal transit time through the target. The origins of these temporary negative ions may arise from "Feshbach resonance" and "Shape resonance". For "Feshbach resonance", two electrons are simultaneously promoted, permitting them ( i f they can both penetrate s u f f i c i e n t l y into the attractive ion core) to experience a stronger attraction to the nucleus and therefore to remain bound. In the case of "Shape resonance", delay in the escape time of the electron i s caused by the promotion of a single electron to a state of high angular momentum which then generates an effective potential barrier that blocks removal of the electron. However, these "resonances" are short-lived and w i l l decay by emission of electron (s). A particular resonance can decay into many f i n a l states, and i t s existence may be detected by measuring the structure in the energy dependence of the cross section of any state. When two electrons are being emitted, a singly charged positive ion i s formed and may cause structure in the positive ion IE curve. Therefore, IE structure observed above the ionization threshold may be interpreted as arising from temporary negative ions or 16 autoionization from states of the neutral atom or molecule. In the IE curves for argon, krypton and other rare gases, a number of features have been detected [23], some of which are undoubtedly "resonances" associated with singly excited states of the neutral atom ("Shape resonance"). However, there are s t i l l d i f f i c u l t i e s in distinguishing between "resonances" and onsets of highly excited autoionizing states of the neutral atom. v) . Postcollision Interaction [24] One phenomenon which may affect fine structure in IE curves i s that of pos t c o l l i s i o n interaction (PCI). This has been observed when the energy of the impacting electron just exceeds the autoionization energy. In the excitation of the autoionizing state, the electron w i l l lose almost a l l i t s energy and leave the target slowly. If the velocity of this slow electron i s s u f f i c i e n t l y low, i t s f i e l d w i l l affect a l l the characteristics of the decay of the autoionizing state. Then, the assignment of a definite energy to the state i s impossible, and any structure in IE curves arising from a state influenced by PCI would be smeared out. This effect may be observed most clearly when the lifetime of the excited autoionizing state i s short, i.e., when the width of the level i s large. 17 v i ) . Types of Ions Produced In spite of the different mechanisms and phenomena, electron impact ionization may produce singly or multiply charged ions, and a number of other different ions: a. Parent Ions Parent ions are positively charged ions produced through the removal of one electron from a neutral molecule with a lifetime of £.10""5 s [25] . Production of these parent ions relative to other ions originating from the same neutral molecule depends on the electron energy and on the electronic constitution of the molecule. Only singly charged parent ions are produced at and just above the IP. b. Fragment Ions If the impacting electron possesses an energy above the AP of a molecule, fragment ions may appear as shown in reaction 6 (Fig. 1). In the case of a polyatomic molecule, a wide range of fragment ions may be produced, i.e., the molecular ion can decay into charged and neutral fragments, and these may be produced in excited states and decay into further fragments, and so on. In general, the interpretation of fragmentation patterns r e l i e s heavily on empirical observations. 18 c. Multiply Charged Ions Multiply charged atomic and molecular ions were observed and id e n t i f i e d very early by Thomson [26,27], and by many other workers since [e.g. ref. 28]. In many cases, i t i s not possible to study multiply charged ions owing to the r e l a t i v e l y low probability of formation. d. Metastable Ions Ions produced by electron impact with su f f i c i e n t internal energy to dissociate before reaching the detector of a mass spectrometer in about 10~ 5 s are termed metastable. Two other terms should also be introduced here. A stable ion i s one which i s produced within the ion source and travels to the collector without decomposition, while an unstable ion, produced with an amount of internal energy, decomposes almost immediately (< 10"*^  s) into fragment ions in the ion source before leaving i t . e. Rearrangement Ions Rearrangement ions are produced by dissociation reactions resulting i n the formation of ions containing bonds between atoms that were not di r e c t l y bonded in the original molecule, i.e., ABCD + e -> ABCD+ + 2e -> BD + + AC + 2e (13) 19 f. Ion Pairs In the process of ion pair production, a positively and a negatively charged fragment ions (and possibly a neutral) are formed simultaneously, and an intermediate molecular ion i s not required, i.e., From the potential energy curves (Fig. 4), the molecule goes through an electronic transition within the Franck-Condon region to a repulsive curve and dissociates into the respective fragments. In fact, this mechanism can give r i s e to ions that AB + e -> A + + B" + e (14) c o •iH HH U rt u r-c In state a and i n the upper portion of state b, the excited molecule can decompose to A + and B (formed with excess kinetic energy). POTENTIAL ENERGY CURVES FOR ION PAIR PRODUCTION FIGURE 4 . Nuclear Separation 20 are formed only by fragmentation and is. most l i k e l y to occur when both ions are pa r t i c u l a r l y stable. However, special experimental set-ups are necessary for detecting and analyzing the simultaneous formation of a positive and negative ion pair [29]. v i ) . The Formation of Negative Ions For a given gas, both the number and intensity of peaks for negative ions in the -mass spectrum axe usually far less than those for positive ions. Therefore, electron impact studies on negative ions have been much fewer and i n general y i e l d less useful information (although t h i s mode can be useful for analytical purposes). Two mechanisms for negative ion formation have already been mentioned. They are the electron capture process and ion-pair production, both of which can be described i n terms of potential energy diagrams (Fig. 4 and 5). . Other mechanisms for negative ion formation by electron impact are also possible [30]. In general, negative ions formed through capture of a free electron are unstable with respect to reversion to the neutral species. Positive ions may also result when two electrons are released (temporary negative ions). On the other hand, these negative ions can be s t a b i l i z e d i f the excess energy i s removed. 21 Nuclear S e p a r a t i o n FIGURE 5 . POTENTIAL ENERGY CURVES FOR ELECTRON CAPTURE PROCESS a. capture of an electron results in rapid decomposition into A and B~, both having excess kinetic energy. b. some ions are formed with enough energy to decompose spontaneously, but others result in AB with excess energy. C. PHOTON IMPACT IONIZATION An alternative to electron impact ionization in fine structure study i s photon impact ionization. For photon impact, the gas phase species to be investigated i s illuminated by a beam of monochromatic u l t r a v i o l e t radiation. If the photon energy of the radiation i s gradually increased, successive stages of excitation can be reached u n t i l the energy reaches a c r i t i c a l value where ionization takes place. With further increase in photon energy, a curve of photoionization efficiency as a function of photon energy can be obtained. A mass spectrometer can also be used to focus the particular ion under investigation and to measure the intensity of ion currents produced. For the ionizing c o l l i s i o n of photons with atoms and molecules, a photon of energy hv can be absorbed to take the system from a state of lower energy E" to a state of higher energy E x, i.e., hiv = E A - E" (15) where h i s Planck's constant, and v i s the frequency of the radiation. Photoionization occurs when an atom or molecule interacts with a photon of s u f f i c i e n t l y high energy, i.e., AB + hv -> AB + + e (16) In a photoionization efficiency curve (Fig. 6), a region of continuous absorption above the IP i s observed, with autoionizing states superimposed on i t . Examples of photoionization efficiency curves for argon and krypton are given in Fig. 6(b) and (c). With high resolution photon impact apparatus, fine structure can also be observed in the photoionization efficiency curve and used for comparison with results obtained from electron impact studies. ( a ) 160 16 5 17-0 17-5 1*0 145 Energy Scale ( -eV ) ( b y 150 15 5 160 ( C ) FIGURE 6 . PHOTOIONIZATION EFFICIENCY CURVES (a) A schematic representation of autoionization process as shown i n a photoionization efficiency curve; (b) and (c) are examples reproduced from Massey's work on argon and krypton by retarding potential photoionization using 584 A radiation [12]. 24 D. THE IONIZATION EFFICIENCY CURVE AND ITS INTERPRETATION Since photo- and electron impact ionization efficiency curves of molecules include much information on ionic states useful in electronic structural studies and in conjunction with molecular o r b i t a l theory, very many investigations have been made in this f i e l d [31]. Measurements have also been carried out on the structure in IE curves pf atoms, especially in the region near the ionization threshold. Information on energy levels, ionization energies and threshold energies are useful in a number of kinetic, thermodynamic and structural-chemical problems [ 32 ] . However, i t can be seen from the literature that much observed structure in IE curves could not be correlated to known energy levels. The reasons for this are unclear, and the work described here i s an attempt to c l a r i f y the situation. 1. Ionization Efficiency Curve Shape An ionization efficiency, IE, curve i s the graphical representation of the variation of ion intensity (or to t a l ionization in experiments not u t i l i z i n g mass analysis of the ions) as a function of the impacting energy . The shape of the electron impact IE curve i s inherently different from the photoionization efficiency curve. An example of an electron impact IE curve i s shown in Fig. 7 [33] -which consists of: (1) the baseline where no ionization occurs below the threshold 25 0 100 200 300 4 0 0 500 Electron Energy (eV) FIGURE 7. IONIZATION EFFICIENCY CURVES FOR SEVERAL IONS DERIVED FROM ACETYLENE [33] energy, (2) a curved onset of ionization where the curvature i s mainly due to inhomogeneity of the electron beam energy, (3) a f a i r l y linear portion for the next 10 to 20 eV, (4) a broad maximum between 50 arid 100 eV, and (5) a gradual decrease in ion current with further increase in electron energy. The theory of ionization probability (efficiency) w i l l not be covered i n thi s thesis, but can be understood qualitatively as follows. When the electron has an energy just equal to the threshold, i t needs to col l i d e with the target gas 'head-on' in order to transfer a l l of i t s kinetic energy to cause ionization. The probability for this to happen i s very low. At higher energies, only a fraction of the electron's energy needs to be transferred, and 'glancing' impacts w i l l result in ionization with a corresponding increase in the ionization efficiency. A mathematical treatment may be found in ref. 34. i . Positive Ions For ionization leading to the formation of a positive ion, three p a r t i c l e s are formed at least: the positive ion, the ejected electron and the scattered electron, i.e., A + e -> A + + e s + e e (17) This process may occur at any energy above the threshold because the excess energy may be carried away in the form of product electron kinetic energy. Therefore, this i s not a resonant process. In an ideal case, with monoenergetic electrons, the positive ion IE curve i s expected to show structure or 'breaks', as they were once loosely called. Each 'break' or upward change of slope i n the curve corresponds to the onset of a new ionization process, and such processes are expected to be additive owing to the vast excess of impinging electrons over the target species. Additional structure above the f i r s t threshold energy may correspond to two-step autoionization processes (Fig. 8 ) . One sp e c i f i c example would be electron induced excitation of Rydberg states i n a rare gas, converging below the limit but lying above the f i r s t ionization potential which may lead to autoionization. Corresponding features have been seen by many workers [35-37] in such IE curves between the 2 p3/2 a n c i 2 p l / 2 thresholds. The ionization efficiency curve may also be expressed as: I (E) = 2 Idj (E) + X i a j (E) (18) where Idj = ion intensity by direct ionization through the jth ionic state Iaj = ion intensity by indirect ionization through the jth autoionizing state E = electron energy This i s to say, the ion current i s the sum of ion intensities by direct and indirect ionization processes at any particular electron energy. 28 o c m c o •H +J rt N •H C o autoionization following excitation A. new ionization process (a) COMPOSITE Electron Energy FIGURE 8 . FINE STRUCTURE IN AN IONIZATION EFFICIENCY CURVE 29 i i . Negative Ions For negative ions, their IE curves can be quite different from those for positive ions. In the case for electron capture of SFg (Equation 2), since there are no product electrons to carry away excess energy, ionization occurs only i f the energy of the impacting electron l i e s within a more or less well-defined range (i.e., a resonant process). A near zero energy resonant peak with a f i n i t e cross section over an energy range smaller than 0.1 eV [38] has been observed for this slow electron scavenging process. This peak i s significant for negative ion IE curve calibration and effective energy resolution measurement (see below, section D.4). The electron capture process which brings about dissociation the molecule may also be resonant i f no electron leaves the c o l l i s i o n s i t e . For example, On the other hand, i f there i s a product electron in the c o l l i s i o n , as i n the ion pair production from carbon dioxide CO + e -> C + 0 (19) [39], (20) / the excess energy can be carried away and the ionization w i l l not be resonant. Therefore, two distinct types of negative ion IE curves may be observed, l i k e (A) and (B) obtained for the production of 0" from CO [39] in Fig. 9. i i i . Ionization Near Threshold Studies on the detailed behavior of IE curves near threshold have been important for accurate determinations of IP's and AP's. As the threshold region i s now generally agreed to be rich in fine structure, high precision observations in this region, i f properly established, open the way to establishment of the nature of electron impact ionization - central to our area of research. E l e c t r o n E n e r g y (eV) FIGURE 9. NEGATIVE ION IONIZATION EFFICIENCY CURVE (0~ From CO) 31 Fig. 10 shows an early result obtained for the threshold IE curve for atomic hydrogen [40]. Here a low-energy ' t a i l ' i s observed and attributed to energy spread in the electron beam. Actually, accurate measurement near the threshold i s faced with considerable d i f f i c u l t i e s of an instrumental nature. Spurious effects may give r i s e to erroneous estimates of the threshold potentials, or distort the shape of the IE curves. Some of these d i f f i c u l t i e s have been summarized by Fox et a l . [41]. Change of contact potential due to surface contamination may result i n i n a b i l i t y to produce surfaces of constant potential. Space charge effects either from the beam i t s e l f or as a result -0.2 0 0.2 0.4 0.6 ( E l e c t r o n Energy) - (Threshold Energy) FIGURE 10. THRESHOLD BEHAVIOR OF HYDROGEN [40] 32 of secondary electron emission at various parts of the apparatus may introduce further e l e c t r i c f i e l d i r r e g u l a r i t i e s , giving rise to distortion of the IE curve. Other physical factors such as the threshold behavior of the ionization cross section, reaction competition (in the case of fragment ions) as well as instrumental factors such as detection s e n s i t i v i t y , signal-to-noise r a t i o and ion residence time in the interaction region must also be considered in a complete analysis. 2. IP and AP Determination Accurate measurements of IP's, AP's and fine structure near the threshold are important aspects of low energy electron impact study. Theoretically, the IP of a molecule or an atom i s the adiabatic IP, defined as the energy required to completely remove an electron from the neutral molecule or atom in i t s ground state to form the corresponding molecular ion or atomic ion also in i t s ground state. However, IP's measured i n electron impact study do not necessarily correspond to the theoretical d e f i n i t i o n because of the p o s s i b i l i t y that the products and/or the reactant gas of the ionization process may be electronically and/or vibrationally excited. Therefore, the operational d e f i n i t i o n of the term IP becomes the minimum electron energy at which the formation of molecular ion or atomic ion can be detected in a given apparatus. Similarly, the term 'appearance potential', generally applied in the case of the formation of a fragment ion from a molecule (when ionization and dissociation both occur), i s theoretically defined as the energy required to produce the ion and i t s accompanying neutral fragment from a given molecule, with a l l species involved being in their ground states. Again the operational d e f i n i t i o n of AP of a fragment ion i s simply the minimum energy at which the fragment ion can be detected. Since these minimum energies depend to some extent on the characteristics of the apparatus used, the properties of the ionization process and the technique used to determine the electron energy corresponding to the threshold of ion formation, the experimentally determined potentials w i l l usually diverge from the theoretical values. There have been many attempts to extract ionization and appearance potentials from experimentally determined IE curves. Many e a r l i e r values of IP's and AP's were derived using either the semilog plot or the linear extrapolation technique. In the former, the logarithm o f the ion current i s plotted as a function o f electron energy for the sample gas as well as a reference gas whose ionization energy i s known accurately (e.g. a rare gas) . The resulting curves in general show approximately linear and p a r a l l e l sections, and the ionization or appearance energies are given by the separation of the curves along the energy axis. 34 In the linear extrapolation method, the IE curves are plotted up to about ten volts above the thresholds. The approximately linear upper portions are then extrapolated backwards to the calibrated energy axis to y i e l d the IP's or AP's. One widely used method today for threshold determination i s the vanishing current method, sometimes called the i n i t i a l onset method. The IE curve for the ion under investigation i s examined, and the electron voltage corresponding to the f i r s t formation of ions i s taken to be the threshold potential. This method has been achieved successfully with the single p a r t i c l e counting technique employed by Mathur [10] and others, and i s obviously a preferred method provided that the energy scale has been carefully calibrated. 3. Fine Structure Interpretation i . High Resolution IE Curve Fine structure near the threshold i s common in high resolution IE curves. Such structure in IE curves was f i r s t observed by Lawrence [4] for Hg in 1926. Fig. 11(a)[42] shows the IE curve for Hg near threshold using a 'monoenergetic' electron beam obtained by a magnetic selector (see Chapter III, section B) . Fig- 11(b) shows the .curve obtained by Fox [43] (RPD) about 22 years ..later with remarkably good .agreement. However, comparisons of other such results are most often in to t a l disagreement since energy resolution, calibration and s e n s i t i v i t y can be different. In this work, i t i s our goal to establish the c r e d i b i l i t y of electron impact study in the i d e n t i f i c a t i o n and interpretation of fine structure seen near the threshold energy, using the most modern technique at our disposal. "FIGURE 11. IE" CURVES FOR Hg NEAR THRESHOLD Fine structure, when interpreted as excitation to Rydberg states, can be obtained by experimental measurements or deduced from the Rydberg formula: . E = E w - R / (n - n ) 2 , (21) where n i s the principle quantum number, and L I i s the quantum defect which can be taken from Moore [44]. For optically allowed levels, M. i s assumed to be constant, or at most varying slowly with energy. For optically forbidden transitions, i t can be assumed that L I varies slowly with the principle quantum number and the value of LI for the Rydberg levels converging to the ^^2/2 state i s similar to that converging to the 2 p i / 2 state for rare gases. However, the high resolution of the data i s accompanied by the loss of s e n s i t i v i t y . Therefore, accumulations of repetitive scans are obtained and the f i r s t derivatives taken in order to reveal the structure in d e t a i l . The minima are expected to correspond to thresholds of ionization processes [45]. When multiple ionization processes without intermediate excitation take place, IE curves have discontinuous second and higher derivatives. However, the discontinuities of this kind correspond to ions with different charge-to-mass ratios and w i l l not be discussed here. 37 i i . Mathematical Treatment of IE Curves Early attempts t D remove the energy spread by analytical methods have faced the problems of noisy data and the d i f f i c u l t y in determining the exact form and s t a b i l i t y of the electron energy d i s t r i b u t i o n i n a given experiment. Also, the direct approach of constructing the ion source with a monoenergetic electron beam encounters design complexity problems and s i g n i -ficant loss of the s e n s i t i v i t y . Therefore, the indirect approach has also been used to eliminate the effects due to energy spread in the impacting electron beam. This r e l i e s on the refined mathematical treatment of IE curves obtained by convent-ional electron impact ion sources. The equation which connects analytically the experimental IE curve i (V) with the Maxwellian electron beam source and the true ionization efficiency curve 1(E) i s : where m(U) = effect of the energy distribution of the electrons i(V) = I (V+U) xn(U) (22) which has to be eliminated V electron energy applied U thermal energy E U+V 38 Different approaches have been proposed to solve the above convolution equation. Morrison [46] was the f i r s t to solve this equation using the Fourier transform, and good results were obtained when the noise signal was weak. To eliminate the noise effects, Morrison employed a time averaging technique [47] by taking sweeps in multiples of four, each differed by a phase sh i f t of 90° relative to the previous sweep. Thus, the noise from the line supply could be cancelled out, producing a better signal-to-noise r a t i o . However, no proper j u s t i f i c a t i o n was given. The energy distribution difference (EDD) method [48] was developed to solve the above equation conveniently in the f i n i t e -difference version. In this method, the ion current measured at electron energy (E) i s adjusted by subtracting from i t a constant fraction of the ion current measured at E + AE. For Maxwellian distribution of the electron energy, the difference in ion current corresponds to a considerably narrower distribution than that of the ion current measured at energy E, thus improving the f i n a l resolution of the IE curve structure. In a more general case, the corresponding solution can be written as a discrete convolution of the observed curve with the inverse convolution (deconvolution) operator. This method i s usually termed as the Vogt's Inverse Convolution method [49]. Here, the above equation becomes: i (V) = I (V+U) * m(U) (23) when the notation for convolution (*) i s included, and in(U) i s m(U) reversed on the energy scale. To remove m(U), i t involves the use of Fourier Transforms, and the true IE curve, I(E), becomes: 1(E) = a 0*i(V) + a 1 , i ( V + AV) + a 2 ' i ( V + 2AV) (24) Finally, the application of equation (24) to every point of the experimental IE curve yields the true IE curve. This method leads to improvements in the energy resolution although not so in the signal-to-noise ra t i o . Hashizume and Wasada [37] have used this method to study the electron impact ionization efficiency curves of Kr and Xe near the threshold and their results w i l l be used for comparison with ours in Chapter V. The 'straightening-through-smoothings' technique, used extensively by Marmet and his coworkers [50], i s the treatment to IE curves to reveal structure which i s located over a strong con-tinuum. The smooth function, which i s the ionization continuum between energies E 0 and E^, i s obtained by applying mathematical smoothing to the original data: x n % = I / 4 <*n-l + 2 x n + x n + l } (25) i.e. , to change the value x n of the n t n channel to x n ' . As the number of smoothings on a curve i s increased, the influence of the neighboring channels on a given channel grows i n such a way that the s t a t i s t i c a l noise, and later, the structure i t s e l f become negligibly small on the curve. After a great number of smoothings, a 'reference curve' i s produced which represents the broad continuum without any structure of pr a c t i c a l interest. This reference curve may then be subtracted from the original data and both the structure and the s t a t i s t i c a l noise are restored on a horizontal background. But by a small number of smoothings, this technique reveals interesting characteristics as a "frequency" f i l t e r for structure. The wider features, which are not being attenuated in the reference curve, are f i l t e r e d out of the reference curve. However, narrow features are usefully transmitted through the smoothing process and are seen as discrete peaks in the IE curve. Autoionizing states and ionization thresholds of various samples in IE curves have been revealed by this technique. Other 'straightening-through-smoothings' techniques with new symmetrical formulae may replace equation (25), but re-evaluations have to give equal weights to the x n _ ^ and x n + i channels, so that no energy s h i f t of the structure occurs. 41 4. Calibration In spite of the energy spreads of electron beams, impacting electrons receive energy from sources other than the potentials applied to electron accelerating electrodes. There i s the thermal energy of the electrons, contact and surface potentials of the electrodes, potential gradients within the ionization chamber, and space charge depressions of the potential within the electron beam. Also, since electrons are charged particles, the e l e c t r i c f i e l d which i s necessary to produce an ion beam in the ion source usually also perturbs the electron energy. Therefore, calibration of the electron energy scale i s imperative for the determination of the actual impacting electron energy. For positive ions, calibration i s usually achieved by the introduction of two gases simultaneously, one having an accurately known IP, and the energy scale i s calibrated according to the difference in the ionization potentials. In this way, the t o t a l gas pressure in the ionization chamber, the impacting electron current, the strength of the electron collimating e l e c t r o s t a t i c "fields and the energy of electrons in the energy dis t r i b u t i o n w i l l equally affect both species. On the other hand, the near zero energy resonant peak by electron capture of SFg to form SFg" has been used for negative ion IE curve calibration. Furthermore, this peak has also been used to determine the energy resolution of the electron beam. Fig. 12 demonstrates the electron beam energy resolution as usually described in terms of the f u l l width at half maximum (FWHM) of the energy pass band, such that higher resolution is implied by a smaller value of FWHM and vice versa. Another term, the 'effective' energy resolution, i s defined by Grasso [51] as the minimum energy difference between two levels that i s necessary for them to be revealed as di s t i n c t . This energy resolution i s larger than FWHM because of other experimental factors which add to the energy spread [52], and i t cannot be measured d i r e c t l y . However, i t can be estimated by observing the resonant peak width of particular species, and the SFg resonant peak i s a choice. Electron Energy FIGURE 12. FWHM - THE ELECTRON BEAM ENERGY RESOLUTION 43 CHAPTER THREE  INSTRUMENTAL METHODS IN ELECTRON IMPACT  IONIZATION IN OBTAINING IONIZATION EFFICIENCY CURVES Simply stated, the essentials for making electron impact measurements are a beam of electrons of known energy which may be passed through the gas under investigation, and devices for detecting the ions produced and measuring the ion intensity. A good, vacuum system i s also v i t a l in this kind of study. Each of these essentials w i l l be discussed b r i e f l y in this chapter. A. ELECTRON SOURCE In order to obtain a f a i r l y high flux of electrons in a beam, a thermionic emitter source i s usually used, i.e., a tungsten or rhenium filament directly heated to such a temperature (~2000°C ) that electrons are liberated from the metallic surface. The electron beam produced w i l l possess an energy spread of about 0.5 eV in half-width, mainly Maxwellian in nature, and i s governed by the temperature of the filament. The temperature variation due to voltage drop across the filament adds somewhat to the energy spread of the electron beam. 44 An in d i r e c t l y heated metal oxide cathode which gives a narrower energy spread may -be used as the electron source, however i t can be easily poisoned- Photoelectrons have also been used [53], and the near monoenergetic characteristic of this beam makes i t an alternative way in high resolution electron impact studies. Unfortunately, the intensity of such a source i s very low. B. ELECTRON MONOCHROMATOR Although electron beams from conventional electron sources can be used i n electron impact studies when coupled with extensive mathematical treatment, the most direct method of studying fine details in IE curves involves the use of monoener-getic electron beams despite the loss of sen s i t i v i t y and the experimental d i f f i c u l t i e s involved. Attempts to produce electron beams s u f f i c i e n t l y monoener-getic for electron impact studies started with Lawrence [4] in the year 1926. Before his work, the measurement of c r i t i c a l potentials and other . properties by electron impact had been seriously limited by the lack of homogeneity of electron energies. 45 A b r i e f summary of each of used i n electron impact studies in F ig. 13, and comparison obtained by some of these. the most prominent monochromators in obtaining IE curves i s given of our results are made with data FIGURE 13. 'MONOENERGETIC' ELECTRON BEAM EXPERIMENTS 1926 1939 1951 1954 1956 1960 1962 1964 1965 1977 Lawrence [4] Nottingham [42] Fox [6] Clarke [5] Hutchinson [54] Marmet [55] Geiger [56] Simpson [57] Lassettre [58] Johnson [59] semicircular magnetic selector improved magnetic selector retarding potential difference 127° electrostatic selector parallel-plate electrostatic selector modified 127° electrostatic selector Wien F i l t e r two-stage double-hemispherical selector 180° electrostatic selector c y l i n d r i c a l mirror electron energy selector 46 1. Semicircular Magnetic Selector Fig. 14 shows Nottingham's semicircular magnetic selector. The whole apparatus i s immersed in a magnetic f i e l d at 90° to the electron path. Electrons emitted by filament (F) are accelerated into the electron-velocity analyzer chamber (A). An essentially monoenergetic beam which passes through s l i t (S2) w i l l be given an additional acceleration at (S3), and collected by the electron collector (EC). Ions are formed in the ion chamber (IC) and collected by the ion collector (P). Although this magnetic selector has been successfully used for producing nearly monoenergetic electrons, the low magnetic f i e l d s ( ~ 10 gauss) required to give convenient orbits for electrons of a few volts energy, and the d i f f i c u l t i e s in maintaining a uniform f i e l d of thi s strength in the presence of stray magnetic f i e l d s reduced i t s popularity in later years. FIGURE 14. NOTTINGHAM'S SEMICIRCULAR MAGNETIC SELECTOR 2. Retarding Potential Difference (RPD) 47 The RPD technique does not generate truly monochromatic electrons. It consists of several planar electrodes between the filament and the ionization chamber. The draw-out electrode nearest to the filament i s operated at a positive potential with respect to the filament, and a second (retarding) electrode i s operated at a potential s u f f i c i e n t l y negative to cause the low energy portion of the Maxwellian distribution to be repelled and lost from the beam. The resulting truncated distribution w i l l then have a sharp low-energy cutoff and i s accelerated to some energy to cause ionization in the ionization chamber. A s h i f t in the position of the low-energy cutoff point can be created by changing the retarding electrode by a small amount (e.g. AV=0.1 eV) , and a second reading i s taken. The difference between the ion currents yields the ionization current caused by that band of electrons between the two cutoff points, providing that the p r o f i l e of the transmitted distribution changes only in i t s low-energy cutoff point. In Fig. 15 , t h i s technique i s described graphically. The low energy portion of electron energy i s not transmitted into the ionization chamber by a retarding potential. As this potential i s changed from V and V + A V , the difference between the readings at ' h i ' and at 'lo' gives an ion current by electrons in a narrow energy interval, A V . 48 Potential Potential FIGURE 15. THE RETARDING POTENTIAL DIFFERENCE TECHNIQUE 3. The P a r a l l e l - P l a t e E l e c t r o s t a t i c S e l e c t o r T h i s c l a s s of d e f l e c t i o n - t y p e a n a l y z e r or s e l e c t o r was f i r s t s t u d i e d by Y a r n o l d and B o l t o n [60]. In b r i e f , t h i s s e l e c t o r c o n s i s t s of two plane p a r a l l e l p l a t e s h e l d a t d i f f e r e n t p o t e n t i a l s ( F i g . 16). E l e c t r o n s e m i t t e d from f i l a m e n t (F) e n t e r t h e s e l e c t o r and on l y those i n a narrow energy band l e a v e (S) t o e n t e r t h e i o n i z a t i o n chamber. Ions are a l l o w e d t o d r i f t i n t o the main a c c e l e r a t i n g f i e l d . U n f o r t u n a t e l y , IE curves o b t a i n e d w i t h t h i s energy s e l e c t o r showed many unaccountable and non-r e p r o d u c i b l e changes o f s l o p e s . 49 U F Ions FIGURE 16. THE PARALLEL-PLATE ELECTROSTATIC SELECTOR 4. 127° Cyli n d r i c a l Electrostatic Selector The 127° c y l i n d r i c a l selector was used by Clarke [5] for electron impact work and subsequently modified by Marmet [55]. The principle i s based on the theory that the focussing of electron beams takes place every 127°17 x ( i / V 2) in a radial e l e c t r i c f i e l d . For two electrons of equal velocity, one entering the selector at an angle + <f> and the other at - <p , the position of refocus, i.e., the position where crossing of the two orbits occurs for the f i r s t time, i s at 6= n /V2 = 127° 17 * (Fig. 17a). This relationship i s independent of <p . Moreover, for two FIGURE 17. THE 127° CYLINDRICAL ELECTROSTATIC ELECTRON SELECTOR electrons entering with s l i g h t l y different energies, the separation of their orbits w i l l again be greatest at the angle 127°17 , / the optimum position to intercept the electron beam in a c y l i n d r i c a l electrostatic selector. The relationship between the energy (E) of the electron focussed and the plate voltages of this selector i s (Fig. 17b): V2 - VI = 2ER log(Rl/R2) (26), Electron beams of narrow half-widths have been obtained. However, i t required the operating electron energy to be 3 eV or les s - i n practice, where, with such low energies, stray magnetic f i e l d s can cause significant interference with electron tr a j e c t o r i e s . 5. Wien F i l t e r This monochromator, described by Boersch et a l . [56], operates near 20 eV, and consists of a Wien f i l t e r with superimposed electrostatic and magnetic f i e l d analyzers (Fig.18). According to Wien (1897), i f an inhomogeneous beam of electrons enters the f i l t e r at right angles to a crossed electrostatic and magnetic f i e l d s , only one velocity (u) w i l l pass, according to: 52 FIGURE 18. WIEN FILTER AS AN ENERGY SELECTOR u = E / B (27) where u j _ E j _ B, E i s the electrostatic ' intensity and B i s the magnetic flux density. Then, the beam i s focussed in the direc-tion of the electrostatic f i e l d , and the electrons that pass through the f i l t e r are those whose vel o c i t i e s are under equal influence by the electrostatic and magnetic f i e l d s . This design was used by Boersch et a l . to study energy levels of argon. This operation requires the electrons to be decelerated from 20 KeV to 20 eV and passed through crossed f i e l d s (adjusted so that elect-rons of the desired energy are not deflected), followed by re-acceleration of the energy selected electrons to 20 KeV again. Therefore, i t i s a non-standard operation of the Wien f i l t e r due to the extreme focussing action at the entrance and exit s l i t s . 6. 180° Electrostatic Selector This selector, also called the 180° hemispherical monochromator (Fig. 19), i s made up of two concentric hemispheres of r a d i i RI and R2 with different potentials applied. This potential difference (V) generates an electrostatic f i e l d in which electrons w i l l be deflected, and the radius of curvature of the electron trajectory i s energy-dependent. Since small o r i f i c e entrance and exit apertures are used instead of s l i t s , good d i f f e r e n t i a l pumping condition i s achieved. Also, this monochromator provides two-dimensional focussing even at much higher voltages. Well-collimated electron beams thus produced w i l l have resolving power according to the following equation: E / i E = R / ( « + R ^ 2 ) (28) where E i s the electron energy, AE i s 2 x FWHM, R i s the average radius of the double hemispheres, to i s the average diameter of the entrance and the exit apertures, and tp i s the maximum incident angle-. According to this equation, the resolving power of the 180° electrostatic hemispherical energy selector i s approximately twice as good as the c y l i n d r i c a l version with the same R, u and <p . FIGURE 19. THE 180° ELECTROSTATIC HEMISPHERICAL MONOCHROMATOR 55 7. Two-Stage Double-Hemispherical Electron Energy Selector The two-stage double-hemispherical electron energy selector was constructed after the design of Amstrong [61]. Fig. 20 [62] shows the assembly of this selector which consists of three parts: an electron gun, a two-stage selector, and a collimator. The position of the two pairs of hemispheres are mutually perpendicular. In the f i r s t stage the energy dispersion of the beam causes the image of the entrance s l i t to spread along a l i n e . The fraction of the beam which f a l l s on the inter-stage aperture i s focussed in the second stage. Only a small fraction of electrons w i l l pass through the aperture leading to the c o l -limator, thus reducing the energy spread in the electron beam. collimator two-stage selector ionization chamber e l e c t r o n gun FIGURE 20. TWO—STAGE DOUBLE HEMISPHERICAL SELECTOR 56 Other tandems of different monochromators have also been used successfully to eliminate background or spurious peaks and reduce the energy spread [63]. However, useful output current higher than 1 0 - - 1 ^ A i s sometimes d i f f i c u l t to achieve, making the data accumulation time prohibitive. 8. Cylindrical Mirror Electron Energy Selector A detailed discussion on the use of this device in electron impact study i s found in Johnson's paper [59]. This i s a deflection type electrostatic selector where an axially symmetric conservative force f i e l d formed between two coaxial electrodes (two concentric cylinders) processes focussing proper-t i e s (Fig. 21). The resolving power of this selector i s dependent on the length (L) of the selector and the diameter of the apertures. outer cylinder inner cylinder source symmetry axis image FIGURE 2 1 . CYLINDRICAL MIRROR ELECTRON ENERGY ANALYZER 57 C. ELECTRON OPTICS Following energy selection by the use of a monochromator, electron optics further controls the paths of the electron beam in an apparatus. Through the use of suitable electrostatic and/or magnetic f i e l d ( s ) , an electron beam can either be well-collimated (the electrons are pursuing paths which are nearly p a r a l l e l ) , or focussed at some point where interaction takes place. However, the electron beam cannot be too intense because the charged particles in a beam repel one another, and tend to spread an otherwise collimated beam to a significant extent. On the other hand, magnetic f i e l d influences electron paths i n other parts of the system; therefore, better control and focussing of the beam could be achieved when only electrostatic f i e l d s are used. Moreover, the earth's magnetic f i e l d in the v i c i n i t y of the electron energy monochromator and the electron optics system must be reduced to effec t i v e l y zero. Usually, this i s done by one or a combination of two techniques: a Helmholtz c o i l system or shielding by paramagnetic material. The use of paramagnetic material such as t>-metal for shielding i s quite often not feasible due to the complexity of i t s design. For electron impact ionization, the electron beam i s focussed into the ionization chamber. Electrons passing through the chamber can be collected in a Faraday cup which i s a hollow, 58 c y l i n d r i c a l , metal container. A l l particles which enter the cup are collected and no secondary electrons produced can leave. Then, the small currents from the electron beam collected at the Faraday cup can be measured with a 'Vibrating Reed Electrometer' where the current i s converted to an alternating AC voltage. D. MASS SPECTROMETERS In order to study the formation of spec i f i c positive or negative ions by electron impact, i t i s necessary to include a mass spectrometer in the experiment. Three types of mass spectrometers have been used in conjunction with monoenergetic electron impact experiments. They are the magnetic-focussing mass spectrometer, the time-of-flight mass spectrometer, and the quadrupole mass spectrometer. The magnetic-focussing mass spectrometer has been used by Frost and McDowell [64] and many other groups. It employed a permanent- or electromagnet to cause the ion beam to be deflected into a c i r c u l a r path of 180, 90 or 60 degrees. Particles of different masses can be focussed on the exit s l i t by varying the f i e l d strength of the magnet or the accelerating potential of the ion beam. However, since high ion energies are required, the electron source and the associated electronics have to be operated at high potentials with respect to ground. 59 Consequently, fringing e l e c t r i c a l f i e l d s can be introduced into the ionization chamber which should be f i e l d - f r e e . At the same time, the fringe magnetic f i e l d from the analyzing magnet can d r a s t i c a l l y alter the electron orbits in the electron monochromator and the electron optics system, resulting in the loss of their f i l t e r i n g and focussing properties. Therefore, elaborate magnetic shielding procedures are necessary, but are often only p a r t i a l l y successful. The time-of-flight mass spectrometer operates on the prin-ciple of applying the ion energy as a periodic pulse. A l l ions are accelerated to the same energy, and have v e l o c i t i e s which depend on their masses. A f i e l d - f r e e d r i f t space allows the ions to separate, according to their masses as a function of time. The pulsed mode of operation wherein the electron beam i s withheld during the ion energy pulse f a c i l i t a t e s the creation of a f i e l d - f r e e region in the ionization chamber while the electron beam i s on. Moreover, the instrument has a very high trans-mission of ions, and simultaneous detection of two or more masses i s possible. This f a c i l i t a t e s the calibration of the electron energy scale through the use of a calibrating gas with the sample gas. The quadrupole mass spectrometer was conceived and developed by Paul and his coworkers [65]. The primary components of this 60 mass spectrometer are the ionizer, the quadrupole section and the ion detector. The sample gas i s introduced into the ionizer (ionization chamber) at low pressure. By electron bombardment, a small percentage of the atoms or molecules i s ionized, accelerated and focussed into the quadrupole section. The ion beam i s f i l t e r e d by permitting only those ions within a specific range of mass - to - charge (m/e) ratios to pass through the quadrupole f i l t e r . This m/e ratio detected i s determined from the values of a DC voltage and an RF voltage which are applied to the poles of the quadrupole f i l t e r as shown in Fig. 22 [66]. Those ions which are able to pass through the f i l t e r are collected by the ion detector which i s usually an electron multiplier or a Faraday cup. nonresonant i o n i o n d e t e c t o r impacting e l e c t r o n beam FIGURE 22. THE QUADRUPOLE MASS SPECTROMETER 61 E. PRODUCT ION COLLECTION As mentioned, charged particles are usually collected in a Faraday cup, but i t offers no gain of the detected ion currents. However, for product ion collection in a mass spectrometer, Faraday plate detectors (with same functions as Faraday cups) are extremely stable and are not easily damaged by high ion currents or contamination. Therefore, this collector has been used, but a higher gain amplifier for signal detection i s required to compensate for the extremely small output currents. Since 1950, secondary emission multipliers which are capable of current amplification have been used for ion collection [67]. It has been known that the secondary emission coefficient depends very much on the nature of the surface of the multiplier, and fast neutral atom beams w i l l also produce secondary electron emission and hence may be detected [68]. Ion detection for electron impact studies i s commonly achieved by a channel electron multiplier (channeltron), which can be mounted ^ off-axis to prevent spurious signals due to fast neutral metastable particles and photons. These channeltrons are non-magnetic devices constructed from a special formulation of heavily lead-doped glass which exhibits useful secondary emissive and r e s i s t i v e characteristics. With an inside diameter of 1 mm, electron multiplication of 10^ i s possible. This gain i s achieved when a pa r t i c l e of sufficient energy hits the interior surface of the channeltron, causing at least one secondary electron to be emitted. This secondary electron i s then accelerated by the electrostatic f i e l d within the channeltron u n t i l i t hits the in t e r i o r surface again, causing additional secondary electron (s) to be released. This process occurs 10 to 20 times u n t i l the electrons reach the output terminal of the channeltron, as a pulse. The characteristics of channeltrons include excellent signal-to-noise capability, stable dynode surface that can be exposed to a i r without degradation, low power requirements for operation, a compact package, and narrow gain distribution of output pulses. A channeltron i s run at a high enough voltage to produce saturated output pulses which are then amplified, dis-criminated, and counted with a on-line computer. F. ON-LINE COMPUTER ANALYSIS AND DATA PROCESSING Of the large amount of data and continuous accumulation of points for the production of an IE curve, a computer program i s essential and data analysis would then be made possible. Operations l i k e addition and subtraction of spectra, ' straightening-through-smoothings', deletion of certain points 63 arising from noise, and differentiation are a l l necessary in order to obtain fine information from the observed data. G. VACUUM SYSTEM The attainment of very low pressures in experimental chambers i s of v i t a l importance for the success of electron impact experiments and other c o l l i s i o n studies. The gas pressure must be such that the electrons make at most a single c o l l i s i o n with a gas target on their way through the ionization chamber. This i s to say, a good vacuum ( < 1 0 - ^ Torr) i s necessary to provide s u f f i c i e n t l y long mean free path to avoid secondary c o l l i s i o n processes to occur. The standard procedure for obtaining a high vacuum i s to employ a dual system consisting of a high vacuum pump and a backing pump. The former w i l l only operate when the pressure has been reduced s u f f i c i e n t l y by the backing pump. Backing pumps are mechanical in operation and w i l l reduce the pressure i n an experimental system to around 10 Torr. Against such a pressure a vapor pump may be used. Certain high-b o i l i n g o i l s are now used as the working liquids instead of the f i r s t used mercury. These o i l s have higher molecular weight and volume than mercury and so are more effective in driving out the residual gas issuing from the chamber to be evacuated towards the entrance of the backing pump. Thus the pumping speed, defined as the volume of gas extracted per second at the prevailing pres-sure, i s considerably higher for o i l condensation pumps. It i s usually desirable to operate with a l i q u i d - a i r or liquid-N 2 cooled trap between the vapor pump and the experimental chamber. 65 CHAPTER FOUR DESCRIPTION OF THE APPARATUS AND EXPERIMENTAL TECHNIQUE Of the t o t a l effort spent in the research described in this thesis, the largest portion has been devoted to designing and developing the instrument. To the best of our knowledge, there are no other systems operating now which are exactly the same as ours, and so, a detailed description of the apparatus used in this study (Fig. 23) i s given, followed with a section on the operating conditions. A. THE MONOENERGETIC ELECTRON BEAM SOURCE The electron source i s essentially formed of three parts: the filament ( 1 ) , the electron 'repeller' (2) and the anode (3). Electrons are emitted from a hairpin-type tungsten filament mounted on a two-directional movable stage. This set-up can allow the adjustment of the filament t i p position to be aligned with the entrance aperture of the monochromator, 1 .5 mm away. With a positive potential on the anode, and a repeller voltage, the electron beam i s directed to pass through the entrance aperture of the monochromator. FIGURE 23. ELECTRON IMPACT MASS SPECTROMETER SYSTEM PARTS OF THE ELECTRON IMPACT MASS SPECTROMETER SYSTEM (FIGURE 23) 1. FILAMENT 2. ELECTRON 'REPELLER' 3. ANODE 4. 180° HEMISPHERICAL MONOCHROMATOR 5. INNER HEMISPHERE 6. OUTER HEMISPHERE 7. EINZEL ENTRANCE LENS 8. QUADRUPOLE LENS 9. BOTTOM CYLINDER 10. CENTER CYLINDER 11. TOP CYLINDER 12. EINZEL EXIT LENS 13. UPPER LENS 14. GAS INLET 15. IONIZATION (COLLISION) CHAMBER 16. FARADAY CUP 17. K)N FOCUS LENS 18. FILTER END PLATE 19. QUADRUPOLE MASS SPECTROMETER 20. CHANNELTRON The 180° hemispherical monochromator (4), with a mean path radius (R) of 1.5 inches (RI = 1.25" and R2 = 1.75"), i s used to reduce the energy width of the electron beam. The surfaces of the two hemispheres (5 and 6) are coated with c o l l o i d a l graphite (Crown 8078) which provides homogeneity and good e l e c t r i c a l conductance. The entrance and exit apertures of the monochromator are both 0.5 mm in diameter, and good d i f f e r e n t i a l pumping conditions achieve a background pressure of well below 10~ 7 Torr. The potential difference (V) (Fig. 19) between the hemispheres i s given by the following equation: V = Vo [( R2 / RI) - (RI / R2)] (29) The potentials of the inner and outer hemispheres can be adjusted and electrons with energy (Vo) w i l l travel in a path of radius R between RI and R2 (with R2 > RI). In principle, the potential of the inner hemisphere i s Vo[3-2(R/Rl)], while that of the outer hemisphere i s Vo[3-2(R/R2)]. However, these potentials are further adjusted to compensate for inaccuracies i n construction and differences in contact potentials. By reducing the energy of the electrons i n the selector, the energy width of the electron beam can be reduced. However, the lower the electron energy, the more the influence on the 69 resulting electron energy spread by stray magnetic f i e l d s , and so a compromise must be made. A set of electrostatic lenses i s used for transporting and focussing the electron beam from the exit aperture of the monochromator (the einzel entrance lens (7)) to the ionization chamber (15). The quadrupole lens used in our study (8) i s made by cutting a cylinder into four equal parts, each separated by a small gap and has a voltage (between +10 and +20 eV) applied to i t . The einzel lens consists of three equiradial coaxiai cylinders (9, 10 and 11). With the potential on the f i r s t cylinder adjusted to that of the t h i r d one, two characteristic situations are possible (Fig. 24). Both the focal point and the focal length for either situation can be calculated or directly taken from tables [69, 70]. Its main function for our experiment i s to allow the ionization chamber, which i s attached to the mass spectrometer, to be placed about 6 inches away from the electron monochromator. An upper lens (13) being on top of the einzel exit lens (12) guides the beam further into the ionization chamber (15). The f i n a l destination of the electrons through the ionization chamber i s the Faraday cup (16) . Its diameter i s large enough (5 mm) for a l l electrons entering to be captured and secondary electrons to be prevented from returning to the ionization region. 70 FIGURE 24. THE TWO CHARACTERISTIC SITUATIONS FOR ELECTRON BEAM DEFLECTION THROUGH AN EINZEL LENS Fin a l l y , the influence of the earth's magnetic f i e l d on the electron path in the whole apparatus i s reduced by three sets of mutually orthogonal and independent Helmholtz c o i l s . N O L I - m e t a l shielding has been used. B. ELECTRON IMPACT IONIZATION AND MASS DISCRIMINATION The ionization chamber i s a fi e l d - f r e e interaction region constructed of a rectangular column ( 3 cm x 1 cm x 1 cm) of highly transparent stainless steel wire cloth with top and bottom apertures (2 mm in diameter). The gas sample i s allowed to diffuse into the ionization chamber through a gas line , and the pressure i n the ionization chamber i s kept below 1 0 T o r r . With an appropriate electron energy setting, ions are formed and extracted into the quadrupole mass spectrometer by a negative potential on the ion focus lens (17) in conjunction with the 71 f i l t e r end plate (18) normally set at ground potential (Fig. 25). The ion focus lens potential i s l e f t at the factory preset value (-90 V with respect to ground). The mass spectrometer in our laboratory (Vacuum Generators generator and the quadrupole analyzer. This apparatus has been modified for use in our study. F i r s t , the original filament i s replaced by the monoenergetic electron beam focussed into the ionization chamber by means of our electron optics system. Second, the ionization chamber i s constructed in our Department by the Mechanical Shop and attached to the mass spectrometer. QXK 300) consists of three units: the control unit, the RF to pulse counting system and computer ion focus Faraday cup channeltron quadrupole plate gas direction monoenergetic electron beam ionization chamber energy FIGURE 25. ION EXTRACTION OF QXK MASS SPECTROMETER 72 Third, the housing of the mass spectrometer i s made to connect to a vacuum pump (a 4" diameter, 285 L/s diffusion pump) added to meet the low pressure requirements for this kind of study. This helps to pump out the mass spectrometer i t s e l f and further reduce the ionization chamber ambient pressure. The quadrupole analyzer, i l l u s t r a t e d in Fig. 26, i s composed of four c i r c u l a r c y l i n d r i c a l stainless steel rods, five inches in length and a quarter of an inch in diameter, aligned a x i a l l y and symmetrically about an inscribed c i r c l e of 0.215" diameter. Each pair of opposite rods i s coupled together e l e c t r i c a l l y and to each pair a combination of superimposed RF (radio-frequency) and DC potentials i s applied as shown. An electrostatic f i e l d i s thereby generated in the region between the rods which, by this p articular arrangement of electrodes, i s a linear function of the coordinates x and y, as defined in the diagram. The potential of this electrostatic f i e l d (0) i s : 6 = (U + Vcos(ut)) (x 2 - y 2) / r Q 2 (30) where U represents the DC voltage applied to the rods, and Vcos(o>t) represents the AC voltage of amplitude V and p e r i o d s . 73 DC GENERATOR RF GENERATOR RF REGULATOR +LL -U +V COS(ut) -V cos(ut) CONTROL UNIT FIGURE 26. THE QXK QUADRUPOLE MASS SPECTROMETER The equations of motion of a unit charge e and mass m under the influence of th i s potential are: mx + (2e/r D z) (U + V cos(wt))x = 0 my - (2e/r D 2) (U + V cos(«t))y = 0 mz = 0 (31) (32) (33) Equation (33) simply says that the ion velocity p a r a l l e l to the rods i s not altered by the f i e l d . Therefore, the axial v elocity of any ion i s i t s value at the entrance to the mass spectrometer and i s not affected by the voltages applied to the rods. Equations (31) and (32) must be solved simultaneously for an ion to pass through the f i e l d . Here, the solution i s obtained by f i r s t f i x i n g a value of U/V rat i o . Then, U and V are selected to allow ions of only a single discrete m/e ratio to be transmitted. A l l other ions w i l l strike the rods and are neutralized after undergoing unstable f l i g h t paths. The ions, after they are f i l t e r e d on a m/e ratio basis, are detected with the wide bore off axis channeltron (20) operating in the single p a r t i c l e counting mode. It consists of a curved funnel-shaped glass dynode structure with a continuous s t r i p r e s i s t i v e coating. Incident ions h i t t i n g the mouth of the channeltron induce the liberation of a number of electrons from the r e s i s t i v e coating. As the mouth of the channeltron i s set at a high negative-potential (-2.7 KV), these electrons repeatedly c o l l i d e with the re s i s t i v e surface, each time increasing the number o f secondary electrons and increasing the (essentially grounded) collector pulse. This pulse i s then fed to an external amplifier consisting o f a NA-15 amplifier/discriminator and Hamner NR-10 linear ratemeter. The NA-15 amplifier/discriminator i s used for low-noise linear amplification as amplifier noise i s suspected to be one of the limiting factors in low-energy resolution. The NR-10 linear ratemeter provides a high degree of v e r s a t i l i t y and accuracy in the measurement of rate and energy characteristics for electron impact studies. It has a counting accuracy of ±0.5% up to 100,000 cps. C. DATA PROCESSING OF IONIZATION EFFICIENCY CURVE A LSI/11 computer with multichannel capacity i s used to analyze the data obtained (Fig. 27). A f u l l description of the function of this computer i s given in Appendix I. The number of channels available i s 4096, and both the step width and the count rate are adjustable. Accumulation of data, achieved by a voltage ramp, i s required to increase the signal-to-noise ratio of the low ion counts near the threshold to an acceptable l e v e l . For a ty p i c a l 80-scan run with a step width of 4 channels and a count rate of 800 ms per channel, accumulation of data w i l l require approximately 9 hours. Measurements of the ion intensity usually start at an electron energy about 0.5 to 1 eV below the ionization threshold over a range of 2 to 4 eV. Thus in the f i r s t tens of the memory channels only background noise i s seen. 76 ELECTRON MONOCHROMATOR AND ION SOURCE J LASER PRINTER UBC MTS COMPUTER PRINTER MASS FILTER CHANNEL ELECTRON MULTIPLIER OSCILLOSCOPE FLOPPY DISK < _ _/ AMPLIFIER/ DISCRIMINATOR RATEMETER LSI/11 COMPUTER RAMP TO ELECTRON BEAM ENERGY FIGURE 27. ELECTRON IMPACT SPECTROMETER OUTPUT AND DATA ANALYSIS SYSTEM 77 To emphasize the presence of fine structure which appears above the f i r s t ionization potential, mathematical treatments are used. The data in the LSI/11 computer, which i s a numerical ion count of the accumulated IE curve stored in memory channels, i s processed by the following procedures: (1) Sharp single channel spikes, which are obviously noise, are eliminated. (2) The data i s smoothed according to the three-point 'straightening-through-smoothings' procedure. The f i r s t and last channels are held unchanged, and to each channel a new value i s given as stated in equation (25). Curves with different number of smoothings are obtained for comparison. (3) The f i r s t derivative curve i s taken. This i s the most common way to detect structure in IE curves, and i s accomplished by the LSI/11 computer. (4) The print-out i s an unsmoothed, smoothed, and/or differentiated ionization efficiency curve with the channel number as the x-parameter. The plot routine i s a program adapted from the UBC Computer Center (MTS), modified during the course of th i s work to f i t our uses. The results are printed by a laser printer accessible at the Computer Center. A complete description of this program i s included in Appendix II. 78 D. THE VACUUM SYSTEM The pumping system (Fig. 28) i s made up of three (liquid-nitrogen trapped) o i l vapor diffusion pumps (DPI, DP2 and DP3) , with backing supplied by oil-sealed rotary mechanical pumps (PI, P2 and P4), and a mechanical roughing pump (P3). A f i f t h rotary pump (P5) i s used for pumping out the gas l i n e . Copper gaskets are used on a l l flanges above the cold trap. As a general rule, components in the vacuum chamber are carefully cleaned by glassbead blasting and washed in organic solvent before assembly. The pressures in the main chamber and the ionization chamber are measured by ionization gauges (IG's) supplied by Vacuum Generators Limited. Each one i s simply a discharge tube relying on ionization for i t s principle of operation. It consists of two tungsten filaments, a grid at constant potential and a collector (Fig. 29). The filament emits electrons which ionize gas species in the gauge, and the collector (negative with respect to the grid) i s used to collect the ions. The number of ions h i t t i n g the collector- depends on the gas pressure, and the collector current i s amplified and observed on a calibrated meter. However, since ionization gauges are ion generating equipment, they are turned off while scanning. The ionization gauges are equipped with safety relays which FIGURE 28. DIAGRAM OF THE ELECTRON IMPACT SPECTROMETER AND PUMPING SYSTEM QMS: Quadrupole Mass Spectrometer CEM: Channel Electron Multiplier IG: Ionization Gauge IC: Ionization Chamber H: Hemispheres T: Liquid Nitrogen Trap P: Rotary Mechanical Pump L: Granville P h i l l i p s Variable Leak Valve DP: Diffusion Pump 80 FIGURE 29. THE IONIZATION GAUGE w i l l automatically turn off the whole system when the pressure reaches some set value, i.e., 10 - 4 Torr in the ionization chamber. The pressure in the ionization chamber before gas introduction i s usually in the 10 -^ Torr range at which multiple c o l l i s i o n s are most improbable. As the gas line i s opened gradually, electrons with suffi c i e n t energy w i l l c o l l i d e with the gas species and produce an ion current. It was found in our experiments that the measured ion currents increased linearly with pressure i n the working range of the ionization chamber pressure (Fig. 30). 1200 1000 800 t—\ w u Z 600 e 3 2 400 c o 200 120 100 ~ 80 to u 60 •• c 3 O u 40 e o 20 2.0 4.0 6.0 8.0 10.0 PRESSURE (X 10 Torr) SAMPLE: argon V : -25.32 eV acc CAGE ENERGY: 14.94 eV CURRENT (FARADAY CUP): 2.6 X 10"10 A 3 .0 3.8 4 . 6 5.4 6 .0 12.0 6.8 FIGURE 30, PRESSURE (X 10 Torr) ION CURRENT AS A FUNCTION OF IONIZATION CHAMBER PRESSURE 82 E. OPERATING CONDITIONS AND SIGNAL OPTIMIZATION 1. Electronic Circuits The electronic c i r c u i t used to supply the potentials for the various electrodes i n the electron source, the monochromator, and a l l other e l e c t r o s t a t i c lenses i s shown in Fig. 31. Teflon-coated wires are connected internal to the feedthroughs on the top flange of the apparatus. The variable resistors used are 10-turn Beckmann helipots and the filament supply i s a 5A, 6V regulated power supply. The ionization chamber potential i s controlled separately by the QXK Mass Spectrometer. 2. Method of Operating The vacuum housings were f i r s t evacuated to 10 - 7 Torr, and s u f f i c i e n t emission from the filament was obtained by passing a current of 3.9 to 4.2 A through i t . An accelerating voltage ( V a c c ) of >20 V was applied between the filament and the anode, and the repeller voltage (~+5 V) was adjusted to maximize the electron current through the monochromator entrance aperture. With the anode and the einzel entrance lens set at approximately the same voltage ( ~ +15 V) and the voltages on the inner and outer hemispheres adjusted, the electron beam was then focussed into the ionization chamber, one stage at a time. The quadrupole lens was tuned f i r s t , then the einzel lens. The voltages of the QXK Ionization Chamber Upper Lens Einzel Exit Lens Top Cylinder Center Cylinder Bottom Cylinder Quadrupole Lens Einzel Entrance R2 u Li F Power Supply -12-n-lOO V Repeller Anode V Ramp acc 10 Turn Helipots R : 10 KQ o Ry 5 Kfi R2: 15 VSl Ry 30 KQ R,: 50 Kfi 4 5A 6V Filament Hemispheres FIGURE 3 1 . THE ELECTRONIC CIRCUIT DIAGRAM OF THE ELECTRON IMPACT SPECTROMETER einzel exit lens and the upper lens were also set at voltages similar to that of the einzel entrance lens. The voltages of the top and bottom cylinders of the einzel lens system were kept at approximately the same voltages, while the center cylinder was set at a more positive voltage. Finally, the currents through the Helmholtz c o i l s and the position of the filament t i p were also adjusted i n order to maximize the electron beam current to the ionization chamber. This beam current was monitored by a 'Vibrating Reed Electrometer', Keithley B200, and was t y p i c a l l y ~3 x IO" 9 A. As the electron beam was maximized and stabilized, sample gas was introduced into the ionization chamber by opening the Granville P h i l l i p s Variable Leak Valve. A working pressure of << 10-~> Torr in the main chamber was maintained while the QXK 300 was turned on, and an energy of +15 V with respect to the grounded f i l t e r end plate to the mass spectrometer entrance was applied to the ionization chamber. Krypton gas was obtained from the B r i t i s h Oxygen Co., and was spectroscopically pure. With an electron energy setting appropriate to the formation of ions, and with a sample gas i n the instrument, the desired mass analyzed ion current was located by the QXK Mass Spectrometer. This current was again maximized by fine tuning of a l l the variable parameters. The electron energy was then scanned over the desired range controlled on-line by the LSI/11 85 computer, and the IE curve was recorded and shown on an oscilloscope, Kikusui COS 5060. A background spectrum was always taken before the actual runs, i.e., obtaining an IE curve with the gas li n e shut after the whole system was optimized. Therefore, the electron beam, the Helmholtz c o i l s settings, the QXK settings and the scanning conditions were a l l unchanged for the background and the actual runs. When an acceptable noise level was achieved, several spectra of the same sample were taken to establish the reproducibility of the results. Typically a good signal-to-noise ratio could be obtained after 80 accumulated scans. A sample of a l l the voltages used on the lenses and other settings i s included in Fig. 32. It was found that d r i f t i n g of the lens voltages was negligible by the end of the 80 scans after 9 hours. However, deterioration in general performance usually occurred after several days of operation, manifested as the appearance of high noise level in the IE curves, and the filament had to be changed once every month or so. Therefore, re-adjusting the various parameters and cleaning of whole or part of the apparatus were necessary to restore optimum performance. Because of the time-varying factors, comparable ionization e f f i c i e n c y curves i n the 'results' section are those obtained when similar conditions were reproduced and when the same features could be recognized on different days. ELECTRON IMPACT SPECTROSCOPY DATE: J u l y 22, 1987 FILAMENT VOLTAGE: 3.5 V SAMPLE: argon CURRENT: FILE NAME: 4.1 A JUL22.1 ANODE VOLTAGE: PRESSURE - MAIN: 10.0 V 4 X 10" 7 T CUP VOLTAGE: 8 V - COLLISION CHAMBER: 5 X 10" VALVE SETTING: 83.25 OPERATING VOLTAGES INNER HEMISPHERE: 16.79 TOP CYLINDER: -0.75 EINZEL ENTRANCE LENS: 30.78 EINZEL EXIT LENS: 34.58 Q l : 27.95 Q2: 25.06 OUTER HEMISPHERE: 7.59 BOTTOM CYLINDER: 0.08 CENTER CYLINDER: 23.48 UPPER LENS: 37.50 Q3: 30.77 Q4: 29.18 T/B: 16 V/ 4.1 A HELMHOLTZ COILS E/W: -7 V/ 5 A N/S: 0 V/ 0.4 A MAX ELECTRON CURRENT (IONIZATION CHAMBER) MAX ION CURRENT: 15,000 cps QXK SETTINGS 3 X 10 MASS NO: 40 GAIN: %$J I 3 X 10 9 AM (%): 0 RULTIPLIER: -2.7 KV SCAN RATE: 800 ms # POINTS: 500 SCAN TIME: fi/J. / 0.03 s RESOLUTION: 5.00 POLE BIAS: 0.00 IONIZATION CHAMBER ENERGY: 15.03 V SCANNING CONDITION # SCANS: 80 STEP SIZE: 4 START POINT: 0 RANGE: 15.00 - 18.92 V REMARKS: FIGURE 32. ELECTRON IMPACT QMS OPERATING CONDITIONS RESULTS AND DISCUSSION If the c r e d i b i l i t y of this experiment i s to be established, reproducible results are essential, and so progressively c r i t i c a l operational tests on the system were performed f i r s t to ensure that fine structure in the IE curves near the threshold energy was reproducible, not 'functions of the apparatus'. This would permit a meaningful discussion of our own results and a comparison between these and other 'monoenergetic' electron impact data. A. OPERATIONAL TESTS The s t a b i l i t y of the apparatus was continually checked with the experimental parameters set to optimum performance. It was found that electrode potential d r i f t , from various causes, was small; however, th i s condition was only reached after many months of painstaking work reducing e l e c t r i c a l noise, improving the e l e c t r i c a l grounding system, etc. A maximum d r i f t of 0.03 V from a t y p i c a l electrode setting was observed after a scanning period of 9 hours. Obviously, data accumulation time i s a major influence on signal-to-noise ratio and resolution, the two main 88 factors c r i t i c a l to this experiment. A nine-hour scanning period was found satisfactory in compromising instrumental d r i f t with overall s e n s i t i v i t y and resolution. Ambient background noise was measured with the gas line closed after the ion current from the sample gas had been maximized. It was found that the ty p i c a l background spectrum noise level was f a i r l y low and did not vary with electron energy (Fig. 33). Accumulated background ion counts varied between 3 and 50 counts per channel after 80 scans, comparing with thousands of counts per channel at the high energy end of a normal spectrum. As few as five three-point smoothings of this background produced a v i r t u a l l y noise-free trace. SAMPLE: krypton SCAN RATE: 800 ms # SCAN: 80 SCAN RANGE (UNCORRECTED): 13.55 t o 15.98 V COUNTS PER CHANNEL: 3 t o 50 c X o u • r i t-•*-> 0) CJ * H N O • r t *rH C <4H o m r - i Ul t 13.55 E l e c t r o n Energy (eV) t 15.98 FIGURE 33. BACKGROUND SPECTRUM FOR ARGON, AN ACCUMULATION OF 80 SCANS Spurious narrow peaks and 'noise' spikes were often observed in spectra, especially during lunch hours and between 3:00 p.m. and 6:00 p.m. on weekdays. Causes of these perturbations were extensively investigated, and proved a severe problem, but no proven causes -were ever tracked down. To avoid this type of noise, our data was collected mostly during the evening, during the night, or at weekends. Also, we t r i e d to minimize the effect of this noise by u t i l i z i n g a PDP11 data analyzing program with a subroutine for removing data from one channel at a time. Unfortunately, noise peaks often occupied several channels, making i t d i f f i c u l t for the noise to be effectively cancelled, and IE curves with such data were discarded. Other attempts were made to reduce the background noise and so increase the signal-to-noise l e v e l . Other than working at hours when the least e l e c t r i c a l perturbations were suspected, routine tuning of the mass spectrometer, change-over of a l l the wiring system to new teflon-coated wires, periodic f i l l i n g of the l i q u i d nitrogen traps (once every 4 hours when operating), and a properly designed- grounding system were employed. Improvements on the IE curves' signal-to-noise rat i o , and lower baseline noise, were usually attained a day or two after the filament was turned on, thi s being the time necessary to 90 attain instrumental s t a b i l i t y . However, due to various e l e c t r i c a l and mechanical problems, stable condition usually lasted for less than one week, and comparable data runs recorded i n such a time numbered two to three only. Other factors hindering prolonged operation of the apparatus were the necessity to periodically change the electron beam filament as well as the filaments in the ionization gauges (these burned out in a month or two under continuous use). Also the intensity of the electron beam grew weak as a result of deterioration or bending of the filament after prolonged operation. Consequently, the vacuum system had to be opened quite often. As stated, energy .calibration in this type of electron impact work i s usually made by comparing the known IP of an inert gas with the gas under investigation. In" our cases, the samples being studied were^themselves inert gases. In most of the present work, only one gas was introduced into the system at one time, and so the i n i t i a l onset of ionization (Chapter II, section D . 2 ) was used to calibrate the energy scale. An increase i n ion counts, marking the ionization threshold, was observed more cl e a r l y i n the f i r s t derivative IE curve,.and at higher energies, minima i n the f i r s t d i f f e r e n t i a l were taken to represent onset energies of further ionization processes. To v e r i f y the shape of the IE curves being a function of the sample gas rather than "instrumental", IE curves for different gases were compared. The shape of any two IE curves ( i . e . A r + and Kr +) were in fact always very different, with i n i t i a l ionization onsets and structure seen at different energies. Also, the difference in IP's for Ar and Kr corresponded well with the known spectroscopic difference [ 4 4 ] . We therefore f e l t i t reasonable to take the observed structure to be, within the signal-to-noise l i m i t s , s i g n i f i c a n t . B. RESULTS ON RARE GASES Two rare gases, argon and krypton, were studied in this work. The ionization potentials of rare gas atoms are known accurately from spectroscopic data [ 4 4 ] , and the ground states of the rare gas singly-charged ions are ^ 3 / 2 a n c i 2 p l / 2 doublets of known separation. Above the 2 p i / 2 IP's, the IE curves for the singly-charged ions from krypton and argon are expected to be v i r t u a l l y featureless in structure (as far as the effects of autoionization are concerned) up to energies corresponding to the second I P ' s . I n the region between the 2 p 3 / 2 a n c* 2 p l / 2 s t a t e s , interpretation of peaks can be assisted by consideration of photoionization data. Negative ion formation [22] and post-c o l l i s i o n interaction [24] should also be considered for a f u l l interpretation of the curves. 92 Comparison between the known and the experimental IP's and doublet separation provides a f i r s t interpretation of our electron impact results. Also, structure manifested as distinct features superimposed on the background continuum could be i d e n t i f i e d and attempts to interpret them made. Generally, the shape of the f i r s t derivative of the electron impact IE curve obtained for a rare gas should be expected to correlate in some way with the shape of the corresponding photoionization efficiency curve. However, due to the different selection rules [21] and the p o s s i b i l i t y of temporary negative ion formation in electron impact ionization, different structure may be seen i n the electron impact IE curves, especially, as observed i n this work, above the rare gas ^1/2 state in the region where no closely spaced Rydberg states exist. 1. ARGON Autoionization i n argon has been studied by a number of workers using different techniques [71]. However, structure in IE curves i n the narrow energy interval between the p3/2 and 2Pi/2 levels (at 15.755 eV and 15.933 eV respectively [44]) has not been investigated to any great extent owing to the stringent demands on instrumental resolution. Moreover, since the second ionization potential of argon i s 27.629 eV [44], Rydberg states converging to this l i m i t are not expected in the energy region studied here, and so no structure in the argon IE curve i s expected. Since the resolution of our apparatus i s better than 50 meV (estimated by the separation of distinct features i n the IE curves), breaks corresponding to the ^ 3 / 2 a n d  2 P j / 2 states are expected to be resolved with the nominal i n i t i a l onsets close to the known values. Other structural features can be used for comparison with previous work from other laboratories. Actually, the main purposes for studying argon IE curves were to establish the workability and s t a b i l i t y of our apparatus, to provide a source of ions in our battle to reduce the noise level and to achieve as much reproducibility as possible in the IE curves' fine structure. A t y p i c a l untreated IE curve for A r + (m/e = 40) and i t s f i r s t derivative after five times three-point smoothings are shown i n Fi g . 3 4 . A smooth baseline was obtained with low counts (<10 counts per channel after 80 scans), as shown i n Fi g . 3 4 (b) . The i n i t i a l onset for ionization, which was located i n the f i r s t derivative I E curve as a sharp minimum, i s always corrected to the spectroscopic value of 15 .755 eV. 94 o c SAMPLE: argon SCAN RATE: 800 ms # SCAN: 80 SCAN RANGE (UNCORRECTED): 15.03 to 18.77 eV (a) Untreated (b) F i r s t Derivative, 5X Smoothings <4H Ul c o •r-l 4-> rt N •H P o (a) UJ t t 3/2 1/2 (16.08 eV) (16.29 eV) 15.03 eV 18.77 eV FIG. 34. IONIZATION EFFICIENCY CURVES FOR ARGON (m/e = 40) Three comparable, r e l a t i v e l y low-noise IE curves for argon are shown i n Fi g . 35. Most peak energies show a remarkable agreement, and, surprisingly, many peaks were found at energies above the ^ 3 / 2 onset. These are summarized in Table 1. At higher energies, the IE curve showed numerous peaks, again reproducible, the origin of which i s not clear at thi s point. 95 14 .80 Filename: A U G 6 . 5 Scan Rate: 8 0 0 ms # Scan: 120 Smoothings: 5X Filename: A U G 8 . 5 Scan Rate: 8 0 0 ms # Scan: 80 Smoothings: 5X Filename: A U G 7 . 1 0 Scan Rate: 8 0 0 ms # Scan: 80 Smoothings: 10X 17.45 FIGURE 3 5 . FIRST DERIVATIVE IE CURVES FOR ARGON 96 TABLE 1. STRUCTURE IN SOME ARGON FIRST DERIVATIVE IE CURVES Curve (Fig.35) MINIMA IN THE POSITIONS ABOVE PRESENT WORK THE 2 p *3/2 THRESHOLD (15. 755 eV) (a) (0.12) 0.21 0.37 0 53 0.61 0.76 0.84 0. 96 1.04 1.11 1 20 1 27 (b) 0.18 0.37 0 50 0.59 0.75 0.84 0. 95 1.06 1 .17 1 24 (c) (0.10) 0.19 0.36 0 49 0.58 0.75 - 0. 95 - 1.11 1 21 1 27 Curves (a) and (c) in Fig. 35 show dis t i n c t structure between the 2 p3/2 a n d 2 p i / 2 states which was not observed in other reported electron impact work. However, this structure was smeared out and not seen in (b), we must therefore regard this structure as uncertain, to say the least. The break at about 0.20 eV above the i n i t i a l onset corresponds closely with the spectroscopically known separation between the 2 p3/2 a n d 2 p l / 2 doublets (0.178 eV [44]). This i s in agreement with other electron impact data; early electron impact work performed by Fox [72] using the RPD method revealed this break at 0.19 eV above the 2 p3/2 onset. Other work [36, 35 and 73] also revealed structure between 0.17 and 0.20 eV above the f i r s t IP, which was naturally attributed to the 2 p i / 2 ionic state. Quite remarkably, breaks were found in our argon IE curves at energies above the p3/2 state where no known spectroscopic states exist. Lossing et a l . [36] reported breaks at 0.17, 0.47, 0.81, 0.96 and 1.26 eV and Brion et a l . [73] observed peaks at 0.20, 0.51, 0.78, 1.27 and 1.74 eV above the f i r s t ionization threshold. Marmet et a l . [35] reported six breaks above the f i r s t IP, two of which appeared doubtful (0.77 and 0.97 eV), the other appearing at 0.19, 0.58, 1.31 and 1.76 eV. These results are summarized in Fig. 36 along with the present work. The breaks we observed at 0.50, 0.75 and 1.24 (data b in Fig. 35) agreed f a i r l y well with other data [36, 73] . However, Position of Peaks Above the 2P 3 /, 2 Threshold (15.755 eV) * 1 1 1 2 I I 1 I I 1 3 1 1 1 1 1 1 4 I I I I I Present Work a 1 : 1 1 1 1 1 1 1 1 1 1 1 Present Work b 1 1 1 1 1 1 1 1 1 1 I Present Work c 1 ! 1 1 1 1 1 1 1 1 1 • ? J 2 p 2 p , r3/2 K l / 2 (eV) 0.0 0.2 0.4 0.6 0.8 1.0 . 1.2 1.4 1.6 1.8 *Ref.44 1Ref.72 2Ref.36 3Ref.73 4Ref.35 FIGURE 36. A SUMMARY OF ONSETS ABOVE THRESHOLD FOR ARGON serious discrepancies occur between the various sets of data in the region above 1.3 eV. Reproducible peaks were observed at 0.37, 0.59, 0.95 and 1.17 eV (data b) in our three separate experiments, and at 0.84, 1.04 and 1.11 eV (data a) in two out of three runs, i n serious disagreement with previous work. From Fig. 36, i t can be seen that correlation between sets of data for argon among different electron impact work i s poor, and the establishment of data r e l i a b i l i t y i s not possible at this stage. However, as the reproducibility of structure and the achievement of high signal-to-noise level was established to a reasonable degree in our work, krypton gas was next introduced into the system for further study. 2. KRYPTON The electron impact ionization of krypton has been studied by several groups, and i s therefore of special interest. Cantone et a l . [74], Marmet et a l . [35], Suzuki [75], Johnson et a l . [59], Lossing [76] and Mathur & Frost [77] have a l l obtained pertinent data. However, their curves are, i n d e t a i l at least, i n contradiction to one another and also to data derived from an indirect method (Wasada [37]). Therefore, our main objective was to obtain fine structure with a more modern instrument and to c l a r i f y the situation. 99 SAMPLE: k r y p t o n SCAN RATE: 800 ms # SCAN: 80 SCAN RANGE (UNCORRECTED): 13.70 t o 16.12 eV — i — i 1 i i _ 14.0 14.5 15.0 15.5 16.0 ^ Electron Energy (eV) FIGURE 37. IONIZATION EFFICIENCY CURVE FOR KRYPTON (m/e = 84) Fig. 37 shows an untreated IE curve (a), i t s smoothed function (b) and the f i r s t derivative of the smoothed curve (c) for the parent ion Kr + (m/e = 84), produced by 80 repetitive scans. The f i r s t IP, which was seen as a change of slope in the derivative IE curve, was observed at 13.90 eV as compared to the expected spectroscopic value, 13.996 eV [44]. This difference between the observed and expected IP i s attributed to the effects 100 of contact potentials, f i e l d penetrations and other perturbat-ions. Happily, these effects appeared to remain constant when the same sample gas was being studied. However, when a different gas was introduced into the system, contact potentials and other effects changed, resulting in a s h i f t in the energy scale. Below the ionization threshold, a p r a c t i c a l l y noise-free baseline was obtained. Structure was observed above the f i r s t IP, again as for Ar +, extending above the 2 p i / 2 state. Although other workers have shown this structure in rare gas IE curves, l i t t l e comment has been made. Close correspondence between two K r + IE curves obtained under similar conditions was observed in shape and intensity, and t h e i r smoothed, f i r s t differentiated IE curves (Fig. 38, obtained with an Epson FX printer before the laser printer plot routine was employed) revealed sharp and reproducible (to better than 30 meV) fine structure just above the f i r s t IP. The number of smoothings was kept small to avoid loss of resolution, and was kept to the point where an almost noise-free baseline was obtained. Reproducible peaks in the differentiated curves (between 2 p3/2 and 2 p i / 2 ) were believed to be, for the most part, peaks a r i s i n g through autoionization of highly excited Rydberg levels of neutral Kr. One temporary negative ionic state was believed to be present i n the energy range studied. Several unassignable SAMPLE: k r y p t o n SCAN RATE: 800 ms # SCAN: CD 120 ( I D 80 SMOOTHINGS: ( I ) 20X ( I I ) 5X 101 ( I ) a • c b f g ( I D JL 14.0 4 *3/2 14.2 14.4 14.6 t 14.8 15.0 Electron Energy (eV) P l / 2 t 1 4 - 6 7 e V) FIGURE 38. FIRST DERIVATIVE IE CURVES FOR KRYPTON 102 peaks within the doublet region and above the 2 p i / 2 state were observed. Since the second ionization potential of krypton i s 24.399 eV [44],'Rydberg states converging to this energy level are not expected in the region just above the 2 p i / 2 l i m i t . Comparison of structure from the data in Fig. 38 i s summarized i n Table 2. These are in turn compared to results obtained by photoionization and other electron impact experiments. Comparison of our results with e a r l i e r data is made, but i s complicated by differences in energy resolution and s e n s i t i v i t y . Only comparison in terms of the number and posit-ion of minima observed in the differentiated IE data, especially in the region between the doublet, can be reasonably made. Cantone et a l . , using the RPD method [74], reported fine structure near the ionization threshold of krypton with an approximate resolution of 0.1 eV. However, their reported measurements on the fine structure were based on the maxima of the differentiated IE curve instead of the minima (minima correspond to onsets of ionization processes). We therefore measured the minima from the published differentiated curve and use t h i s data i n our discussion since direct enquiries from the authors of ref. 74 brought no response. In fact, one of the minima was close to 0.67 eV above the f i r s t IP, corresponding well with the 2 p i / 2 I P - Other minima were also recorded in Table 2. Actually, Cantone et a l . were the f i r s t to publish the TABLE 2. RYDBERG ENERGY LEVELS OF KRYPTON CONVERGING ON Kr* 2 P W , 137] P r e d i c t e d Observed s' P' d' 1 2 3 4 5 6 7 Present I II Work n = 6 14.03(2) 14.02 14 .03 14.04(3) 14 . 04 n = 8 14.07(1) 14 . 06 14 . 06 14 . 05 14 .07 14.07 14 .08 a 14 .10(0 ,1) n = 8 14.08 14 . 10 14 . 09 .17* 14.20(1,2) 14.17 14. 17 14 . 16 14.16 14 .18 14.20 14 14 .21(0) n = 7 14.23(2) 14.24(2,3) 14.19* 14. 21 14.21 14.24 14 .24 C n = 9 14.25(1) 14 . 26 14 . 26 14 . 25 14 . 24 14.27(0,1) n = 9 14.31 14 . 27 14. 29 14 .30 14.33(1,2) .33 d 14.34(0) n = 8 14.35(2) 14.36(2,3) 14 . 32 14 . 34 14.34 14 n = 10 14.37(1) 14.35 14 36 14 . 37 14 . 38 14 .39 14 . 37 14.40 14 .38 e 14.38(0,1) n*10 14.42(1,2,0) n = 9 14.43(2,3) n = l l 14.44 (1) 14.42 14 . 43 14. 44 14.43 14 .44 14.45(0,1) n = l l 14.47(1,2,0) n=10 n = 12 14.48(2,3) 14 . 48 14 . 47 14. 47 14.48 14 .48* 14.49(0,1) 14.49(1) 14 . 50 14. 52 14.52 14 .548 J-values are shown in parentheses S t r u c t u r e with * wa s a t t r i b u t e d to the negat ive i o n i c s t a t e by Marmet[35]. 1Ref. 74 2Ref.35 3Ref.75 4 R e f . 5 9 5 Ref 37 6 Ref 76 7 R e f 77 104 somewhat unexpected structure above the p i / 2 level of Kr +-previous electron impact measurements were apparently lacking in resolution. Marmet et a l . have for many years performed similar experiments to ours using their 'straightening-through-smoothings' method, and a high signal-to-noise differentiated IE curve for krypton was reported [35]. They observed four distinguishable peaks below the 2Pi/2 level at 14 .08, 14 .26, 14.35 and 14.19 eV with the last interpreted as arising from a temporary negative ionic state of Kr~[35]. However, the second ( Pj/2) threshold was not observed as a minimum, as one would expect, and as most other workers have observed, which raises a serious question regarding the v a l i d i t y of their data treatment. Suzuki, using a two-stage double-hemispherical selector, also reported structure [75] supporting the observations of Marmet [35]. Rydberg states 6d', 7d', 8d' and 9d' were reflected i n structure at 14.06, 14.26, 14.36 and 14.48 eV respectively. The structure at_14.19 eV attributed to the negative ionic state by Marmet [35] was unseen, however an increase in slope at the J^?1/2 ioni c state energy was quite clear - an important observation found in a l l reported K r + IE curve studies mentioned here, except i n the case of ref. 35. 105 Johnson et a l . also reported the f i r s t differentiated IE curve for K r + [59]. They used a c y l i n d r i c a l mirror electron energy selector to obtain a nearly monochromatic electron beam of 30 meV half-width. With such high resolution, many structural features were observed and could in turn be correlated to known autoionizing levels (see Table 2). Structure between 14.10 and 14.25 eV was observed and attributed to negative ion resonances of Kr +. Two unpublished sets of electron impact data are also included in t h i s discussion. Lossing [76] obtained a K r + IE curve with a two-stage double-hemispherical selector (as in ref. 34). Much structure was observed in the derivative curve but no assignments of the structure to known ionic levels were attempted. Other unpublished work by Mathur & Frost [77] after the electron impact experiment performed on xenon [78] with an apparatus almost identical to that used by Lossing [36] i s included in Fig. 39, along with f i r s t derivative IE curves repro-duced from the publications referred to above. F i r s t derivative minima in the IE curves for a l l the previous work we know of are l i s t e d in Fig. 40. Some correlations can be made but r e a l l y not to a satisfactory l e v e l . It i s , however, worth noting two things - that an increase in ionization always appears at the 2Pi/2 state, and the existence of structure above th i s state i s s a t i s f a c t o r i l y established. TS i 1 \l H K I f . f i l l i t n / V ii Wasada [37] J o h n s o n [59] •A / M a t h u r and F r o s t [77] L o s s i n g [76] C a n t o n e [74] 106 14.0 FIGURE 39 . 15.0 E l e c t r o n Energy (eV) 16.0 (eV) A SUMMARY OF PREVIOUS FIRST DERIVATIVE IE CURVES FOR KRYPTON NEAR THE IONIZATION THRESHOLD ENERGY nd' ns' 1 ', ', \ t i l l | -1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 tfORK 3 1 1 1 1 1 i snoi 4 1 1 II II 1 1 1 1 1 I I I 1 I 1 I PREV 5 1 1 1 1 1 I I 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 II l i 7 1 1 1 1 1 II 1 1 1 1 1 1 1 1 1 1 1 WORK I a | b c 1 II d e 1 I f g h * M i l III 1 1 1 1 1 ESENT II a | b c 1 1 d e I | III i i 111 11 II a. a. (eV)14 0 14 . 2 14 .4 14.6 14.8 15.0 15.2 15.4 Ref.44 (Spectroscopic Rydberg L e v e l s ) . Other references: r e f e r to Table 2. The estimated u n c e r t a i n t i e s i n our IE peak onset data are indicated by the line-widths i n spectra (I) and (II) of the present work. FIGURE 40. A SUMMARY OF PREVIOUS FIRST DERIVATIVE MINIMA ON CURVES FOR KRYPTON NEAR THE IONIZATION THRESHOLD 108 . An IE function has been obtained ind i r e c t l y by Wasada et a l . [37] based on the Vogt's Inverse Convolution method (see Chapter II, section D.3). Their measurements were claimed to have a re p r o d u c i b i l i t y " of better than + 0.02 eV, and the f i r s t derivative IE curve showed minima at positions which we include in Table 2 and Fig. 39. However, the energy resolution of their work was not good enough to separate the close-lying levels near the 2Pi/2 series l i m i t . A photoionization efficiency for krypton [71] i s shown in Fig. 4 1 . Peaks are observed at 14.07, 14.27, 14.39, 14.51 and 14.59 eV, as compared to our observed f i r s t d i f f e r e n t i a l minima at 14.07, 14.24, 14.40, 14.52 and 14.60 eV (Data I in Table 2). No structure in the photoionization efficiency curve was seen above these energies. The correlation between the photon impact data and ours i s very good, strongly implying autoionization as the source of our structure at these energies. As for other K r + high resolution electron impact studies, fine structure in f i r s t derivative IE curves was observed in profusion. Other than the sharp 2Pi/2 onset at 14.67 eV (observed also by six other electron impact experiments), a peak onset at about 1 4 . 0 7 eV was observed and could be assigned as ar i s i n g from the 6d' autoionization state [37]. Peaks at 14.24, 1 4 . 4 0 and 1 4 . 4 8 eV could be interpreted as arising from 7d', 8d' and 9d' states respectively [37]. Evidence for a resonant Kr 109 14.0 14.5 15.0 15.5 Energy S c a l e (eV) FIGURE 41. CORRESPONDING PHOTOIONIZATION EFFICIENCY CURVE FOR KRYPTON NEAR THRESHOLD ionic state at about 14.19 eV, reported by Marmet [35], and present in the derivative IE curves of other workers as well, was observed i n our IE curves at similar energies (14.20 eV in (I) and 14.17 eV in (II)). Two dis t i n c t peaks at 14.34 and 14.52 eV were also observed and their assignment made (Table 2). However, as seen i n Fig. 40, correlation of peaks above the p i / 2 l i m i t i s poor, and interpretation not possible because no temporary negative ionic states or excited states of krypton are yet known in t h i s energy region. C. COMPARISON WITH THE THRESHOLD ELECTRON IMPACT STUDY FOR FINE STRUCTURE DETERMINATION F a i r l y recent improvements in the study of electron impact excitation has yielded results that should be of value in the evaluation of fine structure in IE curves near the ionization threshold. Such spectra were obtained by Read [ 7 9 ] for small molecules l i k e CO, N 2 , N 2 O and acetylene. In that type of work, atoms and molecules are excited by electrons of energy s l i g h t l y greater than that of an excited state, and only electrons scattered with nearly zero energy are detected. This approach can y i e l d sharp structure, some of which has been shown to correspond to excitation of Rydberg states both below and above the f i r s t IP. A t y p i c a l example where structure i s seen above the f i r s t IP i s in the case of N 2 O . A pair of resonances arising from the p , ,^ r, /- ionic states are observed, and structure between them 1/2,3//: i s seen and compared with electron impact ionization curves with good correlation. Unfortunately, such energy levels for rare gases have not yet been reported, however when such data become available interpretation of IE curves should be much f a c i l i t a t e d . I l l CHAPTER SIX  CONCLUSION The 'monoenergetic' electron impact mass spectrometer, the construction of which formed the major part of the work described, was reasonably effective, in that the intensity of the electron beam using a 180° hemispherical monochromator was su f f i c i e n t to produce an electron current in the 'workable' range of approximately 3 x 10"^ A. The signal-to-noise level in the measured ionization efficiency curves was sufficient to enable detection of very small changes in ion current intensity arising from autoionization processes in the case of most gases studied. Despite the appreciable amount of fine structure seen in the ionization efficiency curves, a careful examination of these curves indicates the existence of reproducible structural features which could be correlated to some previous results from other laboratories. However, in a number of cases such agreements were poor. in both A r + and K r + we find structure the 2 p l / 2 ionic state which although at present not assignable, should be c l a r i f i e d as further work on energy loss spectroscopy proceeds. Structure i n this energy range had been reported before, but i t s existence may now be taken as proven. 112 i More careful work in this f i e l d of electron impact ionization w i l l certainly, in time, produce data of much greater precision, which may then be used to determine the precise nature of the electron impact processes leading to ionization. The struggle to achieve the present situation has been tedious and beset with problems, but even though progress has been slow and there has been understandably a loss of interest in this type of work owing to seemingly insurmountable experimental d i f f i c u l t i e s , technological improvements in ultra-high vacuum technology, electron optics, electron monochromators, low current measurement, particle counting and d i g i t a l data analysis techniques should in time provide the quality of experimental data necessary^ 113 BIBLIOGRAPHY 1. P. Lenard, Ann. de Physik, 12, 714 (1903). 2. J. Franck, G. He r t z , Verhandl-Deut. Phys. Ges., 1_6, 10 (1914) . 3. H.D. Smyth, Rev. Mod. Phys., 3, 347 (1930). 4. E.O. Lawrence, Phys. Rev., 2_8, 947 ( 1 9 2 6 ) . 5. E.W. C l a r k e , Can. J . Phys., 3_2, 764 ( 1 9 5 4 ) . 6. R.E. Fox, W.M. Hickam, T. K j e l d a n s , D.J. Grove, Phys. Rev., 84, 859 ( 1 9 5 1 ) . 7. W. L i n d i n g e r , F. Howorka, i n " E l e c t r o n Impact I o n i z a t i o n " , Ch. 9, e d i t . T.D. Mark, G.H. Dunn, S p r i n g e r - V e r l a g , New York (1985) . 8. J.D. M o r r i s o n , J.C. Traeger, J . Chem. Phys., 53, 4053 ( 1 9 7 0 ) . 9. R J . C e l o t t a , R.H. Huebner, i n " E l e c t r o n - M o l e c u l e C o l l i s i o n s " , Ch. 2, e d i t I . Shimamura, K. Takayanagi, Plenum Pr e s s ( 1 9 8 4 ) . 10. D. Mathur, C. Badrinathan, I n t . J . Mass Spect. Ion Pr o c e s s e s , 57, 167 (1984). 11. D. Mathur, D. C. F r o s t , J. Chem. Phys., 75, 5381 (1981). 12. H . S . W . Massey, E . H . S . Burhop, " E l e c t r o n i c and I o n i c Impact Phenomena", Oxford U n i v e r s i t y P r e s s , London (1969). 13. T.D. Mark, i n " E l e c t r o n M olecule I n t e r a c t i o n s and T h e i r A p p l i c a t i o n s " , Ch. 3, e d i t . L.G. C h r i s t o p h o r o u , Academic P r e s s , London (1984). 114 14. G.E. Thomas, Ph.D. T h e s i s , U n i v e r s i t y of B r i t i s h Columbia (1969) . 15. R.K. Curran, J . Chem. Phys., 38.' 780 (1963). 16. H.M. Rosenstock, K. D r a x l , B.W. S t e i n e r , J.T. Herron, J. Phys. Chem. Ref. Data 6, Suppl., 1_, 1 (1977). 17. C.E. B e r r y , Adv. Mass Spectrom., 6_, 1 (1974). 18. R.D. L e v i n , S.G. L i a s , " I o n i z a t i o n P o t e n t i a l and Appearance P o t e n t i a l Measurements, 1971 - 1981, NSRDS-NBS71", N a t i o n a l Bureau o f Standards, Washington, D.C. (1982). 19. J.D. Waldron, "Advances i n Mass Spectrometry", Pergamon Pr e s s , London (1959). 20. S. L i p s k y , J. Chem. Ed. 58, 93 (1981). 21. A.G. Shenston, Phys. Rev., 38.' 8 7 3 (1931). 22. G.J. Schulz, Rev. Mod. Phys., 45, 378 (1973). 23. S.J. Buckman, P. Hammond, G.C. King, J.H. Read, J. Phys. B: A t . Mol. Phys., _16, 4219 (1983). 24. H. Kleinpoppen, J.F. W i l l i a m s , "Coherence C o r r e l a t i o n A t . C o l l i s i o n s " , Plenum, New York (1980), P. 297. 25. T.D. Mark, i n " E l e c t r o n Impact I o n i z a t i o n " , Ch. 5, e d i t . T.D. Mark, G.H. Dunn, S p r i n g e r - V e r l a g , New York (1985). 26. J . J . Thomson, P h i l . Mag., 24, 668 (1912). 27. J . J . Thomson, see Reference i n A.L. Vaughan, Phys. Rev., 38, 1687, 1921 (1931). 28. T.D. Mark, F. Egger, J . Chem. Phys., £7, 2629 (1977). 29. H.J. Svec, G.D. F l e s c h , I n t . J . Mass Spectrom. Ion Phys., 1_, 115 41 (1968). 30. J.B. Hasted, " P h y s i c s of Atomic C o l l i s i o n s " , Butterworths, London (1964). 31. I.H. Suzuke, K. Maeda, I n t . J . Mass Spect. Ion Phys., 3_6, 221 (1980). 32. V.V. Raznikov, A.F. Dodonov, V.V. Zelenov, I n t . J . Mass Spect. Ion P r o c e s s e s , 21' 1 (1986). 33. J.T. Tate, P.T. Smith, A.L. Vaughan, Phys. Rev., 4_8, 525 (1935). 34. A . J . Ahearn, N.B. Hanna, J . Chem. Phys., 21., 119 (1953). 35. P. Marmet, E. Bolduc, J . J . Quemener, J . Chem. Phys., 56, 3463 (1971). 36. K. Maeda, G.P. Semeluk, F.P. L o s s i n g , J . Mass Spect. Ion Instrum., 26, 1101 (1955). 37. A. Hashizume, N. Wasada, I n t . J . Mass Spect. Ion Phys., 36, 291 (1980). 38. w.M. Hickam, R.E. Fox, Paper p r e s e n t e d at 3rd ann. meeting Am. Soc. T e s t i n g M a t e r i a l s , E-14 Committee on Mass Spectrometry, San F r a n c i s c o , May, 1955. 39. H.D. Hagstrum, J.T. Tate, Phys. Rev., 59, 354 (1941). 40. J.W. McGowan, E.M. C l a r k e , Phys. Rev. 167, 43 (1968). 41. R.E. Fox, W.M. Hickman, D.J. Grove, T. K j e l d a a s , Rev. S c i . Instrum., 26, 1101 (1955). 42. W.B. Nottingham, Phys. Rev., 55, 203 (1939). 43. R.E. Fox, J . Chem. Phys., 35, 1379 (1961). 116 44. C.E. Moore, "Atomic Energy Levels, N a t l . Bur. Stand. C i r c . 467" (1953). 45. E. Bolduc, J.J. Quemener, P. Marmet, Can. J. Phys. 4_9, 3095 (1971) . 46. J.D. Morrison, J. Chem. Phys., 39, 200 (1963). 47. R.G. Dromey, J.D. Morrison, J.C. Traeger, I n t . J. Mass Spect. Ion Phys., 6, 57 (1971). 48. R.E. Winters, J.H. C o l l i n s , W.L. Courchene, J. Chem. Phys. 45, 1931 (1966). 49. J. Vogt, C. Pascual, I n t . J. Mass Spect. Ion Phys., 9, 441 (1972) . 50. R. Carbonneau, E. Bolduc, P. Marmet, Can. J. Phys., _51, 505 (1973) . 51. F. Grasso, I n t . J. Mass Spectrom. Ion Phys., 2, 357 (1969). 52. J.D. Morrison, J. Chem. Phys., 21_, 1767 (1953). 53. A.C. Gallagher, G. York, Rev. S c i . Instrum., 45, 662 (1974). 54. D.A. Hutchinson, J. Chem. Phys. Rev., 24, 628 (1956). 55. P. Marmet, L. Kerwin, Can. J. Phys. J38, 787, 972 (1960) . 56. H. Boersch, J. Geiger, H. H e l l w i g , Phys. L e t t e r s , _3, 64 (1962) . 57. J.A. Simpson, Rev. S c i . , Instrum., 35, 1695 (1964). 58. V.D. Meyer, A. Skerbele, E.W. L a s s e t t r e , J. Chem. Phys. 43, 805 (1965). 59. L.P. Johnson, J.D. Morrison, A.L. Wahrhaftig, I n t . J. Mass Spect. Ion Phys., 26, 1 (1978). 117 60. G.D. Yarnold, H.C. Bolton, J . S c i . Instrum., 2_6, 38 (1949). 61. R.A. Amstrong, Can. J . Phys., 4j9, 1753 (1966). 62. D. Mathur, J . Phys. B: Atom. Molec. Phys., 1,3, 4703 (1980). 63. M. P r o u l x , P. Marmet, R. D u t i l , Rev. S c i . Instrum., 53, 778 (1982). 64. D.C. F r o s t , C A . McDowell, Proc. Roy. S o c , (London), A233 (1955) P. 227. 65. W. P a u l , M. Raether, Z. Physik, 140, 262 (1955). 66. D. Lichtman, Res. Dev., L5, 52 (1964). 67. L. Jacob, "An I n t r o d u c t i o n to E l e c t r o n O p t i c s " , John Wiley & Sons, Inc., New York (1951). 68. R.C. Wetzel, F.A. B a i o c c h i , T.R. Hayes, R.S. Freund, Phys. Rev. A, 35, 559 (1987). 69. E. H a r t i n g , F.H. Read, " E l e c t r o s t a t i c Lenses", E l s e v i e r , London (1976). 70. X. J i y e , "Aberration Theory i n E l e c t r o n and Ion Opt i c s " , Academic Press, Inc., London (1986). 71. V.H. D i b e l e r , R.M. Reese, M. Krauss, Advan. Mass Spectrom., 3, 471 (1966). 72. R.E. Fox, Westinghouse Research L a b o r a t o r i e s , Report 60-94439-4-R2 (1956). 73. C.E. B r i o n , D.C. F r o s t , C A . McDowell, J . Chem. Phys., 44, 1034 (1966). 74. B. Cantone, V. Emma, F. Grasso, Adv. Mass. Spectrom., _4, 599 (1968). 118 75. H. Suzuki, The Laboratory of Electrotechnical Researches, Toyko (1977). 76. F.P. Lossing, Private communication (1982). 77. D. Mathur, D.C. Frost, Private communication (1983). 78. D. Mathur, D.C. Frost, J. Chem. Phys. 75, 5381 (1981). 79. P. Hammond, G.C. King, J. Jureta, F.H. Read, J. Phys. B: At. Mol. Phys., 20, 4255 (1987). 119 APPENDIX I  THE LSI/11 COMPUTER CONTROL The mass spectrometer (QXK 300) used in our study i s controlled by a computer (LSI/11) with a PDP 11 data handling system. The structure of this computer control system.is shown in Fig. Al.1. The 16 b i t general purpose central processor unit (CPU) controls the 64 Kbytes main memory and other peripherals through a set of communication lines, the UNIBUS. A scanning voltage i s set and changed according to the data acquisition program and output to the mass spectrometer. This voltage output i s implemented by one channel of a 12 b i t 4-channel DAC. The +10 to -10 Volt DAC output i s further adjusted and offset to a suitable range of voltages by an op-amp, various potentiometers, resistors and a battery. The signals from the spectrometer are pulses which are amplified and input to the pulse counter of the computer control system. An ionization efficiency curve i s obtained through the cooperation of the scanning voltage output and pulse counting processes, and the timing process realized by a real-time clock. A spectrum i s stored i n the main memory while scanning and i s then transferred to a floppy disk unit after the scanning has been completed. This system can not only scan and store the 120 CPU Main Memory Video Termin-al Console Floppy Disk Unit TTY > 4 \ t : • > • Computer System Level UNIBUS Pulse ADC Interface Counter Level X-Y Oscillo-Plotter scope Spectrum Display Mass Spectrometer Application Level Figure A I . l The Structure of the LSI/11 Computer Control System p -C H CD RECORD (win) tr (D CO rt f-l d o rt d CD O H i rt t r CD CO •< w rt CD 3 h o iQ cu 3 am i c o n h l t l o n T PARAME i T SQUEEZ QUERY 1 — SCAN-EITRAC BINARY IECH0 QUERY QUERY CHARAC r T T DISK I ECHO CHARAC DISPLA I ICY IHHD—OUT-e t c . fliU r e t r l t Y i l •m l »tnr< a e I — DISPLA KYINHD BACK SUM 01SK FNANE EXTRAC SQUEEZ 1RADS0 QUERY QUF!RY B I N A R Y i • 1 1 DISK FNAME EXTRAC BINARY I IRADSO QUERY r WRITE DISK FNAME EITRAC QUERY IRADSO l o u l i t l o n AODSUB EXTRAC BINARY QUERY SQjIEEZ QUERY 1 CHANGE ~ 1 CLEAR EXTRAC QUERY 1 1— LEVEL PLOT 1 SCALE 1 SEPERA OUT-EXTRAC QUERY EXTRAC BINARY IECHO SHOW SMOOTH EXTRAC BINARY EXTRAC BINARY I ECHO QUERY EXTRAC BINARY IECHO QUERY E X T W BINARY I ECHO QUERY EXTRAC BINARY IECHO Other itmictt, I STORE DISK HELP INFO QUERY EXTRAC BINARY IECHO 122 spectra, but also retrieve necessary spectral data and manipulate these data. The structure of the system program i s summarized in Fig. AI.2. 'RECORD' i s the headquarter of the program, which contains the necessary data structure . 28 subroutines cooperate and perform four levels of services. The top level i s for controlling a spectrometer to scan a spectrum and storing the spectrum with related scanning information i m p l i c i t l y . The second level i s for data r e t r i e v a l from some secondary storage (disk) to the interactive system, and e x p l i c i t storage and f i l e creation according to the user commands. Data manipulation is performed at the t h i r d level where a l l the necessary data are present in the interactive system by the actions of the upper le v e l s . F i n a l l y , the bottom level takes care of the error handling and the simulation of user consultation and information center. The functions of each of the 28 subroutines are summarized below: 1. ADDSUB: addition or subtraction of two spectra 2. BACK: take data back from disk to memory 3 . BINARY: convert an ASCII d i g i t a l string to binary 4. CHANGE: change the values of some points in a spectrum 5 . CHARAC: convert a binary number to an ASCII string 6. CLEAR: clear a spectrum out 7 . DISK: read or write on disk 8 . DISPLA: display some spectra on oscilloscope 1 2 3 9. EXTRAC: input some arguments from terminal 10. FNAME: convert an ASCII string to RAD50 format 11. HELP: show the user some helpful information of how to use the system 12. IECHO: echo a binary number to terminal 13. INFO: show and modify information and display-status of a spectrum 14. KYINHD: interpret data manipulating commands and c a l l suitable subroutines 15. LEVEL: level out some spikes in a spectrum 16. OUT: go out of the display loop 17. PARAME: input scanning parameters 18. PLOT: plot a spectrum 19. QUERY: ask user's decision at some c r i t i c a l point 20. SCALE: scale up or down a spectrum 21. SCAN: coordinate some output voltages, a real-time clock and a counter to scan a spectrum and store i t into memory and disk f i l e 22. SEPERA: move a spectrum up or down relative to the base-line 23. SHOW: show the values of some points of a spectrum 24. SMOOTH: smooth a spectrum 25. SQUEEZ: squeeze out a hole in memory for a new spectrum 26. STORE: save or reload the center data bank 27. SUM: sum up some similar spectra in a data f i l e 28. WRITE: write data in memory to a data f i l e 124 Once the desired energy range i s selected, other parameters are also adjustable to identify the different scans. These parameters are: 1. number of spectra in the f i l e ; 2. size of each spectrum in number of blocks; 3. scan rate in msec/point; 4. number of scans per spectra; 5. start point number (where -the scanning starts) ; 6. number of points per scan; 7. step-size of the ramp output to the spectrometer. The spectrum, once taken and manipulated, i s displayed on an oscilloscope (Kikusui, Model COS5060) and a plot of the spectrum i s f a c i l i t a t e d by a X-Y plotter (MFE Plotamatic 715). MOV • 3 . B J 3 t B IC » ITTT60 . IRS> ; ( O S I - S P E C I * I N A S C I I SUBROUTINE AOOSUB VERSION i.a IT-MAR-SI BOV 1RS1• . B J : R2 - S P E C I * I N BINARY O I C B3 ASL B2 : B 3 - 0 F F S E I Or SPTAON TO S P I A O I C FUNCTION o r THIS s u a n o u rINC is t o Pinion* » o o i i I O N / SUBIRACIION BEIWIEN two •OO SAVE.B2 SPECTRA . THC RESULT CAN BE A NEW SPEC!BUN OR PARI OF IME E I I S T I N G ONC . AOO * M .B2 : B2>*SPTADN M l IV I B ) | . | B 4 I » THC PARAMETER L IST PASSED TO THIS SUBROUTINE I S : SOB B3.ll MOV ( 0 3 1 . 0 1 ;R2 POINTS TO SPTAOC L I S T : VOBO 10. CALL A DATA MANIPUIATINC SUB POUT INF MOV ( 3 ( 0 1 1 . I N F O T C ; IN IOIC P O I N I S TO INTO TABLE OF SPECTC SAVE: .BLMW 1 AOOBESS OF PABAMCIEB LIST TO CALL 'OISPLA' (JUST USEO FOB F U B I H I B MODIFICATION! ;G I I S IEP S I I C KCUR: WOOD 4 0 9 9 . 1 COOBOINAIE OF THE CUPSOO YCUR: .WIRO O » COOBOINAIE OF THE CUP SOB G E I S I P : MOV AOGU3 .NE HNI Ml :NEWNUN • SPECT* OF THE NEW SPECT FACTOR .WORO O SCALE FACTOR USED FOR DISPLAY MOV SPIADC .04 ;B4-»SPCCT N OF C NODE : .B lKW 1 THE DISPLAY MOOT MUV SPIAOB.B3 :R3<«SPECI~M OF B S P I A D I .BLKW I ADOBE SS OF SPICTBUM STATUS 1481E OF S P f C l 1 MIV SP T ADA.O 7 :BJ.#SPECT"N OF A SP1A03 .BLKW 1 AOOBCSS OF SPECIBUM S IAIUS TABLE 01 SPEC 12 MUV 6 I 0 3 1 . S I I P A j S I EPA : STEP S U E OF A SP I A D 3 .BLKW I AOOBISS OF SPECIBUM S IAIUS IABIE OF S P I C I 3 MOV fc|B]|.S'IPB :STEPB: S T E P ' s i l E OF B SPIAD4 1 AOOBESS OF SPECIBUM S I A I U S IABLE 01 S P I C K CMP S K P A . S I I P B j m t o i .BLKW 1 ADDRESS OF STACKI USEO TO STOBE IHE SPICIBA BGE I t ; I F STEPA < STEPS MOV S I E P B.BI TMt SUBROUTINE AS»iS EOR THE rOUOVIMG INPUTS: MUV B I . S I E P C THEN S I E P C ' S I I P S 1. J SPECTRUM NUMBERS: FOB THE I W OPERANDS AND THE SUM C I B BO FIRST ONE CAMNOI BE O E I A U I I E O . THE DEFAULT FOR DIV S I I P A , B O IF STEPS ISN'T MULTIPLE OF STEPA THE OTHERS IS ITS PBECfOING VALUE . TSI B I J . 3 START POINT*'*. NUMBER OE P O I N I S AND SIGN ONE E B S I E P THEN ISSUES AN ERBOS MISSAGE THE Of FAULT CONDITION I S IME SAME AS IN 1 . FOR IME 3 SIAST ASL BO ELSE S H P A O ' T H E MULTIPLE * POINT*'!. NO DEFAULT FOR NUMBER OF POI N I S . I H l OEFAULT FOR MOV BO.SIEPA S I I P O ' 3 is •••. MOV • 2 . S I E P B M S T E P A . S ARE USEO TO S I E P THRU THE MEM I : ;1EVEBV P O I N I OF B WILL BE USEO, YOB At ; :IONLY MULTIPLE » P O I N I S WILL BE SK IPP IOI .T ITLE ADO SUBSTRACT BB I N P U I 2 GLDBL ADOSUB .CHIRAC.BINARY, QUE RT. SQUE E 7. CHAR AC MCALL P R I N I I t MOV S I E P A . B I MUV 0 1 . S IEPC ELSE STEPC-STEPA ADOSUB: MOV R S ,SAVE C I B PO AOO 4 I 3.R5 ;RS POINTS TO MODE OIV S IEP8.R0 IF STEPA ISN'T MULTIPLE OF S I E P B MOV RS.MOOAO MOOAD • AOOBESS OF MOOE I S I B 1 ADO *2.RS ;R» P O I N I S TO SPIAOI BNE 1 B S 1 I P THEN ISSUES AN EBBOB MESSACE MOV R S . I A B L S P ; TABLSP • ADOBE SS OF TABLE OF SPIAO N » S l BO ELSE S U P B - 3 ' I H f MULIIPLE « MOV I O I B S I . S I K A O I ;SIKAOI • ADOBESS OF SIACK 1 MOV BO.SIIPB S l l P A - 3 MOV • 2 . S T I P A ; l S T E P A . B ARE USED 10 STEP IMOU THE MINI INPUT!: MOV • L I S T I . R 9 ;ASM FOR SPECT* OF A.B.C BR INPUI? :IEVEBT POINT OF A WILL BE USED. FOR BI JSB P C E K T R A C : ;IONLY M U L I I P L E 4 POINIS WILL BE SK IPP fD I CMPB A0GUI.41OO IE F I B S I ONE OFFAULT ; S I I P S It PBOBLEM: BIO INPUT 1 THEN ASK AGAIN CMPB AOGU2.*70O I F SECOND ONf IS NOT D I F A U I I I B S U P MOV 'MS ro.OUFSAO ;ASK: ' F A I L E D TO MAKE S I E P S U E A AND S U P BNE I t THEN JUST CONTINUE MOV «l I M 3 . B S S I E E _ B COMPATIBLE" IHY'AGAIN?' Mnv ABGUI.ABGU2 ELSE ASSUMI SICONO ONf • E IBS I ONI J ' .O p r . o u r B * »»: CMPB ABGU3.«2O0 IF I H l 0 0 ONE I S NOT O t f A U l l 1 M B ANSWCR BNI 71 THIN JUST CONIIM i l HNI It IF ' Y E S ' THIN GOIO INPU I ' MOV ABCU2.ABGU3 ELSE ASSUME IH lBO ONE • SECOND ONE JMP f I N I S M ELSE IFBMINAIE It JMP INPUI 1 : ( I 0 0 LONG TO USE BRANCH1 i t MOV VARGUI.RS CALCULATE SPIAOA .SPTAOf l .SPTAOC. INIOIC MOV •SPIAOA.RJ AND SIOVI IH(M INPUTS: NOV V I . I STH . aS : INPUT S U B ! POINT* OF ». B. C . NPOINtS . S I G N MOV S f f P C . I B . i l * STEP S I M JSR PC . IKTRAC WIV »i)n N I W S I / . I B 4 I * # J . R 4 S I ? E ~ I N # OF WORDS I N I 0 DOES NOT CHANGE CWf l 4RGU4.«2O0 IF DEFAULT THE F IBS I ONE NOV # 1 0 0 . . I R 4 | « 1 SCALE FAC IORIMOO • 100 BIO INPUT! THEN ASK ACAIN C l B I B4 |» SEPERATION • 0 CNP4J ARGUS.*200 IF NOT O f f A U l t THE SECOND ONE NOV AOORC.2IR4I SIART C • START POINT#_C BNE l » THEN JUS ! CONI INUI NOV A R G U A . *aan I L S I ASSUME THE SICOND ONE • THE F IBST ONE :UPOAIE INFOBNATION T A B L E : NUV ABGU4»2.ARGU9*> MOV S P I A 0 C . B 4 R4 POINTS TO STATUS T A B U AGAIN NOV AOGU4«4 .ARGU4*4 NOV #ARGU4.R2 SIT UP A TABLI CONIAINING THE INFO PARAMETERS I t : CMPfl A O G U C . * 2 0 0 I I NOT 01 FAULT THE tMIBO ONE IN THI BIGHT OBOER IUSI ARCU4 AS BUFFERI 8 N ( 2* THEN JUS I CONIINUE MOV # I . I R 2 I » 1. # SPECT-NSCAN NOV ARGUS.A R G U C I L S I ASSUME THE IHIBO ONE • SECOND ONI MOV IO IR4 I .RO 2 . S I Z f IN # OF BLOCKS NOV A R G U S O . A R G U S O » S H » • 8 . RO I BLOCK • 256 WORDS NOV ARGUS*4 .ABGUC«4 MOV R O . 1 0 2 1 * It CNP8 ABGU>.*200 IE DEFAULT NPOINI CIO 1021* 3. RATI (UNKNOWN1 BEO INPUT! THEN ASK AGAIN C l 0 MOV 1 0 7 1 . ? 2 I B 4 | . | R 2 I « 4 . NSC AN 1 UNKNOWN 1 9 . S IAB I POIN I* MOV •ARGA04 . H 4 .CONVERT ARGU4.9 .C .T TO BINARY MOV N P O I N I . I R 2 I » C NPOINT NOV •4DORA.B2 MUV S I E P C . I R 2 I 1. STEP NOV » 4 . R 3 3t- NOV <R4»>.S>RGA0 STBGAO • ADOBESS OF THE OIGI IAL ASCI I ABGU MOV INFOTC .R4 INFOI 'ADORISS OF INFO BLOCK OF SPECTC NOV ' L I S T 2 . R 9 CALL BINABV MUV «*oi;u4 ,R2 CONVEBI IHISE TO ASCI I CHARACIfOS «IS» PC.BINARY BINARY NUMBER STOBIO AS AOOBA.ADDBB.ADOBC. MOV # 7 .03 R I • PAOAMII fB COUNI ; AND NPOINT BIANKS: MI1V #64 .R I BLANK OUI THE INFO TABLE ( £ 4 WOBOS1 NOV B I N U N . I R 2 I * MOV 04 . 0 5 SOB , B 3 . 3 « I t MIIV B L A N K . IR5>« sun R I . I t NOV #4095 . . B I C INC SET RELATIVE POSITION OF SBECTC ON OSCILL SUB AOORC.BIGIMC I 3 t : NOV #11 M S OS ;CAIL CHARAC NOV IKJI*. NUIWtH IMMIH " aiPWWT rUWIH IU DC lUHVIRItU :CHECK ir T O K I I P THE E I I ST INO PART Of SPECI C OB NOI : J S O PC .CHARAC MOV # 4 . 0 0 ; R 0 • BYTE COUNT 14 BYTES FOR EACHI I I I S I : NOV *MSC2.0UESAD :«SK: 'WANT TO K f f P IHI OIHfB PABIS Of 0 1 0 MOV <CHAB4.0I NOV » L I S»3 .RS SPECT_CT • • ? t : CMPB • J O O . I B I I 200 INDICATES IND OF CHAR4 JSR PC . OUf BY U N I IOS TSTB ANSWER ;ir " Y E S ' . MOV8 # 4 0 . I R4 I> :PUf BLANKS U N T I L GOT 4 CHAR'S BNf K I I P THIN KEEP THE OTHER PARIS BR 1 I t ;0O NOT M I P THI EYISTIHO PART: lOt NOVB I R I I » . ( R 4 | * 1 l » : SOB B O . I 2 t CONVEBIS AND STORES 4 D IGITS MOKEEP: NOV NPOINT. R» CISC TREAT IT AS A NEW SPECIRUN C IB B 4 NOV C0NNA . IR4 I* PUT A COMMA AND A BLANK AT THE END OIV » M . . B 4 1ST • 5 SOB 0 3 . I 3 t REPEAT UNTIL 7 PARAMETERS ARE DONE BIO I t INC • 4 ;R4 • # OT BLOCKS 10 K f f P NPOINI J M P OPERAT GOTO OO THE OPERAT 1 ON • SH • B . . R 4 :B4 • M M S I / I IN ' Of WOODS NOV • 4 . M E W S I ! : K I I P IHI E K STING P A R I : CIBB ERROR NOV • L I S T 4 . R S KE IP NOV SPIADC.B4 R4 POINTS TO THE STATUS TABLE OF SPECIC JSB PC .SOUEEt CALL SOUEEZ TO GEI A >Olt FOR THIS SPIC1RUN CMP S I I P C . 6 I R 4 I IF NfW STEP S U E • OLO SIEP S l i t I S I B IBBOB IF NO E B B U B OCCUBBfO B l O S 1 I P O K I M I N CONIINUE B IO UPOAT• THIN CONIINUE P O I N T ' M S G 2 < I L S I COMMAND ABORIIO AMD STOP JMP F I N I S H ELSE StOP J M P F I N I S H U P O A t l : NOV SPIAOC . R 4 UPOAIE THE SPICIBUN SIAIUS I A B L I NOV 2 0 < R 4 | . | R 4 | « SPICT_C • HIA O C S l l POK MOV 12104 | . R I RI POINTS TO THE INFO T A B L E NOV #40«»S. . I B 4 I «l<0 » 3 0 .0 1 R I POINIS TO NPOINI IN l i t ! INTO T A B L E S U B A O U R C . I R 4 H B I G I N C • 40K5 - S U O l P O I N I . C MOV 0 1 .SIRGAO CONVIRI I H I S ORIGINAL W O INI I O BINARY NOV N P O I N I . I B 4 I » NPOINI MOV ' 4 . R O IHI MAI S W E OF IHIS PARAMEIER IS 4 B Y T E S I » : C M P B # 4 0 . ( R I M ;USI »200 10 IND ( H I O I G I I A L S I R I N G (IPOA12 MOV J O I 0 4 1 . ( 0 4 1 S P C C I C • H E A 0 _ C B I O I t MOV •4U9S . 2 I B 4 1 SOB RO. IS s u n • i m u r , J( 04 | B E G I N C • 4 0 9 S - START POINT# C »»: MOVB - I R O . B 2 iSIOBC THIS C N D I N G B Y I I MOV U l IINPI . 4 ( 0 4 | N P O I N T • O L 0_NPOINI • OIFFST MOVB 4 2 0 0 . I R I ) ;S fT ffJOO AS THC END OF THC D I G I T A L S T B I N G AOO O d I S I . 4 ( 0 4 | MOV 4 L I S I 2 . R 9 MOV N f V S U . 10104 1 NEW S U E JSR P C . B I N A R Y MOV AOOOC.22(R41 S I A R I _ C • S T A R T _PO IN I » _ C MUV BINUM .OLONPT ;OL0NPT • O R I G I N A L N P O I N I OF THE S P C C T C MOVB R I . I R I I iRCSIORI THC O R I G I N A L BYTE I N F 0 2 . MOV I N I 0 I C . R 3 U P O A I E T H E INFO I A B L E ; AOO « ? 4 . 0 3 0 3 P O I N I S TO I H E F I F I H E N T R Y OF INFO TABLE D IFFER : MOV A D O B C . R I ;R« • START_POINT»_C MOV «A0r.U6.R2 R3 P O I N I S 10 I H E A S C I I S I A R I P O I N I * OF S E P C I C C L B RO MOV B L A N K . I B ] ) C L E A R I H E O L D 4 B Y T E P A R A M E T E R F I R S I S U B 2 2 I R 4 I . R I ;RI • NEW START - 010 START MOV B L A N K . 2 ( 0 3 1 B C I I t i l F P O S t l T v E . THEN CONIINUE I t : MOVB I O ? | » . | B 3 l » MOVE IN A S C I I DIGIT B I S • I T T T T T . R O ; E L S E EXICNO THE SIGN B I T TO RO CMI-B »200. I B 2 I UNI I L I H E END OF ASCII D I G I T A L S T R I N G D I V S I R 4 I . R O ; R I ' R T / S T E P C RN( I t MOV R O .O IFFST iDIFFST • #~0F P O I N I S AHEAD BB INF03 GO TO U P D A T E THE REST OF THE INFO. TABLE B C t BCNIND ; IF RO > 0 . NEW S P E C ! S I A R I S B E H I N D THC 010 ; I H l SUM S I A R I S B E H I N D IHE E I I S I I N Q P A R T : : I M t sua STARTS IN FRONT OF THC C U S T I N O PART ; B E H I N D - MOV N P O I N I . R I FRONT: Nta OIFFST :OIFFST IS P O S I T I V E NOW AIIO O I F F S I . R I R l • S U E OF NEW S P E C I IN WOODS MOV ( O I 0 4 I . N E W S U ; I N I T I A L 1 EE N E W S I E E - O L D S U F CMP O I O N P I . R I IF O l O_NPOINt > NEW C O M I N G P A R I MOV O L O N P T . R I ; R I • TOTAL * OF P O I N T S OF S P E C T C I N MCM RCE O P i O A ! T H E N J U S ! GO 10 DO I H ( O P E O A ( I O N ADO D I F F S T . R I ; R I • NCW TOTAL » OF P O I N I S OF SPCCIC MOV B I . 4 I B 4 1 E L S E S E I IHC NEW N P O I N T • THE L A B G E R ONE C N P N P O I N I . R I ; I F N P O I N T TO BE ADOEO IS L E S S IHAN THIS CMP (0 ( 0 4 1 . 0 1 IF 010 S U E > NEW S U E B L E A O J S E t | T H E N OK B E C A U S E SOME O L D PARI K I S I S BGE UPONPI T H E N GOTO U P O A T E THE NEW NPOINT . P R I N T 4 H S G C 1 ELSE P B I N T ' T O MANY P O I N I S ' C I B RO J M P F I N I S H ; AMD S T O P D I V » 7 S « . . R O • TSI R 1 A D J S M : CMP I 0 I R 4 I . R I s i r 0 1 0 S U E » S U E TO S I O B E NEW S P I C I B( 0 I t • C C 3 t i THEN JUST MOVE DOWN IHE O L D S P C C I C I N C BO : R O • S U E IN 4 OF BLOCKS C I B RO I t : ASH « B .RO ; R 0 • S U E IN # OF WOROS D I V «2S€ .RO MUV R O . N E H S U T S T R l C l OB ERROO BCO I t MOV ' I I S I 4 . R S :CALL S0UEE2 TO GET A HOLE FOR T H E NEW S P E C T INC RO SRO • S U E IN B L O C K S 1 0 S I O B E N P O I N T J S O P C S O U E E E • »: ASM AS .RO (RO • S U E IN WOODS I S I B EBOOO MOV RO.NEWSU iNEWSU • NEW S U E OF IHE S P C C T C B N E F I N I S M IE ERROR OCCURREO. SIOP C L R B I R R O R MOV ' L I S I 4 . R S U P D A I 3 : MOV 3 O ( 0 4 | . ( B 4 l S P E C T _ C • H E A O _ C J I B P C . SOU tCZ ICALL SOUEC2 TO G E T A H O L E FOR S P C C T _ C MOV A 4 0 9 S . . 2 I B 4 I I S I B I R R O R SUB 3 3 1 0 4 1 . 3 ( 0 4 1 BEGIN C • 4 0 9 S • START C B C O 3 t ; I F NO ERROR O C C U B O I O . T H I N CONIINUf MOV N C W S U . I O I B 4 I S I I I . C • N E W S U J M P F I N I S H i E L S E S I O P I N I 0 3 : MOV I N F 0 I C . R 3 U P O A T E INFO T A B L E 3 1 : MOV OLONPT.BO AIIO • 6 . 0 3 R 3 POINIS 10 S E C O N D ENTRY OF INFO T A B L E OF C ASL RO : R 0 • OLO S U E I N B Y 1 I S MOV Nf W S U . R I ADO 3 0 I R 4 I . R O ; R 0 • ADDRESS OF IHE 8 O I I 0 M OF IHE O I D S P I C I ASH » 0 . R l NEW S U E IN B L O C K S MOV O I F F S T . R l MOV DI.NUMRCR C O N V C B T TO ASCI 1 A S L R l ;RI > THE S U E AHEAD 01 IHE 0 ( 0 S P I C I I N B f l E S C I B B F L A G C L E A R F L A G . F L A G S E T IF N O MORE C O N V E R S I O N ADO RO.RI ;R I • NEW ADOR OF B O I I O M OF IHE OLD SPCCI CONLP- MOV » l I S I S . O S ; JSO P C . C H A O A C C O N V E R S I O N MOV 0 L 0 N P T . B 3 ;MOV DOWN THE O L D S P E C I ID ACCOMMODAIE IHE NCW MOV >CMA04.02 DOWN MOV - I R O I . - I R I I MUV B L A N K . ( B J I C L E A R I H l S E N I R Y SOB R3 .DOWN MOV B I A N K . 2 1 0 3 1 C L E A R : MOV O I F F S I . R O I t MOVR 1 D ? | . . | 01 ( » MOVE I N O I C I T IS C I B - 1 0 ( 1 iCLEAR THE H O L E CMPB >700 . (B3I U N I I L B Y T E 3 O 0 IS E N C O U N I I R I O SOB R O . I t BNI I t c m 1 I AT. F L A G S E I IF NO MORE CHADAC CAI I BNt OPERAT UPONPT: MOV I N F O I C . B J :UPDATE THE NEW NPOINI IN INIO lARtr ADO • IO . . 8 1 ;B3 POINTS TO SI»1H 1NIRV l » 0T POINIS I MOV 4<B4I.NUMBER ;NEW NPOINT INC E l AG ;SET FLAG TO INDICAIE I I IS IHE END OF CONVER. ; an CONLP :ACTUAL ADOIT ION / SUBTRACTION: OPERAT: MOV •SPTADA.R9 CALCULATE STARTING AOORESS OF EACH SPECI MOV 4AOORA.R4 1 STORE IHIM 10 ADORA,A0OB8.AOOUC ;AN0 GIT * COPT OF SEPEBA. SEPERB. AND SEPERC MOV • S . B3 ADORLP: MOV | R S I * . R 2 :R2*«SPECt_N FOR A .B .OB C MOV I R 4 I . R I SUB 2 3 I R 2 I . R 1 ;R I • PRESENT START POINT* - ORIGINAL ONE BIT I t : I F NEGATIVE. SET START POINI* 10 OHIO ONE •SL R I ;R I IS NOW IN BYTES CIR RO DIV ( . (R2I .RO :RO-S IAR t_POIN I#_N/S I IP .N BB at M I N T •NSG4 : PR INT ERROR MESSAGE. BUT CONIINUE CLB RO ;PRESENT START POINI* • ORIGINAL ONE it •OO 201B2 I .RO ;BO*BO*HEAD N MOV R O . I R 4 I * ;AOOR N • BO. STOSE 10 ADDBA. AOOBB. OB AOOBC MOV I C I R 2 I . C I R 4 I ;GEI A COPT OF S IPEBAI IONS . SIOBf AFIEB NPOINT SOB R l . AOOBLP MOV ADORA.09 :BS POINTS TO SPICIA MOV AOORB.R4 ;P4 POINTS 10 SP IC IB NOV AOORC.B3 ;B3 POINIS TO SPECIC NOV NPOINT.R2 ;R2 IS IHE POINI COUNIEB MAIHLP: MOV I R 4 I . B I ;RI>POINT VALUE OF B SUB SEPERB .R I ;RE SE T IHE SEPERAIION FROM BASELINE CMPB ABGUB .* ' * ; I F AOOIIION B IO 2 t THEN C • A • B CMPB ABGUB ,# ' • I I P SUBTRACTION BEO I t | THEN C • A - B C IB R I ELSE C • A BB 2 t t»: NCO B l It •OO I B S I . R I iCALCULATE C SUB SEP IRA .R I ; R I S I f THE SEPERAIION 1 RON BASELINE •OO SEPERC.RI : S E ! THE SEPERAIION FROM BASELINE FOB SPECIC NOV B I . I B 3 I * :RESTORE IHE BESULT TO SPICIC •OO STEPA.RS ;SKIP ' STEPA ' POINIS FOB SPICIA •OO S IEPB .R4 ;SKIP ' S T E P B / 2 ' POINIS I I POINI • 3 HY I I S I SOB R2.MAIHLP ; S I I THE DISPLAYING MOOE TO DISPLAY THE SUM: NOVB 01 C B NOV ARGU3.RS RS * I , B4 :SET BIT_N OF NOOI IN SUBBOUIINE DISPLA ASH B I S RS .R4 R4.OMODAO :BIT N OF R4 IS NOW SET :SET THE MOOE TO DISPLAY SPECTC ; JOB OONE r IN ISH PRINT 'MSGS :PRINT 'COMMAND 'AOOSUB' E IN I SHEO . ' R IS PC :RE TURN ;OA 1A F IE LO : SAVE : BLKW I L I S I 1 WORD 4 CALL EATRAC 10 INPUI 3 S P I C t « ' S MlS«0 . WORO MSG! AOORESS OF THE NESSAGE ARGAOt . WORD ARGUI ADDRESS OF IHE ARGUMENTS APr.102 . WORO ARGII3 A0GAD3 . WORO ARGU3 AOGUI : BIKW I :BUFFER TOR THE ASCI I SPECT* 'S • RIJJI : B l MM 1 AHGU3: BLKW 1 U s u i . WORO e CALL E 'TRAC 10 INPUT 3 STAR! POINT*•S.NPOINI . WORO MSGI 1 AND I H l ' S I G N ARGAD4 . WORO ABGIM ADDRESS OF IHE ARGUNENIS • RGMlS WORO ARGUS • R i ; » l l 6 WORO AOGU6 «UI,M>> WORO ARGUT ARGAD8 . WURO ARGUS ARGU4: BLKW 3 ; BUFFER FOR THE 3 ASCI I S I A B T P O I N W S ARGUS: B l N W 3 ARGUS: BLKW 3 AOGU?: BLKW 3 BUFFER FOR THE ASCI I NPOINI ARGUS: BLKW 1 4 BUFFER FOR THE ASCI I SIGN L I S I J WORD 2 CALL BINARY SIRGAO BLKW 1 AOORESS OF ASC I I S IRING BINUM: BLKW 1 BINARY EQUIVALENCE L I S I 3 WORO 2 CALL QUERY QUI SAO BIKW 1 ;AOORESS OF IHE QUESTION ANSWER BL KB 1 ANSWER I ' Y I S O'NO EVEN 1 I S I 4 WORO S Ml WNIfM HI K W 1 IHE SPECIRUN * OF IHE INCOMING SPECTRUM MIIIIAO HI K W I ADOBESS OF MOOE Nl WSI / BLKW 1 S l / f Of IHE NLw SPECIBUM i n n i S P BLKW 1 1 ABLE OF AOOBESSES OF SPECTRUM STATUS TABLES s•x i n i BIKW 1 AOORESS OF SIACKI IRHOR Bl K R 1 EBBOB FLAG . SET |F IBBOB OCCUBBEO .EVEN L I S T S : .WORO I :CALL CHIRAC TO CONVERT BINARY 10 A S C I I NUMBER: .BLKW 1 ;BINARV NUMBER .MORO CM4R4 ; I M E ASC I I SIRING ADDRESS FLAG: .81 KB 1 ;A FLAG SET IF N O MORE C H A P A C C A L L S IGN: .BLKB I :SPACE FOR SIGN RCIUSNEO IF ANT CMAR4: .BLKW 3 ;SPACE FOR THC O I G I I A L P A R I REIURNEO • S G I : . ASC I I :EOR C • A • / - • . : . A SC I I «I3>«IS>/INPUT S P I C I * FOR A . B . C : /OOO-t tSOI . I : ASC I I / STARI_POINI* FOR A . B . C . »_0I POINIS . SIGN ' /<700 MSG3: . ASC I I «I3>/WANT 10 KEEP THE OTHER PARTS OF OLD S P C C I C ? / . B m 300 NSG3. 1: . A SC I I /THE NEM STEP S U E IS NOT COMPATIBLE 10 THE OLD ONE. / . A S C I I /COMMAND ABORTEO./ MSG3: . ASC I I / F A I L E O TO MAKE STEP S U E A AND SIEP SIZE B COMPAIIBLE. / . ASC I I /TRT AGAIN? / .BYTE 300 MSG4: . A S C I I /THE DESIRED START_POINT« IS TOO SMALL. SCI 10 MINIMUM NOW MSGS: . A S C I I / C O M U N O ' A D OSUB ' F INISHED. BACK TO DISPLAY . / MSGC: A S C I I /•»• NPOINT TOO LARGE. COMMAND ABORTEO / . E V E N BLANK : ASC I I / / COMMA: . ASC I I / . / SPTAOA: .BLKW I ;*SPECT N OF A SPTAOB: .BLKW 1 : » S P E C I " N OF B SP1AOC: .BLKW • ; # S P E C T ! N O F C INFOTC: .BLKM • .'ADDRESS OF INFO TABLE 01 SPECIC S I I P A : .BLKW ( :STCP S U E OF A STEPB: .BLKM I ; S I EP S U E P F B S I I P C : .BLKM • ;STEP S U E OF c AOORA: .BLKM | ; A O O R C S S OF IHE S I A R I POINI 01 S P C C I A AOD»B: .BLKM 1 ;AOORESS OF IHE S I A R I POINI OF S P IC IB AOORC: BLKM 1 ; A O O R C S S OF THE S I A R I POINI 01 SPECIC MPOINI: . BLKM 1 : » OF POINIS S I P I R A : . BLKM 1 :SEPERAIION FROM B A S H IME FOR SP IC IA S I P E R 8 : BLKM t :SEPERATION F R O M BASELINE F O R SP IC IB S t P l R C : .BLKM • ;SCPCRA!ION FROM BASELINE FOR S P C C I C BEGINC: BLKW 1 ;POSITION OF SPECIC O N OSCILLISCOPC OLONPt: .BLKM 1 :IHE ORIGINAL M P O I N I SIORIO IN I N F O lABLC O I FFST : BLKW D I F F E R E N C E B E I W I I N O L D AND NIW S I A R I P O I N I * KD •SUBROUTINE BACK VIRSION I I 1 - l u B - l l •THE FUNCTION Of THIS SUBROUTINE IS TO R l » 0 BACK OA IA ON OISK i t H t PABANETIB L I S T PASSIO TO THIS SUBROUTINE I S : l l l S T : .HOBO 10. : C A l l A DATA NANimiLAIING S U B B O U I INt : S A V I : .BtKM I : A O O B E S S o r P A B A M I I F B I I S I I O C A L L - O I S P L A ' : » j u s t u s c o f o a f U B i H I R N o o i r i c A i i o N i • « C U B : .HOBO 4099 . : » C O O R O I N A I E o r IHC C U B S O B ; Y C U R : WORO 0 ; V C O O R O I N A I I Or IHI C U B S O B ; T A C I O B : .WOBO O : S C A L I F A C I O B U S C O T O B D I S P L A Y ; N O O I : .BIKH 1 :IHt D I S P L A Y NODE ; S P T A D I : BIKW 1 : A O O B I S S o r S P I C I B U N S T A T U S T A B L E or S P I C I I ; S P T A D 3 : . B L K W 1 : A 0 O B I S S OF S P I C I B U N S I A I U S T A B L E OF S P E C I ] : S P T A 0 3 : . B L K W I ; A D O B E S S OF S P E C I B U M S T A I U S 1ABLI 01 S P I C I 3 :Sf>IA04: .BLKW 1 ; A D D R E S S OF S P E C T R U M S T A T U S T A B L E OF S P E C I 4 ;STKAOI : .BLKW • 1 A D D R E S S OF S T A C K I U S E D 10 STORE I H E S P E C I R A TITLE DATA BACK FROM OISK . CLOB l 1A TRAC .QUERY .OISK.BACK .BINARY. SQUEEZ. FNAME MCALL .PRINT BACK: MOV RS.SAVE ;SAVE THE LINK AOO • M J . B S MOV |R9 I» .M00 I i CE t A COPY OF THE PARAMETERS NOV I B » | » . S P T A 0 l NOV | B 5 | * . S P I A 0 3 NOV ( R S M . S P I A 0 3 NOV |RS I» . SPTA04 NOV I R 9 I . S T K A 0 I •SHOW THE CURRENT STATUS ON DISPLAY: CUB BNT PRINT •MSG! ;OUTPUT SPECTCS OF CUBBINILV OISPIAYEO SPECTRA NOV •ONE .R9 ;B9 POINTS TO TABLE C0N1AINI NG SOME NUMBERS NOV • I . R3 ;B3 USED TO TEST IF SPECI N IS IN NOV • 4 . R 7 i lOOP 4 TIMES CURIN: B U B R 3 . MOOE ; l l B I I _ N « 0 . SPECT_N NOT IN BEO N O U N PRINT R9 NOT I N : ADO »4 .R9 : I 4 BYTES FOR EACH NUMBER 1 ASL R3 SOB R J . C U R I N : INPUT FILENAME OF IHE DAI* F I LE AND IHE SPECTRUM NUMBER OF IHE NEW SPECI RUM BEGIN : MOV ' L I S t l . B S ; INPUI SPECT*.FILENAME JSR PC. IXTRAC NOV 'ARGU3.FNAMA0 :CONVERI FILI_NAMI 10 RAOSO MOV • L I S I 3 . R S JSR PC.FNAME ;AE AD IN IHE INIORMAIION BLOCK OF IHE DATA F I LE AMD GET INTONATION: INIOIN MOVB ABGUI.B4 ;R4>N FOR SPEC t_N BIC »I77760.R4 :CONVFRT TO BINARY MOV R4.NEWNUM ;NEWNUM IS IHE SPECT » OF THE INCONINQ ONI Df C R4 ASL R4 AOO *SPTA0 I .R4 ;R4««SPTA0 N MOV | R4 | . SPTAON jSPIAON • STATUS TABLt FOR SPICTN MOV IR4I.R3 MOV I 3 I R 3 I . R 3 ;R3«INF0A0 N MOV R3.0AD0R MOV *64 . O S I Z l ; INPUT THE FIRST 138 BYTES OF THE OATA F I LE CIRB OSTAIU CIB OSIARI ; INT0_ lABLE_N MUV »IIS13.B» JSB PC.OISK 1MB DSTAIU ; I F DISK OPERATION OK BfU SMOWIN THEN CONTINUE TO SHOW INFORMATION TABLE JMP F I N I S H ELSE SIOP .SHOW THE INFORMATION TABLE OF THE DAT* IN THE OATA F I LE SHOW IN NOV *NSG3.R9 ;B9 POINTS TO THE MESSAGE TO BE OUTPUT MOV *7.BO ;PBINT THE 7 PABAMf lEBS I t : ADD « IB ,R5 ;R5 POINIS TO THE POS 111 ON OF THE NUMBER MOV | B 3 I * . I B 9 I * :MOVI THE ASC I I NUMBER TO THE MESSAGE MOV | B 3 I » . I B 5 I » AOO »I.BS ; SK IP TWO BYTES I L I N I FEED AND RETURN! AOO O . B 3 :SK IP TWO BYTES (COMMA AND BLANK I SOB BO.It PB IN I »MSG3 ;PBINT l# S P I C T . S t Z l . R A T I . . S ? I P S I Z I A B I : I AOO »?0 .R3 ;B3 POINTS Mf AO OF THI OISCRIPTION PB IN I «MSG4 ;PRINI D lSCRIPT ION PB IN I R3 SIC IF I I IS THI RIGHT THING: MOV (MSGS. QUI SAO ; ASK : 'WANT TO SI I I TT ' MOV 'LISI4.RS JSB PC.OUCRY I S I B ANSWER j I F ' Y I S ' BNE PROCfO ; THEN PROCEIO MOV ffMSG6.OUESAD ; ELSE JSR PC.OOEBY ASK : ' TRY ANOTHER O N I ' I S I B ANSWER ; I F ' Y I S ' RNI BEGIN ; THEN IRY AGAIN JMP F I N I S H :0A1A F i l l OK. GET DISPLAYING STATUS FROM INFORMATION BLOCK: PROCIO: MOV 0AOOR.R3 ;R3 POINTS BACK TO INFO T ABL I MOV #S .R J ;CONVERT IHC PARAMEIfRS 10 BINARY I SKIP SCAN RA f f ANO • Of SCANS I MOV ffNSPICI.RI ;RI POINTS TO • TABLE TO S10BC IHESt 9 » S MOV •SIBINT. .B4 ;R4 POINTS 10 A BUFFIR STRING MUV R4 .S IRGA0 MOV ffLISIS.BS-:CONVCBT THISI 3 PARAMETERS 10 BINARY  • 03 i > > > i i i a > > > a a Q — _ A i o « o «l • c a in a B • * — a e vi o • * a o r> m • • a n 3 w* IC o B • — B w « o o 3 s a l IW W t IS in tr- « g S > O ' a a - ^ ^ u I a - tn - tn w M S ' a — — »n » c a « » B « B B 1 • > W U > I £ a c 1 « a > > i ! Z a v & -a Z */* z 03 S S CO CD • t / t • o • » • -J • *» - z - a s • w -1* . • o u * 8 - z f » 2 5 O 3 O a a n i « « a a a B a P i s ^8 r t « » 2 m -- 3 i I o i r 8 3 " I i i n O O - B — B « O B O -J Z B w S 3z 5 e 1 5 j a a -w u £ — » VI W tH • X -— « « B 2 B 8 M> — « I > o a 2 i z x S w • u *** a < o *- ** f t Z * e • * o ° *• * o 3 — x - 5 I B • • i n n •I fi 3 — - - fi • i * * -• n » - B » B a » B f > > < * U 3 i # f # - « ot«r*'w — — — '—»>i«i a 2 % * r> * B S l l s l s f . f 51i55§S 1 1 u m w • I a I • ) l«u«««' i .. 2 2 i u o a o £ s u v» 5 •v «-*" - " 3 M s o.So I I > i/» W P -«* * • -=1 v> u - B ~ 8 * < 2 w S3 B 2 w P K •>> kjH) O V • tM O ' » s • > a \& m B O 8 - 8 O - O M B — s i , -21 o 2 « — -j a -B m u § 2 -ft IH IH >- W B 41 IW « s a n -£ — v» • I i S O ] A •» n t»vj a a a *M — •a • *« «n B •» B n - a ts O f * O Z .•*••>. n •> a n — m m n a t A B B k A f t B B l * 4V IH It. ft* > > B > > 0 > U - J O > > Z > > B > B f m »* •- 2 « l i f t 2 o z in a o a -s r 2 2 ~ O St 3 <n v» 4i tn in • — * 1 B a 8 B — VI a — * r a « B - 8 5 m vt » z . w • — — o « O w — v» n i n « v > l u i o « w > > > « > > > > I l i i U f i i s w II L I S T J : WORO J •NAHM): .BLKW 1 .WORO FRA090 E 0*090: .BLKW 4 ;f IIE_MANE I N RADSO MAS 8 BYIES L I S T S : .WORD 9 WORO FRAOSO OSTABT: .BLKW « ;STARTINC BLOCK* 0A00R: .BLKW • ; AOOBESS Of IME BUFFEB FIELO IN MtM DS I 2E : .BIKW 1 ;* OF WOROS 10 BI IRANSFERBED OSIATU: .B tHB 1 jO-RO ;I«WR; «0 ERROR .EVEN L I S T 4 : WORO 3 ;CALL OUEBT OUESAD: .BIKW 1 ; ANSWER: .BLKS 1 : . EVEN L I S T S : .WORO 3 ;CALL BINARY STRGAO: BIKW 1 NUMBER: . BLKW ' I L I S T * : .WORO > •CALL EatRAC WORO NSQT TO INPUI IHE SPECIRUM * IN f i l l 01 IH l .WORO ARGUS SPECIBUM 10 81 IN ARGUS: .BLKW 3 iSPECTRUM * IN F ILE L I S T T : .WORO B NfMNUH: BLKW 1 ;THE SPECTRUM * OF IHE INCOMING SPECIRUM MOOAO: . WORO MODE ;AOORESS Of MODE N f V S I Z : .BLKW 1 : S I / E OF THE NfW SPECIRUM IABLSP : . WORO SPIAO1 i l A B l f OF AOORfSSIS Of SPECIRUM SIAIUS T A B U S STKAOI: .BLKW 1 :AOORESS Of STACK 1 ERROR: -8LKB 1 ;ERROR FLAG. SET IF ERROR OCCURRID : .EVEN SPIAON: .BLKW I ; S IAIUS I ABLE OF I H l INCOMING SPICI Oil NSPECT: BLKW 1 :* OF SPECIBUM IN F i l l S I 7EBK : BLKW I :S !2E OF SPECIBUM IN RIOCKS S I A R I P : . BLKW « :S IAB t POINI * OF IH l SPECIRUM NPOINI : .BLKW I ;* OF POINIS IN SPECIBUM S I E P : . BLKW I : S IEP SIZE S IR ING: BLKW 3 ;A BUFFER FOR A DIGITAL SIRING BLANK: ASCI I / / MSGS: ASCI I / * SPECT IN F I L E : / « ! ? » « I 5 » ASCI I / S I J t < « BLOCK I : / « I 2 » « I 9 » ASCI I / PA I f ( M S I C I : /<I2»<IS» ASCI I / « SCANS: /< I 2»« IS» ASCI I / START POINT*: /<I2>«I9> ASCI I / # PO IN IS : / « I 2>« I9> A S C I I / S I E P _ S I E E : / MSG4: ASC I I < I 2> /DESCR IP I I 0N : /« JO0» MSGS : A SC I I <I2><IS>/W*NT TO SEE ITT / B»IE 200 MSGS: ASC I I /TRY ANOTHER ONE? / BYTE 200 MSG? • ASCI I <I2>/WMICH SPECTRUM TO BE INT INPUT ITS NUMBER: /«20O» MSGS: A S C I / /COMMAND ' BACK ' COMPLETEO. CO BACK TO ' D I S P L A Y ' . / .EVEN .END Of SUBROUTINE BACK [NO CMPH •loo.at ; l f N O INPUT SPECTRUM* BNE It MOVB L A S 1 N . R 4 THEN ASSUME THE I AST INPUT SPECTRUM * S U B R O U T I N E C M * N S C v t a s i O M t . i J O - O A O - A i I t MOVB R 4 . L A S I N .'STORE THE CURRENT SPECT* FOR L A I I O 01 FAULT n i c * I 7 7 7 S O . R 4 ; R 4 . N (BINARY 1 01 c R4 : f UNCI ION Of T H I S S u B M M t l N t I S 1 0 CHANGE THE CONIENI OF SOKE S P E C I F 110 P O I N I S A M 04 :R4>0rrSIT OF SPTAO_N TO SPTAO_ l AOO I A 8 L S P . R 4 ;R4 ' *SPTA0 N : I H E PARAMII IR L IST P A S S I O TO THIS SUBROUTINE I S : NOV I R 4 I . R 4 :R4 NOW POINTS T O THE SP IC t STATUS IABLE ! L I S T : WORD 10 . CALL A DATA MANIPULATING SUBROUTINE ; G t 1 A O O R E S S OF I H E POINT AT IHE CURSOR POSITION: ; S»VC: BLKW I ADDRESS OF PARAMEIER L IST 10 C A L L O I S P L A ' A O O R S : MOV 7 I R 4 I . I ] ( JUS t USEO FOR F U R I H E R MOD I F ICA I I 0 N I S U B • •CURA0 .A3 : « C U R : WORD 4 0 B 5 . 1 COORD INAIE OF THE CURSOR B G I • t ; I F P O S I T I V E . THIN CONT INUI ;VCUR: WORO O V COOROINATI OF THE CURSOR P R I N T 'MSGS ELSE PRINT ERROR MESSAGE ; F * C I M WORO 0 SCALE FACIOB USIO FOR DISPLAY Cl R R3 :H0OI : BIKW 1 THE 01SPLAY MOOE MOV 7IR4I .OYCURAO SET CURSOR TO START POINT : S P I * D I BIKW 1 ADORE SS OF SPECIRUM STATUS TABIC OF S P E C I I It: CIR 07 : S P T A O J BIKW • A O O R E S S OF SPCC1RUM SIAIUS T A B U o r S P E C I 7 O I V £ 1 0 4 1 . 0 ] : R 7 • DIFFERENCE IN R E L . POSITION / STEP S U E . S P I A D 3 BIKW 1 ADDRESS Or SPECIRUM SIAIUS I A B L E OF S P E C I ] A S L R7 :R7 • DIFFERENCE IN MEM. S P A C E I B Y I E S I : S P f A D A BLKW 1 AOORESS 0 1 SPECTRUM STATUS T A B L E OF S P I C I 4 AOD 7 0 I R 4 I . R 3 ;03 • ACTUAL AOORESS OF THE POINT :STHAOI BLKW I AOORESS OF SIACKI USED 10 StORE THE S P E C I R A : I N T C R P R F I IHI COMMAND PARI OF IHE INPUT: * .TITLE C H A N G E 7t C M P B • S.ARGU7 : IF s-GIOSL | > I R A C . B I N A R Y . I E C H O . O U I R T . C H A N G E BNE 3t MCALL .PRINT J M P SHOW THEN GO TO SHOW VALUES OF POINTS CHANGE: AOO A A . R S 3t C M P B » ' A . A R G U J : i r ••• NOV R S . I C U R A O : X C U R A O • AOORESS OF « COORDINATE OF CURSOR B N E 4t AOO • IO.RS J M P AOVANC THEN GO T O A D V A N C E T H I CURSOR NOV R S . TABLSP iTABLSP POINTS TO A T A B L E CONTAINING ADDRESSES OF S P E C I R O N S I A I U S I A B L E 4t C M P B •0 . A R G U 7 : l l "D-NOV I O I R S I . S T K A O I :STKAOI POINTS TO S I A C K 1 BN( S t J M P OEPOSI THIN <•/> ; • O E P O S I T V A L U I TO CUOOENt POINI INPUT: NOV « L I S T I . R S : INPUT SPECTRUM » AMD COMMAND JSR P C . I X I R A C 5t PRINT * M s n i . i ;PR|NT I I . <rt|ONS ; BR INPUt ;ASK 1 0 0 INPUT COMMAND AGAIN CMPB A R G U 3 . * 7 O 0 I E N O COMMAND BNE I t JMP F I N I S H T H E N STOP. : C H A N G E ALL NEGAIIVE TO THE AVERAGE O F THE LAST AND NEAT POSITIVE VALUES : i t : CMPB • • N . A R O U I I E COMMAND I S ' N - N I G A T MOV S I K A O I . R S ;START FROM THE HEAD OF STACK 1 BNE Jt MOV ' 4 0 9 S . . 0 4 ;AND CHECH ALL POINTS IN STACK 1 JMP NIGAT THEN GO 1 0 NEGAT DIRECILY CIR R3 t s t |BSI» i»: CMPB A P G U 7 « I . * } 0 0 I F THERE IS DIGITAL INPUT IN THI COMMAND P A R I BGI A B I P N O B N E CONVER T H E N Go t o CONVERT IT TO B I N A R Y Cl R -IB5I ;1F F I R S T POINT I S N E G A T I V E CLEAR I I MOV P l . B I N U N ELSE JUST SEI IHAI 10 ONE AO I OOP : I S I I R S M BR STATUS AND SKIP IHE CONVERSION B G E A B I P N O MOV - 4 I R S I . R 2 SNEGATIVE: R7»LAST POSITIVE * CONVIB: MOV *ARGU7«I .STROA0 CONVERT OIGI IAL INPUt 10 BINARY ; CMPB # • - . A R G U 2 M IT Nt GA 11 VE 3t INC R3 R 3 - * OF POSITIVE POINTS BNE • t Dl C 04 INC SIRGAO THIN ADVANCE IHI P O I N I I R 10 IHT ISI D I G I I Bl 0 1NDNIG ; l l THE END IS Ml CAT IVE IHEN GO TO EMDNEG It; MOV » l I S I J . R S ISI | O S I » E l S t IF MORE NEGAIIVES JSR PC.BINARY RI 1 3t . I H I N GO I O 3 t 10 C O U N T « OF NEGAIIVES AOO I R S I . R 7 ; ILSE COMPUTE IHI AVERAGE OF THE IWO GET THE STATUS TABLE• A S O 07 P O S H IVE » S SIA IUS MOVB ARGUI.R4 R 4 - N 1 ASCI 11 sua 03.OS ;MOVl IHE P O I N I I R BACK TO THI I S I SUB R 3 . B S ; NEGATIVE* 4« : MOV R 2 . I R S I * ;CHANGE IHE NEGATIVES 10 I H E A V E R A G E SOB R J . A t ADO O . R 5 ; H O V E THC POINTER 10 IHE M l X I P O I N I ABLPNO: SOB R4.ABL0OP J M P F I N I S H E N D N C O : MOV R 2 . - I R S I ; i r THE END I S ALSO NEGATIVE CHANGE IHE SE SOB R3.INONEG :NEGAIIVES TO THE LAST P O S I T I V E V A L U E ; J M P F I N I S H ; SHOW VALUES: SHOW: MOV B I N U M . R 3 ;R3 • POINT COUNUR BGE I t N IG R l • »: P A I N T •MSG3 ;ECHO THE SPECIRUM • POINI » M S G 3 . I ;PRINT H E AOING MOV •409S . .01 SUB PKCUBAO.Rt ; R I • CURRENT POINI* ecu RO OIV C I R 4 l . R O :ROUND o r r THE CURRENT P O I N I * to MOV R O . R I ; MULTIPLE OF S I E P S I M CIO R O MUL C I R 4 I . R I SHLOOP: MOV R I . I 4 MOV ( L I S I 3 . R S ;CCHO THE POINI* j s a PC.1ECHO POINT *MSG2 2 ;PRINT SPACING MOV I R 2 I . I 4 ;ECHO THE 010 VALUE MOV • L I S T 3 . R 8 J S P P C . 1 ECHO •.OUTPUT 010 VALUE POINT AMSG2.3 ;PRINI LINEFEED AND REIURN TSI BINUM ; I F BINUM I S NEGAIIVI BCT I t S U B C ( R 4 ) . R I THEN ECHO I H E L E F T P O I N I S S U B #2.R3 e o 2 t I t : AOO C I R 4 I . B I E L S E ECHO THE RIGHT P O I N I S AOO • 3 .R2 I t : SOB R3.SHL0OP J M P INPUT :G0 TO INPUT O I H E R COMMANDS ;DfPOSIT NCW V A L U E : DEPOSI : MOV B INUM. IR2 I iDEPOSI I THE NIW VALUI MOV P I . B INUM BR SHOW ;G0 TO SHOW IHE NEW V A L U I :AOVANCI N POINTS: AOVANC : MOV B I N U M . a t AOO 0 1 . 0 7 ;AOVANCE THE P O I N I E R 10 MEMORY ADO 0 1 . 0 2 ; 1 POINT • 3 B r U S MUl C I R 4 I . R I SUB fl 1.••CURAD ;AOVANCE THE CURSOR 110 R I G H I 1 MOV ' 1 . B I N U M BR SHOW :G0 10 SHOW IHC C U O O I N I P O I N I JOB DONE IN ISH : POINI »MSG4 R IS PC ;POINI •COMMAND 'CHANGE' F INISHEO. ;REIURN OAIA F I E LD Af lLSP: BLKW «CUBAO BLKW S1KADI : .BLKW I I S ! I Aor .An i A0C.AII2 AOGUI A0GU2 : WUOO WOOD WOOD WUOO ASCI I ASCI I ASCI I EVEN BLKW BLKW :*DORCSS OF THE TABLE CONTAINING AOORESSES OF IHE SPECTRUM STATUS TABLES ;ADDRESS OF « COOOOIMA TI OF CURSOR ;AOOBESS OF STACK I WHERE SPECIRA ARE S10RE0 SCI RGUI RGU2 ;CALL EMOAC TO GET INPUT :MESSAGE AOORESS ; AOORC SS OF ARGUMENT TO BC INPUT «2><I5» INPUI SPECIRUM « AND THE REQUIRED OPERATION I . J IF CONFUSED)/ : /«2O0> ;SPECTRUM * ;RE0UIREO OPERATION LI ST 2: SIRC.AO: BINUM: I I S I 3 : 14 Msr . j LAS IN MSG3 I MSG2 7: WORO BLKW .BLKW :CALL BINARY TO CONVERT ASCI I ;ADORESS OF IHE ASCI I S IRING S T R I N G 10 B I N A R Y WOOD . BLKW ; C A l l I ECHO 10 ECHO A 14 NUMB CO ASCI I ASCI I ASCI I ASCI I ASCI I ASCI I ASCI I ASCI I ASCI I ASCI I ASC I I ASCI I <I7>/IHC FOLLOWINGS ARE SOME EKAMPLES OF A VALIO OPERATION:/ <»2><tS>/ I . ' A <I7»<IS»/ 2 ' A <I7>«IS>/ 3 ' 0 /CUOOINI P O I N I ' « I 2 » * I 5 » / 4 ' N ' 10 ' MEANS - t O ' MI ANS 10 ' MEANS . /« I2>«IS> MEANS / OF IH l TWO POS IT IVE / « I 2 » » I S > / BOUNDS' « I2><IS*/ 5 . ' S 10 ' MlANS 1 <!7><«S»/ S . ' S - 1 0 " MEANS v «I2»«1S>/ 7 ' ' MEANS ' < I3>< I S x I2><200> 'ADVANCE 10 P O I N I S ' . / GO BACK 10 P O I N I S ' . / DEPOSIT TO AS THE VALUE OF THE / CHANGE ALL NEGATIVES TO AVERAGE/ SHOW THE FOLLOWING 10 P O I N I S ' . / SHOW THE PRECEOING IO POINTS ' / NO OPERAIION. JUS I REIUON' / ASCI I ASCI I ASCI I ASCI I <I2>/IHE SPECIRUM » IS / /2/<200> :SET IHE IN IT IAL O E F A U l l TO 2 «!2><IS>/ POINT » / /«2O0> POINT VALUE /< !2><IS»/ /«200» N S G J . 3 : ASC I I <IJ><<5>/ /O00> MSC4: ' ' A S C I I /COMMAND 'CNANGf ' F INISHEO. BACK 10 ' O I S P I A * ' . / MSGS: . A S C I I /AW* THE CUBSOB IS OUT OF RANGE . NOW SI I 10 IHE SIARI POINI / .EVEN ;EMD OF SUB BOUT INS CHANBE .END S U B P O U T I Nt C H A R A C V E R S I O N 1.1 l - M A R B I F U N C T I O N or T H I S S U B B O U T I N C I S TO C O N V I R T BINARY I O A S C I I TOR P R I N I O U I . I M P A R A M E T E R L I S T P A S S I O TO T H I S S U B BOUT I N I I S : L I S T : .WORO 1 6INUM: BIKW I ;THf BINARY NUHBIR ASCIAO: WORO DIGIT :ADDRESS Or IHI D I G I I A l PABI Of THC STRING (BINARY MUMBIR RANGCO TROM - 9 9 9 9 TO 9 9 9 9 W i l l 81 OK I ( U P O N B C I U R N . D IGIT CONTAINS NAM 4 O I G I I A l B t l l S AND ENDS WIIH 0 0 0 > l I D I G I T * ! CONIAIN THE SIGN BYTE IE I I I S N fGAIIVE I . T I T L E C O N V E R T B I N A R Y TO A S C I I . C L O B L C H A R A C * : NOV B 3 . - I S P I iSAVE D 3 . R 3 . R I . R O NOV » J . - I S P » NOV R I . - I S P l NOV « 0 . - ( S P » S IGN: NOV I I B 9 I . R 3 :R4»BIMARY NUMBER NOV 4 I R S I . R S ; B 5 «ADOBES S Of DIGITAL ASCII SIRING 1ST R J ; | E NOT NEGATIVE BGE B E G I N •HEN BEGIN IMC CONVERSION MEG B 3 E L S E CHANGE I I 10 POSITIVE KOVfl A - - . - M R 5 I ; AND PUT A ' - ' IN TRONI Or THE S I G N : : B E G I N C O N V E R S I O N : BEGIN: CLR8 I E AOO NOV A IOOOO. .B l G E T I 4 : CIR BO OIV » I 0 . . R O BEO r I N I S H MOV RO.RI CLR R J O I V RO . R 3 B N E CONVER ISTB I f AOO BEO GE 114 CONVER: B I S B • S O . R 3 nova • 3 . I R S I * INCB I E AOO ; BR C C I I 4 :JOB DONE: F I N I S H : 1ST IE ADO BNE DONf :BE8 IN CONVERSION. LCADO SCI I f NO H A D I N G O ;RO«10000/ lO ' lOOO AT TIRST LOOP 4 TIMES 10 G i l 4 D IGITS OUT R> • MOD I 1 4 . I O " N I IE NOf O. THEN CONVIRI AND SIORf ELSE I f LIAOING O. IHEN SKIP IHIS ELSE CONIINUE CONVERT TO ASCI I SIORE N O MORE LEAOING IERO ; l f ALL ARE LEAOING ZERO : IHIN GIVE A Tf PO :f LSI NO 0PIBA1 ION NOVH • O . I « S I « (IONI MOVB o I O O . I R S I ;APPEND 300 AT THE END OF fME S f B lNO ; (0R PRINTING PURPOSE NOV ( S P I ' . R O {RESTORE R O . R I . R 3 . R 3 MUV ISP|«.RI MIIV I S P M . R 3 MOV I S P I * . R 3 B I S PC ;RE TURN ;DAIA F I E L D : I t ADO BLKB 1 ;FLAO INDICAIES IF LEADING ZIRO OCCURRED f V I N INI) Of SUBROUTINE CHABAC END SUBBOUI IMC CLEAR VERSION I.I l - M A B K fUNCT ION Of THIS SU) ROUT INC IS 10 CHAD PABT Of A SPECTRUM. THC PARAMETER IIST MSSID TO THIS SOB BOUT INC IS: : I I S T : . HOBO •0 . : C » L l A DATA MANIPULATING SUBBOUTINC :SAVC: .eittM 4 ;A0ORESS Of PARAMETCB LIST 10 CALL 'O I SPLA ' ; (JUST USEO rOB fUBIHCB MOOI f ICAt ION) :>CUR: .HOBO « O M . !« COOBOINAIE Of IME CUB SOB : V C U R : .HOBO 0 :» c o o a o i N * i E o r I H E C U B S O B FACTOR : .HOBO O (SCALE EAC lOa USEO fOB O lSPLAT ;MOOC : .BLKM 1 ( T H E 01 SPLAT MODE ;SPT»OT: .BLKM I (AOOBESS Or SPECIBUM STATUS TABIE Of SPCCTI :SPTA01 : .BLKW 1 ;AOOBESS Of SPCCIBUM SIAIUS CABLE Of S P I C I ] : SPT*03 : .BLKW I :ADDBCSS Of SPCCIBUM STATUS IARLI Or s r f C I S :SPTA04: .BLKW 1 ;AOOBESS Of SPCCIBUM STATUS TABLE Or S P C C I 4 :STKAOt : BLKW 1 (AOOBESS Of STACK 1 USED TO SIOBE THC SPCCIBA . T1TLC C L I » B CONTINf Of A SPCCIBUM .CLOBL EYTR4C.0UCRV.CLCAR . ( • C A L L . M I N T CLEAR: AOO 4 I 4 . B S MOW R9 .TABLSP i l A B I S P IS THE TABLE CONTAINING IHE ADDRESSES OE THE SPECTRUM STATUS TABLE •INPUT SPECTRUM • TO BE CLEABEO: INPUT: MOV •LISTf.as (INPUT SPECTRUM « J S R PC.C>TRACT MOVB A40 .ABGUIAI :BEPIACE BITE ' l O O - W I I H A A B L A N K ; A S K CONTIRMATION: CONERM: MOV •LIST*.as ;ASK: 'BEALLY WANT TO C L E A R S P E C T N T • J S R PC.OUCBT TSTB A N S H C B :ir * N O ' BEO flNISH* 1 T H E N STOP ELSE CONTINUE :OET_SPECT.STATUS_TABLC: MOVB ARGUI.RS ;RS-N IASCIII BIC • I T T T C 0 . B 9 ;RS-N IBINARY) D E C RS A S L RS :RS*orrsET or S P T A D N I O S P I A O I * } ADO IABLSP.RS : R S > * S P T A D N MOV IR9I.RS ( B S ' A O O B E S S Or S P E C I S T A T U S T A B I C :CLEAR THE DISPLAYING PART Of THE SPECTRUM: OPERAT: MOV MOV MOV 4 I R S I . R 4 I R S I . R 3 ( t l f l S ) . R S ; B4 . » Of POINIS TO BE CLIARIO ; B 3 ' P 0 I N I E B 10 THE BEG I ON fO BE CHARED :RS<SCPCRATION I BOM BASELINE It MOV RS.(OJ). . C H A P THE REGION SOB R4 . It :C0NIINUC :JOB DONE : f I N I S H PB INI »NSG3 ;PRINT 'REQUEST DONE. ' R IS PC ;RETURN :OAIA f l E L D IABLSP ; BLKW I :TABLE OP AODBESSES Of SPECT STATUS TABLE I I S I I : WORO 7 ; C A l l EATRAC 10 OEf S P E C T 4 INPUT . HOBO MSGI ;MESSAGE ADOBESS HOBO ABGUI :SPCCIC AOOBCSS H S U : HOBO 7 :C*LL QUERY TO ASK fOR A DECISION HOBO MSG 3 ;MESSAGE ADORESS ANSWER: BLOB 1 ;RE TURN ANSWER: l»VCS O'NO MSG! : ASCI 1 / INPUT THE SPECTRUM 4 : /<JOO> MSG? : ASCI 1 /REALLV WANT TO CLEAR SPECTRUM / ABGUI: BI KH 1 ; f l R S T BTIE IS ASCI I D I O I t . SECOND IS ' » 0 0 ' ASC I I / ? /<J00> MSG3: ASC I * /COMMAND 'CLEAR riNISHEO. BACK TO ' D I S P L A Y ' . / EVCN :END Or SUBROUTINE CLEAR END C/4 S U B R O U T I N E D I S P L A H K I O N t . i I - N A B - B I :STKADI .WORO STACK1 :SPTAOI . H O no SPICT • : SP IA03 wooo S P I C I 3 :SPTAD3 .woao S P I C I 3 :SPIAD4 .WOOD SPICT4 : f l A G A D .BIKW 1 ' T H E F U N C T I O N or T H I S S U B R O U T I N E is to 01SPLAY soar SPECTRA OUT TO » N OSCILL ISCOPE . THC PARAMETER LIST PASSED TO THIS SUBROUTINE HaS THE fOILOHING TORN : L I S T : NOOaO: . H O R O T MOOE CaLL OISRLI aooRESS or BIT B IT BIT BIT BIT THE D I S P L A Y MOOE I • I S P f C I I IS 1 0 B l D I S P L A v I O 1 • I S P E C T } I S 10 B l O I S P L A Y I O J • I S P I C T 3 I S 10 B l O I S P L A Y I O 4 • I S P I C I 4 I S 1 0 B t O I S P L A Y E O B • O a N l * S C A N i R t s i a B i a I E B M I N A T E D J O B I O C I I MORF SC*M I S f t S U B B 0 U 1 I N I SCANI s c a n i s o r r S C 4 N I S ON I S P E C T 2 I S T H I B C S U U I BIT B • O i I :aooRtss or S T A C K t : * O O B I S S or T H I S T A T U S T A B L E or S P E C T R U M • ;aooRtss or T H I sraius T A B L E or S P I C I B U M 2 ;aOORISS Or THI S T A T U S I A B I I Of SPfCTBUM 3 : A O O B I S S or T H I S T A I U S l A R i t o r S P I C I B U M 4 ; A O D B I S S 0 1 A f t AO TO COMMUNICATE H U H ' SCAN . T ITLE DISPLAY OATA OLOfl l DISPLA.HYIMHD MCALL . PB INI DATA IN IT IAL IZAT ION : CTCR«ISTTS2 ;COUNTIR CONTROL RECISTIR CTBR* I6TTT4 :COUNIER BUTTER R I G I S U R CKCR>IT0420 ;REAL I I H t CLOCK CONTROL R IC IST IR , C K B R ' I T 0 4 7 7 ;RIAL TINE CLOCK BUFFER REGISTER • P » IT0440 ; R A M P OUTPUT B U f f f B REGISTER >0UT>ITO444 ; X AVIS OUTPUT BUFFER REGISTER TO O S C I U I S C O P f Y0UT*1TO442 :» AXIS OUTPUT BUFFER REGISTER TO O S C I l l l S C O P t K ITCR*I77S«0 :K|YB0AR0 INPUT CONTROL REGISTER KEYBBOTTSC2 :KEYBOABO INPUT BUrTIR REGIS1ER I ICR -177364 :TERMINAL OUTPUT CONTROL R IGISTIR DISPLA: ADO • 3 . B 5 MOV RS .SAVI NOV •1RSI*.MODE :THI OISPLAT MODE MOV I RS I * . S I KAO I ;AOORESS OT SIACMI MOV IRS I» .SPTAOI ; THE POINTERS 10 SPECTRUM SIAIUS IABIES MOV | R S I « . S P I A 0 2 MOV <RSI*.SP1AD3 MOV 1RS l » . SP1 A 0 4 MOV IRS I . I LAGAO ;AD0BFSS OF A r i A G USID 10 COMMUNICAIf R f f V f l N ; ' S C A N ' AND 'O ISPLA ' CLRB -»t I AGAO ;MAKE SUBE IHAI IHf f t AG IS CL1AB MOVB •I .MODISI ;MOOISI IS A MASK W i l l i ONI B l l St 1 C L B O f FSE f ; 0 F F S I t • OFFSET FROM SPTAOI 10 SPTAO N MOVE UP THE SPECTRA FROM THE BASE LINE IN OROER TO SHOW THEM TOGETHER: I t B ITB MOO 1ST.MOOE ;MOVE UP ALL SPECTRA TO B C OISPLATIO Br SEPERN BIO 2 t MOV o r r s t T . R O AOO « S P I A 0 I . B O : R O « « SPTAD N M U V I BO I .BO ;B0 • SPTAO~N M O V I B O I . B I . ;B I«A00B O r ' l S T POINT MIIV 4 I B O I . B 3 :R2>*OF POINTS M O V I 6 I R 0 I . B 0 ; R O " S I P I R _ M AOO R O . 1 0 1 | « SOB B 7 . 3 t ASLB MOOT SI :OPEBATC THE NEXT SPECTRUM AOO » 7 . o r r s f T :POINTS TO NEXT SPECTRUM STATUS n u n •7O.MO01ST B IO I t MOV • • 6 0 . K I V H N 0 :SAVC THC SYSTEM KEYBOARO HANDIER MOV * K E Y I N I . P * 6 0 ; SE f THI DISPLAY KIYBOARD HANDLER CLR • • 6 2 I S I B MOOE : U SCAN IS ON B l l OSCILL THIN DON'T ENABLE KEYBOARO INTERRUPT NOV A l O O . P ' K E V C R BECAUSE IT IS TURNED ON BY ' SCAN ' ;SMOW IHE SPECIRA O N O S C I l l l S C O P t : O S C I L L : NOV C l B I S I B Br.f J M P »l .MOOTS! Of I SI T • r i A G A O I OOP I out :A ONE-BIT MASK TO T E S T l r O I S P L A T S P E C T N :orrsiT • o r r s i T T B O M S P I A O I TO S P T A D N : i r riAG At T L A G A O I S NOT S I T TO N I G A T I V E 1 H | N C O N T I N U I D I S P L A Y I N G E L S E J U M P OUT Of THE 0 ISPLAY L O O P I S C A N S E T F L A G TO N E G A I I V E AT THC END L O O P 1 B I T B N O 0 T S I . M O D E :ir NOT O I S P I A Y SPECT N B E O N E U S P THEN G O T O SEE IE O I S P I A Y SPECT N» 1 I L S I 0 1 S P L A Y SPECt_N MOV O f f S f t . B O AOO • S P I A O I . B O ; R 0 • * S P T A O N MOV I B O I . B O : R 0 • S P T A D N MOV I B O I ' . B t : R 1 • C H A N N E L "AOORtSS MOV | O O I > . » O U T M O V I R O I ' . P J : R 7 * N P 0 I N I MOV ( P d ) . . 0 0 ; B O - S t E P S I / I I S I B MOOE . a i t s or "Moot s n i r S C A N N I N G B G I t o o s c : I F S C A N N I N G ANO D I S P L A Y I N G THIN I H E SUM NAY CHANCE BY f A C T O R B U B • 7 . M O O T S I BNE A O J L P G O TO A D J U S T AND O I S P L A T l o o s e M O V I O I | . . Y O U I I L S I J U S T O I S P I A Y sun O O . X O U T ; sun 0 7 . I O O S C : SHOW N f K t S P E C I B U M N I « I S P A S I B MOOISt : 1 I S I SP IC I N » l t o o # i . O F F S E T B I T S A J O . M 0 0 T S T : i r N » I « S BNE CMDSP ; THEN DISPLAY CURSOR OR SPOT BR lOOPI ; E L S E LOOPI TO DISPLAY : i r T H I S IS T H E S U M or PREVIOUS SCAN IN A SCANNING MODE. THEN ADJUST I I SCALE : • O J L P : NOV |RI|».RS ;ADJUST T H E VERTICAL SCALE • SM FACTOR.R9 NOV R S . T O U T SUS BO. ROUT SOB R 2 . A 0 J L P • • S i l MODIST t •DO • I . O F F S E T BR LOOPI :CND Of O N E COMPLETE SHOW OF A L L REOUIREO SPECTRA : I N D S P : TSTB MODE ; I E SCAN I S ON OISPIAY CURRENT SCANNINO SPOI BCE CURSOR ;OTHERVISE SHOW A CURSOR : i r SCANNING. SHOW CURRENT SCANNING POINT: SPOT: C IR T O U T ; R E SE T V TO BASELINE MOV RAMP.XOUT ;SMOW THE CURRENT SPOT MOV - K R l l . Y O U T ; R J I S POINTING TO IHE NE YI POINT BR OELAT : I T NOT SCANNING. SHOW CURSOR: C O P S O P : CIR T O U T {RESET Y TO BASELINE MOV I C U R . IOUT (SHOW THE CURSOR MOV YCUR.T O U T B E L A Y : MOV S P T A 0 I . B 9 ; R S POINTS TO THE STATUS TABLE OF S P I C I I MOV A I R S I . R I ; R I • » Or POINIS 01 SPLAY ING FOR SPEC 12 • SH » - S . R I : R I « R I / 3 2 l « : SOB R l . I t C O BACK TO SHOW A l t REOUIREO SPECTRA A G A I N : BR OSCILL O U T or THE OISPLAT L O O P : JUT MOV KCYHND.P 'CO ;MOVE BACK SYSTEM KEvBOARO HANDLER CIR P I S PC ;RETURN TO THE CALLING ROUTINE PRELIMINARY KEYBOARD INTERRUPT HANDIER: ;SAVE RO.RS ( E Y I N T : MOV MOV MOV MOV CIR MOV R O . - I S P I R S . - I S P I VOUT.YBUFFB •TTTT.YOUT PAKEYCR RAKEV6R .RO • • • . R O ;SAVE TOUT :MOVE OUI THE I IGH I Bf AM I fMPORARI lV ;DISABLE INTERRUPT ;R0 • THE INPUI BYIE ; ! F NO! • • ' C N E I t THIN CO TO TEST OTHCB INC FACIOR ELSE INCBENENT FACIOR BY ONE AND REIURN JMP B f I U B N i t CMPB • • - . B O IF NOT • - • BNE 21 IHCN GO TO TEST OTHER 01 C FACIOB ELSE OECRIASI FACIOR BY ONE AND RETRUN JMP BEIUBN :CURSOR CONTPOL i t : CMPB A ' U . B O IF NOT - U ' BNI 3 t THEN GO TO TEST OTHER AOO OILTA.YCUB ELSE INCREASE THE Y COOROINATE OF CURSOR JMP RE TURN 3 t : CMPB A 'O .RO : I F NOT - O ' BNf ••t THEN GO TO TEST OTHER sun DELTA.YCUR ELSE OECREMENT THE Y CORROINATE OF CURSOR .IMP BE TURN A t CMPB »•R.RO IF NOT -R ' BNf S t THEN GO TO TEST OTHER SOB DELTA.YCUR ELSE MOVE CURSOR 10 RIGHT* JMP RETURN S t : CMPB * ' L . R O IF NOT ' f BNI t t IHCN GO TO TEST OTHER AOO Of ITA .YCUB ELSE HOVE CURSOR TO LEFT JMP R E IUBN S t CMPB » F .BO IF NOT ' F ' BNI Tt THEN CO TO TEST OTHER CMP A3O0O.DELTA ELSE INCREASE OELIA EXCEPT IT • 2000 BI [ B E IUBN ASL DELIA RB BEIUBN I t : CMPB A ' S . B O IF NOT - S ' BNI 28 t THEN GO TO TEST OTHER CMPB • I . O f L I A ELSE OECREASE OELIA EXCEPT I I • I R l 0 B f I U B N ASB OIL TA BR B E IUBN i f l t : CMPB » • - . RO i r NOT • - • BNI • t IMIN GO TO TEST OTHER MOV • 4095 . . »CUR ELSE RESET CURSOR C l B YCUR MOV » I 2 8 . .DELTA AND SET DELTA TO A REASONABLE VALUE BR REIURN : S f l IHE CURBENI SCAN 10 BE THE LAST SCAN: R t CMPB » 5 2 . R 0 I f NOT ••• IINI 9 t THEN GO TO TEST OTHER MOVB » f . • f l A G A D ELSE SET A FLAG TO INOICAIE THAT THIS IS THE L A S ! SCAN ANO SHOULO SIOP BP B E IUBN :DA f A M A N I P U t A I I N G MOOC : LD 9»: CM>B #33 .R O I I I NOT E S C B E I U B N : C IR EBBCNT ;CL IAB COUNT I F SUCCESS BNf •os I THEN GO TO CHECK I f WANT 10 CHANGE MODE F IN ISH: MOV ISP .B5 ;BESTORI BS .RO MOV •77TTT .B5 iSET A DELAV TO LE I ALL OUIPUI BUf f E B Bt MOV •77777 .RO •Of : SOB R 9 . 4 0 t 1 EMPTY • t : SOB B O . I t :S IT A DELAY TO EMPTY SYSTEM BUFFER MOV KIYHMD.4M-CO ;CHANGE BACK THE SYSTEM KEYBOABO IMIEBBUPI MUV I S P I ' . R O ;RISTOBE OO MOV •too.PAKEYC* | HANDIER NOV YBUFFR.YOUT ;RESTORE THE ORGINA l POINT MOV • L I S T I . R S , I H f N CALL IHE USER KEYBOARD INIFBBUPt MUV • IO0 .P4KEYCR ;ACTIVAIC THE KEYBOARO INTERRUPT HANDLE JSR P C . KY lNHD I HANDLER 10 OO DAIA MANIPULAIION R l l ;RETURN 10 INTERRUPTED POINI MOV #KETINT .P#«0 .UPON REIURN. SET IHE PRIMINARY HANDLER JMP RETURN : CHANGE MOOI : :OAIA F IELO: IO«: CMPB P ' l . R O I I NOT ' I " L l S f l : HOBO IO ;CA IL KYINHD BNE • I t 1 THEN GO TO CHECH OIHERS ITHIS L IST IS SANE AS THAT USED TO CALL A l l B I S ••.MODE ELSE SET THE T IRS I B l l 10 OISPIAY SPEC I . 1 DA IA MANIPULATING SUBROUTINE 1 BR BCTURN SAVE : . BLKW I jAOOOfSS OF PARAMETER LIST 10 CALL 'DISPLA* 1 JUST USEO FOR FURTHER NOOIF ICATIONI • •»: CMPB P ' l . B O I I NOT BNf l i t •HEN GO TO CHECK OIHERS XCU8: .WO BO 4095 . ;« COORDINATE O F THE CURSOR B IC #I.MOOE ELSE CLEAR FIBST B l l 10 DELETE S P I C T . I YCUB: .WOBO O ;Y COORDINATE OF THC CURSOR BR RE(URN FACTOR. . WORD O '.SCALE FACTOR USED FOR OISPLAT SUN OF SCANS I J t : CMPB # '3 .RO I F NOT BNf. • 3 t THEN GO TO CHECK OTHEBS MODE : .BLKW 1 ;IHE DISPLAY MODE B I S , #3. MOOE I L S I SET SECOND B l l TO OISPIAY SP ICT .3 SP1ADI : BLKW 1 ;AOORESS OF SPECIRUN STATUS TABLE OF SPECT1 BR R E IUBN SP1AD7: BIKW 1 :AOORESS OF SPECIOUM S IA IUS TABLE OF SPECT3 ; SP IA03 : . BLKW I ;ADOO(SS OF SPECTRUM SIAIUS IABLE OF SPCCT3 l i t : CNPB • • • .RO I F NOT ••• SP IA04 : . BLKW 1 ;ADOBESS OF SPECIRUN SIAIUS (ABLE OF SPECT4 BNf • 4 t THEN C O TO CHECK OIHERS S IKAOI : .BLKW 1 ;AOORESS OF S IACK I USEO TO STORE THE SPECTRA B IC #7. MOOE I L S I CLEAR SICOHO B l l 10 DELE IE SPICT 7 BR RETURN ; Of f SET : BLKW 1 ;OFFSET FROM SPTAO_N TO SPTAO_l • 4 » : CNPfl » - 3 . R O | I F NOT - 3 ' BNf •S t THIN GO TO CHICK OIHIRS EBBCNt: .WORO O ;ERROR COUNT O F KEYBOARO PRESS B I S #4. MOOE ELSE SIT THIRO BIT 10 DISPLAY SPECT_3 BB REIURN DELTA: .WOBO 178. ;THC SPIED CONTROLLER OF CURSOR MOVEMENT is»: CMPB • " P . B O : l f NOT KCYHNO: . 8LKW 1 ;THC ORGINAL SYSTEM KEYBOARD HANDLER BNE l « t THIN GO TO CHECH OTHERS B IC O4.NO0E ELSE CLEAR THIRO B l l 10 DELETE S P I C I 3 f l A G A O : . BLKW I •THE FLAG AOORESS 10 INOICAIE THAT SHOULD BR RETURN STOP AFTER THE CURRENT SCAN CMPB » ' 4 . R O I F NOT - 4 ' YBUFFR: BLKW 1 ;BUFFER FOR STORING YOUT TEMPORARY BNf IT t THEN GO TO CHECK OIHIRS B I S • IO.N0OC ELSE SET FOURIH B l l 10 DISPLAY SPECI 4 MOOISt : B L K B I ; * ONE-BIT B I I - T E S 1 MASK BR REIURN CMPB » t . R O : I P NOT • ! • MSCI : ASC I I / •• /<70O> BNE •Bt I H f N GO TO CHECK ERBOB COUNT MSG7 : A S C I / /PRESS ' I S C - . AND TYPE •HELP" I F CONfUSEO / B IC • 10.MOOE ELSE CLEAR FOURIH 811 10 DELETE SPEC I . 4 EVEN BR REIURN IB*: INC ERBCNT INC ERROR COUNI IF INVALID INPUT It NO OF SUBBOUIINE DISPLA CMP • 10 .ERRCNT IF IT HAPPENS 10 I IMIS 81fOOt SUCCESS e e l • I N I S H ; I H f N PBINI fBBOB MESSAGE . END PRINT •MSCI ;PRINTt 'ONLV ' E SC ' . ' * ' •NO • -• »'BI • H O V I D • 1 PRINT •MSC3 ! Sue ROOf INC IIIR»C VI RSI ON I.I l -MAR-SI THC TUNCTIONS OF THIS SUBROUTINE ARC : I . OUTPUT * OUCRVING MESSAGE . 3 . INPUT SOME ARGUMENTS THAT ARE SEPARATEO B» A COMMA THE SUBROUTINE EXTRACTS THE ARGUNENtS 0(11 AND PUIS I HEM 10 IHE ARGUMENT L I S T . AFTER DELETING THE UNNECESSARY BLANKS ! T H E PAR AHE T I B L I S T PASSED TO THIS SUBROUTINE I S : IL I S T : WORO 3 ;THERE ARE 3-1 • I ARGUMENTS TO BE INPUI :MSGAO: .BLKW 1 ;ADORESS OF IHE MESSAGE ;ARGAOIt BLKW 1 ;ADORESS OF ARGUMENI 1 ;ARGA03: .BLKW I lAOORISS OF ARGUMENI 3 .T ITLE EXTRACT SOME ARGUMENTS OUT FROM INPUI .GLOBL EXIRAC .MCALL C H I N . PRINT EATRAC: MOV RS.SAVE ;S*VE THE LINK MOV R O . - I S P I ;SAVE RO .R J .R4 MOV R 3 . - I S P I MOV R 4 . - I S P I .CALCULATE MUM IER OF ARGUNENtS AND INPUT ARGUMENTS: BEGIN: MOV I R S I * . R 3 ;GET NUMBER OF ARGUMENTS PLUS 1 O tC R3 ;NUHBIR OF ARGUNENtS NOW IN 03 MOV | 0 S ) » . R 4 (GET MESSAGE G I L I N ALNBUF,R4 ; OR INT A MESSAGE AND GET ONE LINE MOV •LNBUE.RO ;R0 POINTS TO INPUI MOV RO.R4 I t : I S I B | 0 4 » . i INSERT A COMMA 10 IHE END OF IHE INPUI LINE BNE I t END OF LINE IS A B i l l ' O ' C l 08 I R4 I MOVB COMMA.-IRA) EXTRACT ARGUMENTS OUT AND STORC: I OOP SK IP : STORC: MOV CMPB B I O CMPB B I O I S I B B E O MUVB BR MOVB INC SOB I R S I « . R 4 •AO . I BO I* SK IP COMMA. -1 RO I •RGEND IROI ABNORM I R O I » . I R 4 ) » SK IP ' 3 0 O . I R 4 I RO 03.LOOP ;R4 POINTS TO IHE ARGUMENI ;SKIP BLANKS ( I F END OF ONE ARGUMENI ; I F END OF LINE BEFORE C H U N G A l l iPARAMEIERS. IHEN ASK AGAIN (SIORE INPUT AS ARGUMINI ; IHEN GOIO IESI IH l N I l l B»1E :»300 AS END OF ARGUMINI ; G f l NE<I B i l l IN IH l I INE BUFFER ; U N I I l GOI ALL ABGUMENIS : JOB OONE : MOV I S P I « . R J (RESTORE RO.R3 .R4 MOV I S P M . R 3 MOV t S P M . R O R IS PC ; RE TURN ; I N CASE NO ENOUGH ARGUMENTS. THEN COMPLAIN AMD ASK FOR THEM AGAIN: ABNORM: PRINT •MSGI :N0 ENOUGH INPUT ARGUMENTS. TRT AGAIN MOV SAVE.OS BR BEGIN :DA IA F I E L D : SAVE : .BLKW 1 : THE LINK LMBUF . BLKW 41 ;INPUT LINE BUFFER COMMA ASCI I I.I MSGI: ASC I I CVIN I— NO ENOUGH ARGUMENTS. ARGUMENTS ARC SEPERATEO SV A COMMA. END OF SUBROUTINE EXIRAC IND S U B BOUT I MI FNANt V E R S I O N 1.9 t - N A B - Q I ruNCI ION 0» I H I S S U B R O U T I N E I S 10 CONVERT A N A S C I I S I B I N G 10 * F i l l NAME M U M P R O P E R B A O S O F O R N A T . THC P A R A H T T I R L I S T P A S S I O T O T H I S S U B ROUT INC I S : i {AOORESS Or IKt F i l l N A M ! IM A S C I I FORM :ADOREss or T H I r i t i NAME I N R * O S O FORM ( F l i t N A M ! I N A S C I I rORM I S A N A S C I I S T R I N G . U P O N R E I U R N R A O I N ( M I L L C O N T A I N A B B Y I C S F i l l N A M ! I O I F A U I T : D I V I C I I S O K : ( P R O P I R A S C I I I I L I N A M : A M I 3 B Y T I S FOR 01 V I C E . C B Y T E S TOR I NAME A M ) 3 B Y T E S FOR TYPE . ( t . Q . O V I : r i N A M C P E S ( I F B Y T I P R E C E D I N G • : • I S ' O ' . OR ' Y ' T H I N D E V I C E LIST: .WORO t ASCIN: .BIKW i RAOIN: .BLKW t IS SY: IS OK  EISE OEVICI I I NAMf |S MORE THAN S BVTCS  IT WILL Bl TRUNCAIID I I I TTPI HAS LISS THAN 3 BYIIS. BLANKS WILL BE APPENOEO. T I T L E F i l l NAME . GtOBL F N A M E . IRAOSO ' N A M E : MOV R S . S A V E ; S A V E THE I INK MOV R A . - ( S P ) ; S A V I R4.RO MOV • O . - I S P I MOV •CJ.RA { I N I T I A T E T H E S T R I N G MOV • S I R I N G . * 0 ;8V M O V I N G B L A N K S I N TO I T IHITST: MOV B L A N K . ( R O I * S O B R 4 . I N I T S T :GCT THC OCMICI N A M E : * MOV 3IRSI .RS (RS P O I N T S TO THE A S C I I S T R I N G MOV •4.R4 JIVICI. CMPB • • : .(RSI* (GET THC D E V I C E NAME B E O N O O F T I S O B R4.0IVICC :OEFAULT>OK: S U B • A.RS ;RS P O I N I S T O THE F I R S T B Y T E OF THE NAME HAT A: MOV OK . S T B I M O :0K • 'OK-BB CI1NAM ; A C C E P T 0 AND Y AS OYO OKO OR SY N O D F T I : CMPB •0.-3IRS) ; A L L O T H E R C A S E S ARE I R E A I E D AS OK: B E O S Y S T E M CMPB »V.-3(BSI { S T R I N G IS TO BE P A S S I O 10 IRADSO B N E OATA ; A S I H E F i l l N A M ! I N A S C I I S Y S T E M : MOV SY . S T R I N O ;SY • 'SY' GIT THC NAME OF THE FILE: GETMAM: It: MOV MOV CMP8 B E O •C . B4 • S I S I N G O . R O • • . I R S I M O O T 12 ; I H E C H A R A C I E R S BE TWIN :ARE IHE F I L E NAME 3 t : CMPB RIO MOVB SOB MOV CMPB 81 U INC SOB BR •JOO.IRSI fINISH IRSI*,(R0)« R4 . It • 4.R4 • ' . I R S I NO0FI3 RS R4.« FINISH I F E N D O F IHE S I R I N G T H E N S T O P IT IS PUT 10 A POStIION IRON 4 TH BYTE OF THC STRING : i r IT HAS MORC THAN 8 BYTES THC BEST IS {IRUNCAIIO : i r IT HAS MORE THAN 10 BYTES THE LITTERS {AFTER '.' ARE ASSUMEO 10 BE BLANK GET IHI I Y P I OF F i l l : N O O F T ] : MOV • 3.R4 I N C R S {SKIP THC •.' MUV • S I R I N G * 11 .RO {IHI 3 BVTIS AFTER '.' ARC MOVED TO THC STRING 31 C M P B •1O0 .IRS) {IF END OF THE STRING B I O F I N I S H THEN STOP MOVB IRSI*,|ROI* : SOB B4 .3t : T O R N HAS B E E N ADJUSIID. CALL IRADSO TO CHANGE IT 10 RADSO F I N I S H : NOV SAVE.RS {CALL IRAOSO TO PACK 13 BYTES TO B BTTIS MUV 41 P S 1 OUtAO MOV • L I S T I . H S {OF RAOSO J S R PC.IRAOSO NOV ( S P I * . R O {RESTORE RO.R4 MOV ISP|*.R4 R I S P C {RETURN {DATA MHO: S A V I : . B L K W 1 {THC LINK OF THE PARAMETER LIST STRING BLKW c : 1 3 BYTI BUFFER U S I 1: WOOD 3 {CALL IRAOSO WOBO ICNI {ADOR. OF * OF BYTES WORD SIRING {AOOR. OF INPUT STRING OUT AO BLKW 1 : * O O R . OF OUIPUt RADSO STRING (8 BYIESI I C N I : WORD 13 {13 BYTES B L A N K : . B Y T E 40.40 OK . A S C I 1 / O K / S » : A S C I 1 / S Y / [ V I M :(ND Or SII8B0UIINI FNAME SUBROurINC IICMO VERSION I.I I -HAD-fJI THC FUNCTION OF THIS SU8R0UIINE IS TO CCHO * BINARY NUMBER IN ASCII FORM IMC RANGf I S FROM -9999 TO 9 9 9 9 . THC PRINICR MILL SIOP RIGHI AFICf l IMC LAST O IOI IAL B V I E . THC PARAMETER LIST PASSIO TO THIS SUBROUTINC IS : • L I ST : WORO 1 : I 4 : .BLKW 1 :TMC BINARY NUMBER 10 B f CCHOIO • .T1TLC CCHO 14 .CLOBL CHAR AC . 1 ECHO NCALL PR INI IICMO: MOV R O . - I S P I :SAVC RO MOV BLANK.CHAR4 ;PUT 9 BLANK BYTES TO A SIRING BUf fCR 'CHAR4' MOV BLANK.CHAR4*> NOVO BLANK.CHAR4A4 MOV 3 I R S I . I 4 :CONVCRT 14 10 ASCII O I G I I A l BVIES MOV • L I S T I . R 9 • JSR PC.CHARAC .PRINT ACHAR4 ;PRIMT THC ASCI I DIGITAL SIRING MOV I S P | » . R O ;RESTORE RO R IS PC • :OATA F ICLO : i l S T I : .WORO I ;CALL CHARAC TO CONVERT BINARY 10 ASCII 14: .BIKW 1 ;IHC BINARY OIG I I .WORO CHAR4*I ; ADORE SS OF IHE DIGITAL PART OF THE SIRING BLANK: ASCI I / / :> BLANK BYTES CHAR4: B IKB 9 :< BYTES: 1ST BYTE IS A SIGN -BYIE 200 LAST BYTE IS 200 .EVEN END OF SUBROUTINE IECHO END 01C RS ASL RS ; R 5 NOW • O F F S E T OF » S P I A O _ N TO »SPTAO_l ; AOO S A V E . R S -SUQffOUTINC INTO Vtf tSION 1.1 1 -MAR - 8 I AOO •14 .05 : R S * * S P T A O N • MOV I O S I . B S ; R S NOW P O I N T S TO THE S P E C T STATUS T A B L E MOV R S . S P I A D N : S P I A D N PO IN IS TO IHE S P E C T S T A T U S T A B L E . I I M i r l l n i l #K l u l l • UMIIIMII 11 Ml IS TO SHOW AND MOOIFY THI I N F O R M A I I O N I A B I E ; in» rimiiwi v AMD I H E S P E C T R U M STATUS TABLE THE I N F O R M A I I O N 1 A B L E C O N I A I N S SOME :SHOW I N F O B M A I ON I A B L E : R E C O R O S ABOUT HOW THE S P E C T R U M WAS O B T A I N I O IHC S P E C I B U M S IAIUS tABLE C O N I A I N S TMt C U R R E N T tneour AND D I S P L A Y status or tut spcctout-i OUTPUT: MOV •MSG!.7. DUESAD ;ASK: 'WANT TO S E E T H E I N F O R M A T I O N T A B L E 7' MOV • I I S I 2 . R 5 • T H E r M M m L IST PASSED T O THIS S U B R O U T I N E I S : J S B PC.QUERY I S I B ANSWCR ; I F 'NO* • L I ST : .WORD 1 0 . CALL A OATA M A N I P U L A T I N G S U B R O U T I N E B IO S IA IUS I H C N CO SEE I F SHOW STATUS :SAVE: .BLKM 1 A O O B C S S OF PARAMC ICR L I S T TO C A L L ' D I S P L A ' E L S E SHOW I N F O R M A T I O N T A B L E • ( JUS t U S C O FOR F U R I H C R M O O I F I CA t ION) MOV • I M F O T , R 3 ; R 3 P O I N T S TO T H E T A B L E TO BE P R I N T E D •YCUR: .MOAO 4 0 O 9 . I C O O R D I N A I E OF THC CIIBSOR MOV S P I A O N . R S ; V C U R : .MORO 0 Y C O O R D I N A T E OF THE CUBSOR MOV I 7 I B S I . B 4 - R 4 - A O O R C S S OF I N F O R N A I I O N T A B L E - F A C T O R : .woao O S C A L E F A C I O R U S E D FOR D I S P L A Y SUM OF SCANS MOV »7 .R2 :OUlPUT T P A R A M E T E R S ; M O O C : .BLKM I THC D I S P L A Y MOOC : S P T A O I : . B I K W 1 AODRCSS OF S P C C I B U M S T A T U S T A B L E OF S P C C T I i t : AOO • 22 . , R 3 ; R 3 P O I N T S TO T H E P O S I T I O N OF THE ASCII » ; S P T A D 2 : . B L K W 1 A O O B E S S OF S P C C I B U M S I A I U S IARIC OF S P C C I 1 MOV I 0 4 M . I B J I * :MOVE I N T H E ASC I I NUMBER ; S P I A 0 3 : BIKW 1 A O O B C S S OF S P C C I B U M S T A T U S TABIC OF S P IC I 3 MOV I R 4 I » . | B 3 > 4 : S P I A O * : . B I R M • A O O B C S S OF S P C C I B U M S I A I U S T A B L E OF S P I C K Aim • 1 . B 3 ; A D V A N C E 2 BYTES F O R <I3><IS> : S I R A D I : . B L K M I ADOBESS OF S T A C K 1 U S E D TO S I O B E THC S P C C I B A ADD 42.04 ' .ADVANCE 2 B Y T E S F O R COMMA AND B L A N K son R 7 . I t . T ITLE I N F O R M A T I O N OE A S P E C T R U M P R I N I • H O I N G t ;PBINT H E A D I N G AND I N F O R M A I I O N T A B L E . O L 0 8 L INFO .QUERY . E a IRAC . B I N A R Y . I E C H O .MCALL . P R I N T . C H I N MOV I 2 I R S I . R 4 ;R4 P O I N T S TO I N F O R M A T I O N T A B L E AGAIN INFO: MOW RS.SAVE ;SAVE THE L I N K AOO • 6 2 . . 0 4 ; 0 4 P O I N I S T O IHf O E S C R I P I I O N F I C L O AOO • 1 2 . R S ; R S NOW P O I N I S 10 M O O C C l RB 64 (041 : S I O P P R I N T I N G HERE MOV RS . M O O A O :HOOAO • ADORE S S OF MODE . PP INT •>*JING2 - P R I N T 1 ' O E S C R I P I I O N ' ) P O I N T B4 • P R I N I O E S C R I P I I O N F I E L O . tuny tut rmtfM C T A T I M nal m u i i v . : M O O I F Y IHE I N F O R M A T I O N TABLE : C U B R E N I : ;OUTPUT S P E C T * ' S OF C U R R E N I L T D I S P L A Y E D S P F C T .PRINT AYtSCI. • M O O I F Y : MOV • L I S I 2 . R S ; A S K : 'WANT TO C H A N G E T H E O E S C R I P T I O N T ' MOV A O N C . R S ;RS P O I N T S TO A T A B L E C O N T A I N I M O SOME NUMBERS MOV • M S G J . O U t S A O MOV • I . R 3 ; R 3 U S E O . T O T E S T IF S P E C I H I S IN JSR PC out BY MOV « 4 . R 3 ; L 0 O P A T I N E S I S I B ANSWER : I F ' NO ' CUBIM: B I I B R3.PMODAD ;|F B I T N ' O . SPECT N NOT I N BIO I t T H E M ASK IF C H A N C E P A R A M E T E R S B C O N O U N P R I N T » M S G 3 E L S E P R I N T 1 ' 0 1 0 L I N E : ' I P B I M T RS PB IN I R4 P R I N I 0 10 L I N E M O T I N : AOO • 4 . R S ; ( 4 BYTES FOR EACH NUMBER I G I L I N 04 . » M S G 4 ; P R I N T I ' N E W L I N E : ~ ' | I H E N INPUT Nf WL INC ASL AS SOB R3 .CURIN : C H A N G E P A R A M E I C R S IN I N F O R M A T I O N TABLE: . P B I M T RS :PRINT A L I N E F E E D AND R E T U R N IS : MOV •MSGS. OIIF SAO ;ASK: 'WANT TO C H A N G E P A R A M E T E R S 2 ' : INPUT S P C C I B U M N U M B E R » MOV • I I S I 2 . R S JSR P C . O U C R V I N P U T 1: MOV A L I S T I . R S ;INPUT S P E C T * I S I B ANSWCR ; I F 'NO ' MOV f N S G I . S I R G A D BIO S I A I U S ; T H E N SEE IF WANT TO SEE S T A T U S MOV • 7 . L I S T ! E L S E CHANGE P A R A M E T E R S AS ABOVE MOV •ARGUI.AROADI ;ARCUI • S P I C I * 10 RE INPUI POINI A M S G 3 ; J S R P C .CaTRAC sun • 6 3 . . B 4 : R 4 P O I N I S B A C K TO B E G I N N I N G OF I N F O I A B L E MOVB 67 ( B 4 | . B U r r t B ; S I O O I T H I S B V I E I I M P O B A B V MOVB ARCUt . R S Cl OB 62 IR4 I ; S I O P P R I N I I N G H E R E B I C B • I T T T 6 0 . R S B S - N IN BINABv PO INT P 4 G I L I N R4 .»NSG# ; C l t A NEW LINE MOVB B U F F C B . t . 2 . I R 4 > {RESTORE IHE ORIGINAL BTtE •SHOW THE S T A T U S Of THC S P E C T R U M : STATUS: NOV •MSG* .O U T SAO •.ASK: -WANT TO CHECK THE STATUS TABIET ' NOV • L I S T 2 . R 9 JSB PC.OUERV TSIB ANSWER j i r •»£$• BNE I t T H E N O U T P U T THE S T A I U S I A B L E JMP OTHER ELSE GOIO SEE IF ANOTHER SPECT REQUIRE i t : NOV SPTADN.R4 ; R 4 POINTS ID STATUS T A B L E NOV • B U T F t R . R ] ;R3 IS A BUFFER TO STORE IHE PARAMfIERS IN IHE RIGHT ORDER NOV S A V E . R J NOV 7 4 I B 7 I . B 3 1. R J • ADDRESS OF THE STACK 1 SUB 3 0 I R 4 I . B 2 N C O R2 t R J • POSITION OF THE SPECT N IN SIACKI NOV B 2 . I R 3 I * ; 1 . LOCATION IN STACK NOV J J I R 4 I . |B3»« ; > . START P O I N I * IN MEM NOV I O I R 4 ) . | R 3 l » : 3 . S121(WOODS 1 NOV • 4 0 9 9 . . 1 f l ] 1 SUB 3 I B 4 I . I B 3 I * ;4 S T A R T P O I N t * IN O S C I l NOV 4 ( 0 4 ) . I B J I * ; » . • OF POINIS NOV • 4 R 4 I . I R 3 I * ; • . STEP 'S ITE NOV I 4 I B 4 ) . | R 3 I * ; T SCALE FACTOR NOV 1 C I R 4 I . I R 3 I * : B . SEPERAI|ON_FROM_BASELINE NOV •3 R J ;PR|NI 3 MEMORY STATUS WORDS F IRSI NOV • B U I F E R . R 3 ;R3 POINTS 10 IHE PARAMfICR L I S I PRINT •MOING3 ; PB IN I THE HEADING MOV • $ l « l I . R O ;RO POINTS TO THE STATUS ITEMS IO B l PBINI NOV • L I S T 4 . R 3 NOV • 3 . R I £SECONDLY. PRINT D lSPLAT STAIUS I t : P B I N I R O ; P R INI HEADING NOV 1 •»] ( • . 14 {PBINI THC PARAMfIIR NOV • L I S T 4 . R 9 J S B PC. IECHO • M » 4 « . , R O ;MOVt T O NEAT HEADING SOB 12.11 • o * R S . B f {PRINT 9 DISPLAY STATUS BOROS PRINT •HDING4 {PRINT H E AO ING MOV • S T A I 3 . R O SOB B I . 3 S : .PRINT •BLANK ; 1 0 WIPE O U T IKE SECOND PBINI OF HDING4 : CHANGE STATUS: NOV •NSGT.OUESAO ;ASK: 'WANT TO CHANGE S I A I U S ? ' NOV • L I S I J . B S J S R PC.OUIRT I S I B ANSWER ; IF ANSWER Is NO BCQ OIHtR THIN S i t IT OIHtR SPICIBUN I S BFOUIOFII INPUT 3 MOV •MSGB.STRGAO ; ELSE INPUT N l W PABAMI 11BS MOV • A B G U I . A R G A D I ;ABGUI NOW IS THE START POINT* ON OISPLAT MOV *ABGUJ.ABGAD3 ; A B G U J IS « OT POINTS TO BI DISPLAVEO MOV •ABGUI . A B U A 0 3 i ARGU3 MOW I S THE S U P S l / E MOV * 4 . 1 I S M ;IMIRE ARE 4 - I O PARAMfTERS MOV * L I S I I . R 5 J S R PC . I XTRAC :CONV!RT TO BINARY: NOV *ARGADI.R4 {RA POINTS T O A TABLE 0 1 THE AOORESSIS OF THE PARAMETERS MOV (BUFFER .R3 :R3 POINTS TO A B U F F E R F I E L O FOR BINARY • MOV * ] . B J ;IHERE 3 PABAMETERS MOV * L I S T 3 . R 9 I S . MOV I R 4 | « . A S C I A O ; ASCI AO • A O O R E S S O F THC ASCI I DIGITAL STRING J S B PC.BINARY MOV B I H U M . I B 3 I * :CONVIRT AND STORE THC BINARY TO BUFFCR SUB R 2 . l t ;STORC '0 IHE SPECTBUM SIATUS TABLE: MOV SPIAON.B4 : R 4 POINTS T O T H C SPECTBUN S T A T U S TABLE MOV - I B 1 I . 6 I B 4 ) ; S l l ' . i l I I MOV ( 0 1 1 . 4 1 8 4 1 ; * o l POINTS T O BE OISPLAYEO MUV * 4 U 9 S . . 2 1 0 4 ! S U B - I B 3 I . 2 I B 4 I {POSITION d f l*T POINT ON OSC l l L I SCOPE MOV I O 3 I . 0 3 j R J • ADOB. DF *HIS POINT R t l A I I V I TO POINI O SUB 32 (94 I .R3 i H ] • AOOB. Of THIS POINI RELATIVE TO START PO lN t IN IHE MEMORY B f l l 3 t i l l P O S I T I V E . THEN CONTINUE PRINT *MSG9 I ELSE PRINT 'POINT OUT OF RANGE' BR O IH fR SET NO DIFFERENCE 3 t : A S L 03 i l H I S OFFSET I S I N BYT tS NOW O I V G I B 4 I . R 2 1*2 IS THE ACTUAL OFFSET IN MEMORY ADD 2 0 I B 4 I . B 3 J B 3 I S THE ACTUAL ADOBE SS OF I HE POINT I N M E N MOV A 3 . ( 0 4 ) ; IH I S ADDRESS I S CALLEO S P E C I . N IN TABLE ;CHANGE SCALE: C H S C A L NOV (NSG9 I . O M l l t D ;ASK: 'CHANCE SCALE? ' MOV • L I S I 3 . R 9 J S R PC .OUERT istfl A N S W I B ; | F ' N O ' B I O O I I I I B T H E N GO S C C IF B A N T TO C H E C K O T H E R S P E C1R A MOV * ? , L I S T I E L S E I N P U T NEW S C A L E V A L U E MOV A M S G 9 . 2 . S I R G A O MOV * A B G U I . A B G A O I { A B G U I NOW I S T H E S C A L E F A C T O R MOV • L I S I I . B S J S B P C . t > I B A C MUV 4ARGUI .ASCIAO {CONVERT IT TO BINARY C M P B • ' - . A B G U I ; I F F IRST BYTE IS NOI ' - ' BNf I t THEN JUS I CONVERT IT INC ASCIAO ELSE HOVE POINI IR TO THE D IG I IAL PABI I t MUV » I I S I 3 . B S J ' . O P C . B INABY MOV B I N U M . I 4 I R 4 I :STORE THE NEW S C A l l CHICK O l l l t f l SPICTRUM. O I H I B MOV »MSGIO.OUISAD : ASK * WAN! 10 CHICK ANOIHIB S P t C I B U M T ' 146 8 888 a. a u v* w o $ •ar 5 = 8 I S . t - «# u s S e » j? a — «rt • <• l « — • ; g a — ikw / I cv » -2 12 v* Z »»* 8 «P <*. i »— a. a u v* M O 5 = 8 |p iw « * •] r. • o s u o •> z » •» m I a> — . v x ; i ? Z * r» Z M. — £ 5 12 a « s i » » 1 ft f", I .si •wS < o *. « o z i -88 8<i V •» a. -i * ft. 888 mi * a. -J . V< B -do. •- «• 0 I V* VI z < * w W J...5 C O - i o • £ -tJ tV < - 2 w v - o r« & *• V N . "V " A A A , rT IP aft I :82 » -I a V M V l VI V * ft, IW V v> z o 5 — > Z £ V V V A A A A i I N I N n m •/* fa U •» f» -J Z -> w U -.5S ffi WV • 1 o « a iw a — • u « 3 ml ml o a a >• V" V 8 S 8 -o -ctrvift « o «v O z - -> - r» s B — 5 I I >. •» o » I) > • » Z « U -I t N H " a -» * r 5 -v a w w Q w o — v r ~ o a J A * ! */> a z ** W a- * f bar I w w I I O •> cr — u o ^ o a in MM •> z -2 « z f> 2 OU-i - O •» M* V K U I o o •Jo. «*««««•« So -82 c — -i2 ..IS « c a • Z o m -z S " tn a 3 - 5 1 m <* — S z ~ $ S2 • » 3 « . . > S a • > i » e > t t n V I m 1 • S i - B -5 Z J ii 82 h W tar * O n t> -»"-•» o ». -V I • * • { •nu « a a • > f) V I a o 5 -8 5 § 5 o 3 HA — S a. Z a a f . :§i o a M l 1 • o sir. M O at VI w S VI •J m -JOB Hi U HI 4 p a a a a fi K a K s 6 ^ ^ W ml a B B B a o « « « 3S3 mw iw • c s o o 8 3 S z - | | -I 8 Itf > a a z ) w > i a a «. •-**-» v> •> VI o c 6 C ( S:3 « — z • • •Si md - a a l U M « ( A a l v <• a •/» u 2 if u X 8 » aa* a* .-1 i I I ! 8 S tt r* m C •-e ...g.i NSQIJ' .ASCII /COMMAND 'INfO- MNISMCD. BACK 10 'Ol StHA-• . / IVtN •IND Or SUBBOUTINC INTO .(NO S E S S I O N i.« l-MAR-Rt FUNCTION OF THIS SUBROUTINE I S 1 0 . UPON A 0*1* MANIPULATION RCOUtSI 1 MR OUCH * KEYBOARO INTERRUPT. S*VE THE CURRENT 0*1* BANK, IHFN INPUT * COMMAND AND INTEBPRET IT . THE CONTROL THEN MILL PASS 10 A SUITABLE OATA MANI-PULATING SUBROUTINE TO PERFORM THE REOUtREO JOB. THE CURRENT OATA BANK IS SAVED IN TWO BACK UP F I LES ON SYSTEM DISK AL-TERNATIVE L T l ST BKUPI . RCO AND SN :BKUP7 BCDI . HENCE THE DA IA BEFORE IHE LAST DATA NANIPULATIMa COMMAND TOOK PLACE CAN BC RELOAOEO. IHE RCLOAO PROCESS I S DONE BV A 0A1A MANIPULATING COMMAND •RCLOAO' T O ADO • NEK OATA MANIPULATING SUBROUTINE. ONE SHOULO: I . DEVELOP! AND TEST THE NEW SUBROUTINE 1. ADO THE NAME OF THE SUBROUTINE TO THE GL08LE L IST OF THIS SUBROUTINE 3 . PUI THE FIRST TWO LET I EPS OF IHIS NANE 10 IHE COMMAND I A B H ICMOI8L I 4 . PUI THE NAME OF THE SUBROUTINE TO THE SUBROUTINE L I S I I S U B L S T I IN IHE SANE POSITION CORRESPONDED TO THAT IN THE COMMAND IABLE 5 . PUT THE DOCUMENTATION OF THIS SUBROUTINE IN IHE SUBROUTINE 'HELP ' INC PARAMETER L I S T PASSIO TO THIS SUBROUTINE I S : L I S T : .WORD •0 . ;CALL KVINHO S A V I : .BLKW • ;AOORESS OF PARAMfIEA L I S I 10 CALL O ISPLA ' ; f JUST USED FOR FURTHER MODIFICATION! •CUR: .WORD 40DS. : » COOAOINAIf OF IHE CURSOR •CUR: . WORO 0 ; • COORDIN*IE Of IHE CURSOR FACTOR: . WORO 0 ;SCALE FACTOR USEO FOR OISPLAT SUN OF SCANS MOOE : .BLKW • ; IMI D lSPLAT MODI S P I A D I : .BLKW • ;AOORESS OF SPECIRUN SIAIUS IABLE OF SPECI 1 SPTA03: .BLKW 1 {AOORESS OF SPECIRUN SIAIUS IABLE Of S P f C I l SPTAOJ: .BLKW • {AOORESS OF SPECIRUN SIAIUS IABLE Of S P I C I 3 SPTAD4: .BLKW • {ADDRESS OF SPECTRUM STATUS TABLE Of S P I C K S I KAD I : .BLKW • {ADDRESS OF SIACKI USEO 10 SIORC IHI SPICIRA .T ITLE KEYBOARD INTERRUPT HANDLER .GLOBL OUT.KYINHO.EITRAC . GLOSL BACK. ADOSUB. CLEAR. CHANGE. INFO .GLOBL LEVEL.SEPERA.PLOT.SMOOTH.HELP .GLOBL SHOW.SUM.STORE.WRITE.SCALE . MCALL PB IN I { A l l SUBROUTINES FOR DAIA {MANIPULATION KVINHD: MOV MOV I t : SOB MOV MOV MOV MOV MOV B9.SAVE ATTTTT.BS R S . I t P O . - I S P I R I . - I S P I B l . - I S P I R 3 . - I S P I B 4 . - I S P I ISAVE THE LINK {SET A DELAY TO OUTPUT ALL OUTPUT BUFFER {SAVE RO .R I . R7 . R3 . B4 :BACKUP THE CURRENT DATA F IELD BEFORE CHANGING IT BY SIORCD I I IN OISK BACKUP: INPUT : MOVB NOV JSR I S I B BEO NOV JSB * 1.f LAG ' L I S I 1 . R S PC .S IORE F I AG CMD A L I S I 7 . B S PC .C l TRAC {FLAG • 1 FOR SAVE. -O FOR RELOAO {IF AFTER RELOAD, THEN GO OUT I L S I JUST CONTINUE 10 GET INPUT COMMAND •INPUT COMMAND NOV CMP BNE CLBB BR ABGUI.RO RE LOAD,RO IN I I BP FLAG BACKUP ; B O - I S I TWO CHAR OF THE COMMAND {IF •HIS IS NOT A RELOAD INSIBUCTION THEN GO TO INTERPRET THC COMMAND 1 CISC SET • FLAG AND CALL SIORC TO GET OATA BACK {INICRPRCT IHE COMMAND: INIEPP NOV MOV ' CMDTBL .B I ' S U B I S I . B 3 {RI POINTS TO COMMAND TABLE ;R7 POINTS TO SUBROUTINE ADOR.TABLE CMPB BN l C I B ' 7O0 .RO l» RO {IF NO INPUT THEN SET IT TO IERO I t CMP B l 0 AIIO BR R O . I R I l « CAL SUB • 1.R3 I t {SEARCH THE COMMAND AND GO TO CALL THE :CORRESPONDING SUBROUTINE CALSUB: NOV SAV I . BS JSR P C . P I R 7 I {CALL CORRESPONDING SUBROUTINE IND: NOV ' 1 7 7 7 7 . R S I t SUB RS . I t {SET A DELAY 10 OUTPUT ALL OUtPUt BUFFER NOV I S P | » . R 4 {RESTORE R 4 . a i . R 3 . R I . R O MOV I S P I ' . H J MOV I S P | « . R 7 MOV ( S P I o . R I NOV I S P I ' . B O R I S PC OUMMY PRINT *HSG7 {ARGUI IS AT THE END Of THE COMMAND IABLE . {ITS CORRESPONDING SUBROUTINE IS DUMMY. {IT PR IN tS ' INVAL ID COMMAND' RETURN: PRINT •MSG3 {NO INPUT OR JUST 'RETURN' R IS PC DATA F I C L D : I 1ST I : WOBO 3 {CALL STORE TO STORE THE OATA F I I L O SAVI . BIKW 1 {AOORESS POINIS BACK 10 PARA L I S I OF CALLING •KTINHD" AND OTHER OATA MANIPULATING SUBR. FLAG: B IKB 1 {A FLAG • • FOR SAVE. • 0 FOR RELOAD I V I N I I SI 7 WORD {CALL f M R A C 10 GEI (HE COMMAND ISUBRXMTIM u v t i VERSION i.i I-NAR-SI :TMC rUNCTION Of THIS SUBROUTINE IS TO TAKE OUt SON* SP1KIS IN It SPICTBIIM a SPIKI is D i r i N t D as a p o i n t WHIBI twr o i r r t R t N C f WIIH IMI RIOII ONI aNO IHt D I T f l B t N C I WITH tHt H I T POINI 8 0 IH EKCI tOS tMf S P I C I f l t D c a i t i a i a . I t H t PARAMCTIR LIST PASSID TO THIS SUB a ou TINT IS: :LIST: .WOBO 10. • C a l l * 04TA MANIPULATING SUBROUTINf : S a v f : .BLKW 1 laooRtss o r p » o » « t ? r p u s t t o CALL OISPLA' ; I ( j u s t usio TOR r u a i M f o N o o i r i c A i i o N t ;«CUR: . WUBO 40BS. :« COOROINAII 0 1 IHt CURSOR ;VCUB: .WOPO 0 •v c o o R o i N A t t o r IHT CURSOR : f a c t M : .WOPO 0 'SCALE TACIOR UStO TOR OISPLAT SUN 01 SCANS :«O0 t : .BLKW 1 [THE OISPLAT HOOf ; SP t a01 .BLKW 1 :AooRtss or S P t c t a u N STATUS I A B H or S P t c t i j S P tAOJ .BLKW 1 ;AOO0ISS or SPECIRUN S tA tUS IABLE Or S P f C t l :SPTADJ .BLKW I ;AODR|SS 01 SPtCtRIIM SIAIUS I A B H Or S P I C U :SPt»o« .BLKW 1 :AOORISS or S P i c t R u N status IABLI or SPICIA I S T K A D I .BLKW 1 {ADORISS 01 STACK 1 USIO TO StOBt THt SPICIBA .• .*•>•< . n u t U V t l OUT THf S U M S .GLOBL IATRAC.BINARY. ItCMO.OUtflY.ltVIl .NCaLL .PRINT I f V I I : NOV a s .save tSAVI THt LINK * aoo •I4.RS NOW RS.TABLSP ITABLSP POINTS TO A TABLI 01 ADORISSCS 01 1 TM| SPICTRUN STATUS T A B U S INPUT: NOV •LISTI.BS ! INPUT START POINT*. • Or POINT. L i f t •JSB PC.C(TRACT : R I G H T D i r r t R i N c t . SPECT* ! NOV •aacaoi . a a :CONVERT ABOUT, J . J . 4 TO BINARY NOV •START , R J NOV 4 4 . R I iSTDRI «S S T A R T . N P O I N T . I t M . R I G H t I t : NOV •R4i«.«sciao ' ASCIAO • THI ADORESS ASCII O IGI IAL STRINO NOV • L I S T J . R S JSB PC.BINARY 1 NOV BINUH .IR3I* :8INUN • THE RITURNEO BINARY NUMBER SOB R J . l t •ova •Rous.as 1 8 I C •ITT7C0.RS |*S • SPICT* IN BINARY DIC BS asL RS :RS • orrsET IRON *SPTAO N TO *SPIAO • aoo Taaisp . a s ;RS • AOORESS Or IHE POINIIR t o S tA tUS IABLE NOV I R S I . R 4 :R4 POINIS 10 I H t SPECIRUN SIAIUS IABLI NOV J O I R 4 I . B 3 :B3 • HE AO AOORESS Or S P E C I N NOV START.R*l sua J J I R 4 I . R I ; R | • poiNt • o r N - r n t N t * nr ISI P o i n t IN WIN B r . i PR I Nt CLB Jt •MSG1 I Bl : i r P O S H I Vt tHEN CONT INUI ELSE PBINI 'POINI OUt 01 RANGE' AND CLEAR OtrrtBIHCE Jt L PHI AO: Cl B A S l OIV Alio Mfiv MUV sun MOV I S t nr.t N I c. CMP B l I BO B I •1 IB4I .RO 70IR4I.BO N P O I N I . B J ( B O l » . B l I B O I . R I B I . R I B I Jt B I B i . t t r t LPINO ;R I NOW I N BYTES :R0 • R I / STEP S U E ;R0 • ACTUAL ADORE SS 01 START POINT : B I " l t r T POINf -CUBRCNI POINT •B t -ABS ICUBR fH t P O I N T - H I T POINT I : i r R K L E M CBIIERIUN THEN NO OPERA H O N J t 4 t MOV sun sun ISI nr.f NI c CMP BL T I S t nr.t Nl c sun sun n i t I B O I . R I J I B O I . R I B l . B l B l Jt Bl R I .RIGHT LPINO RJ 4t RJ i t r t . R j R I G M I . R J LPINO •ELSE :R J»UE r t _POINT•CURRENT P O I N T ) . I C U B B I N I . P O I N I - R I G H f ' P O I N f I :R I -ABSICUBBtNT POINT-RIGHT PO IN I I ; IT R I l R I G H t CRITERION THEN NO OPERATION : ELSE ! R J - A B S I l I r T_POINT• RIGHT_POINT - JCURRINf I : B } - B J - l l f r T CR1TIRION*RIGMT CR IT IR ION l ; l l N IGAf I V t ' t H I N JUS f A SLOPE, MOT A SPIKE MOV AllO A SB SOB - J I R O l . l R O I J I B O I . I R O l I BO I B3.IPHEAD ELSE CURRENT POINT • l l t r T _ P O I N I « R I G M T _ P O I N T ) / J ;UNTIL SEARCH OVER NPOINTS :JOB r I N I SHED: r I N I S H : PRINT *N$GJ R t S PC :PBINT 'CO :BfTURN RAND ' L E V E L ' F IN ISHED ' :DAfA l l f l O SAVI : BLKW I ;L INK 01 THE PAR AME TER L IST tABLSP BIKW 1 :TA8LSP POINTS TO A T A B U Of THE POINTERS TO THC SPECTRUM S tA tUS IABLE H S I I WOBO « :CALL EXTRACT TO GET S INPUT PARAMfI fOS W(IU|> MSr. I APGAO1 : WORO • DGUI AOI'.AIl) . wnun ARr. i i j » U ( . « | ) 1 WIIRO ARl'.ll) ARr.AOA WIIRO » o r j | 4 150 8 r ? s z s s I i - z »9 w 55 I! i ! l i i i i «-» i i s ' a l l l l l I s I mm* a s u s £ i ii Hi "Si I I I i l l l l l l l l i l i l i g i l I iii i i ! I m At. i i I illlllliillll.li j | 1 r rs 22 = ! iilliiliiiilihl! i j I l i l t f l i i i i i l i f i f i y _ i 2 I I I SUBROUTINE SUM VERSION I . I t -MAR-RI FUNCTION Or THIS SUB BOUT IME IS TO SUN UP SOME SPICIB* HAVING IHE SAME OAIA FOBMAT IN A OAT A EIEIO. TH|S IS USEFUL 10 SUM UP A MUIIIPIE SCANNIO BE SUIT THAT THOSE INDIVIDUAL SCANS ABE SIOBEO IN A OUMP E ILE ONE BT ONE. THE SUM IS SIOBEO IN ME MOST AS SPECTRUM I Ml TH THE PROPER INFORMAIION TABLE AND STATUS TABLE. I THE PREVIOUS SPECTRAL DATA IN MEMORY MILL BE DESTROYED AND THE USER IS VARNEO BEEORE THE OPERATION. THC PARAMETER LIST PASSEO TO THIS SUBROUTINE IS: ILIST: .MORO 10. (CALL A OATA MANIPULATING SUBROUTINE :SAVE: .BLKM • ;AOOBESS OF PARAMEICR LIST 10 CALL 'OISPLA' IJUST USEO FOR FUBIHIB MODIFICATION) :«CUR: .MORO 40B9. III COOBOINAIE OF THE CURSOR •YCUR: .MOBO O ;V COOBOINAIE Or IHE CURSOR : FACTOR .MORO 0 ;SCALE FACIOR USEO FOR DISPLAY SUM OF SCANS ;MOOE: .BLKM I ;IHE DISPLAY MODE -SPTADI .BLKM • 'AOOBESS OF SPECIRUM STATUS TABLE OF SPICI1 :SPIAD2 BLKM 1 ;AOOBESS OF SPICIBUN SIAIUS IABLE OF SPIC12 ;SPTADI .BLKM • •AOOBESS OF SPECIBUM SIAIUS IABLE OF SPICI] -SPTAD4 .BLKM I ;AOOBESS OF SPECIRUM SIAIUS IABLE OF SPECI* -STKAOI .BLKM 1 ;ADORESS OF STACK 1 USED TO SIOBE IHE SPICTBA TITLE SUM SPECTRA IN A OATA FILE .MCALL .PRINT GLOBL QUERY.FNAME.DISK.BINARY.EllflAC.SUM SUM: MOV RS.SAVERS MOV •LISII.R9 jlCT USER KNOW SIACK1 DATA MILL BE OESfROVED JSR PC.OUERY TSTB 1 ;IF USER MANTS TO SAVE OAIA GO BACK 10 SYSIEH BIO AROUND : JMP ABORT AROUND: MOV RIISTJ.R9 -GET USER INPUT ON WHAT IS TO B I SUMMED PRINT AQUIR -ASM FOR INPUT PARAMETERS JSR PC.EIIRAC -USING EXIRAC MOV 'LIS13.R9 JSR PC.FNAME :CONVERT FILENAME ENTERED BY USER TO RADSO MOV SAVE RS.R9 :FORMA1 MOV #1, 1*1 IRS) I SHOW MOOE AS 01 SPL AV IMG ONLY SPECIRUM 1 MOV l«IR9).R4 ;STORE ADORESS OF SIAIUS IABLE OF SPECI 1 IN R4 MOV 12(04).OADOA CLR OSTART MOV •LISI4.R9 MOV • C 4 .OSIIE (FEICM BLOCK 0 OF FILE CLRB OSIATU :SlOCK 0 CONIAINS INIOBMATION BI.OCK C* WOBOS JSR PC.OISK -LONG • STORE IN INFO BLOCK OF SPICI BUM 1 ISIB DSIAIU BGE CEIINF JMP ABORt GET INF : MOV 12(04) .R3 MOV AT.RI BYIJOO: MUV 03.BI ;INSERT BYTE JOO IN APPROPRIATE LOCATIONS I t CMPB |R]|>.*040 ;IN FIRST SEVEN ENTRIES IN INFORMAIION BE 0 at (BLOCK |.C. Al FIRSI BLANK OR COMMA I SO CMPB 1 at).*OS4 :CNIRIES ARE FORMATTED CORRECTLY FOR BNE It (SUBROUTINE BINARY BR 9t Bt: DEC R2 9t: MOVB •200.IR3) ;ASCII CHARACTER *.' • 094 AOO A6.R3 (ASCII BLANK • 040 SOB RI.BVI2O0 MOV 171R4).IENTRV (FETCH AOOBESS OF INF OB MAT ION BLOCK MOV «lISTS .R] MOV R3.RS (FIRST ENTRY IN INFORMATION BLOCK IS ND OF • J S R PC.BINARY •SPECTRA IN EILE - CONVERT TO BINARY AND MOV BIN.NSPECT ;SIOBE IN MSPECT AOO •6.IENTRV ;SECOND ENTRY IN INFORMATION BLOCK IS SIZE MOV R3.RS :0r EACH SPECTRUM IN BLOCKS J S R PC.BINARY :CONVERT TO BINARY AND SIOBE IN SIZEBl MOV BIN.RS MOV RS.SIZEBL ASH •a..as :R9 • SIZE IN WOODS MUV RS.IOIR4I (STORE TO SIZE,WO OE STATUS TABLE ADD 'IB .IENTRV ;FIFIH ENTRY IN INFORMATION BLOCK IS START MOV R3.RS (POINT OF SPECTRA - CONVERT TO BINARY AND J S R PC.BINARY (SIORE IN SPECTRUM STATUS TABLE IN STARII MOV BIN.22IR4) AOO »6.)ENTRY -SIXTH ENTRY IN INFORMATION BLOCK IS MO. MOV R3.RS :0F POINTS IN SPECTRIN* - CONVERT TO BINARY J S R PC.BINARY (AND SIORE IN SPECIRUM STATUS TABLE IN NPI1 MOV BIN.4IR4I AOO •6.IENTRV :SEVENTH ENTRY IN INFO BLOCK IS STEP SIZE MUV R3.RS 'CONVERT 10 BINARY AMD SIORE IN SPECTRUM J S R PC.BINARY ;STATUS TABLE IN STEP 1 MOV BIN.61041 MOV MOV REP200: CMPB BNI MIIVB A t SOB I2IR4).R3 • 6 4 . . 0 ? I03)«.*200 A t »040.-IR3I R2.REP2O0 SEARCH THROUGH FIRST SEVEN ENTRIES IN INFORMAIION BLOCK AND REPLACE ALL BYTE 300'S WITH BLANKS I ASCI I OAO • BLANK I 12(041.03 SUBROUTINE STORE: VEOSION 1.1 1-SAR-8I ruNcriON or THIS SUBROUTINE is ?o SAVC OR RELOAD THE O»I» r m o INCIUOINC IHE SPECIRUN S T * I U S TABLES. THC INFORATION T A B U S . AND THC STACK TOR IHC SPCCIRUM OATA STORACC. BV DOING A SAVI BCIORC CACH OAIA NAN I PUt A l l MG OATA CAN BE RECOVERED EVEN AFTER A WRONG COMMAND. 'REIOAO' IS PUT AS A SPECIAL DATA MANIPULATING. COMMAND TO RCLOAO I HE PREVIOUS SET OF OATA. THE PARAMETER LIST PASSEO TO THIS SUBROUTINE IS.-; L I S T : .WORO 2 (CALL STORE ; TBADOB: .BLKW 1 ;ADORESS OF THE LIST OF CALLING 'HVINHD' ; ;THC TTH ENTRY IS AOORESS OF SIAIUS TABLE 1 ; FLAG: .BLKB 1 ;FLAC • 1 FOR SAVE. • 0 FOR RELOAD . T I T L E SIORC DATA TO DISK OR BACK_IO DATA_IIILD .GLOBL STOBITDISK" * NCALL PRINT STORE: MOVB 4IRSI.DSTATU ;OSTAIU • FLAG I FOR W R I t t , O FOR READ NOVB DSTATU.FLAB 1STORE IT AS FLAG FOR LAtCR USE MOV K R S I . R 4 ; « 4 • AOORESS OF L I S I Or CALLING 'MYINHD' NOV IAIR4I.R4 ;R4 • AOORESS OF SPECTRUM STATUS TABLE 1 MOV R4.0A0OR ; I H I S IS IHE HEAD OF IHC OAIA FICLO MOV - 3 I R 4 I . D S I I C ;PRECEDING THAI IS THE SITE OF IHC OATA F I E L O 10: NOV • L I S T I . R S ; C A L l DISK TO 0 0 THE 10 OPERATION JSB PC.OISK RESULT: TSTO OSIAIU ; I F SAVE OPERATION IS SUCCESSFUL BGT F I N I S H I THEN GO OUT BEO RELDOK I CLSC IF RELOAD OPERATION IS SUCCESSFUL | THEN GO TO PRINT 'RCLOAO OK' NCGB SWITCH I CLSC DO NOT CHANGE IHI FILENAME TSTB FLAG | PRINI ERROR FOR SAVE OR RELO BCO ERRELD PRIN1 •MSGI ;PRINT ' S AV I FAILED ' BR F I N I S H IRRCLD: POINI »MSG7 ;PRINT 'RELOAD FAILED ' RE LOOK: PBINI AMSC3 ;POINT 'COMMAND 'RELOAD' FINISHED ' NCGB SWIICH ;N0 SWITCH IN CASE OF RELOAD F I N I S H : NCGB SWITCH ;SWITCH TO ANOTHER FILE FOR MEAT SAVE OR RELD : I F ERROR OCCUR. IH fN NO CFFECI tl NIGI MOVB SWITCH.RS ADO AFMADR1*1.RS NOV IRSI.FMADDR ;FNAOOR • ADDRESS OF FNAME FDR NE 1T DPI RAMON B I S PC ;RE TURN :OATA F I E L O : LIST 1. .WOBO S ;CALL DISK TO TRANSFER DAIA 10 OR FROM DISK r NAOOR: WOBO FNAME1 ; AOORESS OF FILENAME If NAHM IS INI! VALUE 1 O S I A B I : OADDB: OSWE : O S I A I U : .WOBO O .BLKW I .BLKW I BLKB I . E V E N ;SIABT fROM BLOCK O OF IHIS F I LE ;WHCRt IS THE OATA IN MEMORY ;HOV MANY DATA TO BE TRANSFERRED U N WOROSI i S I A I U S 1 • WRITE. O • BEAO UPON RITURNED. NEGATIVE IF IBROR OCCURRED fMAORI: FNA0R1: FNAMEI: FNAME 1: . WORO . WOBO .RADSO .RADSO FNANE I FNANE1 /SY BKUPI RCO/ /SY BKUPI RCO/ {ADDRESS OF F H F N E M f 1 :AOORESS OF FILENAME ] ;1W0 F I L E S ARE USEO ALTERNATIVELY TO SAVE I OR RELOAD DATA A SAVE WILL PRECEOE A REIOAO SO ALWAYS REIOAO THE OATA BEFORE IHC LAST COMMAND FLAG: SWITCH: BLKB BYTE ;FLAQ • I FOR SAVC *0 FOB RCLOAO :USI IT TO SWITCH BETWEEN F I L E I A NO F I LES ; I N I T . AS - I SO THAT N f I T F I LE IS F I L E ] NSGI : NSG3: ASCI I / IHE SYSICN IRIEO TO SAVE THC OATA FOR BACKUP PURPOSE. / ASCI I /BUI FAILED /<I J>«I9> ASCI I /CHICK THt OISK DRIVE . /«11»<I5> ASC I I / ABE IHE I WO BACKUP F I L I S BKUPI.BCO AND BKUPI .BCD IN SYSTEM / ASCI I /D ISK T / t l ? > < I S > . A S C I I /TRY USI COMMAND 'WO|TI' TO BACKUP THC DATA . / ASC I I /THI SYSTIM TAILED TO RCLOAO THC DATA . /« !»>« IS» ASC I I /CHECK THE OISK ORI Vt . / « I *>< I3> ASCI I / IRY USE COMMAND 'WRITE ' TO BACKUP THE PRESENT OATA . /« IJ>« IS» . ASC I I / I H f N GO BACK TO R l - l l AND CHECH IHC BACKUP F I L E S BKUPI .BCD / A S C I I /AMD 8KUP2 R C O . / /COMMAND 'RELOAD' FINISHCO. GO BACK TO D I S P L A Y . / CIB - I R I I iC IEAR THE H O l l soa RO. I t UPOAIE IHE S IA IUS IABLES O F IHE GOOD BUT AFFECTED SPECIRA: : O E L E T E IHt S P I C I B * Of THC LOSt O A U : UPOAIE: MOV NEVNUM.B3 :UPOA I E THE STATUS TABLES O F THE MOVED SPECTRA 01 l i t I : I S I S NOEL : MOV A A . B O BCO UPDAIC ( I F NO OELE IE . CO 10 UPOAII I H l S IAIUS TABLE SUB BS.RO :RO • 0 O F COVED SPECTRUM MOVB N D C l . R O •BO"»OF SPECTRA TO BC OILCIEO BIO F I N I S H ; I F 0 N O SUUEE2E MOVB • lO .MOOOC l :MOOOCL USED 10 DCICIC SPEC 1 FROM 01 SPLAT ASL BS 1 OELEIE FROM SPECIRUM 4 AND IHCN UP AOO I AB I SP . R 9 ;R5 • 4SPTAD N « l MOV SP?AOO.at ; R S • S IA IUS TABIC OF BO H O N SP IC I IN NEW CASE A M OIF FEB iO IFFER • S IZE DIFFERENCE I N BYTES MOV I 0 I R S I . R 4 :R4 • SIZE O F BOTTOM SPICI UPOLOP: MOV I B M . P A ;R4 • STATUS IABLE O F SPECT FOLLOW • S L B4 ;R4 • IN BVICS AOO DIF F E B . | B 4 1 :UPOA IE S IABTING POINT AOOBESS AOO j o t R S I . B 4 ;R4 o AOOBCSS O F BOIIOM OF BOTTOM SPICTN AOO D I F F E R . 3 0 I R 4 ) ;UPOATE HE AO O F SPECT •OO R3 .R4 ;R4 • HCAO AOOR OF A I L OCLEIEO SP IC IB* son RO.UPOLOP MOV I A B I S P . R I M H C S IA IUS TABLE O F IHE NEW SPECTRUM I S UPOAIEO B T THC CALLING ROUTINE 1 • 0 0 A M O . R I ;RI - J • ADDRESS O F P IR T O STATUS IABLE 4 JOB F IN ISHED: DI IOOP: MOV - I R I 1 . R J (DELETE SPECTRA BT VARYING SPECT S IAIUS IABIE MOV R 4 . I R 3 I * :S IARI POINI"HCAO F I N I S H MOV |SP>».R0 ;RESTORE R O . B I . B 3 . B 3 . R 4 MOV 4409S . I R 3 l * ; 1ST POINI 10 IHE LEFTMOST O F OSCILLOSCOPE MOV ( S P I » . R I MOV A H . I R 3 I * (ONLY 1 POINI TO B E OISPLATIO MOV I S P | » . R Z C I B I RZ I * (SIEP S I Z E - 0 MOV | S P | « . R 3 C I B I R I I * (SIZE O F SPICI'O MOV 1 S P I * .R4 MOV I R J I . R S ; R S POINTS 10 IHE INFORMATION TABLE RIS PC : R ETURN MOV « S 4 . , R J 'CLEAR THC INC OB AM H O N IABLE I t : eta | BS I« ERROR: MOVB ( I . PERRAD (RETURN W I I N AN E R R O R C O O E SOB R 3 . I t BR F I N I S H MOV R 4 . t ( R 3 | 'HEAO-BOTTON O F THE NEW BOITON SP IC I C I B I O I 0 1 I • i S I AR IN • O B I C B M O O O I l . A M O O A O ;00 NOT DISPLAY THIS SPECIRA •SB MOOOCl : OATA F I E LD : SOB RO. Oil O O P : U N t l l OCLITEO ALL UNNECCESSARV SPECIRA • NlVNUM: BIKW I : SPECIRUM » O F THE COM I N O SPECIRUM BR UPDATC ( G O T O UPOATf T H E S IA IUS TABLES OF GOOD ONES MOOAO: .BLKW I ; ADORE SS O F THE MODE NIWSIZ: BLKW I ;SIZE O F THE COMING SPECTRUM I N WOROS C D t mrhmM • BLKW | • I A f f i l e Va\Ml BT nt ftaBBT Ca>aT*rTDlaBB T l\ QK B t B I Air'aTf. J » 1 • 1l/» I • O i l II' 'rVwi »fr i . v I P"liR"11 • U H t K t F l I I I U ;IMC W W S I Z t I S L E S S I M A M I H E O L D S I Z E : I AB I SP : BLKW I ; IABLE O F ADOBE S S I S O F SPECIRUM SIAIUS IABLES SIK A O I : .BLKW 1 ;ADORESS O F S IACKI S U l l : • S I as (R3 - N E W _S IZE -010_S IZE INEGA11 V I . I N B Y I E S I IKRAU BLKW 1 ;AOOBCSS O F IHE ERROR T O BE BETURNCO ; SPIAOS: BLKW 1 :SPCCIBUM S IA IUS IABLE O F THE BOIIOM SPECT MOV SPIAON.RS :CALCULAIE * O F POINIS TO B E MOVED DOWN A I I I R RE ARRANGE MEN! MOV S I K * O t . R ] ; O I I F E R : . BLKW 1 ;DIFF BEIWEEN IHE SIZE O F NEW AND OLO SPECIRA sua aotR S I . R J : - R l • STRAOI - H I AON ASR R2 ; -R2 • A O F POINIS IRON SPECT1 10 SPECI N- I NOEL : BLKB 1 :NUMBER O F SPECTRA T O B E OELETEO DUE T O THE sua I 0 I R S I . R 1 (-R2 • 4 O F POINIS FROM SP IC I 1 10 SPECIN INCOMING SPECIRUM I S T O O LARGE ADO • B I 9 3 .R3 ;RJ • • O F POINIS BELOW SPCCIN MODOEL : . B IK f l 1 ; • MASK 10 OELEIE SPECTRA FROM BEING OISPLAVED ; • 4 O F POINIS 10 BE MOVCO UP MOV I 0 I R S I . R 4 ;R4 • O L O SIZE O F THE COMING SPECTRUM • SL R4 ;R4 • I N BYTES 1 I S I 1 : WORO 3 : C A l l OUERY AOO 101 R S I . R 4 :R4«HEA0 N«1 10101 OUt SAO: WOBU MSGI -PRINI MSG! AOO R4 .R3 (R3-HEA0~N* 1 INEWl . NEW I S I N FRONt O F OLD ANSWER: BLKB I ;RETURN ANSWER ;MOVE SPEC IRUM N O 10 SPECTRUM 4 U P : MSGI ASC I I / • » » MORE THAN R K WORDS O F DRTA. SOME AT THE END WILL B E / UP: MOV I R 4 M . I R 3 I * ASCI 1 /LOSI / < I J > < U > SOB R2 .UP (MOVE U P THE O A I A ASCI 1 /BUN T H A T RISK? / C I R 3 : MOV 0 IEEER .R4 B Y 1E ZOO NIG R4 • t . CIR I R 3 I * ;CLEAR THE I A I K I H I OUPLICAIE PARI 01 SPICI4I MSG2- ASCIZ / • * • INPUI SIZE 100 LARGE AND ABORIED / SOB R4 . I t I V I N INO OF SUBBOUtlNE SOUEEZ INO .......... f sua IOIBS) .B3 :R3-NfW S I Z t - 0 1 0 S I Z I NOV B 3 . D I F F I R : O I F F I R " . NfW S I Z f - OLD S I Z I BGI SIZGI : G 0 TO S I Z f _ G R t A l f R IHAN~IF NtW S I Z I IS GRIAIR : SU8R0U t lN t SOUICZ WEBSION 1.1 l-KAR-St B l T S I 7 L I :G0 TO S I Z t ' l I S S THAN IF NtW S IZ I IS SNAILIR .. ..... JMP F I N I S H ;SIOP IF SIZIS ARC IHC SAME I NO SQUEEZE 1 •FUNCTION or THIS SUBROUTINC IS TO SOUCIZI OUT A HOIC IN THI S IACKI WHtRI A l l :NEW SIZE IS GREAICR THAN THC OLD SIZcl SPECfRA ARE STOREO. IN ORDER 10 STOBE AN INCOMING NEW SPICIRUM IF IHC SIZGT: MOV IABLSP . R 4 :R4 POINTS TO ADOR OF PTRS OF STATUS TABLES INCOMING SPECTRUM IS SPtCIBUM N . THIN SPICTRUM N o 1 TO SPECIBUM 4 W i l l MOV A4.R2 {CALCULATE TOTAL S I Z I OF 4 SPECTRA : oc AFFICTCD. ic INC SIZE 01 IHt NIW ONE IS LABGEB THAN IHt 010 ONI . THIN THt SPECTRA BEHIND D I L I BI MOVED DOWN 10 IHC BOIIOM OF IHE S IACKI :S f f IF THE S I Z I OF IHE STACK 1 IS ENOUGH FOB IHC NEM CONF 1 CUBA 1 ION: BV IHI DIFFERENCE OF THE TWO S I Z E S . OIHIBWISE IHtV W i l l BE NOVtO UP. I I INOU NOV I R 4 | » . R I OR RIMA INEO UNCHANGED. II IHI TWO S I Z I S ABE IHE SAME. AOO IOIRI 1 .B3 :R3*ACCUMULATE0 SIZE OF SPECTRA i r IHt TOTAL S U E OF THE SPECT BA AFTER BROUGHT IN THE NEW ONE EXCEIOS THI SIZE 01 THC STACK 1. SOMt 0 *1* 01 THt CNO SPICIRA M i l l BE 10SI . A CMP • II197 . B3 ;IF STACK 1 CAN ACCOMODATE THESE OUIRT MILL BC ISSUED 10 ASK THE USER'S OECISION BEFORE IHE OPERAIION BGF CHOUGH ;THIN GET MORE SPECTRA MOV • L IST 1 .RS ; JSR PC.outBY ; ASK : 'MORE THAN 32 BLOCKS Or OAIA.SOME THC PARAMETER L IST PASSED TO THIS SUBROUTINE IS: iOATA AT THE END MILL BE LOST. O K I ' I S I B ANSVIR : i r ' Y E S -L I S T : WORO • ; C A l l SQUEEZ BNf C O N I I N THEN CONTINUC NIWNUN: BIKW I ;IHE SPICIRUM « OF THE INCOMING SPECIRUM JMP IBBOB ELSE Rf IUBN MITH AN ERROR FLAG MOOAO: .WORO MDOt ;ADDRESS OF MOOE N f w S I Z : .BIKW 1 ; S I 7 l OF THE NEW SPECTRUM ENOUGH: SOB R 7 . IFENDU IABLSP : .WORO SPT4D1 ;TABLE OF AOOBESSES OF SPECIBUM S IA IUS TABLES S I KAO I : .BLKW 1 :ADOBESS OF S IACKI CONT IN : NOV - I B 4 I . SPTADB :SPTAOB • SPECT STATUS TABLE OF BOIIOM SPECT ERROR: .BLKB I ' ;ERROR FLAG . SET IF ERROR OCCURRED MOVB R 2 . NO I I ;MOI l • m OF SPECI TO BE D I L I T I D CMP SPIAON.SPTAOO III SPTAON<«SPTAOa . l ine SQUEEZE A HOLI FOR A M W SRICTRUN .GLOBL SOUIIZ .QUIRV BLE 2 t ; THIN CONTINUI M C A U .PRINT : IH t S IACK I CANNOI EVEN ACCOMDAtE SPECIRUN 1 TO SPECTRUM N : SOUCCt: NOV B 4 . - I S P I ;SAVt R 4 . R I . R 2 . R I . R O PB IN I •MSG7 ; ELSE PRINTI • INPUT TOO LARGE AND ABOR1E0* I MOV R J . - I S P I BR IBBOB REIURN MITH AN ERROR FLAG MOV R 2 . - I S P I MOV R I . - I S P I ;IHE S IACKI CAN ACCOMDAtE A t LEAST SPECTRUM I TO SPECTRUM N MOV R O . - I S P I • AMD IHE LOST OF DAIA IS OK ; C l t PARAHEIERS: :CAICULAIE THE B f l O C A t ON PARANITIRS: *oo »3 .BS ;RS POINTS TO THC FIRST PARAMETER J t : MOV O I I F t R R3 ; R 3 -N tM S I Z I - OlO S I Z I IN WORDS MOV | R S I * . M W N U N ;NCWNUN • SPECTRUM NUMBtR OF IHC NfW ONt ASL B3 :R3»NORE SPACC M I O I O IN B Y I I S MOV (RSI*.MOOAO :M0OA0 • AOOBESS OF MODI MOV <RSI« .N IMSI f ;NtWSIZ • SIZE OF THt NfW SPECTRUM MOV SIKAOI RI MOV ( R S I . . T A B L S P • IABISP • TABLE Or ADORlSSfS OF SPTAD N AOO #l« 3 8 4 . B l MOV ( R S I * . S I K A O I i S I KAO l • AOORESS OF S IACKI MOV R I . R O i f l l . T H I BOTION OF STACK 1 MOV RS .CBBAD : ERR AO • ADDRESS OF THt ERROR OUtPUt SUB R3.RO :RO«POINT TO B l MOVtO 10 BOTTOM : R f l O C A t l O N : NOV SPIAON RS :CALCULATI « OF POINTS 10 BI MOVID DOWN : MOV SIKAOI R7 ; C l t SPECTRUM STATUS T » B L I : SUB 2 0 1 R S I . R3 • -R3 • SIKAOI • HtADN RELOCA: NOV NfWNUM .RS :CALCULAt f SPIAON A SB R2 ; - B 2 • » OF POINIS FROM SPICT1 TO S P t C I N - l DEC RS ; lADDR. OF SP tC I STATUS TABIC OF NtW ONI 1 SUB I 0 I B 3 I . R7 : - B 3 • # OF POINIS FROM SPECI1 TO S P I C I N A S I RS AOO «R 197 . R2 ;R2 • » OF POINTS BftOW S P f C I N ADO IA81SP . R S ;RS • f SP IADN SUB D i r r c R . R7 ;R2 • » OF POINIS 10 BE MOVID DOWN MOV I RS I . R S ;R9 • SPIAON MOV RS .SPIAON MOVl DOWN SPECIBUM N . I 10 SPICTRUM 4 : OUWN: MOV - 1 BO 1. -• R U .MOVf DOWN SPECI N H . S P I C t N«3 . . .COMPARE THI NEV S i l l AND 010 S I Z E : SOB B3 OOWN MOV NCWSIZ .RJ CLBI MUV D U 11 B. RO on SUBROUTINE SMOOTH VERSION 1.1 I - N A R - « I rUNCIION PERFORM A 3-POINI SMOOTH FOR a SEGMENT or SPICIBUM ON IHI OISPLAY SNOOtHCOPOININ • POINTN / » • IPOINI_N»l • P O I N t N - l l / 4 TWO P4.a4Nttr.Bs to ac INPUT: I. SPCCIBUM MUMBCB: NO OCFAULT I . NUMBte or IIMCS to at SMOOTHCO: DEFAULT • i •THC PARAMCTCR L I S T PASSCD TO THIS SUBROUT IMC IS: :LIST- MOBO 10. •CALL A DATA MANIPULATING SUB BOUT INf :save: .BLKW • ;AOOBCSS O l PARAMCICR L I S I IO CALL ' O I S P L A ' IJUSI usco COR ruB iMCB MooirICAIIONI !«CUR: .MOBO 4O09. 1< COOBOINATC Of IHC CUBSOB : »CUB: .WOBO 0 •V COOBOINATC OF I H | CUBSOB FACIOR .WOBO O ;SCALC fAClOB USCO fOB DISPLAY SUM Of SCANS :M00C : BIKW 1 ;IMf OISPLAY MOOC : S P I 4 0 I .BIKW 1 :ADORCSS or SPICIBUM STATUS TABIC or S P I C K .SPIAOJ . AlKW 1 :Aooacss or SPICIBUM STATUS IABLC o r S P I C I I :SPIAOJ BIKW 1 -AOOBCSS Or SPCCIBUM SIAIUS t A B l l o r S P I C I ] :SPIAOA BIKW » > :Aooacss or SPICIBUM STATUS IABLC or SPICIA :S1M*OI .BLKM I :ADOBISS or SIACKI USCD to SIOBC IHI SPCCIRA t l T l t SMOOTH A SPCCIBUM .GL08L SMOOT M7CXTBAC.BINABV NCALL .PRINT SMOOTH: 400 #14.BS MOV RS.IABLSP iTABLSP POINTS TO AOORfSSrS or POINICR 10 I IHC SCPCIRUM SIAIUS IABLCS : INPUT SPICIBUM NUMB IB AMD NUN BCR Of IIMCS TO BC SNOOIHtO: INPUT: MOV 4LISTI.R9 ICALL CXTBAC TO C f t SPCCIBUM NUMBCB JSB PC.CKIRAC ; AND • Of TIMES 10 Bt SMOOTHCO • CMPB fJOO.ARGUI ; i r ABGUI IS OCf AULTCO BCO INPUT THIN CO BACK 10 INPUI BICAUSC NO DEFAULT | ELSE CONIINUE CMPB '700.4RCUI 1 IP ARGUJ IS NOT OEFAULTEO BMC NOOEFT | THEN CONTINUE MOV AI.RO ELSE SET K TIMES TO 1 BB CCISP AND GOTO CC 1 SPECIRUM A NOOEFT: MOV 'LIS17.RS 'CALL BINARY 10 CONVERI 4 OF IIMES 10 BINARY JSR PC.BINARY MOV BINUM.RO ;RO • K TIMES 10 BE SNOOIHEO :INIERPREI THC SPCCIBUM MUM8CR AND GET INFORMAIION FROM IIS SIAIUS IABLE: C U S P MOVB ARCUI.RS ;R9 • SPICIA IN ASCII BIC AITTTSO.R3 ;BS • S P I C I * IN RINAP" D C C RS ASL HS ;RS • OFFSET FROM SPTAO N TO SPTAO 1 AIIO I A B I S P . R S :RS POINTS 10 POINICR Of STATUS TABLE N MOV I R S I . R S ;B9 NOW - AOOBCSS OF STATUS IABLE ;PERfORM IHE SMOOIH: OPCRAt: MOV I R S I . R 4 ;R4 • AOORC SS OF 1ST POINT ON DISPLAY MOV 4 I R S I . R 3 :R3 • 4 OF POINTS ON DISPLAY SUB * I . R ] ;NOT SMOOTH THE 1ST AND LAST POINTS ADO A2 .R4 ; SK IP THE 1ST POINT MOV I R 4 I . R I ;R3 IS A WORKING PAO I t : MOV - 3 ( 6 4 1 . R l ;RI • VALUE OF LEFT AOJACENT POINT MOV R J . - J I R 4 I :R1 • THE SMOOTHCO VALUC Of THC LAST OPER. MOV | B 4 | > . B ] :R3 NOW - VALUE OF CURRENT POINT ALIO I R 4 I . R I ;RI • SUM OF LEF I AND R ICH ! ADJACENI POINTS A SB R l -TAKE HALF OF THIS AUO R I . R 7 :A00 THIS TO THC PAO CONTAINS CURRENT POINT ASP R? ;SM0OTM_PT_N • ( P T _ N ) / J • |PT_N*I » P T _ N - l l / 4 SOB B 3 . I t MOV R 7 . - 31R41 ;STORE THC LAST SMOOTHED POINT SOB RO.OPCRAT : 00 THIS KTIMES :JOB DONE: F I N I S H : PRINT *MSG3 ;PRINT 'COMMAND F IN ISHED ' R1S PC (RETURN :OA!A E I E L D : TABLSP: BLKW (POINTS TO POINTERS TO STATUS TABLES L I S I I : ABGUI: ARGUJ: WOBO WOBO . WOBO . WOBO . BLKW BLKW 3 MSGI ABGUI ARGU2 :CALL EAIRAC TO GET INPUT :MCSSACE ADDRESS ;ADDRESS OF ARGUMENT :SPFCTRUM « ;NUMBER OF TIMES TO BC SMOOTHED L I S I J WOBO 2 :CALL BINARY TO CONVERT ASCI I DIGIT TO BINARY WOBO ARGU3 :AODRESS OF ASCI I DIGIT BINUM: BLKW I : IHC REIURN BINARY 4 MSGI: ASCI I /SMOOIH IMC SPECTRUM SEGMENT ON DISPLAY ./< 13>< IS> ASCI I / INPUT SPECIRUM « AND TIMES TO BE SMOOIHEO: /<JOO> MSG?: A S C I / /COMMAND 'SMOOIH' F IN ISHED . CO BACK 10 ' O I S P L A Y ' . / I VCN INO OF SURBOU1INC SMOOIH f NO O U t R I E : A S C I I / P L E A S E E N T E R S P E C T R U M . P I S . > O R < V C U R S O R I O R B Y T E o i a . O Y T E o t s . A S C I I / A M I N O . or P O I N T S ( - V I I N D I C A T E S - > D I R E C T I O N ! / S P E C T N : . A S C I I /»«/ G I L T : . A S C I I /«»»/ N P T S : . A S C I I / X X I X X I / . E V E N L I S B I N : . M O R O I : P A R A M E T E R L I S T T O R S U B R O U T I N E B I N A R Y A S C 1 A O : B L K W I I A O O R E S S 01 T H E D I G I T A L A S C I I S I R I N G N S M O V : . B L K W 1 ; I H E R E T U R N E O B I N A R Y N U M B E R TSTBIT : .BLKW 1 jTEST B l l SEARCHES THROUGH MODE TOR SPECIRA SNUN: . BLKW 1 ISPECTRUN NUMBER BEING SHOWN MSG) : . A S C I I /•MW CURSOR AT NEGATIVE « AK l S - SEARCH F A I L U R E . / t V E N MAXPT: .BLKM 1 :MAII1 MUM POINT TO BE SEARCHED MINPT: .BLKM 1 ;MININUM POINT TO BE StARCHtO MINAOR: .BLKW 1 ;AOORESS 01 MINIMUM POINI LECHO: .WOBO 1 {PARAMETER L I S I TOR IECHO IA .BLKW 1 SAVERS: .BLKW 1 HEADER: .BYTE 013 .BYTE O IS . A S C I I /POINT VALUE/ CARRET: .BYTE O40 :CARRIAGE RETURN .BYTE o o o MSG4: . ASC I I /SPECTRUM / .BYTE 200 BLANK: .ASCI I / / .BY IE 300 MSGS: . A S C I I / • « • CURSOR OUT OF RANGE/ MSGC: . A S C I I / • * • NININUM POINT OUT OF RANGE/ MSGT: . A S C I I / • M M Mi I atMUM POINT OUT Or RANGE/ ABMt SS : . A S C I I /•»*» SHOW COMMAND ABORTEO. BACK 10 OISPIAY / OHMESS: A S C I I /SHOW COMMAND COMPLE ISO, BACK TO D ISPLAY . / .EVEN ;END Or SUBROUTINE SHOW .END on n e t i t POINT •MSGS {PRINT ' CUSS 03 OUT Of RANGE' CIR RI I t : CIR RJ OIV l|R4|.RJ AOO JOIR4I.RI COMPUTE FIBST IMINPTI AND LAST (HAIPT) PTS. TO BE SHOWN - .ISO COMPUtE {ADDRESS Of NINPT I TST NSHOW BPl AROUND NOV Rt.NAlPT NOV NSHOW.RI INC Rt NUL «|RA|.RI AOO MAIPt.Rt NOV Rt.MINPT ADO NSHOW.RJ ADO NSMOV.RT NOV RI.NINAOR NIG NSMOV BR CHCKPT ABOUND: NOV • 1 .NINPT NOV 1 NSMOV.RI OIC RI NUl CIR4I.RI AOO NINPT.RI NOV RI.NAXPT NOV RJ.MINAOR I :ir NSMDM -VE CURSOR IS IAST Pt {EACH PT. I t 1 BYTES i l l NSMDM IS AVE THEN CURSOR IS Most POINI CNP NINPT.32(R4| {CHICK II NINPT IS OUT OF RANG! OF SPtCtRUN BGI It PRINT •MSGS {NINPT IS OUT 01 RANGI - TILL USIR NOV JJIR4I.NINPT {AND SET NINPT TO A VALUE THAT MILL WORK NOV NSHOM.BI BPl It {IF NINPT IS OUT 01 RANGE I t HSS THAN NIG RI {FIRST SPECTRUM POINI LIKILT NAIPT IS ALSO NUl •IRAI.BI {HSS THAN FIOSI SPtCtRUN POINI ADO NINPT.RI •CHANGE IT AS WELL NOV RI.HAIPT NOV 101OJI.O) {CHECK IT MAXPT IS OUT Of RANGE OF SPECTRUM NUl CIR4I.R3 AOO 33IR4I.RJ NUL SIR4I.B) CNP RJ.NAKPT BGI at i TELL USER 'MA I I HUN POINI OUT OF RANGE' PRINT •MSOT NOV R3.MAXPT {CHANGE MAIPT TO ACCCPIABLI VALUE I t : NOV (tlRSI.R! {FETCH T CURSOR VALUE SUB 16(041.03 {SUB10AC! SEPARATION NOV OO.-ISPI PRINT »MSG4 N O V SNUN. 14 {PRINT 'SPECIRUN N' N O V • I f CIIO. RS d'jO PC.IICHO PRINT •Ht AO!0 {PRINT ' POINT VALUE' M O V 1SP1•.RO NOV MINADR.RI {COMPARE PT. VALUI WITH T CURSOR M O V (Oil-.OJ {FFTCH SPECTRUM VALUE SUB 161041.02 {SUBTRACT SEPARATION -ISIB G i l l {AOE WE LOOKING FOR PIS. > OR « T CURSOR BIO SHOW IT {GILT • O SHOW ALL POINTS RfOUISTID BNl LtSS {GILT 4 O SHOW POINTS HSS THAN » CURSOR VALUI CNP 01.OJ {GILT > O SHOW POINTS GRIATIR THAN V CURSOR BGI AGAIN {VALUE BR SHOWIT :RJ CONTAINS T CURSOR VALUE MINUS SEPARATION CNP 0 3 .RJ BIT AGAIN {CO TO AGAIN TO GET MfIf POINT SHOWIT: NOV MINPT.I4 {PRINT PT. NO. AND VALUE NOV •IfCMO.OS JSR PC.ItCHO {PRINT POINT NUMBER NOV RO. -ISPI PRINT •BLANK {PUT SPACING BETWIEN NUMBERS MOV RJ. 14 MOV •IICHO.BS JSR PC.IfCHO {PRINT POINT VALUE PRINT •CARRE I {PRINT CARRIAGE RITURN-tINffffO MOV •T7TT7.RO {DfLAV ALLOWS CHARACIfOS TO B l RINOVIO I t : SOB RO. It {OUTPUT BUffIR OF TIRNINAL MOV ISPI'.RO AGAIN: AOO 61R4 | .NINPT {Oil NEXT POINT CMP NIMPt.NAXPt B l l BACK * NOV SAVtRS.RS DO ME WANT TO LOOK FOR ANOTHER SPECIRUN I S I RO RO -0 THIN "SHOW- A l l SPtCIRA B M N G OlSPLAVfO BNf CNPLET OTHERWISE Mf HAVE SHOWN SPtCtRUN RtOUtSttO ASL I S t B I T {IHE RE FORE FINISHED INC SNUN J M P I I S I S P ABORT: POINT • A B M f S S PRINT ERROR MESSAGE BR o u t CNPLET PRINT •OK NESS PRINT 'COMMAND COMPLETED. ' OUt : RIS PC {RETURN :DAIA F I t l D : U S U I WOOII 4 CALL I IIRAC tO INPUT 3 P A R A M fIfR S WIIRII OUIRII ourOV ADDRfSS wnou S P I C I N Aonotss or SPICIRUM MIMBIR WIIRO G t l 1 •onotss or sfAocii c o i t r o i o N WIIRII N P I S ADORfSS or NUMntR or P O I N I S tn S U B R O U l I M C SHOW V I B S I O N I . I I - B A R - S I r U N C I I O N or T H I S S U B R O U I I N C I S T O P R I N I out A N U M B I B I S I I E C I I D B Y U S I R I or P O I N T S A O J A C E N I 1 0 a C U B S O B O I S P L A V E O l O G C I H f f l W I I H I H C S P C C I B U M 3 P A R A M E T E R S B B C B t O U t S I I O T P O M T H E U S E R : ( I ) S P E C T R U M N U M B E R - I E O E E M I t T . E N T E R E D N O . 0 1 P T S . R E 0 U I S 1 C O A R C P R I N I E O T O R E A C H S P E C I R U M « E I N G O I S P L A V E O . R E C A B D I E S S 0 1 C U B S O B V P O S I I I O N 131 S P E C I F Y M H E I K C B P O I N I S G R C A I C R I H A N ( C N I I H S Y M B O L > l O R I C S S I H A N I < I C U R S O R ' S * P O S I T I O N A R E 1 0 B E S H O W N - I E D f f A U t l . A l l P O I N I S A B C SHOWN I H C S E P A R A T I O N OT A S P E C T R U M f R O M B A S E L I N E I S S U B T R A C T E D I B O N B O I H C U R S O R A N O S P E C I R U M V A L U E B E T O R E C O M P A R I S O N . • E N I R V V A L I D O M I T I T S P E C I R U M N O . N O T D E E A U L T I 131 N O . O E P O I N T S TO B E C O M P ARC O - I E E N T R Y - V E . P O I N T S TO I H E L E T T 0 1 I H E C U R S O R ' S « P O S I I I O N A R E S E A R C H E D ; O T H E R W I S E . P O I N I S TO I H E R I G H I ARE S C A R C H E D . D E E A U L T : 1 9 P O I N T S T O T H E B I G H T f D E E A U L T IS I N D I C A T E D B T A B T T E 3 0 0 A S THE E I R S I B i l l O f I M E I N P U I I T H C P A R A M E T E R L I S T P A S S E D T O T H I S S U B R O U T I N E I S : • L I S T : : S A V E : • A C U A ) : - Y C U R : f A C I O R : M O D E . : S P T A O I : : S P I A 0 3 : : S P I A D 3 : - S P I A D 4 : : S I K A O I : . W O R O . WOBO B I K W . B L K W B L K W B l « W . B I K W B L K W • O . I 4 0 9 9 . O O I I I I I I :CALL A OAIA MANIPUIAIING SUBROUIINI (AOOBCSS Of PABAMIIIR I I S t 1 0 C A l l DISPIA' ; I JUSI USCO IOB fURIHIR MOO 1 1ICAIIONI ; I COORDINAIE O f IHf CUBSOB :» COORD I NA IE Of IHf CURSOR :SCALE fACIOR USIO fOR DISPLAY SUM Of SCANS •IMC OISPLAY MOOC 'ADOBESS Of SPCCIBUM SIAIUS IABLI Of SPICI I :AOOBCSS o r SPICIBUM SIAIUS IABLE or S P I C I J (ADDRESS Or SPICIBUM SIAIUS IABII Of S P I C I J :AOOBCSS o r SPICIBUM SIAIUS I A R H or S P I C K (AOORCSS o r SIACKI USCD 1 0 SIORE IHC SPICIRA . T I T L E SHOW V A L U E S O E SOME P O I N T S I N A S P E C T R U M . N C A l l . P R I N T . G L O B L E X I R A C . B I N A R Y . I E C H O . S H O W I N P U T S P E C T R U M N U M B E R . S E A R C H C R I T E R I A . A N D N U M B E R O f P O I N I S 1 0 B E S I A R C M f D : S H O W : M O V R S . S A V E R S ( S A V E THE L I N K M O V ' L I S I E A . R 9 ( C A L L E X I R A C 1 0 G E T I N P U I J S R P C . E X I R A C C M P B A 7 0 0 . S P C C I N ( C H E C K E O R D E T A U L I V A L U E B N E MYDEr C L R R O 1 I F S P E C T N O . O E F A U L I C O SHOW P O I N I S R I O U E S I E D C I R B G I L T ( O N A L L S P E C I R A B R P O I N T S N O O E F : M O V B S P C C I N . R O j C O M P U I C S P E C I R U M NO SI HI • S O . B O C M P B A 7 U O . G I L T ( A R E WE L O O K I N G F O R P T S . > OR < C U R S O R V A L U E B N I C H I C K ( I F B Y T E I S 3 0 0 I H E N A S S U M E D E F A U l l V A L U E C L R G T : C L B B G i l l : S H O W A L L P O I N I S B R P O I N I S C H E C K : C M P B ' G i l l . A O T 4 ( A S C I I O T A • < B N I G B I H A N M O V B • - 1 . G I L T R U P O I N I S G R I M A N M O V B 4 1 . G I L T ( A N Y O T H E R A S C I I C H A R . A S S U M E ' » ' E N T E R E D P O I N I S : C M P B A J O O . N P T S ( C O M P U I E N O . O F P O I N T S TO C H E C K B N I C N V C R I • M O V • I 5 . N S M 0 W ( D E F A U L T I S I S . B R N O I N C G C N V C R T : M O V r N P I S . A S C l A O ( I F N O T O E F A U L T C O N V E R T S T R I N G TO B I N A R Y C M P B M P I S . # 0 5 3 : C H E C K | E T I R S T C H A R A C T E R I S A S I G N 6 1 0 1 N C R ( • • A S C I I O S 3 C M M B N P I S . 4 0 5 9 ( - • A S C I I O S 9 B I O I N C H B B N O I I N C I N C H : I N C A S C I A D ( I F T H E R E I S A S I G N P O I N T T O C H A R A C T E R A F T E R N O ! I N C : M O V • I I S B I N . B S J S B P C . B I N A R Y C M P B N P I S . ' O S S 6 N C N O I N C G ( N S H O W - V E M E A N S S C A N P T S . 1 0 L E F T OF C U R S O R M O V S A V C P 5 . B S M O V B O . S N U M 1 S I B O ( I F R O 1 S P E C I R U M N O 1 N O I 7 C R 0 SHOW O N L Y I B N E G O S H O W ; S P E C ( R U M M O V • I . I S I B I I : R 0 • 0 M U S T L O O K F O R W H I C H S P E C I R A B E I N G M U V • I . S N U M • O I S P L A V E O ' n i l T S T B I I . I 3 I R S I • R O I A I E I H R O U G H MOOC L O O K I N G F O R A B I T S E T B N E G O S H O W A S L I S I B I I I N C S M I M C M P S N U M . A 4 B L C I f S I S P J M P C M P L E 1 M O V • J 0 9 5 . R l : C O M P U T E P O I N T 4 W H E R E C U R S O R I S L O C A T E D sua 4 I B 5 I . R I B G C G O O D P B I N I « M S G 3 ( I F - V E C O M P L A I N J M P A R O B I M U V R 5 . B 4 ; C I I A O O B C S S OF P A R A M I M R B L O C K F O R I H A I AIIO S N I I M . R 4 ; S P E C T R U M « I I U S N U M . B 4 M O V I 7 I B 4 I . R 4 M U V 7 7 I B 4 I . R 3 ; G C T V A L U E OF S T A R T _ N sun B 1 . R 3 N ( G B 3 : C O M P U I E A D D R E S S O F C U R S O R P I . A S L R 3 ARGUI: .BLKW 3 ;IHE ASCII OICITAL SIRING N: .BLKM 1 [SPEC!e OE THE SPECIRUM BEING CHICK10 MODTST: .BLKB 1 :A ONE-Bit BIT-TEST REFERENCE NSOI: ASCII .BYTE /THE SPECTRUM / 3 0 0 H S U : .ASCII .BYTE / IS POSITIONED AT / 2 0 0 MSGS: .•sen / ABOVE THE BASILINC./ • 5 0 4 : .ASCII .BYTE /PLEASE CNTEB M M VALUE: / 3 0 0 ttSOS: ASCII .EVEN /COMMAND 'SEPERA' EINISHEO GO BACK 10 'DISPLAY-. / •END OE SUBROUTINE SEPERA END tn INPUI : MOV • I I S I 7 . B 5 JSB P C . E K I B A C ;GET NtW VALUt ISUBROUTINC s t r ia* VIBSION * . « I-MAB-BI NOV •ABGUI.ASCIAO CMPB • ' - . A B G U I ; i r NEGATIVE BNf I t -,tunci ion or THIS SUB BOUT IMC I S TO CHANCE THC SEPABAI ION BETWEEN A SPECIRUN INC ASCIAO THEN SKIP THE SIGN BYTE • A NO THC BASE L INE . • i t CMPB • 7 0 0 .ABGUI : i r NO INPUT* B t O N E X t THEN DON"T CHANGE THIS SPECTRUM : THC paRANCTtR L I ST PASStO TO THIS SUBROUTINE I S : ; • MOV • L I S T 3 . R S {CONVERT VALUE TO BINARY . l i s t : . WOBO • 0 . CALL A DATA MANIPULATING SUBROUTINE JSR PC.BINABV : S a v f : .BLKM 1 AOOBESS Or PABANEIIB L I S I IO C A l l -OISPLA* ; (JUST USEO EOB ruRTMff l MOOITICATIONI :UPOATt THE STATUS TABLE AND MOVE THE SPECTRUM VERTICALLY TO NEW POSITION: :«cua: .WOBO 40BS. X COOBOINAIE or THt CUBSOB O P f B A t : NOV N t W V A l . t 6 | B 4 | : UPOAI t S f P f B N :»CU«: .WOBO 0 V COOBOINAIE Or THt CUBSOB SUB 14 N I W V A l : N t VVAl"NEWVAL-OLDVAL : r a c r o a .WOBO 0 scAit TACIOB usro roR oiSPLAT SUN or SCANS : : " o o t : .SIMM* I THt DISPLAY HOOt MOV 7 0 I B 4 I . B I :RI»POINTEH :SPTADI BIKW 1 ADDRtSS OF SP tC tRUN S tA tUS T A B l t 01 SPfCT1 MOV 10IB4I.B7 ; B 7 - » or POINTS IN THE WHOLE SPECTRUM {SPTAOT BIKW 1 AooBtss o r s P t c t B t M SIAIUS i A B Lt or S P f C I 7 NOV NtWVAL.R4 : R 4 » v t v T I C A l POSITION TO BE CHANGED :Sr»taoJ .BIKW 1 ADDBfSS Or SPtCIBUM SIAIUS TAB l t Of S P f C I I : S P I A D 4 .BIKW 1 AODBfSS Or SPtCIBUM SIAIUS 1 A B l f Of SPICIA i t AOO R 4 . IR 1 I* •HOVE THC SPCCT_N VERTICALLY ; S I K 4 0 I .BIKW 1 ADORfSS Of SIACKI UStO TO STOBf THt SPtCTRA SOB R7. I t * A»a\A» ; C H t C K THf Nt XT ONf : . f i n e SEPARATION SPECT AND B A S t l l N E Nt Kt : INC N .GLOBL SEPERA.EXTRAC.IECHO.BINARY ASLB MOOt St :CMfCK NEXT SPTCTRUN NCAL l .PRINT CNP N . » 4 {UNTIL N>4 N00 f - # I O WHEN N-4 BLE LOOP SEPEBA: AOO • 1 3 . R S MOW (RS I* .N O D E MODE • THC OISPIAY MTtOf :JOB O O N t : MOV R S . T A B I S P IABISP POINTS TO POINI tRS DE STATUS TAB l t S ; f INISH: PB IN I •NSGS {PRINT 'COMMAND 'SEPERA- M N I S H t O . ' {CHECK IC THC SPECTRIN IS BIINO DISPLAYED: B t S PC {BEIUBN MOVB »t.MOOTST ; MOV • I . N IOOI>: B ITB MOOtST.MDDE : I E SPECTN IS NOT BEING O l S P i a v E D BCO NEXT THEN CHECK NEXT ONf :DATA r i t i o CLSC OUtPUt 010 SEPIRATION. INPUT NtW ONf MOOt : BLKW 1 {THE OISPIAY NOOE {OUTPUT 010 SCPIBATION: OUTPUt: PRINT •MSG! :PRINT (-SPECTRUM '1 I A B I S P : BLKW 1 { IABISP POINTS TO THE POINTERS Of THC MOV N . l « SP tC tRUN STATUS TABLES MOV • L I S T I . R S JSB P C . IECHO -PRINT N . PRINT •MSCI ;PRINt I ' IS POSITIONED AT - | LIST I : WOP1 1 {CALL IECHO TO ECHO AN 14 NUMB I B ; 14. Blt-W 1 MOV N.W4 DEC R« A S I BA ; B * • Or rSET fROM »SPt»l> N 10 »SPIA0 1 1 I S t 3 : WOBO 7 { C a l l EITRAC TO INPUT THt NfW VALUt AOO • ABLSP.R4 ;R4 POINTS TO PO IN I f B IO SPECIBUM SIAIUS M B i t WOBO NSG4 MOV (R4I.R4 ;B4 POINTS TO THt SPECIRUN S IA IUS IABLE W0RI1 ABGUI MOV • C I R A I . I 4 iOUTPUT THE SEPERAIION MOV • L I S I I . R S JSR PC. IECHO PRINT SEP fB N 1 ISI3 WOBO 3 {CALL BINARY 10 CONVtRI ASCI I 10 BINABV : ASCIAO B l KW I PRINT •MSG3 PRINT 1'ABOVE IHE BASEL i N f . • Nl WVAL : BLKW 1 : INPUI NtW VALUE: ' TABLES: .BLKM Y [TEMP STORGE FOR T BINARY tOJMBERS RAMPST: aiKM 1 •STARTING POINT OF RAMP PTCTR: BLKM 1 •POINT COUNTER NSC AN: BLKM 1 ;NUMBER OF SCAN REOUIREO S I A R I : .BLKM I ;SIART POINT* NPOINT: .BLKW 1 ;NUMBER OF POINTS TO BE SCANNEO STER: .BLKW I :STEP SIZE S I Z E S * : BLKW 1 •SIZE OF MEMORY IN BYTES SIZEMO: .BIKW 1 •SIZE OF MEMORY I N WORDS F t AGO: .BYTE 0 :FLAO 0 I S USEO TO DETERMINE SOME CONDITIONS U A G I : .8Y1E O -FLAG 1 IS USEO TO COMMUNICATE W I I H D I S P I A ' .EVEN STRAOI: .BLKW 1 : ADDRESS OF STACK 1 HEA02: .BLKW 1 •HEAD OF SPECT2 INFOI : .BLKW I (AOOBESS OF INFO TABLE OF SPECI1 INF 0 2 : .BLKW 1 ;AOOBESS OF INFO TABLE OF SPECT2 INI RAD: .BLKW 1 ;AOOBESS OF KEY8OAR0 INIERRUPt HANDIER NSCN08: .WORD 0 ;NUMBER OF SCAN OBTAINIO I I S T I : .WORO 1 (CALL IECHO TO ECHO AN 14 NUMBER IA : .BLKW I L I S T J : .WORO i (CALL BINARY BINUM: .BLKW i -BINARY * .WORO CMARA CMAR4: .BLKW s -CHAR4 SHOULD HAVE ONIT 4 BVYES » <20 COMMA: . ASC I I /. / BLANK: . ASC I I / / MS GO: . ASC I I < I 2 X I 5 » < 2 O 0 > MSGI: •ASCII / * OF SCANS OBTAINED I S : /<200> MSGI : ASC I I /T»F>f IN DESCRIPTION: /«2O0> .EVEN (END OF SUBROUTINE SCAN .END NOV INT OJ .B4 ELSE 0 0 IHE SANE IHINGS 10 INIOJ JSR PC . O I S K •K1V • 1481 EC.RJ i EXCEPT ; . . . . NOV • I . I R J I : a SPECT • l {PRINT NC SSAC.C OF HOW MANY SCANS HAVE B t t N OBTAINED: NOV NSCNOB.«|Bl| i «"SCAN • NSCNoei* or SCANS OBIAINCOI PRINT •MSC 1 {PRINT:('• OF SCANS OBTAINED I S { ' iNca F L AGO SET flAO TO INOICAIE IT ' S SECOND IINF INC NSCNOB {NSCNOB: • OF SCANS OBTAINED BR IWICE ;CNO_OF_IF NOV NSCNOB.14 NOV •LISII.RS : OUt OU1 IMfOBNAT I O N B L O C K TO THE CXJNP EILE ON OISK: JSB PC .1 ECHO {PRINT NSCNOB PRINT •MSGO {PRINT ( L I N C F E E O/RETURNl TOOISK: N O V INTOI.R4 ; O U T P U T INTO TABLE 1 TO OISK aoo •CO. ,R4 {FIRST SO BYTES ARE PARAMfIERS {CHECK IF C O O U T OR CO TO G E T ANOTHER SCAN: NOV NSCO.IR4I* :NE«T > BYTES ARE LINE H C O AND RETURN NOV ISPI«.RS {RESTORE RS TO THE INTERRUPTED POINT C H I N R4 . ANSCI ;INPUT DESCRIPTION AS THE NEXT 64 BYTES NOVB •JOO.6S.IB4l {•100 A T IHE END CNP NSCAN.NSCNOB {IF ALL RtOUIRID S C A N S ABE OVER I B IO OUI THEN O U T NOV IABLE3.RS ; O U T P U T T O DISK { JSB P C .DISK TSIB FLAGI {TEST FLAG . I F S E T BY DISPLA' ; BNl OUI THEN OUT NOV INfOJ . R S :INITULIIE THE OC SCRIPT ION OF SPECIBUM } ELSE CONTINUE TO GET SCANS aoo •SO . R S ; NOV 1SP 1 • . R O {RESTORE R O NOV •33. . R J {MOVE THE CC BYTES DESCRIPTION FIFIO JMP BCGSCN ELSE GET ANOTHER SCAN NOV - J I R 4 I . I R S I * :MOVE T H E SOIH AND SISt B f ICS F I B S ! • t t : NOV (R4|o . ( R S I * {IHCN MOVE THE SS BYtES OESCRIPIIOh OUT : MOVB • - I .FLAGI {SET FLAGI T O NEGATIVE T O S T O P 'OISPLA' S O S R J . I t MOV I S P1• . R O : RE SIOBC BO : MOV •IOO.P*KEYCR : R T S P C ;RE TURN T O MAIN Bl 1 {RETURN B A C K T O THE INTERRUPTED 'OISPLA' ;C10CK I N T E R R U P T HaMDLER: {DATA FIELO: C K I M T : N O V • I T . C T C R {ENABLE TO REAO CTBR NOV CIBR . I B4 ) {STORE COUNTS TABLE 1 BLKM 1 I IMC 10 FIRST LIST OF PARAMETERS NOV « I 0 0 . 4 > » K E V C B -.ENABLE KEYBOARO INTERRUPT WHICH INCLUDES ALL THC SCANNING PARANETERS BIC •IT0O0O.IB4I {MOV I J BIT COUNT TO SPECI1 aoo I B 4 | « . ( R J | > {SPECTa-SUN OF THE SCANNED O A T A TABLEJ BLKM 1 {LINK TO SECOND LIST O F PARAMETERS OIC picta .WOBO NODE eio 4 t { O N E SCAN IS OVER .WOBO SIACKI SUB SIIP.BAMP {SIEP OOMN IHE RAMP .WORO SPfCII CIR • M E V C R {OISABIE KEYBOARO INtERRUPI .WORD SPECT3 •JMP NEXtPT ; A N O GET MORE POINIS WUHO SPECI3 .WOBO SPECT4 :om S C A N i t ovca. S T O R E tut P R E V I O U S scan A N D PBEP»BE EOR OTHER SCANS: WOBO FLAG :SIORf: B O . - I S P I iABLE 3 .BLKM 1 :L INK 10 THIRO LIST OF PARAMF IE BS IHOM 10 CALL OISKI 4 t : N O V {SAVE R O . R S NOV B S . - I S P I NOV TABLE).BS { R S P O I N T S P A R A M I ICR LIST FOR 'OISK' TABLE4 BLKM 1 ADOBE SS OF SPECTRUM STATUS TABLE OF SPECIBUM 1: NOV B S . R 4 SPECII: .BLKW 1 auo • 4 . R 4 B I G I N I : BLKW 1 TSI NSCNOB {IF I S T TRANSFER NPtf: . BLKW 1 BIO S t THEN SIABIBIOCK-I S I C P I : BLKW 1 NOV SI7CVO .RO S I / V O I : BLKW 1 • SH • - S .RO I UPOAIE STARIINC BLOCK • OF IHIS IRANSIER INIOI: BLKW 1 •DO R 0 . ( R 4 l » SC4I I 1: BIKW 1 S t BB St SrPIBI: BLKW 1 NOV • I . I R 4 I * {S fABf BLOCK • IS ONE A l IHC BEGINNING HE AO 1: BLKW 1 6 t NOV SIKAOI.IR4I* {SIORC SPECI1 S I A B I I : BLKW 1 (SEE IHE NAINPROCRANI NOV S I / E M O . 1 R 4 ) * {SIOBC SPCCII aisa • 1 . I R 4 I :SCI IHt MB MOOI IAIII ES Bl KM l ADOBESS OF PSECIRUN SIAIUS IARLC Of SPECIBUM ] MOV l A B l t S . B I :B) POINTS 10 S IAIUS l A B l t OF SPEC I J MOV S T K A O I . I B 3 I * ; SP tCT I • ASIACKI MOV S t K A D I . I R I ) 'SPECT3 • ASIACKI • S IZEBV_Of_SP lC I I AUO S I Z I B V . I R M * MOV 4 4 0 9 S . . I R 3 ) SUB STABT . I B3 I :BCGINI . 409« -START MOV | B ] | . | R I I > ; B IC IMJ -B IO IN I MOV IB3I* .RAMPST ; I IN IT IAL IZE THE BANP OUI I KOV RAMPST.RAMP : (RAMPST IS AMOIHEB COPT OF BEC IN I I MOV NPOINT.<R3)* - N P t f N P O I N T MOV NPOINT , I B I ) • :NPI2«NB0INT MOV S 1 C P . I R 3 I * ; S I E P I - S I C P MOV S 1 C P . I R I I * :S ICP3*S IEP MOV S IZEWO. IR3 I* i S I / V O I * S l t E M 0 MOV S I ZEWD . IR I t * -SIZWOJ-SIZCWO MOV <R3 ) * . IN fO t ;INFOI*A0OB OF INFO IABLE OF SPECI I MOV < R t l * . I N F 0 3 :IN»OI-AOOB OF INFO IABLE OF SP IC I 3 MOV 4 I O O . I R 3 I * :SEI THE INITIAL SCALE FACIOB • lOO MOV 4 I 0 O . I R I ) * | C I B IR3>* i S I P I B I - O C IB IB 11* ;SIPCB3«0 MOV S T K A D I . I R 3 I * :HCAOI«SIKAOI MOV S I K A O I . ( R I ) :HEA03«StKAOt*SIZEWO*3 AOO S I Z C B V . I R I I * MOV S I A R I . I B 3 I » : S I A R I t - S I A R I MOV S T A R T . | R t ) « - S I A f l t J - S I A R I ; S I T UP CLOCK INTERRUPT: MOV ACKINT.CKPC C IR CKPS IMCB EL AGO -FLAGO*I THE F IRS t CTCLE •SET COUNT INO PROCESS MOV A 3 . C ICR {COUNTING UP MOOf :SIART SCANNING: MOV STMAOI.HEAOI : ME ADZ • HE AO OF SPECT Z AOO SIZEBT.HEAOZ BEGSCN: NOV S I K A 0 I . R 4 ;R4.POINICR FOR SP IC I I MOV HCAD2.R3 :R3>P0INIER FOR SPCCI~2 MOV NPOINT.PTCTR i P I C I R ' P O I N I COUNTIR MOV RAMPST.RAMP •RAMPST* 1ST POINI OF RAMP •SCAN POINT •» POINT: NEITPT : C I B CTCR ;RESET COUNTER ;TRIGGER THE CLOCK PROCESS AND THE COUNTING PROCESS MOV 4 I 4 I . CMCR ;IURN ON IHE CLOCK MOV 43 .CTCR ; IUBN ON THE COUNT IB TSTB ELAGO : IF FIRST TIME COME HIRE . BNE 3 t THEN GO 10 CALL DISPIA R l l ; ELSE REIURN 10 INIIRRUPIEO POINI A l DISPIA 3» : CLRB FLAGO - F I R S ! CTCLE GO 10 OISPIA MOV TABLE2.RS JSR PC .D ISPLA •••NOTE R 3 . R 4 SHOULD NOI RE USCO IN ' O I S P L A ' WHILE SCANNING I ;AFtCR SCANNING A l l REQUIRED SCANS. CONTOOl IS ST I L L IN D ISP IA -IHf USER IS ASKfO TO IN I tRRUPI IT AND USE THE 'OUT ' COMMAND TO PASS IHC CONTROL BACK 10 IHE CALLING ROUI INE . IN IH I S CASE ' S C A N ' . iouipur THE INFORMATION BLOCK OF THIS SET OF SPECTRA TO BLOCK 0 OF THE INFOUT : MOV TARLE4.RS ; R S ' A S P I C T I ' MOV TABLES.R4 ;R* POINIS TO PARAMETER L IST FOR DISK AOO 4 4 . R4 : R4 . fOSTAOT C I R IRA 1. ;PUI INfOOMATION TO 1ST BLOCK OF OATA MOV I N F 0 I . I R 4 I * ;PUT ADOOESS OF INFO IABLE • 10 OADOR MUV A S 4 . . I R 4 I * : 0 S I 7 E . 6 4 MOVB 4 I . I R 4 I :SET UP WRITE MOOT :UPOAIE INIORHAIION 1AB IE : MOV I A B L E I . R 3 ;R3 POINIS TO SCANNING INFO TABLE Ml IV A l A B l f G . R Z :SEI UP A TABLE CONTAINING IHE INFO MOV NSCNOB. IRZI* ;PARAMCICRS IN RIGHT OROER ; ; 1 . A SP IC I -NSCAN MOV I 4 I 0 3 I . R O ; 3 . STZE IN • OF BLOCKS A'jH » 8 .RO 1 BLOCK • 2SC WOODS MOV 0 0 . 1 0 3 ) . MUV 3 I R 3 I . I R 2 I * ; 3 . RATE MUV 4 I . I R 3 I * ; 4 . NSCAN AIIO A S . R3 MOV | R 3 I * . ( B 3 I * START MUV 1031* .< 0 ] | * : « . NPOINT MUV 1 0 3 1 . ( 0 3 1 ;T . S I EP MOV I N f O I . 0 4 ; IN fO I -AOORfSS OF INFO BLOCK Of S P E C f l C l RB f I AGO : I A I 1 0 ON OUTPUT INFOJ . FLAGO USfO AS MUV • I A B L E S . R 3 ;CONVCRI IHISC 10 ASCI I CHARACTERS TWICE: MOV • T . 0 3 ;R3 - PARAMETER COUNt B IANKS: MOV •64 . R l ;BLANK OUI THE I N f 0 _ I A B I E ( « 4 WORDS 1 MOV RA .RS I t : MOV B L A N K . ( R S I * SOB R l . t t I 3 t : MOV • L I S T J . O S ICALL CHARAC MOV 1R J1* .B INUM :BINUM • 81 MART NUMBER TO BE CONVERTEO JSR PC.CHAOAC MOV • 4 . 0 0 ;RO - BYTE COUNT 14 BYTES FOR EACH) MOV •CHAR4.RI I 2 t : CMPB • 3 0 O . I R I I ; 3 00 INDICATES IND OF CHAR4 BNI l o t MOVB • 4 0 . ( R 4 I » 'PUT BLANKS UNTIL GOT 4 CHAR 'S BR l i t l o t MOVB ( R I | * . ( R 4 I * l i t : SOB R O . I Z t iCONVCRIS AND STORES 4 D IGITS MOV COMMA.IRA I* :PUT A COMMA AND A BLANK AT IHE END SOB R 3 . I 3 t ;REPEAT UNTIL T PARAMETERS ARE DOME I S I B f 1 AGO : I F IN f 03 HAS BEEN UPOAIED HNI IUUISK IHCN OUIPUt INTO l « B L I I 10 OISK SUBROUTINE SCAN vtasiON II l -MAR-BI •IHE FUNCI IONS OC THIS SUBBOUIINE ARE TO SUPERVISE I ME fOHOMING PROCESSES: A ) A REAL TINE C lOCK MEASURES A SPECIF IED 11ME DUBAIION B l A COUNTER COUNTS SOME PULSES C l SUBROUTINE OISPLA TO SHOW THE CURRENT SCANNING RESULT O l A MAIN PROCESS TO SET UP THESE PROCESSES. JUDGE THE FLOW OF CONTROL. AND OUT PUT • BAMP VOL I ACE TO THE SPECTDNEIER THt PARAMETER L IST PASSEO TO TNIS SUB ROUT INE IS : LIST: .WORO .WOBO .WORD .WORO 3 L I ST1 I I S I 3 L I S I 3 ;HOW TO SCAN ;WHEOE TO SIORE IN MEMORY ;WHERE 10 STORE IN OISK THE ABOVE L I STS ABE : L I S T I : R A I E : NSC AN: S IABPT: NPOINT: STEP: SIZEWO: .BLKW .BLKW .BLKW .BLKW .BLKW .BLKW ;S ARGUNENTSIRATE.NSCAN.STABT.CMD.STEP I ;RATE OF SCAN IN MILLISCC :NUNBER OF SCANS ;WMtRE TO START SCANNING 7; MOV MANY POINIS TO BE SCANNED LTME S IEP SIZE OF THE OUTPUT VOLTAGE ;THC SIZE OF MEMORY ALLOCATED TO THIS SPECTRUM L I S T S : HOOAO: T NODE ISAME LIST AS THAT FOR CALLING OISPLA ADDRESS OF BIT BIT a n BIT a n THE DISPLAY NODE I • I SPECI I IS TO BE DISPLAYED 3 • I SPEC 13 IS TO BC DISPLAYIO 3 - I SPECI3 IS 10 BC DISPLAYIO 4 • I SPCCT4 IS TO BE DISPLAYED B • O A NEW SCAN 1 BESIAR1 A TEBNINATCD JOB TO GET MORE SCAN ISEC SUBROUTINE SCAN) SCAN IS OFF SCAN I S ON I SPEC 13 I S THE BESUL I I : S IKAOI : .WOBO STACK 1 . S P I A D I : .WOBO SPECI1 : SP IAD3 : .WOBO SPECI3 : SP IAD3 : WORD SPECT3 :SP1A04 : . WORO SPECT4 :F L AGAD: .BLKW 1 i t I S T ) .WORO 9 f HAMAD: .BLKW 1 ;DSTART: .BLKW 1 DADUR BLKW 1 .DS IZE : .BLKW 1 :OSTATU: .BLKB C .EVEN I BIT a • o I I :ADOBESS OF STACK I {AOORESS OF THE STATUS TABLE OF SPECTRUM I {ADDRESS OF IHE S IA IUS IABLE OF SPICIRUM 3 {AOORESS OF THE S IAIUS TABLE OF SPECIBUM 3 {AOORESS OF THE S tA tUS IABLE OF SPICIRUM 4 {ADDRESS OF A FLAO FOR COMMUNICAIION BIIWCEN AND ' D I SP LA ' ' SCAN ' {FILENAME ADDRESS SStARIING BLOCK NUMBER i S f A B I I N G AOORESS OF IHE OAIA FIELD 10 BE USED |» OF BLOCKS 10 BE TRANSFIRIb {STATUS: BIT I • I IF WRIIE 10 DISK , B i t 1 • O IF RIAO FROM DISK UPON BEtUBNIO NEGAIIVI II FAILEO TITLE SCAN OAtA CLOBL SCAN.OISK . IECHO.CHARAC.OISPLA MCALL P B I N I . GIL IN C t T R . 1 6 7 7 6 3 {COUNIER CONtBOL REGISTER C IHR -167774 {COUNIER BUFFER REGISTER CKCR - I 70430 :Bf AL TIME C lOCK CONIBOL REGISTER C K B R M T 0 4 2 3 {Bl AL TIME CLOCK B U F f I B REGIS fER C K P C 4 4 0 {REAL TIME C lOCK IN I IBRUP I VECTOR REGISTER CKPS -443 {REAL TIME CLOCK INTERRUPT STATUS RCGISI IR RAMP.170440 {BAMP VOLTAGE OUTPUT BUfFER RCG IS f f R KOUI-170444 ;« AXIS OUIPUI BUFFER RCGISIER TO DSC IH I SCOPE YOUt -170443 {Y AX IS OUIPUI BUfFCB BCOISIER TO OSCILLISCOPE KCYCB - I 77S60 {KEYBOARD CONIBOL REGISTER K C Y B B - I 7 7 S 6 I {KEYBOARD B u r f f B REGISTER t l C B * l ? 7 S 6 4 {TERMINAL CONSUL OUTPUT CONTROL REGISTER I I B R . I 7 J S 6 6 {TERMINAL CONSOL OUTPUT BUFFER REGISTER I V f C I R - 6 0 {SYSTEM KEYBOARD INTERRUPT VECTOR I S I A I U - 6 2 {SYSIEN KEYBOARO INIEBBUPf STATUS I t : ADD • 3 .BS MOV I B S l » . I I B I E I {TABLE 1: MOW TO SCAN ( L I STS OF NAINI MOV | B S ) » . t A B l E S {TABLES: MOW TO S tOBf IN NEM I L I S T 3 I NOV I R S I . T A B L E S {TABLES: MOW TO STORE IN DISK ( L I S T S ! SEE THE OATA F I E LO FOR D E I A H S NOV IABLE3 .RS •OO • J . B S B I S • 7 0 3 . P l R S I {SET SCAN ON AND DISPLAY SPECTS B IT • 4 0 0 . P I B S I * {IF JUST CONTINUE TO GET MORE SCANS BNE I t THEN KEEP NSC NOB 1 • OF SCANS 0B1AINE0I C I B NSCNOB { ELSE CLEAR IT MUV ( R S I * . S I K A O I {STKAOI««SIACKI MOV 1BS1 • . 1 A B l E 4 {TABLE4 - SPECTRUM STATUS TABLE OF SPECT1 MUV | B S ) * . I 4 8 L E S {TABLES • SPECTRUM STATUS TABLE OF SPECI3 NOV • F LAG I . 4 1RS1 {SE1 UP THE FLAG AOORESS AND COAMAJNICAIE WITH ' D I S P L A ' C l BB F l A C t MOV 1 A 8 1 E I . R 3 { ( R S I - P L I S T S AOO ' 7 . B 3 { | R3 |wRATE > IHE C lOCK BUFFER: NOV IR3 |o .CKBR {HOVE RATE TO CLOCK BUFFER N IG CKBB {COUNT UP UNTIL ZERO :GET SCANNING PAPAMfTEBS: MOV MOV NOV MUV MUV MOV ASL ( B 3 ) • .NSCAN ( R 3 ) » . S t A B T I B ] ) * . N P O I N I | B 3 I » . S I E P IB3 I . SI 71 WO SI /TWO.SIZE8Y S I / EBY {GET * COPY OF THE SCANNING PARADE IERS {SIZCBY • SIZE OF SPECIRUN IN BYTES { IN IT IA L I ZE THE SPCCTRUN STATUS CABLES OF THE SPECfBUN I AND S. S IA IUS MOV IABLC4 .B3 :R3 POINIS 10 S IA IUS IABLE OF SPECI I • s 8 S s e •» w t» m m a I: - tz 2 U K M ii i « a i z » » > _t m t/> I M • I J s! S . 8 — « «1 8 88 • • a I vt u a. I e 8 ! s 1 — u m "» • z 8 z if e •» •» »» z § o 8 •* Z I e s i * «• z s e e 1 a 1-5 -S A8 •IN *> V *fl *V — */ - - - z U U W w * * t* > • « «s w 2 * • a « 58 » I 28 J z > » 8 • m *• I » 5 1 2 i L 4*. . *-> tft I u #-• taf a * . CV m 5 5 3 At K x x a K x ^ . 1 e -« w B B B 5 • B • - n 8 u • u to • ~ a (j • a 8 J> — 8 w »» * • . .8 -=!;8 : — S • » a> « o pee iii • o a :2gS • - i 5 « iSUBROUTINE S C U f VERSION 1.1 M - M A R - B I : FUNCT ION Of THIS SUB ROUT INC IS TO CHANGE THt S C » H OT THT OISPLAYCD PORTION Of a SPECTRUM AS S R C C i r t f O BT IMC USfR I INPUT S C A L C I O O . SO I M A ! CAN J BC SCALED 10 THC SICONO OECIMAL P IACI I ; THt SBCCTRUN K i l t BE SCAICO BACK TO UNI IT ISCALCMOO • 1001 E IRST . BE -EORE SCAIINQ TO THE NIW EACTOR. I OvIBFLOW WILL BE CHECKED. U S E R ' S DECISION WILL BE ASKEO IT OVERFLOW OCCURS. THE PARAMETER L IST PASSED TO THIS SUBROUTINE I S : L I S T : • 0 0 0 id. SAVE: .BLKW 1 (CUR: .WORO 40BS TCUR: .WOOD O fACTOR: . WOOD 0 M0OE : .BLKW 1 SPTAOI : .BIKW I SPTA01 : . BLKW I SP IAD3 : .BLKW 1 SPIAOA: .BLKW 1 STKAOI: .BLKW 1 i C A l l A O A T A H A N I P U L A I I N O S U B R O U T I N E ; A O O B E S S Or R A R A M E I I R L 1 S T TO C A L L ' D I S P I A ' i I J U S T U S E O T O R ruoimo M O O I E I C A I I O N ) ; l C O O B O I N A I E O ' I H E C U O S O R I* C O O R D I N A T E O ' T H E C U R S O R ; S C A L E F A C T O R U S E D F O R D I S P L A Y SUN 0 1 S C A N S ; | H E D I S P L A Y NOOf • A O O O E S S O F S P I C I B U N S I A I U S T A B L E Or S P I C I I ; A O O B E S S O F S P E C I O I M S I A I U S I A B L E OF S P F C I 1 ; A O O B E S S O F S P E C I B U M S I A I U S T A B L E 0 1 S P I C I ] ; A O O B E S S O F S P I C I B U M S I A I U S I A B L E 0 1 S P I C I A : A D O B E S S O F S I A C K I U S E O I O S I O R E I H E S P E C I R A . T I T l t SCALE SPECIF IEO SPECTRA M C A l l .PRINT GLOf l l ICCHO.EXIRAC.BINARY.SCALE.QUERY SCALE: NEXTSP: AOO • 11 .RS MOV IRSI ' .MOOE MOV RS . I ABLSP t I AB I SP POINTS TO POINIERS OF SIAIUS T A B U S MOV • 1 . I S I B I I MOV • 1 . S P E C I N MOV SPECIN.H4 :FETCH ADDRESS OF SPECTRUM PARAMETERS OEC R4 ASL R4 AOO TABLSP.R4 ;R4 POINTS TO POINIERS OF S IA IUS TABLE N MOV I R 4 I . R 4 ;R4 POINIS TO STATUS TABLE N CLRB FLAG ICLEAR FLAG SO IHAI OVERFLOW WILL BI I I S I C D B IT ISTBIT.HOOE M I S T IE SPECIRUM IS B U N G DISPLAY lO BNE AROUKtJ JMP NOIHIS AROUND: PRINT A-MSCI ; PR INT THE SCALE OF SPECIRUM MOV SPECTM.I4 MUV A L I S T I . R 9 JSR PC. ICCHO ;PRINT SPECIRUM NUMBIR PRINT »MSGJ :PR|MI - I S -MOV I 4 I R 4 I . I 4 l E I I CM SCALE FACIOR MOV A L I S I I . R S JSR PC . I fC IA J ;PR|NT SCALE FACIOR P R I N I ' M S G S ;POINI <C0><10> M O V ' I I S I 7 . R 5 J S O P C . I X I R A C C M P B O O O . A N S B C O N O I H I S ASK FOR NEW SCALE FACTOR NO ENTRY-DO NOT CHANGE SPECTRUM MOV •ANS.ADORNO :SET UP STRING ADDRESS TO CONVERT TO BINARY CMPB ANS.AOS] RIO INC ;CHECK IF S IGN B IT CMPB ANS.AOSS ; PRESEN! OS3 - * BNE NOI INC • 0 5 5 - -INC AOORNO ; IHEN POINT TO BVTC AFTER S IGN MOV • 1 I S M . O S :COMVCRt SCALE JSO PC.BINARY :FACTOO TO BINARY CMP N l w s c l . I 4 I R 4 I ; | f NEW SCALE FACIOR B IO NOIHIS ;SAME AS OLD DON'T CHANGE SPECTRUM MOV MOV I S I B B IO SUB I R A I . R 3 A I B A I . R 1 F L A G O L O S C A N O I 0 I O . R 1 FETCH ADDRESS OF FIRST POINT TO BE CHANGED FETCH NO OF POINTS DISPLAYED IF NO OVERFLOW OCCURRIO AND A RESTART THEN RESET ALL POINTS ELSE RESET ONLT IHE CHANGED POINTS OLOSCA: MOV SUB CIR Mi l l 0 1 V MOV SOB ( R 3 I . R 0 1 6 ( 0 4 I . R O R l ••OO .RO 14104 1.00 RO. 1031* R7.01DSCA ;FETCH FIRST POINT iSUBSIRACT SEPARATION REMOVE SCALE FACTOR STORI VALUE R3 CONIAINS NO OF POINTS : SCA IE : SCALP: M O V M O V M O V CLOB 4 ( 0 4 1 . 0 3 ( B 4 I . 0 3 N I W S C A . I 4 I B 4 I 1 L A G F l t C H N O . O F POINIS DISPLAYEO E IRS I AOOBESS O F F I BS I POINT SIOBE N C W SCALE FACTOB CLEAR THE FLAG SO OVCBFLOW WILL BE CHECKED M O V I R 3 I . R O FETCH VALUE Cl R 01 37BIT NUl I I P U C A t ION Mill Nl WSCA . R O COMPUIE NIW VALUES Ol V »lOO . R O BVC I t OVEBFLOWT IT N O I . GOTO I t A N D CONIINUt I S I B Fl A G I F NOI F I B S I TIME OF OVERFLOW BNI I t I H E N CONIINUC 1 0 OO I I Ml IV R 7 . N O I D I D NOIDID • » O F P O I N I S H A V E BEEN D O N E INCB 1 1 AG ELSE S C I F L A G A N O A S K USCO ' S OCCISION MOV • 1 1 S T 4 . 0 5 A S K ' O A I A o v c o r i o w r o s i i l l W A N I I O D O I f J S O PI. .UUIOT a. S l / E o r I * C H SPECIPUN IN BIOCKS 3. RAIE o r SCAN IN - s i c 4. • OF SCAN OBIAINEO rOS EACH S P I C T RUN B. r*OlNl» or I H t ISI POINT IN NIMOBT S * Or POINTS A C I U A l l r IN MEMORY T STEP S I K HMIIE SCANNING IHIS SPICT RUN T H R U MORE PARAMETERS MAT" BE APPENDED THt DESCRIPTION IS USEO 10 CLABITT THE SPECIRUN ;NENOA)T TOR THt SPECTRA: STACK 1: SIKH B U I . THE EIRST SI TWO I HOBOS NAME UP SPECT I THE NEAT SI3W0J HOBOS HAKE UP SPEC ! ) THE NEAT SI/HO3 HOBOS MAKE UP SPECI3 THE NE«t SIIW04 HOBOS MAKE UP SPEC 14 ;tNO Of MAIN PROGRAM RECORD ' END S1AR1 OS list*": .MORO 3 ' C A L L SCAN R t r . l N I : WOOD 4095 P O S I H O N or ist POINI or SPECI 1 ON OSCILLISCOPt .WORO L I S T S 'HOW T O SCAN NPI 1 . WOOD IOOO 4 Of POINIS 10 BE OISPLAVEO .WORO L I S T S 'WHERE TO SIORE IN MEMORY S U P I : tfoon 4 S U P SIZE OF IKE VOL (AGE .WORO L I S T S ;WHERE T O SIORE IN DISK SI / v o l : WOOD IO?A SIZE OF IHE WHOLE SPECI1 IN A Of WOROS ; I Nf n i MOUO I N f O i l AOOBESS Of THE INTO IABLE ABOUI SPECI1 S C A U | ; WOOD 1 V IB I I CAL SCALING fACIOR Of S P f C I I L I S T S : • WORO 9 - C A L L OISR S I P E R I : . WOBO O SI P t RAMON Bf tWEEN BASELINE AND SPECI 1 .WORO f l l E N A -FILENAME ADORESS HI AO I . WOBO STACKI AOORESS Of THE HEAD OE S P E C I I OSTART: .WORO 0 tSTARIINC BLOCK NUMBER S IAR I 1 : WORD O THE IN IT IAL START POINI A Of THIS SPECTRUM DADDR: .WORO STACK I 'STARTING ADDRESS OF IME OAIA F IELD TO BE USIO DS IZE : . WOBO 1034 1* OF BLOCKS TO BE TRANSFIRIO OSTAIU: .8v1E 0 iSTATUS: BIT I • 1 IF WOIIE 10 OISK SPECT?: WORO SI ACK 1*3048 . : AOOBESS O F 1ST POINT Of SPECT3 TO BE OISPLAVEO .EVEN S B IT 1 * 0 IF READ FROM OISK B IG INZ : . WOBO 4095. POS I I ION Of 1ST POINT Of SPECI} ON OSCHLISCOPE UPON RE1URNE0: MICA I IVI IF FAILEO NPI ? . WOBO IOOO. # Of POINTS TO BE OISPLAVEO • S I E P ? : . WOOD 4 SIEP SIZE Of IHE VOLTAGE SI7VOJ- . WOBO IOJ4 . SIZE Of THE WHOLE SPECT? IN 4 OF WOROS F I L E N A : R A O S O / D K SREC O M R / • D K : S P E C . D N P IS THE SCRAICH OAIA T H E THAI 1 NT 02 • . MOBO INf 01? AOOBESS Of THC INFO IABLE ABOUI SPECI} I S USEO TO STORE THE SCANNED RESULT SCALE?: WOBO t V I B I I CAL SCALING FACIOR OF SP fCT? ; ; SIZE • 336 BLOCKS SI P I P ? : . WOBO o SEPEHA1 ION BCIWCEN BASELINE AND SPECI} HI AO? . WOOD S T A C K l * ? 0 4 9 . 'AOOBESS Of' IHf HEAD Of SPECT? L I S T S : .WORD B ' C A L L SOUEEZ TO SQUEEZE A HOLE FOR A NEW SPECTRUM S I A R I ? : .WOBO 0 IHE INI 11 AL S IAR I POINI 4 OF THIS SPECIRUM NEWNUM: .BLKW I [SPECIBUM NUMBER Of IME NEW COMER MOOAO: .WORO MODE :AOOBESS Of IHE DISPLAY MODE N t w S I Z : .BLKW 1 ' S I ZE Of THE NEW SPECIRUM IN » Of WOROS S r i C T S : WOBO STACK 1*4096 iADORESS OE 1ST POINT Of SPECT3 TO B f OISPLAVEO TABISP : .WORO SPTADI ;TABLE OE ADDRESSES OE SPECIRUM S IA IUS IABLES n i r . t N 3 : WOBO 4095. POS I I ION OF IST POINT OF SPECI3 O N OSCILLISCOPE S IKAOI : .WORO STACKI (ADDRESS Of THE STACK I NPI 3 WOBD IOOO. « Or POINIS TO BE OISPLAVEO ERROR: .BLKB' 1 ;ERROR f l A C . SET I f ERROR OCCURRED UPON REIURNFO S U P S : WOBO 4 S1CP SIZE OF THC VOIIACC SI/W03: , WOBO IO?4 . SI7C OF IHE WHOLE SPECT3 IN A Of WORDS INT03 WOBO INfOT3 AOOBESS Of IHC INTO TABLE ABOUT SPECT3 NSOI : . A S C I I / D A T A RETRIEVAL? /<30O> SCAIE3 . WOBO 1 VIB I ICAL SCALING IACIOB Of S P I C I 3 S I P I 0 3 : WOOD IOOO. SIPERA1I0N BETWEEN BASELINE AMD SPEC13 N S 0 3 : . A S C I I /PRESS ' E S C ' A N D THEN TYPE I N ' BACK ' TO GET D A I A BACK / HEA03: . WOBO S IACK1* 4 0 9 6 :AOORESS Of THE HE AO Or S P I C I 3 S I A 0 I 3 : WOBO 0 IHE INI I I A L START POINT 4 Of THIS SPECIRUM N S 0 3 : . A S C I I /MORE SCANS? /<300> ; M S G 4 : . A S C I I < I 3 > / | 1 0 STORC THE S U M . PRESS ' E S C AND tvPE v o l I f 1/ SPECT4: . WOBO SIACK l*S 144. ;ADORESS O F 1ST POINI OF SPECT4 TO BE OISPLAVEO . A S C I I <I3><IS>/(THE SUM I S I N S P E C I R U M J l / « I 3>« IS>< 1?><-?O0> B E G I N * : WOBO 4095. POS I I ION OE 1ST POINT Of SPECT4 ON OSCILLISCOPE NPI4 : . WOBO IOOO. A Of POINIS 10 BE OISPLAVEO N S C S : . A S C I I /STOP N O W ? /<300> S I I P A : WOBO 4 S l f P SIZE Of THE VOLTAGE SI/ V O A : WOBO IO?4. , SIZE Of THE WHOLE S P E C !4 I N • Of WOROS NSCS: . A S C I I /WANT T O OISPLAY? /<300> INI 04: WOBO I N r o l A ADOOESS Of IHf INFO IABLE ABOUI SPCCI4 S C A l E 4 : . WOBO I VCRIICAL SCALING IACIOB Of SPCCIA NSCT: . A S C I I /WANT ANOTHER RUN? /<300> S I P I 0 4 : . WOBO 1500 SEPERAIION BCIWCCN B A S H INI AND SPECI4 .EVEN HI ADA . WOBO SIACK1*8144. :A0ORESS Of IHE H E A O Of SPECTA SIA0I4 WOBO O IHE I N I I I A L S IAR I POINI • Of IH IS SPECIRUM BLANK: BYTE A O . 4 0 (O f : .BVIE 4 0 . 3 0 0 : ; INTOBMAIION IABLES: M O D E : . W O R O > ( IN IT IAL VALUE Of MODE. SHOW SPECI} ONIY INI O l 1 BLKW 64 IHf INTOeMAIION IABLE ABOUI SP IC I 1 ; INI O l ? m KW 64 IHf INIOOMATION TABLE ABOUI SPICI} INI O i l R l KW 64 IHf INIOOMAIIOH IABLE ABOUT SPICI3 SZOATA: .WORD 4 0 . * 3 9 S . » 8 1 9 3 . (SIZE 01 IHE O A I A BANK I N f 0 1 4 : BLKW 64 . IHC INIOOMATION TABLE ABOUT SPtCTA EACH INIOBMAIION TABIE CONTAINS A PABAMEIER EIELO I T IRS t 6 0 B Y t l S I :SI>fCimjM STATUS TABLES: A NO A ( l i S C R I P I I O N r i f l O H A S I 66 B V I I S I . ; A P A B A M f I I P IN PABAMEIER EIELO IS A LETT ADJUSTED 4 • B Y I I ASCI I ; O l r . l l A l SIRING. S I P I R A I I O WIIH IHE NE«1 ONE B» A COMMA A NO A BLANK St»ICTI: .WORO STACK I 'ADDRESS OE IHf 1ST POINI Or SPICI 1 IO R l D I ' . P I A X O IHl PABAMIIIBS ABE 1 A Of SP IC IBA I N I H l f i l l : if NO, cnio c t i SCAN p u i H i i m s ; i r U S . I»*SS CONIBd l TO 0*1* « l » l ( v » t ••ASS CONTROL TO DAT* BETRI tVAL PRINT ANSCJ ;PRINT ' P R t S S ' I S C ' IH fN TYPE IN BACK- • NOV FL IST3 . B S JSR PC .O ISPLA :C«L t DISPLA TO OISPIAY »NO MANIPULAII ; ' THE 0*1* JNP ASK3 -GOTO S t l I f STOP ! O AIA ACQUISITION: •GET SCANNING PARAMETERS: CEIPAR: MOV A L I S U . R S JSR PC.PABAME ;CALL PARANt TO G i l SCAN PABAMII fRS SPACE: NOV A l .RA i C A l l SOUIEI TO NAME TWO SUITABLE HO l f S NOV AI .NIVNUM ;TOR SPECI I ICUBRENI SCAN) AND SPECT3 ISUM) MOV SITE VO.NEWSK ; N l WNUM IS SPECIRUN ' . NEVSW IS IHE SI 71 CLBB ERROR ;CLEAB ERROR I S : NOV ' L I S K . R S JSB PC .SOUI IT Tsia IBBOB i l l ERROR OCCUBREO. BNE ASH 3 THEN S t t IF StOP INC NI WNUM ; ELSE DO FOR SPECI3 SOB BA, I t I i SCAN: I NOV A I I S T 4 . R S JSR P C .SCAN ;CAIL SCAN TO SCAN I ME SPECTRUM I i « l L SCANS MERE OVER. ASK I f MORE SCANS ARE 0ESIRE07 ASK3: QUEST VMSG3.ST0SUM ;ASK: -NORl SCANS? ' : IF NO. CUtO MORE THE SUM : I f *ES . CONTINUE AND OS I MORE SCANS :GEI NORE SCANS: B I S •AOO.NODE ;SET A CONTINUOUS MOOE 10 K f f P SOMI ACCOUNTING CONS I «N IS IN -SCAN' INC NSCAN ; G f l ONE MOBf SCAN IAS D F I A U t l l BR GI IPAR : C I I PABAMII IBS AND SCAN AGAIN :STORI THE SUM: SIOSUN: PRINT ANSG4 ;PB INI HOW 10 GIF THE SUN SIOPEO .DISPLAY THE RESULT OSCILL : NOV MUV JSB (7.MOOF »l I S I 3 . B5 PC .D ISP I A ;CALL OISPLA TO OISPIAY IHE RESULT ;ASH IF STOP ASKS: OUISI 1 * 1 ' 'MSGS.ASKA ;ASK: 'STOP NOV? ' I f NO. ASK I f DISPLAY I f Y I S . I IRMINAI I :ASH I f D ISPLAY : ASKA: OUIS t 'MSGS .ASKS BR OSCILL ;ASK -MAN! 10 DL5PL.AY? ' ; IF NO. ASH IF MANI ANOTHER RUN ; IF V I S . GOTO TO DISPLAY IHI RESULI AGAIN ;ASK IF MANI ANOTHER RUN: ASKS. QUEST ' NSCT .ASK3 -ASK: 'MANT ANOTHER BUN?' ; IF NO. ASK IF »IOP JNP S1 ART ; IF V I S . GOI0 TO SIART AGAIN ; DATA F I I L D : L I S T I : HOBO 3 CALL OUfBYIOUfSTION. ANSMIRI QUE SAO BLKM 1 MfSSAGf AOORESS ANSWER . Bl KB 1 RETURNED RESULT • •YES . 0-NO .1 V IN L I S T 2 : WOBO 5 CALL PARANt ( R A T I . NSCAN. START. IND. S U P I RA 1E . WOBO 700 INI H A L DEFAULT VALUtS 3O0 MSEC PEB POINT NSCAN: . WOBO 70 70 SCANS SIABPT WOBI) O EBON POINT O NPOINT WOOD IOOO TO POINI 1000 S U P WUBO A VO l fAG f S l f P S i l t IS 4 SI7EW0 WOBO 1074 . < MAN S l /EMO WORDS OF DATA L I S I 3 : WOBO 7 CALL OISPLA WOBO MOOf A C T I V I I f OF EACH SPECIBUM B l l I • I SP tC I I IS 10 Bt OISPLAYIO B i t 3 • I S P I C I 7 IS 10 B l DISPLAYED B i t 3 • I S P I C I J IS 10 Bt DISPLAYIO B i t 4 • I SP IC IA IS 10 B t DISPLAYED BIT B • O A NtW SCAN 1 B f S I A B t A 11BMINA1I0 JOB 10 C F t MOBf SCAN I S t l SU8ROU1IMC SCAN) BIT B • O SCAN IS OIF I SCAN IS ON ISPECI3 IS THt R tSULTI •SCAN' WOBO SIACK I ADOBE SS OF S IACK I SPIAOI WOBO S P t C I 1 ADOBE SS OF tHE S IA IUS T A B l t OF SPICIRUM 1 SPIAII? : WUBO S P I C I 7 AIIIIBE SS OF IHI S IA IUS T A B U OF SPtCIBUM 7 SPIAOT: WOBO SPFC I3 ADOBESS OF IHE S IA IUS T A B U OF SPICIRUM 3 SPIAU4 WOBO SP IC IA ADDRISS OF IHI S IA IUS IAHLI OF SPICTBUM 4 F 1 AGAO: BLKW 1 ADOBESS OF A FLAG FOB COMMUNICATION B f l W I l N AND 'D ISPLA-CE :NAIN PROGRAM RtcoRO VIRSION i . i i N A R - » I FUNCTION or T K PROGRAM is TO COMTROI A SPtctRONiitR WITH A i s t n NICBO-• COKPUt fB IKE JOS INCLUDES OATA ACOUISI I ION. OATA STORAGE, AND I DATA RETRIEVAL. I t l . OATA ACQUISITION: THE NAIN RROGRAN ASKS TOR SCANNING PARAMFIfRS B» CALLING ; ' PARAMf ' . THEN CALL 'SOUEEI" TO NAME TWO SO I I ABL I MOLES IN S IACK I . ! ONE TOR THE CURRENT SCAN CALLEO SPICIRUNI AND OIHtR TOR IHE SUM Of | PREVIOUS SCANS CALLEO SPECIRUN3. THIN CALL ' SCAN ' TO SCAN IHE REOUI0IO OATA A NO STORE THEN IN STACKI . EVIRY SCAN IS PUT TO A F i l l CALLIO -OK:SPtC .OMP- ON DISK AFTIR B U N G SCANNED. I DURING SCANNING. ' SCAN ' WILL CALL ' D I SP LA ' TO OISPLAT THt SUM I S P I C I 7 I | OUT. THE U S I R ' S KITBOARO INTIRRUPT HANDLEO BT 'O ISPLA ' IS ENABLED 10 ; LIT IHI US!P. CHANGE SOME 01 THt OISPLAT OR SCANNING CONDITIONS 1 AFTIR FINISHED SCANNING. IHt CON! POI WILL B t PASSIO BACK 10 SCAN' I BT I S ITTING A FLAO 10 NEGATIVE TO SIGNAL 'O I SPLA ' IN I I S INF INI I I I OOP I. I MIN BACK IO NA IN . I IF NORl ' S C A N ' IS DICIOtO BV THE USER. IHt ABOVE PROCESS IS RIPIATEO ; OTHfRVIS t CONTROL IS PASSIO TO ' D I SP LA ' 10 OISPLAT IHt R I S U l l FRON I H f N ON. THt USIR NAT USI THI KITBOARO INI IBRUPI TO DO OAIA MANI -; PUI A TI ON. SUCH AS 'WRITt THt SUM 10 OISK' OR ' PLOt A SPICTRUM OUI ' BT TYPING 'OUT • WHILE I N OATA MANIPULATING MOOt. CONTROL WILL Bt R f l URN fO BACK 10 NAIN.' I H f N THt MAIN PROGRAM A SKIS THE USIR WHETHER TO STOP. OISPLAT OR WANT ANOTHER RUN. it. OAT* STORAGE: ALL OATA r i l C S CONTAIN A ONI -BLOCK INFORMATION F IELD AS THE STARf INC I BLOCK AND A NUMBER OF SPECTRAL OAIA SIC TORS IACH OF WHICH IS A S I N G H I SPICIRUM AND HAS S i l l AS A INIIGRAt NUNP.tR OF BLOCKS. IHE INFORMATION F l t l O Of SCR I Bt a MOW MANT DATA IHIRf ARt IN THAT f l i t , t AMD HOW IHI DA IA WIRt OBtAINIO. IHt 00QANI/AI ION IS AS FOUOWIO • . PARAMf I I R F l t l O I F I R S I CO BTT tS I THIBt ARt T ASC I I PARANt M R S IN PRSINT . Tift T ' ARt : NUMBf* or SPECTRA IN IHIS TILE S U E O l EACH SPECTRUM IN NUMBER OF BLOCKS BATE d f SCAN IN N I LL ISEC P tR POINI NUMBER dF SCAMS P tR SPECTRUM St ARt POINt_NUN8tR Or INE SPtCtRUN (WHtflt S IA f l t SCANNING) i NUMBER at POINIS sCANNto PER SCAN : STEP SITE 01 THE VOLTAG! OUTPUT EVIRT PARAMETER IS LETT AOJUSHO AND HAS F I I I O LINGTH AS A BYTES BLANKS WILL B t F I l l l O IN IF LESS IHAN 4 B T l f S . A COMMA AMD A BLANK I ARt UStO 10 SEPERAIE 1WO PARAMfIERS. B. OFSCRIPT ION F I E LD : I63RO B T f t S 10 I3TIH B T t f S I IH I S DESCRIPTION OESCRIBES B R I f f l T ABOUT tHt S P IC IBA l DAIA . SUCH AS NAME OF COMPOUND. OAIE Of IHP fR IN tN t I I C . D E I A I l t O OOCUNfMIAtION IS 10 BE WRI H E N IN A NOT MIR DOCUMENIAt ION FILE B T IHE USIR • DUMP l i l t CALLEO ' DKSP IC . O N P ' HAS B U N CREAt tO IN IHI DAtA OISK FOR OUNPING IHE INDIVIDUAL SCANS WHILE SCANNING. INfORNA11ON BLOCK WILL B l F I L L E D AFTER ALL SCANS ARE OVfR . INDIVIDUAL OATA F I LE CAN BE CREATED AND WRI t tEN BT A ' V f l l l l COMMAND IN IHt OAIA MANI PUI At IMG MODE OF 'O ISP IA DAtA R E I R I t V A l : OAIA R f l R I E V A l IS OONF WHILE THE CONTROL IS A l OATA MANIPULATING NODI OF ' O I S P I A ' BY A COFWANO ' BACK ' AFIER THE DAT* ARE READ INTO MEMORY FURTHIR OATA MANIPUIAI ION CAN BE PERFORMED. I IHI DATA MANIPULATING MOOE OF ' O I S P I A ' IS ENABLED BY KEvBORAO INTER RUP t fD IHt DISPLAYING PROCISS BY PRESSING ' I S C ' . A PRELIMINARY HANOII IN D I S P L A ' . UPON R I C t l V I N G THIS S IGNAL . WILL CALL ANOTHER HANDLER 10 GIT AND I N I t R P R l t A DATA NANIPULAT INC COMMA NO I 'KYtNMO' 11 . f l l l t RICORO MAIN . MCA t l PRINT . K I T . G l O B l OUt R T . 0 1 S P L A . P A R A N t . S C A N . S O U I I I MACRO OUrSI PRAOOR.NOADDB N O V PRAOOR.OUISAO N O V A L I S I I . R S JSR PC.OUIBT j PR IN f A OUfST ION WITH AOORESS AS PRAOOR I S I B ANSHfR ; IF ANSWER IS ' N O ' . B IO NUAOOR IHTN BRANCH 10 NOAItOR tNOM f L S t CON I INUt : OAIA IN IT IAL IZAT ION: C I C R O S T 7 6 7 :CO(INTfR CONTROL R fC . IS t IR C I B H - I G 7 7 7 4 :COIINIfR BUI I I R R f C I S I t R C K C R - I 7 0 4 J O : R I A l I I M f CLOCK CONIROl REGIS !ER C K B B - 1 7 0 4 7 } : R t A l TIMf C lOCK B U r f t B R I G I S I t f l P A M P ' 1 7 0 4 4 0 ; RAMP OUfrHlf BUFF tR R f C I S T I R » O t l l • 110444 ; » » « I S OUIPUI B U f r t * R f G I S I I R TO O S C I l t l S C O P I Y O U I - I 1 0 4 0 : T A H I S OUIPIJt B u r r t B R I G I S I I R t o O S C I l l l S C O P t K I Y C H - 1 7 7 S K O ; K t YBOARO INPUt CONIROl B f G I S f t R KI TBR* l ? 7 S f » 3 :KI YBOARO INPUt B U f F f B R I G I S t f R I I C B - I 7 7 S 6 4 ; I f R M I NAL OUfPUt CONtROl R I G I S I I R JSW-44 ; JOB S I A I U S WORO FOR I f T I N . . I 1T0U I I S t t R i l l MANUAL I L C -. - 3 0 0 «LC S I A P l : MOV A S t A R t . S P :SET UP SYST IN S tACK l S IACK P O I N I E R - R t l MOV A S T A C K 1 . R 4 :CL IAR STACK 1 M O V »ilT»J ,R3 :STACK I CONTAINS S K W O R D S It: Cl R |R4|. i l l MAY ACCOMMOOAtt 1-4 SP lC tRA SOB B3. It M O V • INF 011 R4 ; I N f O t N: INTORMAtlON f A B U ABOUt SPIC t N M O V »4.R3 * IN IT IALLY I f CONTAINS 137 BLANK B v t I S Jt: M O V »63 RJ AM> B Y f t 30O AS U S IND 3t M U V B I A M K . I R 4 I * BLANK • 3 BLANK B f t I S S U B R J . 3t M U V t o r . I R 4 | « IOF • BLANK BT1I • BY1I 300 SOB R3.3t i«SK If PA IA P t I R I I V A l IS D t S I R t O 7 ASK 1 gut St ' M S G I . O f I P A R ;ASK 'DAtA R l t R t t V A l 7 ' v j o SUBROUTINE ou f * T VERSION I.< i-Kan-at 'EUNCTION Of THIS SUBROUTINE IS 10 PRINI * OKI SI I ON AND INPUI AN ANSwrR IF I I N f ANS V IA IS I I S ' . IHf N IT a f l U B N S • H A G AS ' I ' . I ' I HI ANSVIR IS s - N O ' . i H t M i f aciuaNS A FLAG as - 0 - . OIHERWISC. II ASKS IHI OUISIION AGAIN. ifHf PABANETEB LIST PASSEO TO THIS SUBROUTINE IS AS EOLLOMS: I I S I : . t J O B O I O U I S A D : . B L K W I ANSWER: . B L K B I -EVEN ;AOOBCSS Of THE OUISt ION 'RETURN ANSWER O'MO l « » I S TITLE O U I P T A N D GIT TES/NO .GLOBL OUI 0 1 • C A L L POINT. C I L I N OUERT: NOV B O . - I S P l :SAVE ao NOV as.SAVE NOV n a s i . a s A S K : G U I N •ANSWEa.as :PBINT THE OUESTION AND GC1 IME ANSWCB NOV AANSVIB.BO I t ' CMPB *' .IROI* •SKIP THE PBECEEOING BLANKS BCO ' It CMPB A r . - i a o l - I S ANSWER TT BCO TES : T I S . I H C N GO TO TES CMPB AIT i . t a o ) :IS ANSWCR y? BIO EES : T C S . t H t N GO TO TES CMPB « - o . i a o i ; I S ANSWCR 'OK' BIO TES -TES. CHIN GO 10 TES CMPB A I S T . ( B O ) (IS A N S VI 0 ' o t a -BIO TES ITES IHCN GO 10 TIS CMPB « N . I B O I ;IS ANSWIB N T BCO NO :»CS IHCN GO 10 NO CMPB • i s c . i a o l ;IS ANSWCB n T BCO ND ; T E S . THCM GO 10 NO B B ASK iOIHEBWISC GO AND BCPEAI IHE OUISIION TES: MOV SAVE.as MOVB A l . A I B S ) : I E ArriBMAIIVE ANSWCB SCI FLAG 10 1 B B BEIUBN RESIORE AND BCIUBN NO: MOV SAVE .as C L B f l AIRSI : I E NEGA1IVE SEI riAG 10 0 BCIUBN: MOV I S P K . B O AND RESIORE RO a i s PC ;REIURN :OATA E I E L O : SAVE: .BLKW I ;LINK TO THI PAOAMCICR I I S I ANSWER: .BLKW 10 ;BUTTER 10 SIORC IHC ANSWIR SIRING INO OT SUBROUttNE OUERT END i Nf a R l :THE CLOCK COUNTS UP TO 7ERO. SO NEGATE R l NOV RI.CKBR - . INITIALIZE IHE BUFFER REGISIER OF IHE CLOCK NOV AAI.CHCR ;START COUNTING DEIST: CMP P340.CMCR •NE DELAT * SUB R4.Y0UT (OUTPUT R A(IS(I*I> SUB R4.RAMP ;VOLtWE1IR<| . |» SDS RS.PLOTLP (UNTIL NPOIN I - I POINTS HAVE BEEN PLOI IED NOV IR3I.RI (SHOW THE LAST POINI ASM FACTOR.R l MOV R1,TOUT : JOS DONE: f l i t Un- MOV INTBLir .PASO (MOVE OUT INTERRUPT HANDLER OF THIS ROUIINC CL* • 4 S 3 MOV A-MS04.OUESAO (ASK: -STOP NOW MOV A L I S I l . R S OSS PC.OUERT TSTB ANSWER ( i r -YES-ONE I t ( THEN STOP JMP BEGIN ELSE PLOI AGAIN i t : . POINT •MSOJ ;PR1NT •COMMAND ' PLOT ' FINISHEO UTS PC [RETURN TO DISP IA -[KCYBOARO INTERRUPT HANDLE OF THE PLOTTING ROUTINE: KEYINT: C I S RE VCR (DISABLE FURTHER INTERRUPT MOV •AKEvSR.BO •BO-THE KET PRESSEO CMPEJ R-E.RO [ I F NOT 'F* BNE t t [THEN COMPARE OTHERS DEC R l (ELSE MAKE R l MORE NEGATIVE 10 FASIEN SPIED BB RETIFRN j It: CMPB, » S.RO (IF NOT •$• BNE I t I IHEN COMPARE OTHERS INC R l (ELSE MAKE R l LESS NEGATIVE TO REDUCE SPEEO BR REIURN J t : CMPB R'A.BO ( ; I F NOT •»• BNE 3 t (THE  COMPARE OIHERS INC E AC TOR (ELSE INCREASE FACIOR TO ENLARGE T AKIS BR RETURN 3 t : CMPB A---.RO ( I F NOT ' - • BNE A t [THEN COMPARE OIHERS OCC EACTOR (ELSE REDUCE FACIOR 10 REDUCE T A H S BR RETURN « t : CMPB A-O.RO [ I F NOT ' 0 ' IOUII 1 BNE P i t U R N IHEN R t l U B N 10 P i n t MOV A lOO. A>#BE TCR ELSE REIURN ABNOBMAtlT ADD AA.SP J M P E IN ISH TO IHE END OF PIOI BE I U B N ;ENABLE THIS INTERRUPT HANDLER AGAIN M O V V I O O . A » K E T C R R l l [RETURN TO INTERRUPT POINT :DAIA F 1 1 0 : SAVE : BLKW 1 [LINK TO THE PARAMETER L IST FACIOR: BIKW 1 (SCALE FACTOR FOR THE PLOTTER i N IBUF : BLKW 1 (BUFFER STORES THE ORIGINAL INTERRUPT VECTOR L I S ! 1 . . WOOD W O B D . W O B O W O B O 3 MSG 1 ABGUI ABGUI (CALL EATRAC A P G I I 1 : ABGU7: 61KB BLKB 3 7 (SPECTRUM » (SPEEO * i t s u Out S A O : ANSWCB: W O B O BIKW . BLKB 3 1 1 MSGI : ASCI 1 ASCI I / INPU I S PEC I * TO BE PLOTTEO AND SPEED* 1 LARGER .FASIER .EG . / : /<20O> 4 1 / MSGI: ASC I I B f IE / I S THE PLOTTER 10O REAOT NOW? / MS03: A S C I I /COMMAND ' PLOT- F INISHED. GO BACK TO ' D I S P L A Y ' . / MSG4: ASC I I / S IOP NOW? /<100> EVEN ;END OF SUBROUTINE P IOI END MOVB ABGUI .RS ;R9 • N IN ASC I I B I C » I7T76O .09 ;RS • N IN BINARY : S U B R O U T I N E P l o t V E R S I O N i t I - M A S - B I A S L R5 ;R5 • O f f SCT FROM SPTAO_N T O S P T A O I * 2 A O O SAVE.RS A D O Y I 2 . R S ;RS P O I N I S T O S P T A O N F U N C T I O N Or T H I S S US R O U T INT. I S TO P L O T a S P E C T R U M IWO V O l l a G I S COOOESPONOCO MOV I R S I . R 4 [R4«4SPECt_N TO I H C • A X I S A N D » A I I S A R E OUTPUT 10 A P L O I I I R . IHC HMC Of IHf P I N ; R C S I O E O A T A P O I N T I S A L I N E A R E U N C T I O N Of IHE O l F fERENCI BE 1 WE EN IHf MOV I R 4 ) » . R ] : R ] ' S I A R T P O I N T V A L U E S Of T H C C U R R E N T P O I N T A M D IHE NEXT PO IN I . IH IS O l l » » IS FUHIIHR M U V I B J | . . « O U I ( I N I T I A L I Z E VOLTAGE OUIPUT T O » A » I S A O J U S T E O B T » S H U H M D F A C T O R . M O V (OUT.RAMP ANO V O L T H E I E R M O V | f l ] » . YOUI [ I N I T I A L I Z E Y A l l - S B Y I H E 1ST POINT • SPECIAL KEYBOARO I N T I P P U P T H A N O I I * I S L I N K C O TO HANOIC INI IBRUPIS OUR I N C P IO I 1 I N C T H C O P T I O N S ARC: :PLOI • » • T O S C A L E U P T H E P I O I B T 2 . . . |o SCALE D O W N IHE PLOT B T 2 M O V •MSC2 . 0UE S A O •f T O SPEEO UP IME P I O I M U V • I I S I 2 . 0 S ( A S K : - I S I T T H E P L O T T E R R E A O T NDWT• • $ • T O SLOW DOWN THE P L O T J S R PC.OUERV [ • O - T O Q U I T I H E P L O T I S I B ANSWER [ I F ANSWER: ' N O ' BCO f I N I S H : THEN RETURN TO ' O I S P L A ' [ELSE PLOT: !lMC P A R A M C T C R L I S T P A S S E O T O T H I S S U B R O U T I N E I S : M O V I B A I . . B S [RS-NPI N • L I S T : WORO • 0 . C A L L A D A T A MANIPU lAt ING SUBBOUIINI O I C B5 [SHOW NPOINT-1 P O I N T S I N ' H E LOOP : S A V C : .BLKM 1 A O O B E S S Of PARAMI I I P I I S I 10 C A l l O ISPLA ' MOV 104 1.04 [ R4«S ICP _ N I J U S I USED fOR f U B l H I B MOOIf ICAt IONI ; ! » C U R : ' .WORO 4 0 M . 1 COOBOINAIE Of IHf CURSOR MOVB ABGU2.R2 [ARGU2»SPCED* I N A S C I I . L A R G E R A E A S I E R SPEEO :>CUR: .WORO 0 Y COOBOINAIE Of IHf CUBSOB C M P B • 7 O O . 0 2 [ I F NO INPUT [FACTOR): .WORO o SCALE fACIOR USCO COR DISPLAY SUN Of SCANS B N I I t .IAOOI : .BIKW 1 IHE DISPLAY MOOC C l R R 2 T H E N J U S T S E T S P E E O C O N T R O L T O ZERO :SPTAOI : .BIKW I ADDRESS Of SPICIBUM SIAIUS IARI1 Of S P I C I ( BR 3 t . S P I A O J : .BIKW I AOOBCSS Of SPCCIBUM SIAIUS IABLC Of S P I C I I IS CMPB » - . R 2 [ I F N E G A T I V E ; S P I A O J : .BLKW 1 ADOBISS Of SPICIBUM SIAIUS l AB tC Of S P I C I ] B N I 2 t :SP1A04 : .BIKW 1 ADUBCSS Of SPICIBUM SIAIUS IABLC Of S P E C I A MOVB ARGU2*1,R2 THEN M O V E T H E OIGITAL P A R T I N [ S T I A / M . .BLKW I A O O R E S S Of S IACKI USCO TO SIOBE IHE SPECIRA 2 t B IC AI7T7CO.R2 [R2«SPEE0 IN B I N A R Y CMPB • - - .ARGU2 [ IF N C C A I I V E 6 1 0 3 t IHCN L O W E R T H E SPEEO. SO DON'T N f G R2 . T 1 T L C P L O T NIG A2 [R2 USCO A S SHIFT INO F A C I O R IO CONTROL SPEEO . G L O B L E X I R A C . Q U E R Y , P L O T 3» CLR r a r t O R [ S E T F A C T O P TO ZERO " C A L L .PRINT ; 5 I I INTEPRUPT HAMHCR: ; D A T A I H I I I A I I Z A I I O N : ; MOV • » 6 0 . I N I B U f [ S T O R E T H C O R I G I N A L VECTOR CTCR'ltVTTiSZ ( C O U N T E R CONTRT. REGISTER M O V >Kf YINI .PAC4} C I 8 R X S T T 7 4 -COUNTER B U f f I B R f C I S I I R M O V A I O O . K C Y C R ( E N A B L E I N T E R R U P T C K C P - I T O A 2 0 •RIAL TIME ClOCK CONTROL REGISIER C I R •«62 C f - I R - I T C I I I -.REAL TIME CLOCK B U f f f R PEC IS I IR RAMP«ITO440 (RAMP OUTPUT BU f fER O fG IST 'R ;PLOI PO IN I S : «0UT«ITO4«4 [• A l l s O U T P U T BU f f ER REGISIER 10 OSC I I I ISC W E VOUT--tT0442 : T AAIS OUIPUT B ' •"'9 R IC IS ICR 10 OSCIHISCG->l P I O I L P : MOV I R J I * . R l KIVCR»IT>«iSO :KCYBOARO INPUT CCNIROl REGISTER ASH 1ACIOf l .R I K C r R R M T T S S J ' KE YBCABO INPUT E . ' - f l R REGtS I IR M O V R l . Y O U I ; Y - A « I S - P O I N t t 1 l * 2 * » f A C t O R T ICR - ITTSS* ;IERMINAL O U t ' U ' CONTROL REGISIER M O V ( 0 1 ! . R l A S H I A C I O B . R l . : N r ' J T T H C S P C C T R U N N U M B E R AM7 <PfCO »-Up-(J«R: S U B Y O U I . R l R S . S A V E [ S A V E T H >.\:y. 1 \ . TV.I : R * N ' G R l l i i G | . - ' : NT.V f< I S T I . R 5 INPUT SPECT A . S P U D I t : * l ' l ' A I C C . R I ; 0 | . 1 0 0 » A 1 S ( Y _ A I I S I 1 - 1 l - Y AK1 SI 1 I I vTi :"• P C i-twr I ' l l 0 7 . R : ["IC'TCI IH IS BY ? - ' P 2 BCCAUSC 02 IS N I G . I I V I JSR PC . I ICMO AOO » J 0 .B3 :POINT TO NE I f t T I N son R I . PRVALU ; PRINT PNSG3 ! PB IN I ' « i a » « I S > ' NOV *MSG*.0UfSAO NOV » L I S U . R S JSR PC.OUIRT J.ASK: 'SCAN NOV ? ' I S I B ANSWER i l l TES . B N l IS | THEN CO BACK 10 NAIN JNP B I G I N I I S I CO 10 B I C I N AGAIN it: NOV | S P | * . B 1 ;R IST0RI R 3 . B a . R t . B O NOV I S P | * . R 3 NOV ( S P | « . R I NOV ( S P | » . R O B I S PC :BEIURN :OATA F I I I O : SAV I : .BLKM 1 i L INK 01 IHt PABAMII IB LIST L l S t l : WOBO 1 , ;CALL IECHO 14 : .BLKM I LIST}- . WOBO 1 {CALL QUIRT OUISAO .BLKM I :AOORESS 01 OUtSI ION ANSVIR .BLKM 1 :ANSWER BTIE . I V I N L I S T 3 : WOBO a :CALL IATRAC NSGAO: .BLKM • ;A0ORISS 01 MESSACE ARGAO: WOBO ABGU ;ADOBESS O l ARGUN!NT ABGU: .BLKM ; ARGUN! NT IS A B BTTI B U M IB L I STA : STRGA0: WOBO WORO ABGU NUNBIR: .BLKM ;CALL BINABT ;ADOBESS OF THt STRING TO BE CONVIRIED 10 ; BINARY INO SIGN) -.BINARY NUNBIR SMI ICH: .BLKM MAI: WORD N IN : WORO MSGO: A S C I I MSGO. I : ASCI I . ASC I I MSGO 3: ASCI I ASC I I MSGO.I NSGO.a ;A SMIICH SMITCHINC BETWEEN MSGO I 10 MSGO 3 :HA I : AOORESS OF IHI MESSAGE OF SHOWING MAI .N IN : AOORESS OF IHE MESSAGE OF SHOWING NIN « I J x I W O U I P U t VOLTAGE RANGE CHICK : / /NOW SHOWING THE MAI I MUN OUIPUI VOLTAGE. / /WANT TO CHECK MINIMUM? /'?00> /MOW SHOWING THt MINIMUM OUIPUI VOLTAGE / /WANI TO CHICK MA HI MUM? /<]O0> MSG I: ASC I I «I1><1S>/IKE DEFAU l t SCANNING PABAMEIERS ARE / ' I J • - I S - - J O O . NSGI 1 ASCI I < 1 1 " I 5« / BAIE IN -SEC /<30O> NSGI 3: ASCI 1 « I 2 x I S > / » Of SCANS: /<JOO> NSGI 3 ASCI I « ! } • < I S - / STABI POINT* /<2O0> NSGI 4 : ASCI I « I2>«IS>/ c OF PO IN IS : / O 0 0 > NSC 1 5 : ASCI I «ia»«I5>/ S U P S i l l : /«JOO> NSGI A S C I I / 1 MSGA ASC I I /ABE THE DEFAULT VALUES OKT / B Y I I aoo NSGS ASC I I « ia>/INPUT NtW SCANNING PARAMETERS: 1DEFAULT • 0 1 0 VALUE 1/ ASCI 1 «ia>< is>«aoo» HSG6 ASC I I <I3>/SCAN NOW? /«200> MSG? ASC I I < i?>< ia>< u>< t?><i3><i]><i]><i2><ia>< l a x u x i j x I>><I>><II> . A S C I I / IHE SCANNING PARANEURS A R E : / EVEN .ENO OF SUBROUTINE PARANE I NO SUBROUTINE M M VERSION (.1 t -MAR-S t CONVERT THEN TO TUNCT ION OF THIS SUBROUTINE IS TO INPUT SCANNING PARANt TIPS. BINABY AMD RETURN IH tS t VALUES. THt PARANtTER L I S T PASSIO THIS SU8R0UIINE IS AS FOLLOWS: L I S T : WORO S : 9 ABGUMINTSIRAIE. NSCAN. START. IND . S 1 I P I R A T I : .BLKM I ;RATE Of SCAN IN N I LL ISEC NSCAN: .BLKM I ;NUMBER Of SCANS S IARPT: .BLKM I ;MHERE TO START SCANNING NPOIN I : .BLKM I ;HOW MAN* POINIS TO BE SCANNED STEP: .BLKM I ;IHE ST I P SITE 01 IHt OUIPUI VOL T AGE S I I I M D : .BLKM I ; IHC SIZE 01 ME MOR r ALLOCATED TO IHIS SPECTRUM .T ITLE GET SCANNING PARAMETERS .GLOBL BINARY.EXTRAC. IECHO.QUERY.PARAME .HCALL .PRINT RAMP* ITEM 40 •0UT>ITO444 :RAMP OUTPUT BUTTER R I G I S I I R i « AX IS OUTPUT BUTTER REGISTER TO O S C I l l l S C O P t PARANt NOV as.save {SAVE THE LINK MOV B O . - I S P l i S a v t R 0 . R I . R 1 . R 3 NOV B I . - I S P I MOV B 3 . - I S P I NOV B 3 . - I S P I . ; CHECK THC OUTPUT VOLTACC RANGE BEG IN : NOV a-1.SMITCM {SMIICH BETWEEN MAY IMUM AND MINIMUM PRINT •MSGO ;PRINT ' (HECK OUTPUT VOLTAGE RANGE' It: NOV •7T7T.RANP {SHOW MA (I MUM VOL 1 AGE OUIPUI NOV RAMP.YOUT { It: NOV «MAX«I .R I { B l POINTS BETWIIN AOORISSES 01 WAX A NO NIN AOO SMITCH.RI {RI NOW POINIS 10 aODRCSS 01 MAY OR MIN NOV IR I I .OUESAO {ASK: 'WAN1_J0 CHECK NA I /N IN VOLIAGIT ' MOV • L I S T J . R S { H I R S T IIME SHOW MAX BUT ASK MINI JSR PC.UUERY TSTB ANS VIR sir NO B IO RANGOK THEN CO TO RANGE OK N IG SMIICH 1 ELSE IE SHOVING MINIMUM B IT It | IMEN SMIICH MA HI MUM CLB RAMP ELSE SHOW MINIMUM VOLTAGE OUTPUT CLB •OUT BR • t {SHOW OETAULT VALUE: RANGOK: PRINT ANSGI NOV S A V f . R l MOV AS .H I ADO • I B ] NOV • M S G I . I . R 3 PROIFT: .PRINT R3 {PHINTI ' THE D E f A U l l SCANNING PARAMIIERS ARE ' ; RI • ARGUMtNT COUNI {RI-ARAIE IA TAniE CONIAININC THE PARANEIIRS I {R3 POINTS TO IHI MISSAGI {PRINT PARANE!IR NANE NOV I R J I » . 1 4 {PRINT IHE DEFAULTIO PARAMf I t R VALUI NOV ' L I S T 1.RS JSR PC . IECHO Alio • 30 .R3 {POINT TO NtXT H E N SOB R 1 . P R O E M ; PRINT •NSGI I PRINT ' « l l > < 1 3 > ' NOV •NSC4. OUE SAO NOV • I I S I I . R S {ASK : ' ABC THE OETAULT VALUES ACCEPTABLE? ' JSR PC .OUfBY I S I B ANSWER : i r ANSWER YES BNE I I N I S H THEN BETURN {GET PARANETERS GEIPAR: NOV SAVE .R3 ADD » 3 . R I :R3 POINTS TO aRATElTABLE TO STORE PARAMETERS! PRINT 'MSGS {PRINT HEADING NOV •MSGI . I.NSGAD {NANE Of f l R S I AROUNENIISAMC AS ECHOEO ONCSI NOV • S . H I {RI • ARGUMCNI COUNT INPUT: NOV • L I S T S . B S ; INPUT RATE.NSCAN.START.NPOINT.STEP JSR PC .EX IRAC CMPB •30O.ARGU :TEST i r o i r A u i l B IO I t I H f N SK IP AND KEEP THC OLD VALUI MOV • I I S T 4 . R S ELSE CONVIRI AND UPDATE THC NEW VALUE JSR PC.BINARY NOV N U N B I R . 1 R I | I t . AOO • IO . .NSGAO {POINTS TO NANE 01 NEXT ARGUMENT AOO • 1.R7 {ADVANCE THC POINI IR SOB R I . INPUT {CALCULATE THE SIZE OF MEMORY TO BE ALLOCATED TO THIS SPECTRUM IN WORDS: GEISZB CIR RO NOV - A I R I I . R I { -4IR3 l»MPOINT OIV O S S .RO I S I R I ; l r 440 Of MINDER BEO UPOSZB {THEN JUST UPOalC S I / I B K BT OUOTIINT INC RO { I L S I S IZ IBK«OUOTI INI* I UPOSZB ASM •1..RO {RO • SIZfWO (A M I L I I P i t Of 2SS WOROSI NOV R O . I R I I {SIORC SIZfWO {JOB DONE : F I N I S H NOV SAVE .R1 { IN IT IA L I ZE X . A I I S 01 OSCILLOSCOPE NOV •409S . R I SUB S I R I I . R I AND VOLTAGE OUTPUT TO SPECTROMETER ; I R I " 4 0 M . - S I A R I _ P 0 I N I | NOV RI .XOUT NOV R 1 .RAMP • :PRINT IHI UPOATED PARANEIERS: PRINI •MSGT NOV • S . R I {R 1 •ARGUMENT COUNI AOO >7.B3 ; R ? . * R A I f |A TABLE CONTAINING IHE PARANETERS! NOV •MSGI I . R 3 {R3 POINIS IO IHt MISSAGI PRvAMI: PRINT B I {PRINT PARAMFIIR NAMf NOV I R I I * . 1 4 {PRINT IHt D tEAUL I tO PARAMEIIR VALUE NOV • H S I I . B S ••MOV .HOOO AROU9 M S G I : A S C I I / S E A R C H S P I R C S / < tj»« t9» ASCII / I N P U T S I A R I P O I N T * . • P O I N I S . l l f l CRItlRION. / • s e n / a i c M i C R I T E R I O N , A N D S P E C I * / . I V I N L I S T J : W O O O 1 A S C I A O : .am* I • I N U M : B L M M I START: •IBM 1 ;START POINT* fOR IHf SfARCH NPOINT: BIKW I ;• Of POINIS ID BI SIARCMIO l i r i : U M I • l l f l CRIICRION AS A SPIKI aiCMI: .Biaw 1 'RIGHT CRIIIRION AS A SPIKI ABGUI: .BIB* 9 (ASCII INPUI AS SIARI ABOUT;: BLKM 1 (ASCII INPUT AS NPOINT ABGUI: .BLKW 9 •ASCII INPUI AS II1 1 ABGUA: BIKW S (ASCII INPUI AS RICH! ARGUS: .BLKB a (ASCII INPUT AS SPICI* MSG I' I: ' ! ASCI I * "/••*>' THE ' SPECI! ICD POINT IS OUI Of RANGE. NOW l A K f (III / .ASCII /MINIMUM./ (ASCI: .ASCII /COMMAND 'LEVEL' EINISHEO. GO BACK 10 'DISPLAY' /•!?>• IS-.CVCN :ENO Of SUBB0U1INC LEVEL END (CALL BINARY 10 CONVERI ASCII lO BINARY ;ASCIAO I S IHE AOORCSS Of IMC ASCII SIRING ; B I N U M I S THE RIIURNEO BINARY NUMBIR tURAIWIIKf OUI VfRt lON I I l-MAB-tl IM. IUNC1ION Of INI1 U*l*OUl I M |1 TO JAAAP OUT Of f Ml (Mf I Ml If OttPLAt lOO* ' » » " ' ( • n o PASSIO i a IMII -H jaaou i i iM j i s : C A l l a OAIA MMIPUlAfINS (HjaBOUtlM laooattt Of »«**M'fa n i l to can OIYPIA' < jut i U M O to* I I A I M I aooif leaf lorn :• cooaotiMti of I M cuatoa i» c o a n i w u of I M cuavoa : l r « i i f a c t o * U M O fO» OIIAIAY sua) of SCAMS :iHf o i t a i A T acof ; a o o a i s i o* SPICIBUM (Ya ius TABIC or tffcti ; a n o « I S ( Of l a t C I B t A a l l a f u * f a B l l Of IAICIJ :«ixjo«sl or I X C t l W YIAtUt t a a n Of I M C I I : a o f > a l l l Of »»lclau*i l l a f u l l a a u Of m t l l :Aooa is t Of iiAcai u l i o lo stoat IH< sa fc taa • • • • • • • • • • • • • • • . • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • . • . • . • a : I I M wnao •o :»*»« • IKV « :»eua •oao aoa ; tcua .woao 0 :> i ( toa wnao o .aooi .01 «w 1 : 1 » H H I : • l a v 1 .»»la0»- a t a v 1 .»*t*o i - Ol aw 1 :t*l*Oa • law 1 .M»»0« a i a v 1 • • • m i l OUI cioai out" m i •on • u . a t l a M . a i :aa • a n d •ao* aa .Moot ATJIMIS TO POIMTia Of I I A l U t taan I •uv • i.a» ;•> • A O M I B I I a u_n ! t _ a i f i a i N X < ;CIi»a OUI IHf 1 1 a i a a i i o M •IIHt lM IMt • A l l t l M f AMD TMt IPfCIBA f | * l l : l oo* BI TO • 3 u : l f INI l a i c i a u a 11 NOI OM D I l P l A i BIO MOf IM i IMIN agio CMica M I I O M MOV ( • M A I * J POINT* TO Y'AIUS T A i a i •Klv i c o n a i • i • HI AO • o o a t l l anv mtaii .ao . ao • S i l l IN MOTO1 II lua • ( • • > ! . t a i l * :ClfAO OUI IMA l t»IBat lOM »oa ao i t C I B I U B J I UPOalf TMI SIATUt lABl l KOI IN AOO • i .as . C H I C * M I U OH* III 0 • > CMAO •JO .BJ i l f CMftalO l i l t IMAM 4 tPICTBA •Cl too* IMAM emeu M i l l l l l COMIIMUt :BHioa( a n o ia i t t ias AM > IRaCI BACK TNI COMTBOL: AtlO A J .1P : v i a t u a t i Y at ium to maouM** -RUMMD' MIW li*i>.aa ; ai t ioat •< a9 . a i . a i . ao WHICH aat t a v i o M l * i i » i » . a j IM -KIIMMO' , M i a ISPM .oj M l * I I P I I . O I M l * I t P l a . R O alio • ».s» :VI0IUAHY oiTuaM te waaouilMI -0 i t* tA ' » i f H M - . a * : » . t o AA| la»io IM a n INI o* B l l P t a -M l * isa i* . oo alio • • . » • : > i a i u A H Y atluaai to a t * IMi iaaua i fO AOIMI i%ia MMM : l i I r a n i t o*» •Cf • » m a JUII a i i u a N to maul INK t a n INC o l l» i« •nn • • S P l i u SKIP f f n c i Of (toca iM i iaaua i i t BIS r c atIUAM Oala m m a m i ai«» i -.ottPtat Moot. a iM a n • t If SCAM i t OH .Ian of sur.aoutiNf oui IHO 177 APPENDIX II FIRST DERIVATIVE IONIZATION EFFICIENCY CURVES A program has been written for the LSI/11 computer in our laboratory to obtain the f i r s t derivative of the accumulated ionization efficiency curves. However, the print-out after d i f f e r e n t i a t i o n could not be f i t t e d onto one single page (instead, i t would take about 15 pages), therefore, the floppy disk with the necessary data i s brought to the UBC Computer Center, and the TELL-A-GRAF program i s used to print out the curve in i t s f i n a l form. The procedures of each of these two programs w i l l be given below. To differentiate the data which i s already stored on a floppy disk, the output from 'RECORD' i s loaded onto a 'DISK FILE' written in binary and can be re-inputed into 'RECORD' for viewing and other uses. Then the f i l e i s converted to octal (ASCII) using a system 'DUMP' routine for space limitation. This e f f e c t i v e l y puts a l l binary code into octal code. . R DUMP * BINARY.DMP = (output filename)/S:1 'BINARY.DMP' must now be edited for use in DIFF.FOR which i s a three-purpose program: 178 1. i t reads and converts octal 'BINARY.DMP' into dectal system 2. i t sets up an X-array for the channel numbers 3 . i t takes the f i r s t derivative of every point in the spectrum The editing includes the elimination of the f i r s t two lines at the top of f i l e (label) and any subsequent lines in the f i l e containing alpha-numeric characters. It also includes an EF (end of f i l e ) l i n e . . ED BINARY.DMP Differentiation w i l l proceed with the command 'DIFF' . RUN DIFF > THE NO. OF BLOCKS OF SPECTRAL DATA IN THE DUMP FILE IS? [2] -screen w i l l show converted values of binary.dmp to dectal numbers > THE NO. OF POINTS? [ ] > POINT SEPARATION IS? [ ] -screen w i l l show a l i s t i n g of the counts f i r s t , and program w i l l proceed to subroutine to calculate differentiated values and show a l i s t i n g of the three columns mentioned above: the channel number, the origi n a l count, and i t s f i r s t derivative. 1 7 9 Then the output f i l e i s in 'SPEC.DAT' which contains three columns: x = the channel number, y = the original count, and z = i t s f i r s t derivative. Now, the data i s ready to be plotted, either with the LSI/11 or with the MTS program. With the LSI/11 computer, the data w i l l be read into the plotting routine 'YORRIC.FOR'. This i s an X-Y plot of the channel number and the f i r s t derivatives of the original data points. . RUN YORRIC >POINT NO. FOR SECTION OF CURVE TO BE PLOTTED? [enter channel no., e.g. for f u l l plot 0 1996] -screen w i l l show the minimum and maximum channel nos., and program w i l l then work out the minimum and maximum values of the differentiated counts and show these values. >PLOTTER WIDTH (NOL OF COLS.) IS? [enter no. of column, usually 60 or 65] -screen w i l l show the scaling factor. >TYPE INJTIYLE OF GRAPH [ ] -program w i l l then echo t i t l e and proceed to show, on the screen, the X-Y plot. >ANY MORE SECTIONS TO PLOT? [type in 0 for NO, 1 for YES] 180 To obtain a hard copy of the output f i l e , the command to use i s 'PLOT.DAT'. . PRINT PLOT.DAT To print the differentiated X-Y plot with a printer, each point w i l l take up one line, and the channel numbers are printed on the l e f t hand side of the page with corresponding dif f e r e n t i a t e d value denoted by a dot (.). In this way, the print-out would be very long, and therefore, the data in 'SPEC.DAT' i s sent to the UBC Computer Center where a graphing program was modified to print out the plot for our purposes ('TELL-A-GRAF' in MTS Plot Routine). Similarly, the input f i l e for the MTS Plot Routine i s 'SPEC.DAT' written on a floppy disk, and this disk i s submitted to the Computer Center for mounting, after which the program can be accessed through any MTS terminal. Destination: [g] - general [$ SIGNON XXX] [password] [$ MOUNT [mounting code] FDSK *WYK* 'XXX'] [$ COPY *WYK* DISKETTE] The above copying process w i l l transfer a l l the data in the transfer diskette onto 'WYK'. 181 [$ RUN ELEC:RT11 8=DISKETTE] -data in DISKETTE i s translated [. COPY SPEC.DAT - GRAFX] [. STOP] [$ COPY - GRAFX GRAF] [$ EDIT GRAF] -the middle column has to be deleted for the x-z plot [: COL 16 40] -delete columns 16 to 40 in 'SPEC.DAT' [: SH/F L 10] -columns are shifted 10 spaces to the l e f t [: DEL 1 3] -delete lines 1 to 3 [: RENUMBER] [: STOP] [$ EMPTY DATA] -'DATA' i s the f i n a l f i l e as part of TELL-A-GRAF [$ COPY GARF TO DATA] [$ EDIT TELL] [:$ R *TELLAGRAF SCARDS = TELL] -this activates the plot program; and a primitive graph w i l l be shown on the screen of the MTS terminal [:$ R *QMSPLOT] -th i s i s to get a printed copy of the plot and this plot can be picked up i n the Computer Center [:STOP] [$ SIGNOFF] 182 For a detailed description of the program, refer to the UBC MTS program manuals which contain a l l the information to edit, access, and use the MTS system. Another computer program has been put to work with our system, the MCP 'WINDOW program. With this program, the IBM PC and the MTS systems can be connected, and a l l the computer terminal work can be accomplished through the IBM PC computer in our laboratory. To run the 'WINDOW' program, put 'DOS' disk in drive A: of the IBM PC computer and 'WINDOW' disk in drive B:, and enter the word 'WINDOW'. A> [B] B> [WINDOW] Then d i a l up MTS and use i t for terminal communications. With an acoustic coupler, d i a l 5011 and the phone in the cradle. A greeting message should be displayed after connection. > Where do you want to go? [g] -now the system i s in MTS, i.e., the IBM serves as an MTS terminal [# SIGN XXX] [password] Then proceed as described above, and the plot can be picked up from the Computer Center. SOME MTS EDIT COMMANDS 183 # $ CREATE YYY # $ EMPTY YYY # $ DESTROY YYY # $ EDIT YYY PRINT 1 200 -prints lines 1 to 200 PRINT *L -prints last line INSERT *L -inserts after the last line INSERT 2.1 -inserts after line 2 DELETE 12 -deletes line 12 DELETE 3 5 -deletes lines 3 to 5 RENUMBER -renumbers lines in the f i l e STOP OR MTS -exits EDIT mode and goes back to MTS # COPY YYY TO YYY1 -copy f i l e YYY to f i l e YYY1 # COPY LAD TO LAD1 (*L+1) -copy f i l e YYY following the last line of the existing data on YYY1 Again, for a detailed l i s t of commands, please refer to the MTS EDIT manual. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0060350/manifest

Comment

Related Items