Abstract:
A display employing a horizontal and vertical grid of parallel infrared light beams in front of a cathode ray tube (CRT) face wherein a finger or other object may be placed against the face of the CRT to mark a spot thereon and the spot so marked will be detected by the interrupted beams. Infrared sources and detectors are located around the periphery of the CRT face and operate in different planes to more closely follow the curvature of the CRT face and thereby minimize parallax errors.

Description:
FIELD OF INVENTION 
     This invention relates to interactive cathode ray tube (CRT) displays and more particularly to apparatus for indicating a point on the face of the CRT. 
     BACKGROUND OF THE INVENTION 
     The use of CRT video display terminals as interfaces to computers has expanded rapidly in the past decade. Keyboards, light pens, joy sticks, and other devices have been used in conjunction with these video display terminals to allow the operator to interface with a host computer in order to enter, edit and select information, prepare engineering designs and many other applications which are too numerous to list. All these interactive video display terminal applications require a physical element such as the keyboards, light pens and joy sticks mentioned above to provide the interaction, but these devices may be cumbersome or otherwise undesirable depending upon specific applications. 
     Accordingly, in many applications it has been found desirable to provide an arrangement whereby a display operator may interface with a host computer by merely touching the face of the CRT with a finger or other object. This requires sensor arrangements that can accurately determine the point on the face of a CRT that is being touched by a finger. 
     An arrangement in the prior art for providing this feature utilizes a matrix of intersecting light beams which are all located in one plane in front of a CRT face. However, in the industry, curved face CRTs are used very widely to minimize focus and other problems inherent to flat face CRTs. With curved face CRTs and beams lying in one plane, parallax problems arise which have been objectionable enough that light beam techniques have never been accepted in the industry. With a curved face CRT a light beam is close to the CRT face at the middle of the display area but is spaced further from the face nearer the edges of the screen. Due to parallax caused by this spacing finger or other object not oriented vertically to the CRT face then interrupts a light beam not related to the spot on the screen being touched. This causes operational errors. Accordingly, the use of intersecting light beams has never been accepted in the industry. 
     Thus, there still exists a need in the art for an arrangement whereby a person may interact with a computer without special equipment such as light pens and without having errors due to factors such as parallax. 
     SUMMARY OF THE INVENTION 
     In accordance with the teaching of our invention we provide a curved face CRT display coupled to a computer and the equipment operator may interact with the computer by merely touching the face of the CRT with, for example, a finger to perform many functions limited only by the imagination of the programmer who writes the operational software for the system. 
     Our invention utilizes infrared light sources mounted around the edges of and located close to the curved CRT face. The beam from each source along an edge lies in a first plane and is adjusted to be tangent to but not touching the face of the screen on a first half of the CRT face closest to the last mentioned edge. It can be recognized that these same beams pass further and further from a convex CRT face as they pass over the half of the CRT face furthest from the last mentioned edge. This increasing spacing of the beams from a curved CRT face causes a bad parallax problem which has never been solved. To solve this problem we provide infrared light sources along the opposite edge of the CRT face adjacent the second half of the screen. The beams from the last named sources only pass tangent to the screen over the second half of the screen. Thus, each beam is relatively close to one half of the face of the CRT. This is repeated for the remaining two edges of the screen. 
     As the face of the CRT is touched, two horizontal beams are interrupted, one close to the CRT face and the other spaced from the CRT face. At the same time two vertical beams are interrupted one close to and one spaced from the CRT face. A programmed microprocessor then utilizes the addresses of the interrupted vertical beams to determine which horizontal interrupted beam is closest to the CRT face at the point touched and the other horizontal interrupted beam is ignored. The same process is repeated utilizing the addresses of the interrupted horizontal beams to determine which interrupted vertical beam is closest to the CRT face at the point touched. The other interrupted vertical beam is ignored. Using the addresses of the interrupted horizontal and vertical beams closest to the CRT face at the point touched, the microprocessor accurately identifies the point being touched despite the finger or other object not being vertical to the face of the screen. 
     Our invention will become more apparent upon reading the following detailed description in conjunction with the drawing in which: 
     FIG. 1 shows the spatial relationship of infrared sources spaced around a CRT with respect to the curved face thereof; 
     FIG. 2 shows the spatial relationship of infrared sources spaced around three of four sides of a curved face CRT as is described herein as the preferred embodiment of the invention; 
     FIGS. 3 and 4 show a block diagram schematic of our invention; and 
     FIG. 5 is a timing diagram of signal waveforms in our invention. 
    
    
     DETAILED DESCRIPTION 
     In accordance with the teaching of our invention, we utilize parallel vertical and parallel horizontal infrared light beams but no parallax problems occur with a curved CRT face. To achieve this goal we utilize a multiplicity of infrared sources (Light Emitting Diodes) located around the periphery of the CRT face and we also utilize a like multiplicity of infrared detectors also located around the periphery of the CRT face. These infrared sources (LEDs) and detectors cooperate in pairs. 
     On each of the four sides of a rectangular face CRT, the infrared sources are located close to the CRT face and are spaced along the side of the tube. The beams from the last named sources are parallel to each other and are coplanar. With the infrared sources being close to the CRT face their beams are tangent to but not touching the half of the CRT face closest to these sources. This orientation is seen in FIGS. 1 and 2 of the drawing. As may also be seen in FIGS. 1 and 2 the beams are spaced further from the screen as they pass over the half of the convex CRT face furthest from the particular infrared sources. As these beams pass over the furthest half of the screen the beams are spaced from the screen by an amount depending on the face curvature of the particular CRT utilized. 
     It should be noted in FIGS. 1 and 2 that the infrared sources on the remaining two opposing sides of the CRT face are similarly oriented and the previous discussion also applies thereto. The result, as may be seen in FIGS. 1 and 2, is that the planes in which the infrared beams lie on opposing sides of the rectangular CRT face are not coplanar. 
     The infrared detectors which detect the presence of an infrared beam from a corresponding one of the infrared sources are necessarily spaced from the CRT face as shown in FIGS. 1 and 2 in order to intercept the beam. 
     As is obvious after understanding the physical non-coplanar orientation of the infrared light beams originating from more than one side of the CRT face, a finger or other object touching the face of the CRT must interrupt more than one infrared beam. For beams originating from two opposing sides of the CRT screen a finger will interrupt one beam close to the CRT face and one beam spaced from the CRT face. This will also occur for two beams originating from the remaining two opposing sides of the CRT screen face. Thus, a maximum of four beams are interrupted. In the embodiment of our invention disclosed herein in detail, however, infrared sources are only located on the left, bottom and right sides of the CRT screen as shown in FIG. 2. Accordingly, infrared detectors are located on the left, top and right sides of the CRT screen. It was chosen to put the vertical oriented detectors on the top to minimize ambient light effects on these detectors. 
     With this preferred embodiment a finger or other object touching the screen will interrupt three infrared beams; two horizontal oriented non-coplanar beams, one of which lies close to the face of the CRT and the other of which is spaced from the face of the CRT at the point touched, and one vertical beam passing over the point touched and tangent to the center of the CRT face. It can easily be recognized that parallax problems will most likely occur with reference to the interrupted horizontal beam that is spaced furthest from the CRT face. In accordance with the teaching of our invention our novel equipment detects and identifies the interrupted vertical and two horizontal beams and then determines which horizontal beam is spaced farthest from the face of the CRT. It is the farthest spaced interrupted beam that is then ignored to minimize the parallax problem. The identification of the intercepted horizontal beam closest to the CRT face is used to indicate the vertical coordinate of the point on the CRT face that is being touched. 
     As described previously, two vertical beams may be utilized and, in the manner just described for two horizontal beams, the horizontal coordinate of the point on the CRT face being touched is determined. However, as further described, in the embodiment of our invention described herein infrared sources are only located along the bottom edge of the CRT screen with corresponding infrared detectors being located along the top edge of the screen. This embodiment allows for increased parallax but this is deemed acceptable in the particular application as horizontal rows of alpha-numeric characters are marked with a finger rather than individual points on the CRT face. If finer horizontal resolution is required, infrared sources should be located at both the top and bottom of the screen. 
     In the embodiment disclosed herein sixty-four collimated infrared sources are described for ease of representation. The exact number utilized may vary and a greater number are to be used for finer resolution of the point on the CRT face being touched. Twenty collimated infrared sources are located along each of the left and right hand edges of the screen and twenty-four sources are located along the bottom edge, with the sources along each edge being equispaced. As previously described, the sources are located near the CRT face as shown in FIG. 2 and the beams from all sources along each edge of the CRT face are parallel to each other and lie in the same plane. However, due to the curved face of the CRT, the beams originating from each edge of the CRT face are coplanar but each plane is non-coplanar with the other planes. 
     The infrared sources are then sequentially and periodically energized by circuitry described hereinafter and the output of the corresponding ones of the infrared detectors is sampled to determine which beams are broken by a finger or other object touching the face of the CRT. As all sixty-four sources are sequentially energized there will correspondingly be sequential outputs from three infrared detectors. Each infrared source is energized for one-half millisecond within a one millisecond period so each infrared source is energized once every sixty-four milliseconds. 
     The sequential and periodic scanning of the infrared sources is controlled by oscillator/clock driven digital circuitry and the clock time when a detector determines its corresponding beam has been broken indicates a horizontal or vertical coordinate of the point on the CRT face being touched by a finger. These last mentioned clock times are then processed by a microprocessor and a specific point or a row of information on the CRT face is highlighted to indicate the finger marked point, information, or command to be executed. 
     The clock count of an interrupted vertical infrared beam indicates to the microprocessor whether the point is on the left half or the right half of the CRT screen. The microprocessor knows from the interrupted infrared beam clock counts which horizontal beam originates from the left hand edge of the screen and which beam originates from the right hand edge of the screen. The microprocessor then selects the horizontal beam originating from the side of the screen corresponding to the interrupted vertical beam. The selected horizontal beam is the one close to the CRT face so vertical parallax is minimized. The horizontal beam spaced furthest from the CRT face is rejected as it would cause unacceptable parallax. 
     The clock count of the selected horizontal beam and the clock count of the broken vertical beam respectively indicate the vertical and horizontal coordinates of the point being touched by a finger. The microprocessor, which also generates the signals for the information being displayed, then causes the touched point or row of characters, etc. to be highlighted. The microprocessor will also perform other functions if the touched point indicates a command to the microprocessor. 
     In FIGS. 3 and 4 are shown the detailed block diagram of our invention. In FIG. 3 an oscillator/clock (not shown), well known in the art, is used in conjunction with flip-flop 10 and logic gates 11 and 12 to generate timing signals used to drive the digital circuitry of our invention. The clock signal applied to flip-flop 10, and logic gates 11 and 12 is shown as signal CLK in FIG. 5. Clocking signal CLK has a period of 0.5 milliseconds. Initially, flip-flop 10 is in its zero state with its zero output being high, and this output is connected to the D input of the flip-flop as well as to AND gate 12. The next clock pulse which is applied to toggle input T of flip-flop 10 causes the flip-flop to go to its one state due to the D input being high. The one output of flip-flop 10 is now high, while the zero output, which is coupled around to the D input, is now low. Upon the next clock pulse being applied to toggle input T, flip-flop 10 will be returned to its zero state because its D input is low at this time. The result of the operation of flip-flop 10 is shown in FIG. 5 with the one output signal waveform being shown as F/F1 and the zero output signal waveform being shown as F/FO. It can be seen that the output signals of the one and zero outputs of flip-flop 10 are mirror images of each other and have a period of 1 millisecond. As may be seen in FIG. 3, the one output of flip-flop 10 is one of the two inputs to AND gate 11, while the zero output of the flip-flop is one of the two inputs of AND gate 12. The second input to each of gates 11 and 12 is the clock input. The output of AND gate 11 is the signal φshown in FIG. 5 while the output of AND gate 12 is the signal φ2 shown in FIG. 5. The period of both signals φ1 and φ2 is 1 millisecond and these two signals are 0.5 milliseconds out of phase with each other. Signals φ1 and φ2 are used to drive circuits of our invention. 
     As may be seen in FIG. 3, signal φ1 is input to six bit counter 13 which counts in binary fashion and provides a six bit binary number on its output leads. The three lower order bits of the six bit binary number output from counter 13 are input to both one-out-of-eight (1/8) decoder 14 and one-out-of-eight (1/8) decoder 15 as shown. Decoders 14 and 15 respond to the three bit binary number input to them to sequentially provide a signal on one out of the eight leads output from each of these circuits. With respect to decoder 14 the eight output leads are used to sequentially select one of the total of eight of one-out-of-eight (1/8) decoders 17 within decoder 16. The three lower order bits output from six bit decoder 13 are applied to each of the decoders 17 within decoder 16. The result is that each of decoders 17 is sequentially selected and, upon each of decoders 17 being selected, their eight output leads are individually and sequentially energized. The end result is that the sixty-four total output leads from decoder 16 are individually and sequentially energized for 0.5 millisecond periods beginning with each φ1 pulse and in approximate synchronism with the F/FO signal. 
     As mentioned heretofore, the sixty-four infrared light emitting diodes are distributed around the left, bottom and right edges of the CRT face with twenty LEDs being located on the left side of the screen, twenty-four LEDs being located along the bottom edge of the screen and twenty LEDs being located along the right side of the screen. All of the LEDs are uniformly spaced along their respective sides of the face of the CRT. Each of the sixty-four LEDs located around the edge of the CRT face is connected to a corresponding one of the sixty-four ouput leads from decoder 16 in FIG. 3. In this manner, decoder 16 is able to periodically and sequentially energize each of the infrared LEDs around the three edges of the CRT. Particularly, output leads 1-24 from decoder 16 sequentially energize each of the twenty-four LEDs located on the bottom edge of the CRT, while leads 25-44 sequentially energize the LEDs along the left hand edge of the screen and output leads 45-64 from decoder 16 sequentially energize the twenty LEDs along the right hand edge of the CRT screen. As mentioned previously, there is an LED energized during each one state of the signal represented in FIG. 5 as F/FO. This is during the second half of each one millisecond period, the first half of which is during each one state of F/F1. 
     In FIG. 3, decoder 15 has the three higher order bits output from counter 13 input thereto and alike decoder 14, decoder 15 sequentially and periodically energizes each of its eight output leads which are connected to analog switch 18 shown in FIG. 4. The three lower order bits output from counter 13 are also connected to analog switch 18. Particularly, the last-mentioned total of eleven leads input to selector switch 19 within analog switch 18. Selector switch 19 responds to these signals to sequentially select one-out-of-sixty-four inputs thereto and connect the selected input to its output which is wired to switch 20 as shown. As noted in FIG. 4, the sixty-four inputs to selector switch 19 are connected to individual ones of the photo detectors located around the edge of the CRT face. The control signals input to switch 19 cause the switch to periodically and sequentially step at a 1 millisecond rate to connect ones of the photo detectors through to switch 20 for a 1 millisecond period. Switch 19 operates such that as an infrared LED is energized its corresponding photo detector is being connected through to switch 20. 
     During the 1 millisecond period in which each photo detector is connected to the input of switch 20 the switch is operated to connect the input through to its outputs φA and φB for 0.5 millisecond periods each. This is done under the control of the F/F1 signal applied to control input E from the one output of flip-flop 10 in FIG. 3. In this manner, the detector signal input to switch 20 is switched between its two outputs for 0.5 milliseconds apiece. During the first 0.5 milliseconds of each 1 millisecond period switch 20 switches the input signal to its output φA to sample and hold circuit 21. Circuit 21 is made up of amplifier 22 and capacitor 33 in a manner well known in the art and stores samples of the signals input thereto and provides an output corresponding to the samples. During this first 0.5 milliseconds the LED corresponding to the photo detector connected to switch 20 is not operated and the only signal received by the photo detector, and input to sample and hold circuit 21 is due to ambient light. The output of sample and hold circuit 21 is input to reference circuit 24 as shown. In particular, the output of circuit 21 is applied to comparators 25 and 28. Comparator 25 has two inputs, the second input of which is connected to a voltage divider circuit comprising resistors 26 and 27 which divide voltage V as shown. The purpose of comparator 25 is to monitor the output from sample and hold circuit 21 to determine when the ambient light condition exceeds a predetermined level set by the voltage divider. When the ambient level is too high, there is an output from comparator 25 to the set input S of flip-flop 30 in interface circuit 29 which maintains this flip-flop in its one state for the duration of the time that the ambient level is too high. 
     During the second 0.5 milliseconds of each one millisecond period the control input E of switch 20 is high and a photo detector is connected via lead φB and amplifier 23 to comparator 28 which compares the photo detector data signal on lead φB with the output of the sample and hold circuit 21. Upon a finger or other object being placed against the screen of the CRT to interrupt an infrared beam, the output of the corresponding photo detector goes high, except for the ambient light level, and this high signal, which is present on lead φB, is inverted at comparator 28 and applied to input D of flip-flop 30 in interface circuit 29. While input D is low and the φ2 clock signal appears at clocking input CL of flip-flop 30, the flip-flop is placed in its zero state indicating an interrupted light beam. The one output of flip-flop 30 is applied via a driver amplifier 31 to microprocessor 32 which interprets the low signal as an interrupted beam and then supplies an acknowledgement signal via lead ACK to the reset input R of flip-flop 30 to return the flip-flop to its one state. In order for microprocessor 32 to know which infrared light beam is interrupted as indicated by the low signal output from flip-flop 30, the six bit binary number output from counter 13 in FIG. 3 is applied via driver amplifier 31 to microprocessor 32. From the address information and beam interrupt information input to microprocessor 32, microprocessor 32 identifies three infrared light beams which are interrupted by a finger or other object during each sixty-four microsecond period in which all the light emitting diodes are scanned. 
     From the interrupt information input to microprocessor 32, the microprocessor first determines which of the twenty-four vertical infrared beams is interrupted and uses this information to determine which interrupt address for the two interrupted horizontal infrared beams should be utilized. If the infrared beam for vertical oriented LEDs 1-12 is interrupted, the microprocessor knows that the object interrupting the beam is touching the left half of the CRT face. Similarly, if the infrared beam of LEDs 13-24 is interrupted, microprocessor 32 knows that the object interrupting the beam is touching the right half of the CRT face. As previously described, the two horizontal interrupted infrared beams are generated by an LED source at each of the left and right hand edges of the CRT face. To minimize parallax errors, microprocessor 32 will only utilize or consider the infrared beam originating from the left edge of the CRT face when the interrupted vertical beam originates from LEDs 1-12; and microprocessor 32 will only consider the infrared beam originating from the right hand edge of the CRT face when the interrupted vertical beam originates from one of LEDs 13-24. 
     Once microprocessor 32 determines which interrupted horizontal beam to consider, it utilizes the clock information input thereto from counter 13 in FIG. 3, for the interrupted vertical beam and the selected interrupted horizontal beam to calculate the address of the point on the CRT face which is being touched by a finger or other object. Microprocessor 32 then uses this point address to perform various functions. The information displayed at the point touched may indicate a command to be executed and microprocessor 32 then causes the command to be executed. The procedure may be a bit more complicated whereby the first point touched on a screen may indicate a given type of processing to be performed on information displayed at a second point to be touched on the CRT face. Many variations may be implemented limited only by the programming of microprocessor 32. Another function that may be accomplished is to perform a display inversion upon the point touched. In this case, for example, light alpha-numeric characters may normally appear on a dark background and, upon touching the point, the point or a predetermined area of the screen is inverted such that black letters are displayed on a white background to indicate to the operator by visual feedback which point is being processed by the microprocessor. 
     The following program listing is the program put into microprocessor 32 to implement the invention and is written in assembly language, which is well known in the art. The program is input via an 8080 assembler to an 8080 microprocessor coupled with sufficient memory. Descriptive headings are provided throughout the program listing to identify sub-routines that implement the various functions of the program. These functions are described hereinabove in this specification. 
     
         __________________________________________________________________________     ;NOW START OF TIPS PROGRAM     ;     ORG 0C000HC000 00   START: NOP ;SET SPACE FOR FF&#39; TO FOOL POLY MONITORC001 CD 08 C0          CALL SETUPC004 FB        EIC005 CD 1C C8          JMP TITLC008 21 20 C9     SETUP: LXI H,PARL ;STORE ADDRESS OF PARALLEL PORT       HANDLER IN WORMHOLEC00B 22 12 0C     SHLD SRA2 ;INTERRUPT ADDRESSC00E 21 BE CA     LX1 H,OFF ;SET RETURN ADDRESS TO TURN OFF TEST       INTERRUPTC011 22 14 0C     SHLD SRA3C014 00   NOPC015 22 10 0C     SHLD SRA1C018 3E FF     MVI A,OFFH ;CLEAR FLAGSC01A 32 0C 0C     STA KBUFF ;CLEAR KEY BOARD BUFFER FLAGSC01D 32 0D 0C     STA KBUFF+1C020 32 8D 0C     STA MBUFF ;CLEAR MOBLE INPUT BUFFERC023 32 8E 0C     STA MBUFF+1C026 21 00 2F     LX1 H,SA ;PUT A 0 AT BEGINNING OF SPARE STACKC029 36 00     MVI M,0C02B 21 80 0C     LXI H,PBUFF ;CLEAR BUFFER TABLEC02E 06 0C     MVI B,0CH ;SET COUNTERC030 77   STA1: MOV M,AC031 23   INY HC032 05   DCR BC033 C2 30 C0     INZ STA1C036 CD 86 C8     CALL CLEAR ;WRITE SPACE CODES IN MOBILE REFRESH       MEMORYC039 CD 0C CA     CALL INIT ;CLEAR ACID STACKC03C CD 86 C8     CALL CLEAR ;CLEAR DISPLAY MEMORYC03F C9   RETC040 CD 86 C8     ST2: CALL CLEARC043 CD E9 C6     CALL FORM ;SET DISPLAY FORMATC046 CD 86 C7     CALL FIX ;SUBROUTINE TO PUT FIXES IN DISPLAY PATERNC049 CD BF C7     CALL WORK ;PUT WORDS INTO FIXED DISPLAYC04C CD 55 CA     CALL ACID ;INITIALIZE ACID DISPLAYC04F C9   RET     ;INSTRUCTION DECODE THIS PART OF THE PROGRAM WILL       DECODE THE     ;DIFFERENT KEYBOARD INPUT COMMANDSC050 D3 23     INST: OUT CLRPRT ;CLEAR I/O BUFFERSC052 FB   EIC053 3A 0C 0C     LDA KBUFF ;GET KB STATUSC056 B7   ORA A ;SET FLAGSC057 CC 6B C0     CZ KEYINC05A 3A 80 0C     LDA PBUFF ;GET PARALLEL INPUT STATUSC05D B7   ORA A ;SET FLAGSC05E CC E4 C0     CZ PARINC061 3A 8D 0C     LDA MBUFF ;GET THE MOBLE INPUT FLAGC064 B7   ORA A ;SET THE STATUS FLAGSC065 CC D9 CA     CZ MOBILE ;CALL MOBILE INPUT HANDLERC068 C3 50 C0     JMP INST ;RETURN IF NO INPUT     ;     ;     ;     ;PARIN THIS ROUTINE WILL CONTROL THE PROCESS OF       DECODING     ;AND EXECUTITING THE DESIRED TOUCH ENTRY COMMAND     ;C0E4 CD AE C8     PARIN: CALL PDEC   ;DECODE PARALLEL INPUTC0E7 21 88 0C          LXI H,PDON    ;CHECK DONE FLAG NEED THREE       INPUTSC0EA B7   ORA A ;SET FLAGSC0EB C0   RNZ ;NOT DONE RETURNC0EC CD 61 C1     CALL CMD ;COMMAND DECODE ROUTINEC0EF C8   RZ ;NOT VALID COMMAND ZERO FLAG SET     ;COMMANDS RETURNED IN THE COMMAND BUFFER (BCMD)     ;  XLGC =01  XTRC =02   XLCL =03   TERM =04     ;  A     =05   B    =06  LFPL =07  LFPG =08     ;  CANCEL=80 NO COMMAND IF =FF AND ZERO FLAG SETC0F0 3A 8C 0C     LDA BCMD ;CHECK FOR CANCEL COMMANDC0F3 FE 80     CPI 80HC0F5 C2 2E C1     JNZ PAR1 ;IF CANCEL COMMAND FOUND OR END OF COMM       ENTER HERE     ;REMOVE THE INVERSE VIDEO FLAGS     ;AND CLEAR THE COMMAND BUFFERC0F8 2A 90 0C     PCLR: LHLD INV1 ;GET THE INVERSE VIDEO POINTERS AND       CLEAR THE INVERSE VIDEO FLAGSC0FB 3E A0     MVI A,0A0HC0FD 77   MOV M,AC0FE 21 FF F7     LXI H,0F7FFH ;CLEAR THE FIRST INVERSE VIDEO FLAGC101 22 90 0C     SHLD INV1C104 2A 92 0C     LHLD INV2C107 77   MOV M,AC108 21 FF F7     LXI H, 0F7FFH ;CLEAR THE SECOND INVERSE VIDEO FLAGC10B 22 92 0C     SHLD INV2C10E 2A 94 0C     LHLD INV3C111 77   MOV M,AC112 21 FF F7     LXI H,0F7FFHC115 22 94 0C     SHLD INV3C118 2A 96 0C     LHLD INV4C11B 77   MOV M,AC11C 21 FF F7     LXI H,0F7FFHC11F 22 96 0C     SHLD INV4C122 21 8C 0C     LXI H,BCMD ;CLEAR THE COMMAND BUFFERC125 36 FF     MV1 M,0FFHC127 CD 55 CA     CALL ACID ;DISPLAY THE UPDATED ACID TABLEC12A D3 23     OUT CLRPRT ;CLEAR I/O BUFFERSC12C FB   EIC12D C9   RET ;RETURN TO MAIN PROGRAM     ;     ;VALID COMMAND RECEIVED NOW GO EXECUITE THE        SUBROUTINE     ;THAT PREFORMES THE COMMANDC12E 21 49 C1     PAR1: LXI H,JTAB ;SET HL POINTERS TO THE JUMP TABLE     ;     ;THIS SUBROUTINE LOOKS AT THE PARALLEL INPUT       AND DETERMINES     ;WEATHER IT IS VERTICAL, OR HORIZONTAL INPUT       AND STORES     ;IT IN THE CORRECT INPUT BUFFER. IT ALSO       SETS THE BUFFER FLAGSC8AE 21 80 0C     PDEC: LXI H,PBUFF ;SET POINTERC8B1 23   PDEC1: INX HC8B2 7E   MOV A,M ;GET DATAC8B3 2B   DCX HC8B4 36 FF     MVI M,OFFH ;CLEAR FLAG     ;NOW IS DTAT VERTICAL INPUT, RIGHT HORIZ, OR       LEFT HORIZ.     ;STORE DATA IN CORRECT BUFFER AFTER DICISIONC8B6 FE 18     CPI 18H ;CHECK FOR VERTICALC8B8 FA EF C8     JM VINP ;BRANCH IF VERTICALC8BB 47   MOV B,A ;SAVE DATAC8BC 3A 86 0C     LDA VPOI ;GET VERT FLAGC8BF B7   ORA A ;SET FLAGSC8C0 C0   RNZ ;IF NO VERT DATA RETC8C1 78   MOV A,B ;RETURN DATAC8C2 FE 2A     CPI 2AH ;CHECK FOR RIGHT HORIZ.C8C4 FA DD C8     JM RIGHTC8C7 21 84 0C     LEFT: LXI H,LPOI ;SET LEFT POINTERC8CA 47   MOV B,A ;SAVE INPUTC8CB 7E   MOV A,MC8CC B7   ORA A ;SET STATUS FLAGSC8CD CA FF C8     JZ END1 ;ALREADY HAVE A RIGHT INPUTC8D0 00   NOPC8D1 00   NOPC8D2 34   INR M ;SET FLAGC8D3 23   INX H ;INCREMENT POINTERC8D4 78   MOV A,BC8D5 DE 2B     SBI 2BH ;CORRECT ADDRESS TO THE LIGHT NUMBERC8D7 77   MOV M,A ;STORE LIGHT NUMBER IN BUFFERC8D8 C3 FF C8     JMP END1C8DB 00   NOPC8DC 00   NOPC8DD 21 82 0C     RIGHT: LXI H,RPOI ;GET RIGHT POINTERC8E0 47   MOV B,A ;SAVE DATAC8E1 7E   MOV A,M ;GET FLAG FROM MEMORYC8E2 B7   ORA A ;SET STATUS FLAGSC8E3 CA FF C8     JZ END1 ;ALREADY HAVE A RIGHT INPUTC8E6 34   INR M ;SET FLAGC8E7 23   INX H ;INCREMENT POINTERC8E8 78   MOV A,BC8E9 DE 19     SBI 19H ;CORRECT ADDRESS TO THE LIGHT NUMBERC8EB 77   MOV M,A ;STORE LIGHT NUMBERC8EC C3 FF C8     JMP END1C8EF 21 86 0C     VINP: LXI H,VPOI ;GET POINTERC8F2 00   NOPC8F3 00   NOPC8F4 47   MOV B,A ;SAVE DATAC8F5 7E   MOV A,M ;GET FLAGC8F6 B7   ORA A ;SET STATUS FLAGSC8F7 CA FF C8     JZ END1 ;ALREADY HAVE VERTICAL DATAC8FA 00   NOPC8FB 00   NOPC8FC 34   INR M ;SET FLAGC8FD 23   INX H ;INCREMENT POINTERC8FE 70   MOV M,B ;STORE INPUTC8FF 21 82 0C     END1: LXI H,RPOI ;GET POINTERC902 00   NOPC903 00   NOPC904 7E   MOV A,M ;GET FLAGC905 B7   ORA A ;SET STATUS FLAGSC906 C2 1F C9     JNZ DONE ;NOT SET JUMPC909 00   NOPC90A 00   NOPC90B 23   INX H ;INCREMENT POINTERC90C 23   INX HC90D 7E   MOV A,M ;GET FLAGC90E B7   ORA A ;SET STATUS FLAGSC90F C2 1F C9     JNZ DONE ;NOT SET JUMPC912 23   INX H ;INCREMENT POINTERC913 23   INX HC914 7E   MOV A,M ;GET FLAGC915 B7   ORA A ;SET STATUS FLAGSC916 C2 1F C9     JNZ DONE ;JUMP IF NOT SETC919 23   INX H ;INCREMENT POINTERC91A 23   INX HC91B 36 00     MVI M,00 ;SET PARALLEL INPUT BUFFER FULL FLAGC91D 00   NOPC91E 00   NOPC91F C9   DONE: RET     ;     ;PARALLEL INPUT INTERRUPT HANDELER     ;IT PUTS THE INPUT DATA INTO PBUFF+1 AND SETS       THE PARALLEL     ;INPUT FLAG. PBUFF=0 DATA READY, PBUFF=FF        DATA NOT READYC920 21 80 0C     PARL: LXI H,PBUFF ;SET POINTERC923 DB 20     IN PORT ;READ THE INPUT DATAC925 47   MOV B,A; SAVE THE DATAC926 E6 3F     ANI 3FHC928 FE 17     CPI 23 ;NOT A VALID INTRC92A CA 64 00     JZ IORETC92D FE 3C     CPI 60 ;INTER OVER 59 NGC92F F2 64 00     JP IORETC932 00   NOPC933 00   NOPC934 7E   MOV A,M ;GET POINTERC935 B7   ORA A ;SET FLAGSC936 78   MOV A,B ;GET THE DATA IN AC937 CA 41 C9     JZ FULL ;IF BUFFER STILL FULL RETURNC93A 36 00     MVI M,0 ;SET PARALLEL INPUT FLAGC93C 23   INX H ;INCREMENT POINTERC93D E6 3F     ANI 3FH ;MASK OFF THE UPPER BITSC93F 77   MOV M,A ;STORE INPUT DATA     ;C644 00   NOP     ;ACDEC THIS ROUTINE WILL TALE THE PARALLEL INPUT       DATA     ;AND CHANGE IT INTO AN ACID CODE     ;  LDEP1 =01  LDEP2 =02  LDEP3 =03     ;  LARR1 =11  LARR2 =12  LARR3 =13     ;  GDEP1 =09  GDEP2 =0A  GDEP3 = 0B     ;  GARR1 =19  GARR2 =1A  GARR3 =1B     ;IF COMMAND INPUT BUT NOT A CANCEL THEN RETURN       WITH NO DATA     ;IF CANCEL OR NOT A VALID ACID RETURN WITH ZERO       FLAG SET     ;IF ACID RETURN WITH ACID CODE IN A REG     ;C645 3A 87 0C     ACDEC: LDA VPOI+1 ;READ THE VERTICAL INPUTC648 FE 03     CPI 03C64A FA 7B C6     JM LFDCMDC64D FE 09     CPI 09 ;SEE IF INPUT FROM LEFT PART OF SCREENC64F FA 88 C6     JM ACDEP ;JUMP IF DEPARTING ACIDC652 FE 0D     CPI ODH ;CHECK FOR COMMAND INPUTC654 FA 5A C6     JM ACDCMD ;JUMP IF COMMAND INPUTC657 C3 90 C6     JMP ACARR ;MUST BE FROM RIGHT PART OF SCREENC65A 3A 83 0C     ACCMD: LDA RPOI+1 ;CHECK FOR CANCEL COMMANDC65D FE 06     CPI 06C65F CA 76 C6     JZ ACDCAN ;JUMP IF CANCELC662 FE 07     CPI 07C664 CA 76 C6     JZ ACDCAN ;JUMP IF CANCELC667 FE 0E     CPI 0EHC669 CA 76 C6     JZ ACDCAN ;JUMP IF CANCELC66C FE 0F     CPI 0FHC66E CA 76 C6     JZ ACDCAN ;JUMP IF CANCEL     ;NOT CANCEL MUST BE STILL IN THE COMMAND MODE     ;SET NO DATA ENTRY AND RETURN     MVI A,0 ;NO DATAC671 3E 00     JMP ACDEND ;JUMP TO ENDC673 C3 D9 C6     ACDCAN: MVI A,80H ;SET CANCEL COMMANDC676 3E 80     JMP ACDEND ;JUMP TO ENDC678 C3 D9 C6     LFDCMD: LDA LPOI+1 ;CHECK FOR LFD COMMDC67B 3A 85 0C     CPI 06C67E FE 06     JZ ACDEC7 ;STILL LFD COMMD,RETURNC680 CA D7 C6     CPI 0EHC683 FE 0E     JZ ACDEC7C685 CA D7 C6     ACDEP: MVI B,00 ;SET THE DEPARTING FLIGHT BITC688 06 00       BIT 4=0C68A 3A 85 0C     LDA LPOI+1 ;USE THE LEFT INPUT DATAC68D C3 95 C6     JMP ACDEC1CA8080 Version 4(36) TIPS.LST=TIPS.SOU 06/26/78 @1422 PAGE 3-16C690 06 10     ACARR: MVI B,10H ;SET THE ARRIVING FLAG BIT 4 =1C692 3A 83 0C     LDA RPOI+1 ;USE THE RIGHT INPUT DATAC695 FE 02     ACDEC1: CPI 02 ;CHECK FOR THE H2 LOCAL 1C697 C2 A0 C6     JNZ ACDEC2C69A 3E 01     MVI A,01 ;SET LOCAL 1 FLAGC69C B0   0RA B ;APPEND IN THE REST OF COMMANDC69D C3 D9 C6     JMP ACDENDC6A0 FE 03     ACDEC2: CPI 03 ;CHECK FOR H3 LOCAL 2C6A2 C2 AB C6     JNZ ACDEC3C6A5 3E 02     MVI A,02C6A7 B0   ORA B ;SET LOCAL 2 FLAGC6A8 C3 D9 C6     JMP ACDENDC6AB FE 04     ACDEC3: CPI 04 ;CHECK FOR LOCAL 3 H4C6AD C2 B6 C6     JNZ ACDEC4C6B0 3E 03     MVI A,03C6B2 B0   ORA B ;SET LOCAL 3 FLAGC6B3 C3 D9 C6     JMP ACDENDC6B6 FE 0A     ACDEC4: CPI 0AH ;CHECK FOR GROUND 1 H10C6B8 C2 C1 C6     JNZ ACDEC5C6BB 3E 09     MVI A,09C6BD B0   ORA B ;SET GROUND 1 FLAGC6B3 C3 D9 C6     JMP ACDENDC6C1 FE 0B     ACDEC5: CPI 0BH ;CHECK FOR GROUND 2 H11C6C3 C2 CC C6     JNZ ACDEC6C6C6 3E 0A     MVI A,0AHC6C8 B0   ORA B ;SET GROUND 2 FLAGC6C9 C3 D9 C6     JMP ACDENDC6CC FE 0C     ACDEC6: CPI 0CH ;CHECK FOR GROUND 3 H12C6CE C2 D7 C6     JNZ ACDEC7C6D1 3E 0B     MVI A,0BHC6D3 B0   ORA B ;SET GROUND 3 FLAGSC6D4 C3 D9 C6     JMP ACDENDC6D7 3E 00     ACDEC7: MVI A,00H ;NOT A VALID ACIDC6D9 4F   ACDEND: MOV C,A ;SAVE ACID CODE A MOMENTC6DA 21 82 0C     LXI H,RPOI ;CLEAR PARALLEL INPUT TABLEC6DD 3E FF     MVI A,0FFHC6DF 06 07     MVI B, 07H ;SET COUNTERC6E1 77   ACEND1: MOV M,AC6E2 23   INX HC6E3 05   DCR BC6E4 C2 E1 C6     JNZ ACEND1C6E7 79   MOV A,C ;GET ACID CODE BACKC6E8 C9   RET ;RETURN WHEN DONE     ;__________________________________________________________________________