United States Patent 19 11) Patent Number: 4,751,726 Hepp et al. (45) Date of Patent: Jun. 14, 1988

3,885,552 5/1975 Kennedy ...... 128/904 (54) EKG TELEMETRY BASE STATION 4,004,577 1/1977 Sarnoff ...... 128/904 75) Inventors: Dennis G. Hepp, Coon Rapids; Paul 4,173,971 1/1979 Karz ...... 128/904 J. Beckmann, St. Paul; Thomas C. 4,428,381 1/1984 Hepp ...... 128/904 Evans, Fridley; Robert A. Neumann; Maynard J. Hoffman, both of Blaine; Primary Examiner-James L. Dwyer Thomas L. Jirak, Plymouth, all of Attorney, Agent, or Firm-Kinney & Lange Minn. 57 ABSTRACT 73 Assignee: Futurecare Systems, Inc., A telemetry base station for use in a system also includ Minneapolis, Minn. ing a patient worn EKG monitor and transmitter, and a physician monitoring station. The base station is micro (21) Appl. No.: 838,997 processor controlled, and includes a receiver for receiv 22 Filed: Mar. 10, 1986 ing FM EKG transmissions from the patient transmit 51 Int. Cl'...... HO4M 11/00 ter, an A to D converter, a conventional telephone set, 52 U.S. Cl...... 379/93; 379/38; used as an intercom to communicate with the physician, 379/106 and a data modem which is used for digitized transmis 58 Field of Search ...... 179/2A, 2 DP; 128/904, sions of the EKG signals. Base station functions includ 128/903; 379/93, 97,98, 104, 106, 38 ing selection of data or voice transmission are con trolled by a physician monitoring station. The base (56) References Cited station includes simulated telephone ringing functions U.S. PATENT DOCUMENTS which assist in its use by patients without specialized 3,872,251 3/1975 Auerbach et al...... 179/2A training. 3,872,252 3/1975 Malchman et al...... 179/2A 3,882,277 5/1975 De Pedro et al...... 379/106 3 Claims, 13 Drawing Sheets

U.S. Patent Jun. 14, 1988 Sheet 1 of 13 4,751,726

U.S. Patent Jun. 14, 1988 Sheet 2 of 13 4,751,726

U.S. Patent Jun. 14, 1988 Sheet 3 of 13 4,751,726

VIVO/8GGw 60/

OO/

5.1.1.NI 15899 13552] 1303×ldS

90/ 602/ 962/

ZO/WZ 962/-- #28615 U.S. Patent Jun. 14, 1988 Sheet 4 of 13 4,751,726

M/2 U.S. Patent Jun. 14, 1988 Sheets of 13 4,751,726

NURS ACT VE CALL NURSETE

Pao 222 2 PSEUDO RINGER T PA4A3 - - Y - RNGTHEBELL-a-AUXHS E. TERELAY E. s RING RELA PBf xoSTEC E. 3 T PB O PTONE 3 s TONE a 5 g; ELITE OFF HOOK PCO AEC 8. 39 GATE 2 PC3 8 3 -DOE - - - - /routfine------SSGS C...... k

E N 7 s

- SV AA

RDY 24, 5 AUX INTRout 13 STBYINTIt

PWROWN 223 SV

OSco O OSCN /56 Sfig34 i T /52 /54 U.S. Patent Jun. 14, 1988 Sheet 6 of 13 4,751,726

9 3 a 5 4 a 25 2 23 2 2O 22 U.S. Patent Jun. 14, 1988 Sheet 7 of 13 4,751,726

ASAFAOa/Maara 74/ G/Wo D (2% 224 AAe/2474 AAC/A7OAMAF Most? 13 AuOAMZIMé 247/ai/Maf f a/WaAM /2 2O Af

4. - - - - - A. 11 v S--- A FAAFSAF al 2/ : A Yazady 6- 7.5/ af 774away ada/Act L-23s org/ 23. - 27 s AsAAAA 26daeva 246 23 (1240

avazyata - 232

7taatmya alAvatawa

2/4. AZZOAAAeoAaaaaaaa 22-w- 22O r

fig-sa 6A/d U.S. Patent Jun. 14, 1988 Sheet 8 of 13 4,751,726

aAyia aAAAWAF 263 U.S. Patent Jun. 14, 1988 Sheet 9 of 13 4,751,726

U.S. Patent Jun. 14, 1988 Sheet 10 of 13 4,751,726

fig, 394 343 DA 3.54 ii E. anals 56O f5 y 2-25 33% 35A, 357 D Eds 344 C 6V 3569 ;Hé, C.D. a H 9Y . 9 SAPAFA

spike Hora U.S. Patent Jun. 14, 1988 Sheet 11 of 13 4,751,726

U.S. Patent Jun. 14, 1988 Sheet 12 of 13 4,751,726

U.S. Patent Jun. 14, 1988 Sheet 13 of 13 4,751,726

NOENOHAXOOH

H.B.LVLS ENITX?OOHNOENOHd kW3GO?awQUELOBINNO9 q318VNE 4,751,726 1. 2 One important feature of the base station is that in the EKG TELEMETRY BASE STATION event the patient desires to contact the physician during EKG monitoring, the patient need only remove the BACKGROUND OF THE INVENTION hand piece of the telephone set and press a call nurse 5 button. This will initiate a digital transmission to the The present invention relates generally to EKG and physician's base station indicating that voice communi patient monitoring systems, and in more particularity to cation is desired. While the base station waits for a telephonic electrocardiogram monitoring. response, it causes a simulated ringing signal in the Transtelephonic EKG monitoring has become rou earpiece of the base station telephone set. However, tine for patients with implanted pacemakers. Typically, 10 digital EKG transmission continues uninterrupted until such monitoring is short-term, and involves the patient and unless the physician elects to initiate voice commu contacting the physician by phone, and employing an nication and use the intercom function. Similarly, when EKG transmitter of the type described in U.S. Pat. No. the physician desires to contact the patient, although 4,151,513, issued to Menken et al. Use of such device the telephone portion of the base station is not con typically requires the patient to apply EKG electrodes 5 nected to the phone line, a telephone ring occurs to to his or her body, and to subsequently couple the moni signal to patient that voice communication is desired. toring device to their telephone to allow for a brief This simulated telephone function is believed to be period of monitoring. particularly beneficial in that it is easily understood by Long-term monitoring has typically been accom and familiar to almost all potential patients. plished by means of a holter monitor, or similar device, 20 The structure and functioning of the base station is which stored long sequences of EKG strips either on described in more detail in the following brief and de magnetic tape or in a digital memory as described in tailed descriptions of the drawings. U.S. Pat. No. 4,360,030 issued to Citron et al. With such systems, the physician typically does not have the abil BRIEF DESCRIPTION OF THE DRAWINGS ity to monitor the patient's condition in real time. As 25 FIG. 1 is a plan drawing of the base station. such, when long-term real time monitoring is required, FIG. 2 shows a plan drawing of the patient transmit patients often must remain in the hospital. ter. FIGS. 3A through 3I are schematic drawings of the SUMMARY OF THE INVENTION circuitry within the base station. The present invention provides a system which al 30 FIG.3J is a schematic drawing of the circuitry within lows for continuous long-term transtelephonic EKG the patient transmitter. monitoring. This system provides the benefits of long FIG. 4 is a state diagram illustrating the basic func term EKG monitoring without requiring that the pa tional operation of the base station. tient remain in the hospital. The system includes a patient worn EKG monitor 35 DETAILED DESCRIPTION OF THE and transmitter. This small, battery-powered device is DRAWINGS worn by the patient during the intended period of moni FIG. 1 is a plan drawing of the telemetry base station. toring, and provides an FM modulated EKG signal. In The base station 10 includes an external telephone 12 addition, the transmitter provides 2 KHz tone bursts coupled to the base station by means of a standard, superimposed over the EKG signal in the event of ei 40 modular telephone jack 14. This station also includes a ther a sensed pacemaker spike, or the pressing of a telescoping antenna 16 which is coupled to the RF patient alert button on the transmitter. receiver within. On the front of the base station are a The base station includes an FM receiver which re Call Nurse button 18 and two indicator lights 20 and 21 ceives the transmitted EKG and 3 KHz bursts. The base which indicate that the unit is transmitting information, station includes an A/D converter and a modem, both 45 or that the Call Nurse button 18 has been pressed, re under microprocessor control, and sends a digitized spectively. On the back of the unit, not visible in this version of the EKG, along with the pacing spike and drawing, are two standard modular telephone jacks, patient alert indicators to the physician's monitoring one of which is used to couple the base station 10 to the station where they may be displayed and analyzed. In patient's telephone line. addition, the base station includes a telephone set which 50 FIG. 2 is a plan drawing of the patient transmitter, allows the patient to speak to the physician. The transmitter 22 is intended to be coupled to three The base station is designed to allow operation by a EKG electrodes by means of snap connectors 24, 26 and patient with a minimum of training. When the base 28, mounted to conductors 30, 32 and 34, respectively. station is initially powered up and coupled to the pa The device includes a patient alert button 36 which the tient's telephone line, it simply functions as a telephone. 55 patient may press in the event that the patient perceives This allows the patient to contact the physician or the some cardiac abnormality or related sympton, such as physician to contact the patient in order to begin the shortness of breath, dizziness, etc. The device is battery monitoring procedure. Once the monitoring procedure powered, with batteries accessible to the patient via has begun, the telephone is disconnected from the tele battery cover 38. phone line, and the base station is coupled to the physi In use, three EKG electrodes are attached to snap cian monitoring station by means of a 1200 baud connectors 24, 26 and 28, and placed on the upper right modem. While coupled, operation of the base station is chest, upper left chest and lower right chest, respec under control of the physician's monitoring station. The tively. The transmitter provides an FM modulated out base station may be instructed to couple the telephone put signal with a center frequency of about 216 MHz, to the phone line to serve an intercom function, to pro 65 around which the EKG signal is modulated. In the vide a calibration signal, to adjust the gain of the EKG event that the device detects a pacemaker spike, a 10 signal, to transmit a measured pacing rate, and to per msec., 2 kilocycle tone is sent to the FM modulator, form various other functions. and it is superimposed over the EKG signal. In the 4,751,726 3. 4. event that the patient alert button 36 is pressed, a 60 crocomputer 100. The internal timer provides a 1.5 msec., 2 kilocycle tone is provided to the FM modula MHz CLK signal on pin 8 which is used as a base timing tor within the transmitter, and is superimposed over the signal through the rest of the circuitry. Port A including electrocardiogram signal. As will be discussed below, pins 21-28 of chip 144 is configured as an output port these three kilocycle tones are digitized by the base used to drive various I/O devices which will be dis station, and are distinguished by their differing dura cussed individually. Port B including pins 29-36 of chip tions. 144 is configured as an input port which is used to take FIGS. 3A through 3I illustrate the circuitry within various input signals and supply them to the microcom the base station. The circuitry is comprised of generally puter 100. Port C including pins 37-39, 1, 2 and 5 of available integrated circuit chips, and is discussed in 10 chip 144 is used as an output port which again controls more detail below. For reference purposes, a parts list is various functions of the circuitry. provided following the written description of the cir Timer chip 146 is a triple timer chip. This chip takes cuitry. the CLK signal at 1.5 MHz and in turn creates three FIG. 3A illustrates the microcomputer chip 100 and separate timing signals. A 20 Hz signal used for internal its associated reset circuit. Timing functions are accom 15 timing and also to control the ringing functions is pro plished using a 6.00 MHz crystal 102. The power-up vided on pin 17 of chip 146. A 300 Hz timing signal reset, which resets microcomputer 100 at either power which is a 3.3 msec.interrupt for the microcomputer 100 up or a push-button reset via reset button 105, is con and is the basic analog sampling signal for the system is trolled by inverters 104,106. Capacitor 108 charges via provided on pin 13. A 1 Hz timing signal is provided on resistor 109 at power-up and holds the pin 36 (RESET 20 pin 10 and is used whenever intervals of 1 second or IN) of microcomputer 100 low until it charges up, giv more are required. Output of timing signals on pins 17, ing the internal circuitry of the chip enough time to 13 and 10 are controlled by pins 37-39 of I/O chip 144. reinitialize. Microcomputer 100 as illustrated is an Intel Memory chip 146 is a read only memory chip. The 8085 processor chip. socket for chip 146 is configured via a jumper block 147 FIG. 3B illustrates the circuitry controlling the ad 25 to be able to accept various types of read only memory dressing functions performed by microcomputer 100. chips including 8 K, 16 K and 32 K byte ROM chips. Microcomputer 100 has a multiplex bus in which the Real time clock chip 150 functions as a real time clock data lines and the low order address lines are multi source. It is programmed and set by microcomputer plexed on pins 12-19, coupled to the data/address bus 100. Real time clock chip 150 employs its own 32.768 log 109. 30 Killocycle crystal source including crystal 152 and In order for the microcomputer 100 to operate, the start-up capacitors 154 and 156 and maintains the real address and data lines are separated out by latch chip absolute time independently of whether or not the unit 110. Each address cycle, the low address lines are is powered. latched by latch chip 110 and coupled to the address bus FIG. 3D illustrates chips 158, 160, 162, 164, 166 and 112. Driver chip 114 increases the drive capability of 35 168 which are 8K by 8 random access memory chips. the upper order address lines. Buffer chip 116 is used to Chip 168 is the fixed random access and temporary increase the drive capability of the eight data lines from storage memory chip for the entire system and is used microcomputer 100 and is coupled to the data bus 118. for temporary storage of variables. The remainder of NAND gate 120 enables buffer chip 116 only during the random access memory chips are selected using memory read and write cycles. output port lines PC3, PC4 and PC5 from pins 1, 2 and Selection of memory chips and memory mapped 5 of chip 144. input/output devices is done via decoder chips 122 and In FIG. 3DD, LED's 170 and 172 correspond to the 124. Both decoders 122 and 124 are one of eight line power on and data transmitting indicator LED's 20 and decoders. Decoder chip 122 is used to select among the 21 (FIG. 1). Power LED 120 is on whenever power is random access and read only memory chips (FIG. 3C). 45 available in the unit. LED 172 is controlled by the AC AND gates 126, 128 and 130 are used to further decode TIVELITE line from pin 22 of I/O chip 144 and is the addresses for the RAM and ROM chips. Decoder turned on via driver transistor 174. Switch 184 is a 124 is the I/O decoder which accepts the high order momentary push-button switch with an integral light address lines and divides them into individual banks of emitting diode 186 and corresponds to Call Nurse I/O addresses to enable input to and output from the 50 switch 18 (FIG. 1). The light emitting diode 186 is various circuit chips. Resistors 132 and 134 are pull-up controlled by transistor 188, controlled by the CALL resistors to hold the read (RD) and write (WR) lines NURSELITE line from pin 21 of I/O chip 144. Switch decoded by NAND gates 136 and 138 high between 184 is read by microcomputer 100 via pin 30, I/O chip read and write cycles, a facility which the microcon 144. puter 100 does not provide. Inverters 140 and 142 are 55 FIG.3E illustrates the telephone interconnect section hysteresis inverters which buffer and invert the RD and of base station 10. Modem chip 200 is a self-contained WR lines prior to driving NAND gates 136 and 138 1200 baud modem. This module functions as a complete which in turn gate the RD and WR lines to the power Bell 212A and Bell 103A compatible modem which can up reset circuitry. NAND gates 136 and 138 ensure that be directly interfaced to a microcomputer bus, and also during power down conditions when the RAM chips 60 allows direct connection to a telephone line on the (FIG. 3C) are powered off of the internal battery (FIG. public switch network with pass through FCC registra 3H), no spurious red and write signals will be applied to tion. The modem chip 200 also has audio output and the RAM chips. inputs to allow analog audio signals to be coupled into FIG. 3C illustrates Input/Output RAM and timer the phone line via microcomputer control. Modem chip chip 144 and associated circuitry. This chip contains 65 200, as illustrated, is an XE 1203 modem chip manufac 256 bytes of RAM, a 14-bit binary counter, and 2 8-bit tured by XECOM, Inc., Milpitas, CA. input/output port chips. The clock signal for the inter Octal buffer chip 202 is used to buffer the data lines nal timer is provided by the clock out/pin 37 of mi going into the modem 200 and to provide additional 4,751,726 5 6 digital drive capability and isolation. Buffer chip 202 is tion and presents a high impedance, the signal out of a bidirectional bus buffer allowing both reading and optical isolator 250 is high. When telephone 12 goes off writing of data to the unit. Buffer 202 interfaces directly hook, it presents a low impedance and the signal from to the microcomputer 100 via multiplexed Address optical isolator 250 goes low. The signal on the ELI /Data Bus 109, and uses the chip select pin 38 to read TEOFF hook line from optical isolator 250 is read by and write. The hardware reset pin 39 is controlled by microcomputer 100 through pin 36 of I/O chip 144. the XERESET line from pin 25 of I/O chip 144. This A second jack 254 is provided which allows a second provides microcomputer 100 with hardware reset con telephone line to be connected to the unit. In some trol of the modem 200. clinical applications, the base station is used on two Jack 204 is the main phone line connection of the base O telephone lines simultaneously. Typically, in such an station 10 to the external telephone line. Standard tip application, a 49 MHz full duplex cordless voice system and ring connections are used. Pins 1 and 4 of the Jack is added to the unit. In this application, relay 218 is not 204 are not connected. Inductor 206 and resistor 208 installed in the unit and telephone 12 is continuously and inductor 310 and resistor 212 are series components connected to Jack 204. In such application, connector used for surge protection between modem 200 and the 15 256 would connect jack 254 to the 49 MHz cordless telephone line. These are standard telephone industry phone base circuitry and would provide power and interconnect components. Jack 214 is a two conductor ground voltages and a digital signal to control the hook four position RJ type connection jack which is used to switch. The hook switch control is provided by the connect the internal circuitry to the external telephone AUXHKSW line coupled to pin 26 of I/O chip 144. 12 (FIG. 1) mounted to the top of base station 10. Exter 20 When relay 218 is not installed in the unit, telephone 12 nal telephone 12 is not continuously connected to the is effectively isolated from all other circuitry except telephone line, but is connected selectively to the tele jack 204 and is not under any control of microcomputer phone line via relay 218 controlled by microcomputer 12. 100. When relay 218 is unenergized in the normally , FIG. 3F illustrates detection chip 258 and its associ closed position, telephone 12 is connected directly to 25 ated circuitry. Detection chip 258 is a Teltone M981 jack 204. This connection allows the base station 10 to call progress tone detection chip which allows mi function as a standard telephone set when the unit is crocomputer 100 to assess the operating condition of unpowered or if it should lose power for any reason. the telephone line. An optical isolator 260 is used in Relay 218 is energized by transistor 220, controlled by parallel across jack 204 and processes the sounds which the ELITERELAY line from pin 27, I/O chip 144. 30 come across the line via resistors 262, 264, capacitors When relay 218 is energized, telephone 12 is discon 266 and 268, resistors 270 and 272, operational amplifier nected from the telephone line and connected to relay 274, resistors 276, 278 and 280. This resistor capacitor 216. Relay 216 in the normally closed position connects amplifier network amplifies and level shifts the signals the telephone set to a pseudo ring circuit. The psuedo coming from opto-isolator 260 and applies them to de ring circuit is composed of transistor 224, resistor 226, 35 tector chip 258. Detector chip 258 has its own 3.58 and AND gate 228 and allows a simulated ringing MHz crystal 282, provides a filtering and selection func sound to occur in the hand set of telephone 12. The tion with four outputs which indicate receipt of call pseudo ring circuit is controlled by the PSEUDOR processing tones on line CPTONE 1, 2, 3 and 4. These INGER line from pin 23 of I/O chip 144. The patient outputs are available to microcomputer 100 via pins hears a simulated ring back suggesting that the phone is 40 32-35 of I/O chip 144. This allows microcomputer 100 ringing at the physician's monitoring terminal. In real to detect the presence of a 100 Hz call waiting tone ity, only a digital control signal has been sent and EKG which is typically sent across the phone line in pairs of transmission continues across the telephone line. When two at 4 second intervals. When a call waiting feature is the pseudo ring function is enabled by the PSEUDOR installed on the patient's phone line, detector chip 258, INGER line, the 20 Hz signal which originates at pin 17 45 in combination with microcomputer 100, circuitry al of timer chip 146 is applied to relay 216 by AND gate lows the detection of an incoming telephone call. The 228 and thereby applied to telephone 12 via relay 218 base station 10 can then notify the physician's terminal and jack 214. and, on command of the physician's terminal, allow the When relay 216 is in the energized position, telephone telephone 12 to ring and allow the patient to access the 12 is disconnected from the pseudo ring circuit and 50 second incoming call. connected via relay 218 to transformer 232. Trans FIG. 3G illustrates the power supply circuitry within former 232 is used to create a high voltage signal of 250 base station 10. Transistor 300 in combination with volts AC which is used to ring the ringer inside the xener diode 302, resistors 304, 306 and 308, transistor telephone 12. The ring signal is created via the 20 360, diode 312 and battery 314 comprise the auxillary HERTZ line from timer chip 146, gated with the RING 55 battery power for the real time clock chip 150 and the THE BELL signal from pin 24 of I/O chip 144 through random access memory chips 158-168. In case of failure series of NOR gates 234, 236 and 238. The 20 Hz signal of the external power supply or if the unit is not plugged is fed to power FETs 240 and 242 which provide the in, this network provides 2.7 volt battery voltage which primary drive circuit to transformer 232, the secondary preserves the data in the random access memory chips of which creates the 250 volt ringing signal at 20 Hz 60 158-168 and keeps the real time clock chip 150 operat which is provided to telephone 12. Telephone 12 will 1ng. ring only when it is in the on hook position with the In FIG. 3GG, connector 316 is the main power con hook switch closed either in the cradle or with the hook nector for the base station 10 and provides power to the switch depressed by the patient when holding it in the main circuit board from an external power supply (not patient's hand which is standard telephone set function. 65 illustrated) which provide voltage of +12, --5 and -12 Jack 204 is coupled to the hook switch of telephone 12 V. Capacitors 318 and 320 are incoming filter bypass via optical isolator 250 which is powered through resis capacitors. Voltage regulator 322 is an adjustable regu tor 252. When the telephone 12 is in the on hook posi lator which via resistors 324 and 326 is set to provide 4,751,726 7 8 the --9 volt power for the RF receiver circuitry (FIG. ternal components, demodulator 404 demodulates the 3I). Voltage regulator 328 is a fixed regulator which FM signal and produces a data out signal which con provides a+5 V power supply for the digital circuitry. tains the analog ECG signal with 2 KHz patient alert Capacitors 330, 332 and 334 are output bypass capaci signals and pacer spike signals superimposed. The data tors for the voltage regulators 322 and 328. out signal is fed to a filter section 405 including low pass FIG. 3H illustrates the analog ECG processing cir filter 406. Schmitt trigger 408 produces a TTL compati cuitry of the base station 10. Connector 336 connects ble signal on output 410. Low pass filter 406 separates the main circuitry to the RF receiver circuitry (FIG. 3) the ECG signal (0-200 Hz) from the 2 KHz spike/pa which provides EKG and patient indicator signals to tient alert signals. ECG signals online 411 are provided the main circuit. Connector 336 also provides the --9, 10 to pin 1 of connector 336 and the spike/patient alert --5 volt and ground power to the RF circuitry. signals are provided to pin 9 of connector 336. The ECG processing circuitry is configured as two FIG. 3K illustrates the circuitry of the transmitter 22 independent analog ECG channels with independent which the patient wears. Operational amplifiers 412, digitally programmable gain controls 338, 340 and an 8 414 are used as a dual differential amplifier which ampli channel A/D converter chip 342. Each channel pro 15 fies a signal from the two patient electrodes 418 and 420. vides both filtered and unfiltered ECG signals to mi The electrodes are bypassed to ground by capacitors crocomputer 100 and thus four complete channels are 422 and 424. Amplifiers 412, 414 are used as unity gain capable of being processed by microcomputer 100. buffers which are then fed into amplifier 426 which The demodulated analog EKG signal enters through provides an overall gain of 20. The amplified EKG amplifier 344, capacitor 346, resistor 348, resistor 350, 20 signal from each electrode is fed in parallel to a Med and capacitor 352. Capacitor 354 provides AC coupling tronic 180297 Teletrace TM chip 428 manufactured by and level shifting for the incoming signal. The incoming Micro-Rel, Inc., Tempe, Ariz., which is used in this signal is typically a one volt peak to peak analog ECG application simply as an EKG spike detector. The cir level shifted at a positive 2 volts. Resistor 356 provides cuitry andoperation of this chip are similar to that de a set level shift to allow the output of amplifier 344 to be 25 scribed in U.S. Pat. No. 4,226,245, issued to Bennet, and referenced back to the 0 volt ground reference of the incorporated herein by reference in its entirety. Chip system. Chip 338 is a digital to analog converter chip 428 has internal circuitry which provides amplification configured as a digital gain control. Sixteen gain steps and edge sense triggering and provides an output at pin are provided. Gain control chip 338 connects directly 14 when a pacemaker spike is present on the skin. Am to the Data Bus 18. Amplifier 358 is the output amplifier 30 plifier 430 provides the drive current to the reference of the digital gain control section. Capacitor 360 and electrode 432 of the unit which is the algebraic sum of resistor 362 provide feedback and filtering. The output the signals created on two electrodes 418 and 420 and is of amplifier 358 is fed directly into the EKG 1 input (pin used to drive the patient's skin to a common reference 9) of the A/D converter chip 342, and fed simulta voltage to increase common mode rejection. The ampli neously into a filtersection which provides a 5Hz to 50 35 fied ECG out of amplifier 426 is fed to an additional Hz filtered version of the signal through the network amplifier 434. This unit level shifts the ECG signal and comprising amplifier 364, resistors 366, 368, 370, 372 drives the RF Oscillator circuit via diode 436. The trans and capacitors 374 and 376. The filtered ECG signal is mitter circuit uses a 70 MHz crystal 438 in conjunction provided to pin 2 of A/D converter chip 342. The resis with a tank oscillator 440 and provides frequency mod tor network, comprising resistors 378, 380 and 382, 40 ulated signals centered about 216 MHz. Amplifier 442 provides various voltage taps into the unused A/D provides a reference voltage for the system. A 560 mi converter channels and allows sampling of the ECG at croamp constant current diode 444 is used via the feed various amplitude levels. The alternate path from the back loop of amplifier 442 and provides a regulated bias pin 3 of connector 336 to pins 8 and 5 of A/D converter supply for the FM transmitter section. This circuit pro chip 342 is identical in function to the upper section 45 vides constant transmitter modulation and output re described earlier. Amplifiers 384 and 386 provide the gardless of the internal battery voltage. voltage references for the A/D converter chip 342. The output of the pacing spike detector chip 428 is Voltages of +5 and -2 volts are provided. The -2 fed through NOR gates 446 and 448 which are config volts is provided via resistor 388. Capacitor 390 is used ured as a one-shot and provide a 10 msec. squarewave to bypass the input voltage to amplifier 384. Amplifier 50 signal. This 10 msec. squarewave is fed into the EKG 384 is used as a unity gain noninverter buffer. Amplifier path via counter 450. If a pacing spike occurs, counter 386 is also a noninverting buffer and the --5 V reference 450 is started and a 10 msec. burst of 3 KHz is sent to the voltage is provided via resistor 392 bypassed by capaci FM modulator. When the patient alert button 452 is tor 394. pushed, a minimum 60 msec. burst of 3 KHz is provided FIG. 3 illustrates the RF receiver section of base 55 to the FM modulator. The two signal sources are inter station 10. This receiver is a dual superhetradyne 217 locked by NOR gates 454 and 456 such that a pacing MHz. RF receiver which takes in the frequency modu spike via NOR gates 446 and 448 shuts off automatically lated signal from the patient transmitter unit 22 and at 10 msec. The patient alert button 452 uses a separate provides the analog ECG output to connector 336 output path and oscillates for the 60 msec. period of (FIG. 3H). The circuit employs a telescoping RF an 60 tenna 16 followed by an amplifier 396 and filter section time, providing absolute differentiation between pacer 398 and a mixer 400 from its own internal first oscillator spike outputs and patient alert button pushes. 402. Because the circuitry herein is conventional, no detailed description of its operation is believed neces COMPONENT LIST sary. Local oscillator 402 provides a 57 MHz signal. 65 Integrated Circuits Type The signal is fed to the FM demodulator 404 which has 00 80C85 Microprocessor its own 10,245 MHz fundamental crystal source 572 and 104,106,40,42 74HC14 Inverters a 455 KHz local oscillator. In conjunction with its ex 120,136,138 74HC132 Hysteresis NAND Gate 4,751,726 9 10 -continued -continued COMPONENT LIST COMPONENT LIST 126,128,130,228 74HC08 AND Gates 608 .047 uH 110 74HCTS73 Octal Bus Driver 5 510 .035 H. 14 74HCT54 Octal Bus Driver Transformers Type 116,202 74HC245 Octal Buffer 122,124 74HC138 Decoder 538 10 MHz IF (Green) 44 81C55 /O RAM. Timer 588 455 KHz IF (Yellow) 146 82C53 Timer Resistors Value (ohms) 148 27C256 ROM O 158,160,162,164,166,168 TC5565 RAM 1 109 15K 150 MM58167 Cock 132,134,176,178,182,192 10K 200 XE1203 Moden 180,190 270 258 M981. Detector 145,147,149,155,230,226 10K 234,236,238,446,448,454,456 74HC02 NOR Gate 247,222 2K 274,344,358,364,384,386 CA3240 Amplifier 248,244,237,252,368,370,556 10K 250,260 LDA200 Opto-Isolator 15 246,514 120 338,340 AD7524 D/A Converter 284,264262,263 5K 328 LM320 Regulator 276,270,272 499K 322 LM317 Regulator 278 57.5K. 342 AD7581 A/D Converter 280 49.5K. 412,414,426,430,434,442 8023 Amplifier 203,204 22 740,742,744 7631 Amplifier 20 356,388,392 20K. Adjustable 450 CD4060 Counter 357 180K 404 MC3359 Demodulator 350 7.5K 348 15K Transistors Type 362 110K 174,188,220,235,300 2N2222 366 39.2K 224,310 2N2907 25 372 22K 240,242 4N15 378,380,382 300 506 3N21 308 10K 530 3N22 304 1K 558 2N98 306,336 4.7K 612 2N2857 326 lK Adjustable Diodes Type 30 324 120 500,502,526,528,584 100K 107,233,253,312,712 1N448 534,542,544,548,592 100 444 1N5291 566 470 436 1N832 596 5.1 K 302 LM03 - 2ener 602,557 200K Adjustable 719 1N94 626,638,644 470K 35 628,636,656,666,670,654 8.2M Capacitors Value 630 62K 108,334 22 uR 623,646,650 91R 154,56 200 pF 656,664,720,722 100K 226,268,604,726,728,730,734 .001 uF 676,674 10K 265 uF 660,694 OK 354 22 uR 40 672 56K 346,352,390,394,318,320,580, ... uF 682,686 75K 582,738 690,724 47K. 360 .015 uR 702 20K 374,376,332 .33 uR 704 27OK 330,590 47 uR 706,724,726,728 2.2M 504,518,532,536,552,568,620, .01 uF 45 708 4.3 M 622,684 714 18M 508 1.8-6 uPAdjustable 716 1.5M. 512,554 2.8-12 uP Adjustable 718 82K 516 01 uR 522 33 pF 524,554 2.8-12 pF Adjustable 50 546 5 pF DETAILED FUNCTIONAL DESCRIPTION 560,614,736 68 pF 570 9-50 pF Adjustable The operation of the telemetry base station can most 574 150 uR conveniently be described in terms of a finite state ma 576 68 uR chine. FIG. 4 illustrates the various functional states of 586,688,700,678,595 150 pF 598,680,692 uF 55 the machine, and summarizes the conditions for chang 592 10 m ing from one state to another. Understanding of the 606 3-12 pF Adjustable functioning of base station 10 may be facilitated by 610 5 pF 616 4-40 pF Adjustable referring to FIG. 4 in conjunction with the following 624 100 pF detailed description of the states and transitions be 634,652,648 47 F 60 tween states of the base station. The function of the base 640,642 0.033 uR station in each state, as well as the conditions for chang 658,662,688 150 pF ing states and the operations involved in changing states 424,422,732 470 pF are all controlled by the program stored in the read only 668 68 uR memory 146 (FIG. 3A). The source code for the pro Inductors Value 65 gram stored in read only memory 146 is set forth below. 206,210 10 uH 520 .024 uh The program as set forth is written in Pascal and in 550 1 u assembly language. Compilaton and assembly of the 564,618 47 H. program for loading into read only memory 146 is ac 4,751,726 11 12 complished via a Hewlett-Packard 64000 Microcom puter Development System. STATE A In state A, the base station 10 merely waits and STATE X checks to see whether the variable ELITEOFFHOOK State X, as illustrated in FIG. 4, is the initialization 5 is true, indicating that the external telephone 12 has state. During the initialization procedure, all interrupts gone off hook. If the external telephone 12 goes off to microcomputer 100 are disabled. The I/O chip 144 is hook, the NEXT STATE is set to “0”, which begins the then started up, and the output states of gates PCO, PC1 transition to state O. Telephone 12 is coupled directly to and PC2, at pins 37-39, are set to control the operation the phone line and functions normally. of timer chip 146. Timer chip 146 is then set to provide O a 300 Hz (3.3 msec.) signal on line INT 75 which func TRANSTION TO STATE O tions as the basic sampling frequency signal and is pro During the transition to state O, a time period of vided as an interrupt to the microcomputer 100. In twenty seconds is initiated, and interrupt port RST 5.5 addition, timer chip 146 is programmed to provide a 20 (pin 9) of the microcomputer 100 is unmasked to allow Hz signal on the 20 HERTZ line from pin 17. This 20 15 counting of the one second interrupts from timer chip Hz signal is used for a variety of functions including as 146. The STATE is set to equal NEXT STATE vari a clock input to pin 9 of chip 146. Subsequently, the able, and the device enters state O. input latch (pin 7) to microcomputer 100 from interrupt line INT 7.5 is reset, and the interrupt function of this STATE O latch is masked. All other interrupts are enabled. Fol During state O, the twenty-second timer functions by lowing this, timer chip 146 is set to provide a one sec decrementing SECONDS LEFT by one with each one ond time out signal on line INT-55 (pin 10). This one second interrupt from timer chip 146 on line INT 55. second interval is used to time all intervals measured in During state O, the variables ELITEONHOOK which multiples of one second. Following set-up of the timing 25 is true when the telephone 12 is on hook, CALL intervals, the variables RING NURSE, PT CALLING, NURSEPRESS, which is true when the Call Nurse and PT GAVEUP are all set false. The amplifier gain is button 184 is pressed, as well as SECONDSLEFT are adjusted to an initial setting by gain control 338, the all monitored. If telephone 12 goes on hook prior to Call Nurse light is turned on, and NEXT STATE is set either the Call Nurse button 184 being pressed or the to A. 30 time-out of the twenty second interval, NEXT STATE TRANSTION TO STATE A is set to 'A', and the transition to A, as described Upon determining that the NEXT STATE= A, and above, begins again. If either the Call Nurse button 184 that STATE, indicative of the present state of the ma is pressed or the twenty second interval times out (SE chine, is not equal to A, the transition to state A begins. 35 CONDSLEFT=0) prior to the telephone 12 going on This transition begins by turning on Active light 172, hook, the NEXT STATE is set to 'C', and the transi and turning off the Call Nurse light 186. In addition, the tion to state C begins. one second timer is set to time a period of one second. TRANSTION TO STATE C After this one second interval, reset of the modem chip 200 begins. During the transition to state C, the 3.3 msec. inter ... Reset of the modem chip 200 includes hanging up the rupt port, RST 7.5 (pin 7), of microcomputer 100 is ... internal phone hook within the modem 200, and subse masked. Subsequently, the command register of modem quently setting the modem to operate in an asynchro 200 is reloaded to enable the receiver and transmitter nous data transfer mode, with parity disabled. In this therein . Modem 200 is then placed on hold and data mode, the modem provides 10-bit asynchronous signals 45 buffer 202 is cleared. Modem 200 is then set to receive consisting of a first start bit, eight data bits, and a final and placed in DTMF receive mode so that it will recog stop bit. The 8-bit data words may signify an amplitude, nize DTMF codes as data. The variable WRITEENA if the modem 200 is transmitting digitized EKG signals, BLED is set false, and STATE is set to equal NEXT or may be a command or indicator code. Finally, the STATE. The base station now enters state C. modem 200 is enabled to receive and transmit data by 50 entering appropriate commands through pins 27-34. STATE C Following the reset of the modem 200, the Call Nurse During state C, ELITEONHOOK is monitored. If light 186 is turned on, and the Active light 172 is turned this variable goes true, indicating that the external tele off. phone 12 has gone on hook, NEXT STATE is set to Next, the telephone 12 coupled to the base station via 55 equal "A". Otherwise, the Call Nurse light 186 goes on, phonejack 214 is coupled directly to the telephone line and base station 10 waits for receipt of data from jack 204 by means of relay 218. Subsequently, the one modem 200 indicating the receipt of a DTMF Atone by second interrupt via line INT 5.5 to pin 9 of microcon modem 200. The base station then continues to wait for puter 100 is masked. The PSEUDORINGER, RING 60 the receipt of a DTMF B tone from the physician's THE BELL, and RING RELAY lines from I/O chip monitoring station. If the DTMF A and B tones are 144 are then all set low, disabling the ringing and received in their proper order, NEXT STATE is set to pseudo ringing functions. The RING STATE, "D”. Base station 10 will continue to wait for receipt of MODEMCONNECTFAIL, MODEMCON the properly ordered A and B tones until the external NECTED, and SPIKEENABLED variables are all set 65 phone 12 goes on hook. As discussed above, if the exter false. The Call Nurse light 186 and Active light 172 are nal phone 12 goes on hook, NEXT STATE is set to then turned off and STATE is set to equal NEXT 'A', and the transition to state A, discussed above, is STATE. The base station 10 has now entered state A. once again initiated. 4,751,726 13 14 provides spike indicator code to modem 200 for trans TRANSITION TO STATED mission. During the transition to state D, moden 200 attempts Sampled data presented to the modem for transmis to establish communication with an identical modem in sion takes several forms. Byte values of 001 hexadecimal the physician's monitoring station. The Call Nurse light 5 (001H) to OFDH are reserved for indicating EKG am 186 is turned off, and the data link attempt is begun. The plitude. If the value of the averaged bytes from A/D bell ringing circuitry is disabled and the external phone converter 342 is equal to OFFH or 0FEH, then the value 12 is disconnected from the jack 204 by relay 218. The is modified to OFDH. If the averaged value is 00H, then data register of modem 200 is then loaded with the it is modified to 001H. This acts as a software filter of character 'A', which allows the modem to transmit 10 extreme EKG values, and allows the use of bytes hav modern answer tone. If modern 200 receives a proper ing values of 00H, OFFH, and OFEH as indicators. If modem response carrier frequency from the physician's SPIKE is true during any one of the three readings of monitoring station, the modem 200 assembles a "-" in data from A/D converter 342 between modem trans its data register. The data register of modem 200 is read, missions, the SAMPLER subroutine will set the data and if it contains a "-', the microcomputer 100 enables 15 sent by modem 200 to OFFH. This allows the physi modem 200 for two-way transmission by writing appro cian's base station to detect the occurrence of a pacing priate command bits in to its data register. If the con spike. Similarly, because the pressing of the push button nect attempt was successful, MODEMCONNECTED on the patient's transmitter also activates the spike de is set true. If not, then MODEMCONNECTFAIL is tection circuitry within the receiver, but for a longer set true. The data queue for the 8-bit EKG data from 20 time period (60 m.sec.), it allows the physician's moni A/D converter 342 is reinitialized, and RST 75 inter toring station to determine that the patient has pressed rupt (pin 7) of microcomputer 100 is unmasked to allow the alert button 36 on the patient transmitter 22, because for sampling of data from A/D converter 342. STATE sequential OFFH bytes will be decoded by the physi is set equal to NEXT STATE, and the base station cian's monitoring station. enters state D. 25 During state E, the base station's own EKG monitor ing and analysis software is functional. This software is STATED similar to and derived from the software used to control In state D, the base station checks to see whether the the operation of the portable EKG acquisition unit previously attempted modem connection to the doc described in U.S. Pat. No. 4,360,030, incorporated tor's monitoring station was successful. If this connec 30 herein be reference in its entirety. The EKG analysis tion was successful, as indicated by MODEMCON and processing software in the present application dif NECTED being true, then NEXT STATE is set to fers in that it has been converted from Intel and NSC equal “E”. If MODEMCONNECTFAIL is true, then 800 assembler format to HP64000 8085 assembler for NEXT STATE is set to equal “J”. Transition to state E mat, the code has been modified to use the base station's or J then begins. 35 I/O capabilities, and some variable names have been changed and features deleted. TRANSITION TO STATE E The EKG processing and analysis may conveniently In the transition to state E, the Active light 172 is be divided into real time and nonreal time functions. turned on. The ringing relay 216 is disabled, and the Sampling of data from the A/D converter 342 is under queue of data for transmission is again reinitialized. 40 the control of the 3.3 msec. interrupt driven SAM STATE is then set equal to NEXT STATE and the PLER subroutine. The SAMPLER subroutine reads base station enters state E. The transition to state E may the 8-bit data register of A/D converter 342 each 3.3 also be made from state H, discussed below. If so, msec., accumulates five sequential values and maintains PTGAVEUP is set true. a running average of those values. Each 10 msec., the 45 SAMPLER subroutine calls the INBYTE subroutine STATE E which determines what information byte will be loaded In state E, the base station transmits digitized values into the modem for transmission. The SAMPLER sub of the ECG signal. The digital value of the ECG signal, routine will present either the averaged EKG value or as stored in the data register of A/D converter 342, is the spike detect code OFFH. The SAMPLER subrou read each 3.3 m.sec. in response to the interrupt on line 50 tine is enabled during initiation of the data queue during INT 75 from pin 15 of chip 146. With each interrupt on the transition to state D. Each 10 msec., the INBYTE line INT 75, the data present in the output register of subroutine determines which of a variety of available the A/D converter 342 is read. Because modem 200 information bytes will be transmitted by the modem transmits at a maximum rate of 1200 baud, and because 200. These data types include command bytes, calibra the data words transmitted by modem 200 are 10-bits 55 tion bytes, and EKG/spike bytes. The INBYTE sub long, modem 200 is not able to transmit each 8-bit byte routine prioritizes data transmission in this order. assembled by the A/D converter 342. For this reason, Whenever called, the INBYTE subroutine first checks the interrupt driven SAMPLER subroutine performs to see whether a command byte is avaliable for trans an averaging function. Each 10 msec., the sampler rou mission, then checks to see whether the calibration tine provides a byte to the modem 200 for transmission. 60 generation routine (discussed below) is functioning and, This byte represents the running average of the sampled in default, loads and transmits the EKG/spike detect bytes obtained from the A/D converter 342. In addi information from the SAMPLER subroutine. tion, if the spike detection function has been enabled During state E, a number of variables are monitored with each 3.3 msec. interrupt, SAMPLER checks to to determine whether commands, rather than EKG determine whether SPIKE is true. If SPIKE is true, this 65 data are to be sent by modem 200 to the physician's is indicative of the fact that the SPIKEDETECT line monitoring station. If the PTCALLING variable is coupled to the radio receiver by pin 9 of connector 336 true, the command 002H will be loaded into the modem has gone high. In this case, the SAMPLER routine for transmission. If the RING NURSE variable is true, 4,751,726 15 16 then the command 001H will be loaded into the modem incoming commands from the physician's base station. for transmission. If the variable PTGAVEUP is true, Modem 200 is a full duplex modem, so receipt of incom 006H will be loaded into the modem for transmission. ing commands delays transmissions out for a few milli Transmission of such command bytes is always pre seconds, but does not prevent their transmission. If the ceded by a 0FEH byte, which indicates to the physi modem 200 has received a command and that command cian's monitoring station that the following byte is a is available and assembled in the data register of the command byte. As such, each command is a two byte modem 200, the base station will then read the com transmission. mand to determine whether it is one of a number of PTCALLING indicates that the patient has lifted the predetermined command bytes. receiver of the external telephone 12 in order to contact O If the GAINUP command 00AH is received, mi the physician. RING NURSE goes true when the pa crocomputer 100 performs a subroutine which increases tient presses Call Nurse button 184. If both of these the gain of the EKG signal as applied to the A/D con codes are transmitted, the physician's monitoring sta verter 342. This function is controlled by chip 338 tion is informed that the patient desires to use the inter which functions as a digital gain control for the analog com function of the base station, as described in the 5 EKG signal. Similarly, if the GAINDWN command description of state F, below. The PTGAVEUP vari 00BH is received, microcomputer 100 decrements the able goes true when the patient hangs up the external gain of the EKG signal. This allows the physician's telephone 12. The significance of these transmissions is monitoring station to adjust the gain of the telemetry discussed below. system in order to optimize the EKG signal. If the com PTALERT indicates that the base station 10 has 20 mand 005H is received, the spike detect function of decoded the occurrence of a string of sequential spike microcomputer 100 via pin 5 is enabled, if the command detects. During sampling of the incoming signal by the 06 is received, the spike detect function is disabled. SAMPLER subroutine, a running count is kept of the An additional command which may be received by number of times that SPIKE has been true during the modem 200 is the GO TO INTERCOM command previous 103.3 msec. interrupts. If SPIKE has been true 25 002H which, in conjunction with a determination of for five of the previous ten 3.3 msec. interrupt cycles, whether telephone 12 is on hook, initiates a change to PTALERT is set true. In this case, the INBYTE sub either state G or state F. If GO TO INTERCOM is routine will select the command 001H (same as RING received and the telephone 12 is on hook, then NEXT NURSE) for transmission. This feature allows the pa STATE is set to “G”. But if the telephone 12 is off tient to inform the physician's monitoring station of a 30 hook, then NEXT STATE is set to “F'. problem, without being in the immediate vicinity of the If the command OFEH is received, the calibration base station 10. signal generation routine is begun. This routine is driven CALGENCOUNT indicates the status of calibration by the INBYTE subroutine which transmits, sequen signal generation. If calibration signal generation is tially, two bytes indicating the precalibration value underway, indicated by CALGENCOUNT not equal 35 (PRECALVAL), ten bytes at a value equal to the pre 0, then the INBYTE subroutine will transmit an appro calibration value multiplied by the amplifier gain setting priate calibration signal value. The calibration signal provided to the digital gain control 338 (STEPCAL generation activity is triggered by the receipt of a com VAL) and two bytes indicating the post-calibration mand by the modem 200, and is discussed below. value (POSTCALVAL), which is equal to the precali SEND RATE indicates that the modem 200 has pre bration value. This allows the physician's monitoring viously received a command to transmit the patient's station to calibrate its own EKG analysis circuitry. As heart rate. If SEND RATE is true, the modem initiates discussed above, transmission of the PRECALVAL, a command transmission consisting of a first OFEH byte STEPCALVAL, and POSTCALVAL bytes takes pre and a subsequent byte, RATE TO SEND, between 40H cedence over EKG and spike detect transmission, but and 255H, indicating the patient's heart rate. RATE TO 45 will be interrupted by command transmissions to the SEND is generated by the nonreal time portion of the physician's monitoring station. If the command 007H is EKG signal processing. Although this function is de received by the modem, then SEND RATE is set true, scribed in more detail in the above-referenced Citronet triggering transmission of the RATE TO SEND byte, if all patent, the basic functions can be summarized as available. follows. During real time sampling of the EKG signal 50 If a command is indicated as having been received by bytes from A/D converter 342, the amplitude and slope the modem 200, but is not a valid byte or cannot be of the EKG signal are monitored. In the event that a read, the command received is set to 00H, clearing the particular string of EKG bytes are likely candidates to register and allowing transmission of data out. At any be QRS complexes, indicative of hearbeat, such data is time during state E, if the patient lifts the receiver of the loaded into RAM, for analysis by the RSENSE subrou 55 telephone 12 off hook and presses Call Nurse button tine. This subroutine determines whether the QRS can 184, then NEXT STATE is set to "H', triggering the didates are, in fact, QRS complexes. The time differen transition to state H. tial between detected QRS complexes is stored. After four QRS intervals have been detected and validated, TRANSITION TO STATE H an average interval is calculated, which is translated 60 Transition to state H begins with turning Call Nurse into an average heartbeat rate. This is the RATE TO light 186 on, and setting PTCALLING true. This trig SEND byte. If this byte is available and the modem 200 gers a transmission of the PTCALLING code to the has received a request for rate information from the physician's monitoring station, via modem 200 as de physician's monitoring station, the OFEH byte, fol scribed above in conjunction with state E. Because the lowed by the RATE TO SEND byte will be transmit 65 transmission of data from the modem to the physician's ted by the modem 200. station is interrupt driven, it continues during the transi In addition to transmitting data commands during tion to state H. The base station then enters a ring back state E, the base station monitors the modem 200 for procedure which involves setting RING STATE true 4,751,726 17 18 and setting RING NURSE true. As discussed above, com between the patient and the physician. During setting RING NURSE true will initiate a transmission state F, the base station 10 behaves as during state C, of the code corresponding to RING NURSE to the and looks for a DTMF A tone followed by a DTMF B physician's monitoring station. In addition, the relay tone. Although modem 200 is disabled from transmis 218 is set to couple telephone 12 to jack 204, in parallel sion, it is still capable of receiving and decoding the with the modem 200. The psuedo ringing circuit is DTMF tones. In the event that a DTMFA followed by energized to allow the ringing relay 216 to generate a a DTMF B is received, NEXT STATE is set to I, and simulated telephone ring, which the patient will hear the transition to state I is initiated. through the earphone of the telephone 12. This simu TRANSITION TO STATE I lated ringing, however, does not interfere with the con 10 tinued transmission by modem 200 of EKG and other During the transition to state I, an attempt is made to data to the physician's monitoring station. At the same link modem 200 to the modem in the physician's moni time, it simulates normal telephone function, and indi toring station, precisely as discussed above in conjunc cates to the patient that he has contacted the doctor's tion with the transition to state D. After the attempt to monitoring station. After the pseudo ringing procedure 15 link has been made, STATE is set to equal NEXT is initiated, STATE is set to equal NEXT STATE, and STATE, and the base station enters state I. the base station enters state H. STATE STATE H State I is virtually identical to state D, discussed In state H, microcomputer 100 waits for the nurse or 20 above. In state I, the base station checks to see whether physician at the physician's monitoring station to pick the attempted connection to the modem at the physi up the phone in order to initiate voice contact. During cian's base station was successful. If the connection was state H, the simulated ring is allowed to stay on for one successful, then NEXT STATE is set to equal “E”. If second, and is then turned off for three seconds by unsuccessful, then NEXT STATE is set to equal J, setting the PSEUDORINGER line high and low, se 25 triggering the transitions to those states. The transition quentially. This procedure continues until and unless to state E has been discussed above. the modem 200 receives the GO TO INTERCOM TRANSITION TO STATE J command 002H. In this case, NEXT STATE is set to "F". If the patient simply hangs up the phone, NEXT During the transition to state J, the 3.3 msec. inter STATE is set to 'E' and the base station enters the 30 rupt to pin 7 of microcomputer 100 is first masked. transition to state E, as described above. As noted in the Relay 218 is then commanded to disconnect telephone discussion of the transition to state E, the fact that the 12 from jack 204. The modem 200 is then reset, as de previous state was H will set PTGAVEUP true, trig scribed above in conjunction with the transition to state gering transmission of the command byte 006H. This A, and is enabled to transmit and receive. The Active will alert the physician's monitoring station that the 35 light 172 and the Call Nurse light are turned off, and the patient no longer desires voice contact. While the base bell ringing functions are disabled. MODEMCON station is in state H, during the psuedo ringing proce NECTED and MODEMCONNECTFAIL are both dure, the RING NURSE variable is alternately set true set false, the Active light 172 is turned on, and AU and false, initiating spaced transmissions of the RING TOATOG is set true. A one second time interval is NURSE code to the physician's monitoring station. The 40 begun, and STATE is set equal to NEXT STATE. The overall result of this is that the RING NURSE code is base station 10 now enters state J. sent to the physician's monitoring station once every six seconds signaling the patient's desire for voice commu STATE J nication. In state J, the base station 10 waits for a reconnect 45 attempt via a new phone call from the physician's base TRANSITION TO STATE F station. During state J, the modem 200 is monitored to Transition to state F begins with the turn off of the determine whether ring signals are present on the phone Call Nurse light 186 and the Active light 172. The bell line. If so, NEXT STATE is set to “K'. Otherwise, the ringing functions are disabled, and the procedure of Active light 172 is flashed on and off at one second entering the intercom state is begun by masking of the 50 intervals, while waiting for ring signals. 3.3 msec. interrupts to microcomputer 100, via pin 7. Because the 3.3 m.sec. interrupts are necessary in order TRANSITION TO STATE K to transmit digital data via the modem, this disables the During the transition to state K, the Active light 172 modem from transmitting although it remains con and the Call Nurse light 186 are first turned off. A data nected to jack 204. Modem 200 is on hold temporarily 55 link connection between modem 200 and the modem at while the data buffer 202 associated with modem 200 is the physician's base station is then attempted. This data cleaned out. Modem 200 is then enabled to receive and link attempt corresponds to the data linking attempt switched to DTMF mode to enable recognition of described in conjunction with state D, above, and in DTMF tones as data. The external phone 12 is then cludes disabling of the ring back and bell generators by coupled to the phone lines via relay 218. STATE is set 60 setting a RINGTHEBELL line and PSEUDOR equal to NEXT STATE, and the base station enters INGER lines low and the ELITERELAY line high, state F. It is important to note that until and unless the via I/O chip 144. The modem 200 is then set to have a intercom function is achieved, data transmission contin command written into it, and the modem 200 is com leS. manded to enter the answer mode. The modem 200 65 transmits a modem answer tone, and waits for a re STATE F sponse from the modem in the physician's monitoring In state F, the telephone 12 is connected to the phone station. If a proper modem carrier response is detected, line, allowing the telephone 12 to function as an inter then MODEMCONNECTED is set true. If the re 4,751,726 19 20 sponse is anything else, then MODEMCONNECT enter the intercom function (state F). During state G, FAIL is set true. The data queue is then initialized, and the bell is sequentially turned on and off for three sec STATE is set to equal NEXT STATE. The base station ond time periods, until one of two events occurs. The 10 then enters state K. first event is the expected response that the patient lifts STATE K the hook of telephone 12. If this occurs, NEXT STATE is set to "F", and the transition to sate F begins. This State K corresponds to state D, and simply checks for transition has been discussed above. Alternatively, if the a successful data link to the modem of the physician's patient does not respond to the ringing telephone 12, the base station. If MODEMCONNECTED is true, then O physician's base station may send a DTMF tone equal to NEXT STATE is set to E'. If MODEMCONNECT the character "a' or". During state g, the modem 200 FAIL is set true, then NEXT STATE is set to 'J'. The is monitored to determine whether a data transmission transitions to states E and J have been discussed previ from the physician's base station has been received. If ously. so, the command received is checked to determine 15 whether it is one of the two previously denoted charac TRANSTION TO STATE G ters. If so, then NEXT STATE is set to L. Otherwise, As discussed above, in the event that the GO TO buffer 202 is cleared, and the base station continues to INTERCOM command is received during state E, and wait for either a valid command from the physician's the telephone 12 is on hook, NEXT STATE was set to base station or for the patient to lift the phone. “G”. During the transition to state G, the Active light 172 and the Call Nurse light 186 are turned off. The TRANSITION TO STATE L procedure for connecting external telephone 12 as an The transition to state L corresonds exactly to the intercom telephone is then begun. First, the 3.3 m.sec. previously described transition to state K and to state interrupt to pin 7 of microcomputer 100 is masked. D. This transition includes an attempt to establish a data Modem 200 is then placed oh hold and the data buffer 25 link between modem 200 and the modem in the physi 202 is then cleaned out. Modem 200 is then placed in cian's monitoring station. After the attempt, NEXT DTMF mode to enable recognition to DTMF tones as STATE is set to 'L', and the base station 10 enters state data and then is enabled for transmission and receiving. L. Because the 3.3 msec. interrupt to pin 7 of microcom STATE L puter 100 has been masked, no data transmissions from 30 modem 200 to the physician's base station may occur. State L corresponds to states D and K described above. In state L, the base station 10 checks to deter Relay 218 connects telephone 12 to the phone line. mine whether the attempted data link which previously Finally, the relay 216 is activated in order to initiate the occurred has been successful. If MODEMCON ringing of the bell. STATE is set to equal NEXT 35 NECTED is true, then NEXT STATE is set to “E”. If STATE, and the base station 10 enters state G. MODEMCONNECTFAIL is true, then NEXT STATE G STATE is set to 'J'. The transitions to states E and J have been described above. During state G, the bell of telephone 12 is rung in The software listing describing the function of the order to signal the patient that the physician desires to 40 base station 10 in more detail follows below. FIE; SMS; BBS HP 64 GGG - Pasca "88. Ode (tilt at : 1 OGG "8085 2 000 SEXTENSIONS ONS 3 OGC $SEPARATE ONS A GOOG OPTIMIZE OFF 5, IDG PROGRAM SK; 6 OOC 1 7 GO CONS 8 OIOG 1 PTCALLINGNURSE = I2H; 9 GOC 1 TIME GOES BY = TRUE; OOC OG 1 TYPE 12 OC 2 3 4 5 - 7 889 A B C D E F) 1300GG 1 STATE-TYPE = (A,B,C,D,E,F,G,H,l, J,KJ, K, L, M, N,C,X); 14 000 RMSTATE TYPE = (RESET, AITSE TUPMNTR); (see Module MONITOR) 15 OG BITS = (DDD2, D4,506,07 ); 16 08 VAR 17 O 18 OGG ID ; INTEGER; 19 062 1 JUN ; BYTE, 20 003 COINT ; INTEGER; 2 05 4,751,726 21. 22 22 005, G8VAR ONS 2 OS STACKAREA (64); AkkAY. O. , 1023 OF BYTE, (all 6 cates space} 24 GA05 STACK (65); BYTE, (lnit value for corpiie ) 25, 466 ORKWAR ; BYTE, 28 407 ATOADG BCOLEAN, (FF for a to answer blink) 27 AG8 SENDRA: E : BOOLEAN, (Contro is the sending of the rate pair} 28 469 $GOEVAR OFS 29 O45 3D 409 SEWAR ONS 3 489 RMS At : RMSTATEYFE; (AOC ville MGNOK) 2 (409 NEXT. RMSTATE RMSTAETYPE (Modulie MiNT OR; 33 409 RAFE TO SENE ; BYTE; (NC duis MG ITGA 3 049 SANFLE.ON : Bi:OLEAN (POGie MUNT is S 469 SPIKEENARLED BCOLEAN 6 4.09 RING STATE ; B00EAN; 37 49 RINGNURSE, 38 469 PTCALN, 39 G49 FTAVP : BUCLEAN, (AUX - ServiceG & reset by ISR A 84.09 COMMANDRCVD ; BYTE, AUX 4 4Cs SECONDSLEFT : INTEGtk; (AXJ 42 G-89 RESU Y FE, 4. 49 XECOMCOMMAND ; SET OF BITS, 44 40. XECUDATA ; B E, 4 469 A8, ; BYTE, A6 O469 ;IERLO ; BYTE; 47 AG3 TIMERH. : BYTE; A8 G49 PORTA ; SE OF Big 49 49 PCR B ; Si Or BS; SO 8409 PCRIC ; SET JF BII; 51 49 CTC MODE ; BYTE, 52 0439 CTCC ; BYTE; 53. 49 CC ; BYTE; 4 64.0% CTC-2 : BY: SS 409 AGAIN, 6 4.09 AAMP ; BYTE; 57 49 RING COUNT ; BYTE; (Number of v?. i. et vyted Fings: 58 469 CONNECTRESULT ; CHAR; (RESULT OF MODEM CONNECT FUNitri 59 46.9 ODECONNECTED : B00LEAN 60 49 MODEMCONNECTFAIL ; BOOLEAN; 6 49 PHYSCONNECTED : BOOLEAN 62 49 PHYSCONNECT FAIt : BOOLEAN; 409 XECAD : SET OF BITS; 64 409 VOICEHOOKFLAG :OOLEAN; S 049 66 49 EWAR OFFS 0.49 68 409 SOBVAR ONS 69 49 7 49 IFLGDFLG, FLG ; BOOLEAN; 7 4 OC IBYTE, D. BYTE ; BYTE; 72 48E 7 40E TRMSX ; SET OF BITS; 74 OAGF INTRSTS ; SE OF BIS 75 A10 76 4 STATE ; STATE TYPE; 77 4 NEXT STATE ; STATE. TYPE; 7B 42 INISTATE ; BYTE; 4,751,726 23 24 79 43 BO 43 SECOND1 ; INTEGER; (Used in spilt the 8 45 XECOMRESULT : CHAR; 32 416 GTD CKD ; SET OF BITS, 83 (47 GTD BATA : BY E; 84 418 85 418 KINDEX ; BYTE, 86 (419 K : BEAN, 87 4A 88 04 A PAGES 89 OGG (IAparted procedures/functions) 90 OGG PROCEDURE DISABLE 75; EXTERRAL; 9 GO PROCEDURE ENAEE 75; EX; ERNA; 92 PROCEDURE CURRENTRMS OPS; EXTERNAL; (Module MONITOR} 9 OGG PROCEDURE CHANGERIS; EXTERNAL; (Odue Xi OR) 94 GO PROCEDIRE CLEARDISP; EXTERNAL; 95 GOO PROCEDURE DISPSTATE; EXEMA; 96 000 FCTION CALNURSEPRESS BOOLEAR; EXTERRA; 97 FUNCTION CAGEN BOOLEAN; EXTERNAL; 98 FUCTION GOTOINTERCOM ; BOOLEAN; EXTERRAL; 99 OGG FNCTION CANCELINTERCOM : BOOLEAN, EXTERNAL; O GO FNCTION RELEASEBASE ; BOOLEAN; EXTEKNA; 1 980 FUNCTION NURSECALLING : BOOLEAN; EXTERRA; O2 000 FNCTION GAINUP ; BOOLEAN; EXTERNA; FUNCTION GAINDWN ; BOCEAN; EXTERNAL; 194 OOO PROCEDURE ISR55; EXTERRAL 0 000 PROCEDURE ENABLE; EXTERNAL; 6 PROCEDURE DISABLE; EXERNA; 17 O. PROCEDURE SMASK, EXTERNA; 108 OOC PROCEDURE RMASX; EXTERNAL; 9 O. PROCEDRE TICK EXTERNA 10 000 PROCEDURE SETCLOCK (SECONDS; INTEGER); EXTERNAL; 000 PROCEDURE STOPCLOCK EXTERNAL; 2009 PROCEDURE SENDBYTEU (B; BYTE) EXTERRA; PROCEOURE SENDTCCASPER (A; BYTE); EXERNA 4 OOC PROCEDURE INIT GUEUE; EXTEKNAL S COO FUNCIN GOAA : BOOLEAN, EX ERNA (teeth Die 16 00 FUNCTIOR BEING CALLED ; B00&AN; EXEKRAL; GO PROCEDURE SENDFNCA; CHAR; WAR 8:HAR; EKSERNA 18 OG FUNCION EITEONHOCK ; BOOLEAN; EXERitii; 9 O l FNCTION ELITEOff HK : Big A, EXERNAL, 20 000 PROCEUR ELITE ONLIN; EXTERNA; 2 CEOG l PROCEOURE El TEDFFLINE; EXERAL; 122 CEO PROCEDUREXECOMINIT; EX RNA; 23 COO PROCEDURE HANGJPLINE EXERNA 124 OGGO PROCEDIRE ENABLEXECOM; EX; ERNA 12, CO PROCEDURE DISAS EXEM, EXEkiti, 26 (JG PROCEDURE ERABLEINGUT; EXTEKNA; 27 (8) 1 PROCEDURE ENAELETXRX; iXTERRA; 28 000 PROCEDURE DISABETXRX, EXTRNA 129 CBO PROCEOURE PHYSHEK; EXERNA-; 30 00 PROCEDURE SAR BEL, EXKRF; Il B l PROCEDURE SFO: E.; EX ERNA; 32 OGO l PROCEDURE SERVICEBEL, EXEEKRA, 33 C GCC PROCEDURE SEARTRINGSAK; EXEitA-, 13 OC PROCEDURE STOPRINGBACK, EXTERRA; 35 GO PROCEDRE SERVEERNACK EXENA; 4,751,726 25 26 136 OGG G : PROCEDURE MCDEMCHECK EX? RNA; 137 6080 1 PROCEDUREXEiri ODA i A, EXERNAL; 138 000 & 1 PROCEDURE LOCK FORCOMMAN, EXERNA; 139 GGOO 1 PROCEDUREXECOM.O.D. MF; EX Ei NA; 140 000 0 1 PROCEDUREXECOM, RESE; EXTERNA; (XI - hardwar; 14i OGGG 1 PROEDURE INTERLJr., EXTERNA; (XT - sets ev} 42 OCOG 1 FUNCTION DATALINK ; BYTE, EXTERNAL; XE - Sets up 143 OGOC 1 PROCECURE XECOMOG (8; 8 Yi E; C, BOOLEAN); EX ERNA; 144 OGG, l P0CEDRE GETDAA (WAR IN FLAG; BUOLEAN, Utes if have a? unfo Mat of byte fr} 4S 8062 2 WAR DAAFAC, BOOLEAN (l) Ges it have data) 46 004 2 VAR TXRDYFLG; B00LEAN (Ges it see XRY at time of priced U} 147 0006 2 WAR INFOBYTE : BYTE, (Infor Maten byte fr Gh Xe(U V & G in 48 008 2 VAR DA; ABYTE; BYTE (Data byte frth XeCU; all Only if 149 OOA 2 ); EXTEKNA; 150 60 0 1 PROCEDURE ENABEEKG; tXEkkA 151 OlO& 1 PROCEDURE DISABEEKG, EXERNA 152 COG i PROCEDURE INCREASE GAIN; EXENA; 153 000 PROCEDURE DECREASEGAIN; EXTERNAL; 154 00 G 1 PROCEDIRE GEN CALSIG; EXEERNA; 155 000 1 PROCEDURE ACTIVELITEON; EXTEKNAL; 156 BOOG 1 PROCEDURE ACTIVElITEOFF EX? ERNAL; 157 OOOG POCEDURE CNLIEON EXTEKNAL 158 00 G 1 PROCEDURE CNLITEOFF; EXTERNA, 159 GDO 1 PEOCEDURE BLINKA; EXTERNAL; 160 600 PROCEDURE BLINKE; EXTERNA; 161 00 0 1 PROCEDURE STARTUP; TERNA; 162 800 1 PROCEDURE FLUSHEYTE; EXERNA 163 0600 1 PROCEDURE VOICE OFFHOOK; EXTERNAL; 184 600 1 PROCEDURE VOICEONs))K, XERNA 65 00 1 PAF's 167 000 0 1 PROCEDURE EVALUATE TRIGGERS, 168 000 2 (Here we evaluate the possible triggers to new states) 69 OOG 2 BEGIN 170 OG 2 CASE STATE OF 7. 900 2 A; BEGIN 172 006 2 7AG98, WRSON) 7 OG 2 (This is the PGS inhe ok state) 7A OOO6 2 IF ELITEOFFHOOK THEN NEXTSTATE := 0; (2G seconds with Xecar off) 7S G 2 END; 176 O. A 2 77 OGA 2 C; BEGIN 178 6014 2 (SAUGE VERSI)N} 179 001. A 2 (This is the 'Ready for 1st DTMF A' state} B 04 2 8 OA 2 IF ELITEDNHOOK THEN NEXT STATE := A; 182 00F 2 B OF 2 CNITEON; 84 22 2 185022 2 ORKVAR := BYTE (XECOMCOMMAND H (D7,D}) 86 CO2A 2 CASE RKWAR OF 87 OG2D 2 13 : COMMANDRCVD := XECOMDáil, 188 036 2 28 ; COMMANL. RCWD , = 0, 18 OO3E 2 2 BEGIN 199 G3E 2 COMMAND RCW = El Or. 2A, A, 91 CG44, 2 COMMANDRCVD := 0; 192 CG 49 2 END, 4,751,726 27 28 93 CG4C O ; COMMANDRCVD := 0; 94 S4 EN); (CASE) 95 C.6B 196 9065 IF (CCAMAND RCV) = 'a') THEN 197 G873 (Here we halt for seco?ig and thef, ii or for a Drif 83 198673 BEGIN 199 973 SETCLOCK: ); 200 0078 REPEAT UNTIL (SECONDSLEF = G, 20 CO84 WORKAR := BYTE (XECOP CUMnri i E7,31 ; 202 0C8 CASE WORKVAk Ci 203 CCSF 30 : COMMANORV) = KEUME, F, 24 OO98 38 ; COMMANERCVD := 0; 205 (GAG 2 ; ELIN 28 AG COMMANDRCV := XLCGh DA if; 207 GOA6 CUMAN KCE - G 28 OGAE EN), 209 (AE O COMAN R-3 ;= , 20 0988, ENE (CASE} 21 GOCD IF (CONAND RCVI s 'b' TirN 22 OGO, NEXT STAli := D; 213 ODA END; 214 OCDA END; (Seiector CJ 215 060 26 090) D; BGN 27 OD) (7At 1925, VERSION 2 B COD) (Here the Moder is attempting a 2,2A handilakk Of it, a connect} 29 GOOD (It is generatling answer tones) 2) ODI MODEMCHECK 22 OCEO IF OCECONNECTED THEN NEXSTA E := E, 222 OEC IF MODEMCONNECTFAll TLN NEXT STAT: ; ; J; 223 OOF8 END; 224 OFE 225 OF E; BGIN 28 00FB (AUG98, VERSI)N) 227 OF (Here the Moder is transmitting the EKG data) 28 Of IF (XECO COMMAND D7) = ()) THEN NEXT STATE := J. ESE (DS has drpped) 229 OO) IF (XECOMCOMMAND E D1 = (D1) THEN If R xRDY} 23C 87 IF (XECON COMAND ED7) = (D7)) THEN (DSR 1s HI) 25 021 BEGIN (A valid byte) 232 62 MINISTATE := 1; 23 O25 COMMANDRCVD := XECOMDATA, 234 G12C IF ANP TEN (CREASEGAIN ELSE 235 G38 IF GAINDIN THEN DECREASEGAid ELSE 236 GAA IF (COMMAND RCVD = -2) THEN CEN CALSIG ELSE (ifth) 237 05 IF (GOTOINTERCON AND ELITEONHOOK) THEN NEXSATE := G ELSE 258 0166 IF (GOTOINTERCON AND ELITEOFFHOOK) TH&N NEXT.SIATE := F ELSE 239 017A IF (COMMAND RCVD = 05) THER SPIKEENABLED := TRUE ELSE 24C OSA IF (COMMANS RCVD = B6) HEN SPIKE ENAEE) - FALSE E St.) 24 08A IF (COMMAND RCWD = i.) THEN SPIKEENABLED := FALSE; 242 G97 IF (COMMANDRCVD = 07) THEN SEND RATE := RUE; 243 A4 END (lf a valid byte) 244 CA7 ELSE F Shift (An info byte left frn 22 245 01A ELSE COMMANIRCVD := 0 GH, (if nothing is there.} 24t Oi B2 IF (NEXTSTATE = E) THN 247 08A IF CANURSEPRESS THEN 248 OC IF ELITEFFC HEN 249 OC5 NEXT STATE := H; (Pt waits liter (DAJ 4,751,726 29 30 2 G1 CE 2 251 9 CE 2 END; 453 CE 2 F; 3. iN 2,301 CE 2 (SAG98, VERSION 254 OE 2 (This is the INTER COr, AGue 255 CE 2 (This is a two stage GO TONIERCM D4, Cohraid interpret Er) 256 GCE 2 It locks for a Mr. A followed within i techu (ly a DNF 3 2579 CE 2 28 OCE 2 WORKVAR := BYTE (XECOM CCFAN. D7, D. ); 25 GD 2 CASE RKWAR OF 26 OO 2 ; COMMANER CVD := X3GP, SA, A, 28 0.2 2 28 ; COMMAN RCD := 0; 262 G1 EA 2 2 ; FiGN 263 CitA 2 CJMNRNRCV) = E-MBA in 264 GFG 2 COMMAN RCV = 0; 25 O15 2 ENO, 265 OF8 2 O ; COMMAR). RCW = 0, 28, G2G G 2 EN; (CASE) 263 627 2 269 G37 2 iF (COMMAND RCW = 'a') HEN 27C 621F 2 (here we wait for i second aRd ther lik for a Diff by 27 3F 2 BEGIN 272 B21F 2 SECGCK ( ); 27, 224 2 Rt:'EAT UNTIL (StLGRDS LEFT = G, 274 (230 2 WCRKVAR := BYTE (XEC, CUMAN, k ...... ; 275 02:38 2 CRSE (RKWAR 0: 27, 23B 2 30 ; COM,KDRC) := XELUDA, A, 77 244 2 28 : COMMANLRCV) := 0; 278 C24C 2 2 ; BEGIN 279 024, 2 COMMAND RCVE := XLCOM DAA, 28 O2S2 2 COMMAND RCY := ; 28 0.257 2 END; 282 025A 2 ; COMMAND RCVD := , 83 262 2 END; (CASE) 2B4 O279 2 IF (COMMAND RCVD = 'b') THEN 285 28, 2 NEXT STATE := l; 286 9286 2 END; (IF) 287 28, 2 288 9286 2 END (State F) 289 0289 2 G: BEIN 290 0289 2 7AG1985, VERSION) 291 289 2 (here we are waiting for patient t pick up phone) 292 0289 2 (The bell is ringing in the basestation) 293 8289 2 (No data is being transmitted-the xecOM is liffhook in TAF receive) 294 289 2 (The ring generator is supplying a UGO to the line for the nurse) 295 0289 2 296 O289 2 (DTF receiver Code IEEEEEEEEEEEEEkitikk - Elek-k-k-k- 297 289 2 SERVICEBEL; 298 028C 2 IF (D1 IN XECOM COMMAND) THEN (Look for Rx R2Y 299 (298 2 EGIN 300 298 2 IF (D7 IN XECONCOMMAND) THEN 30 2A 2 EEGIN 302 02A 2 COMMAND RLVD := XECOMDAA This is Vaid ) 383 02A6 2 END 3O4 92A9 2 ELSE 35 02A9 2 BEiN 306 02A9 2 COMMAND RCVD := XECOM. DA A, (Ciean the buff} 4,751,726 31 32 367 2AF 2 COMMANDRCVD := GyH; (A divity Val VG) ROB 024 2 EN) 309 6234 2 EN) 30 0287 2 ESE 31 O287 2 COMMANDRCVD := 0 G, (hithing rele) v 32 G2BC 2 (EEEEEEEEkitiki Ekk & EEEEEEEk H. E.H. XX % x + k kit H K E X 31 O2BC 2 34 028C 2 IF ( (COMMAND RCW = 'a') OR (CUMINDRV) - 'E' )) HEN (GUI) DA A CGMA 35 620E 2 NEXTSATE := L; . . . try iO Chrii, 316 02E3 2 317 2E3 2 (MUST BE FALSE. Bt CAU H.3KSI C1 ORY KK. Thi-kt} 18 2E 2 IF (ELITEOffijuk ANE (KINGS ATE = FAS)) ThiEN REXSTA E = F 39 EFF 2 END; 32C 302 2 ; BEGIN 32. 302 2 7AU1985, VERSION: 22 362 2 (iere we are waiting for nir set G plc up ph Gile 323 CO2 2 (Data is being transMitted} 324 G32 2 25 0362 2 Casper CAM.and receiver od 3 kitikkkk - k kit k skkkitkk} 526 8502 2 SERVICENGBAK; 327 O303 2 IF (XECOH COMMAND ID7} = {}) HEN NXF S: A E := J; (DSk has dipped) 328 G314 2 IF (XECOMCOMMAN, ; } } = (D1) fritN (if Riki Y 329 631 E. 2 If (XECO.COMMAND D'J = (D7) Tilk (DSk lishi) 30 028 2 BEGIN (A a (, yte 33 0328 2 Nii Ait ;2 32 O2) 2 CCMAARCW = ECOMBA A 333 0333 2 EE 34 336 2 ELSE FSHBYTE 335 033C 2 ELSE 336 633C 2 COMMANDRCVD := B(H, 337 0341 2 (kHk 3: KEEEEEEEEEE 8: E. E. E. k h Exhib:: **k kekkek: Ek}} 38 341 2 339 0341 2 IF COTOlNTERCOM THEN NEXISTATE := f; 40 O34C 2 ( IF ELITEONHOOK THEN NETSTATE := E; ) 4 34C 2 342 (34C 2 END; 343 (3.4F 2 : EGIN 344 03.4F 2 7A1985 VERSION3 345 34F 2 (Here the Iden is attempting a 212A handshake reconnect) 346 BAF 2 (It is generating answer tones) 347 3AF 2 NODECHECK 348 632 2 If MODEMCONNECTED THEN NEXTSTATE := E; 349 035E 2 IF MODEMCONNECTFAIL THEN NEXTSTATE := J; 50 C36A 2 END; 35 036) 2 EGIN 52 036) 2 7AG1985, VERSION) 353 B36) 2 (Here we look at the DET pin of the Xen and GO TO K if detected) 54 836) 2 IF (D6 IN ECON COMMAND) THEN 55 0379 2 IF (D6 IN XECOMCONANO) TRN 356 038 2 IF (D6 IN XECOMCONANE) TN 3,70389 2 IF (DS IN XECOM.COMMAND) THEN S8 39 2 IF (D6 IN XECO CONAND) THEN 359 O399 2 IF (D6 IN XECOMCOMMAND) THEN 360 3A 2 IF (D6 IN XECO COMAN THN 36 03A9 2 IF (Di, IN XECOMCOMMAND) THEN 362 GB 2 IF (D, IN XECON CONANO) Ti-N 363 0339 2 BEGIN 4,751,726 33 34 364 OE FOR CONI := 0 TG 3. GG DC (, , 2 St. PAUSE) 365 0303 EXT STATE := K, 388 OSEO END; 387 3EO IF (NEXT STATE = J) HEN 388 G3ES IF (SECONDSLEFT = 0.) THEN 369 (34 CASE AGATO OF 37 OFA RUE BEGIN 71 FA ACTIVELITEOFF, 372 O3F) FOR COUNE := 0 TO 15G G DL 7 G4F AftjAfDG is r ALSE; 374. O42A EN; 375 0427 FALSE: BEGIN 76 0427 ACTIVEl TECN: 377 042 FOR CON = G T G J&G OU 78 G44 ATCATGG := TR; 379 845 EN); 38 0454 END; 38 G461 Ek); fr 382 0464 lvi 383 0464 (AUGi85, VERSUNY 384 (484 (here he are walt ific for noder confect on autoanswer } 335 (464 (it is generating answer tGries) 388 0464 MODEMCHECK; 387 347 IF DECONNECTED THEN 388 C-46E BEGIN 89 46E REPEAT UNTIL (27 IN XECCCGNAD); 39G 47A NEXTSTATE := E; 9 94.7F END; 392 047F IF MUDEMCONNECTFAIL THEN NEXT STATE := }; 393 0488 END; 394 048E BECN 395 ABE (7AG93S VERSION 96 04BE (here we are waiting for Model reconnect frn bases tatl is ringing) 97 (49E (It is generating answer tones) 398 48E MODEMCHECK 399 49 EF NODECONECTED THEN NEXT STATE := E; 400 O49) IF KODEMCONNECTFAll THEN NEXTSTATE := J; A 4A9 END; 42 4A 0: BEGIN 493 94AC (7AUC1985, VERSION) 4G4 4AC (Here we are waiting 20 seconds for call nurse butt In 4S 4AC depression. The XeCC is liff the line allowing the 466 04AC Elite to dial. At the end of 26 seconds or at Call nurse 47 4AC depression, the XeCOM will CIMe Online and will be ready 408 04AC to accept the Dif a from Casper to go to data) 49 4AC IF ELITEONHOOK THEN NEXT STATE := A; 41 O 0437 IF CANURSEPRESS THEN NEXT STATE := C; A B4C2 IF (SECONDSLEFT = 8) THEN NEXTSTATE := C; 42 040 END; A 406 ; BEGIN 41 4 04:06 7A98. VERSION 45 04:06 (This is a special initialization state that starts everything) 46 406 STARTUP; 47 40% SAMPLE.ON = FALSE; 48 040E SEND RATE := FALSE; 419 04E3 r2 RATE TO SEND := 4G; 420 4E8 BLINKA; 4,751,726 35 36 42 04EB 2 NEXTSTATS = A; -r Elaced for AutoAinswer an in1 tis Ck press) 422 648 2 (see lead-in (Ode in Aalin Hop) 423 94EB 2 IF CALLNURSEPRESS THEN NEXT STATE := ELSE NEXT STATE := A; 424 04FE 2 END; 25 051 2 OTHERWISE 426 05Gl 2 (FAI) 27 O50 2 NEXT STATE := x; 438 30 2 END CCAS:3 429 O549 2 END; (EVALUATE TRIGGEkS} 438 OB PAGES 43 000 PROCEDURE TRANSFORAMACHINE; 432 354C 2 (The state. If the new states are set up herei 33 054C 2 BEGIN 434 054C 2 CASE NEXTSTATE OF 435 0552 2 A BEGIN 436 6553 2 (7AUG98, VERSION) 437 552 2 (Ging in to POTS anhook) 438 0552 2 BLINKB; 439 555 2 XECON RESET; (Hardware reset of the ech a?.) 440 6558 2 BLIKA; 44 0555 2 442 O55E 2 ELITEONLINE; 443 SSE 2 444 OSSE 2 STOPBELL; STOPRINGBACK 445 0564 2 446 564 2 NODEMCONNECTFAIL := FALSE; 447 559 2 MODEMCONNECTED := FALSE; 448 056E 2 PHYSCONNECTED := FALSE 449 (573 2 PHYSC)NNECT FAIL = FALSE 450 0578 2 45 0578 2 SPIKEENABLED := FALSE; 42 (57) 2 CNLTECFF; 43 0580 2 ACTIVELITEOFF; 34 0.583 2 END; 455 588, 2 8: BEGIN 458 (585 2 (7AU85. VERSION3 457 058, (SEP TO COUNT RINGS AN, LOYK FOk ELITE OF HOOK) 438 0386 2 RING COUNT = 1; 459 058B 2 ENI) 460 08E 2 C; EGIN 461 (58 2 7AU985, VERSION) 462 053E 2 (Going into ready for ist D if noue) 463 0585. 2 INTERCOM; (tilt eOnlife, if receive lii U) 464 91 2 ACfIVEI EOFF; 45 SSA 2 EN; 46, 3597 2 5: BEN 47 O557 2 (7AG98, VERSION) A68 Gyi 2 (Going inti ist (O anect atter pi: 469 OS 97 2 CNT OFF 470 059A 2 CONNECTRESULT = DAAINK, (DFALNK SE is Up aisler Audit a 47 CSA 2 (his aise Wii erugi e iii terr J. 472 05AC 2 EN1; 473 033 2 E: BE (N 474 C5A3 2 (7AU985 WKSICN } 47 CSR 2 (Going into Data fran Alttling o 476 05A, 2 ACTIVELITEDN; (iurn of lite is let 5ki klub ) 477 35A, 2 Sf OPEEl; SFUPNGEAK, 37 4,751,726 38 478 CAC 2 INT GUUE; 479 05AF 2 IF (STATE = H) THEN PTGAVEUF = kJ.; (Servicec & reset by ISR 48, 5 2 END; 48 GSKF 2 F; BEGIN 482 SEF 2 (AUG1985, VERSION 483 OSB 2 (Going intG IN FERCOM} 84 BF 2 LGI (EFF, 485 G5C2 2 ACTIVELIEOFF 486 85C 2 STOPEEL STOPRNGEACK 487 OSCE 2 INTEk (OM; 483 CE EN); 48%. GS) 2 90 501 2 G; BGN 491 SD 2 (ALG98, VERSION} 492 OSD1 2 (Going int. BASE,STATION RINGIN) 43 O.SD 2 (BASESTATION RINGING desn't send data in this revisio)) 494 OSD 2 CNLITEDFF; 495 G5)4 2 ACTIVELITEOFF; 498 OSD7 2 INTERCOM; (Eli1 enline, DIM receive in O) 497 O5)A 2 STARTEELL; 498 OSC) 2 END; 499 (5E 2 500 SEC 2 : BEGIN 50 SEG 2 (AUC1985, VERSION) 52 05EO R (Going into AITING FOR NURSE (data transMitting)) 563 CEO 2 JUNK = XECOMATA; 564 C5E6 2 CNITECN; 505 G5E9 2 PTCAING F TRUE (This is serviced and reset by the ISk} 08 CEE 2 START RiNGBACK; 507 OSF EN); 58 f4 2 SO 9 OSF4 I; BIN 2 7AG985, VERSI)N 2 (cing into nodeM connect from lifter CGA) 2 CONNEC RESULT := DFTALINK, O 5F A 2 EN); i 2 2 J; BGN 55 2 (SAU18 VERSIN 2 (Gong into Auto Ainswer) 2 DISABE-75; (17 Sept 85 update 1 or a e-sensei ELITEGFR, 2 2 (his does both a hardware ali, 5 (; tra e reset) X(CF RESET, 2 2 5 i 2 ACIVETEO; ; CN. tFF; 2 2 S. J.'8: ; SOPRINGRACK 3 t 2 (fit Gvt a 12 set of a paust: 2 FCR D := TO 360. , 2 2 MUDPLONFECIFAL = r A Si, 4,751,726 39 40 53 (6.3% O)2CUNNECI tij = FASE; 558 063 Ph, YSCONN.C.E.) ; 2 FASE, 37 643 PHYS.Nfi?fA. : - FAE; 3 O64:ii 539 0848 ALEEON, 349 G54B AU A G = jRU.; (ii te 15 (? 4 OEC SETCLOCK ( ); 42 O55, 543 6655 ENE; 544 0858 K, BEN 343 (68 (7A98. VERSION) 546 96.58 (Going into Models confect fron a yt Danswer) 47 0658 548 (658 ACTIVELITEOFF; 549 638 CNTEGFF, 50 06SE 551 65E CONNECTRESULT := DATALINK; 52 664 ( IS INFORMATION PRESEN ? ) 553 864 IF (NOT (D7 IN XECOMCONANE) AR (D, IN KECO COMMAND)) SS4 679 THEN CONNECT RESULT = XECOA DATA; 555 067F END 55 0682 : BEGIN 557 0.82 (AUG1985 VERSION) SSB 682 (Going int. Rider connect fron basestation ringility) 559 6682 CONNECTRESULT = DATALINK 56C 0888 END; 561 068S 0; BEGIN 562 683 (7AUG1985, VERSUN) 563 06BE (Setup for a 2B second pause for normal POS w/o Xe(Oh Inline) 564 688 SETC (CK (2); 565 069 EN) 566 693 567 693 OHERSE 588 069 (FAT) 59 693 NEXTSTATE := X; 576 (698 EN); (CASE) 57 009 ENE); (TRANSFOKNMACHINE) 572 OO SPAGE 57 6DE BEGIN (Main procedure) 574 DE 75 60E (Initialization) 576 6DE STATE := ; 577 8E6 (NEXTSTATE := A; - replaced for Avto Afiewer I? CN press) 578 06E RMSTATE is RESET; 579 06EB NEXT RMSTATE := AIT; 58 BF SB 6FO (Mainlop) 582 6F HILE TIME GOES BY DO BEGIN 583 06FO 584 6F (Rate nonitor Operation background tasks) 585 6F CURRENT_RMS OPS; 586 98F IF RMS FATE () NEXTRMSTATE 587 6F HEN BEGIN 588 86FD CHANGERMS; 589 76 RMSTATE := NEXT.RMSTATE; 59G 70. END; 591 7 41 4,751,726 42 592 676. 1 (Basestation operat. In backgrivnd tasks) 593 786 1 (BISPSTATE; 594 0766 5950786 F CALNURSEPRESS THEN 596, 67C BEG 597 (7 IF (SECONDSLEFT=a) THEN 598 G78 8GN 599 078 IF VOICEHOCKFAG=KU THEN 6, 720 BESI oil 9720 SETCLOCK (1); 62 0725, 1 VOICEHOOKFAG;=FASE; 83 072A WOICEONHCJK, 64 G72) CYLIEFF; 60S 073G 1 EXI 66 07 ELSE BEIN 607 0733 1 SETCLOCK () 808 9738 1 VOE JUKF. A. : TRJE, 609 973) VOICE OFFHOCK 61C 074 CNIEON, 6 743 EN); 62 743 1 END; 6 O743 1 END; 614 0743 1 EWALUAE. RIGGERS; 615 0746 IF STATE () NEXTSTATE 86 7, 1 THEN BEGIN 617 6750 TRANSFORM MACHINE; 618 G753 STATE := NEXT STAFE, 69 759 END; 620 0759 621 O75% END; 522 75 62. O75C EN), 624 OG 1 CBROC FFS End of COApilation number of errors=

FE A38:Es. H. 84.6 - Fabia: "Et uu" Code stic at if GOG "88" 2 OGO EXTENSIONS ONS 3 O GO $SEPARAE ON$ 4 OG 1 OPTIMIZE OFF 5 GBC 1 PROGRAM ALX; 6 GOG 1 (This code provides various at Kilary functions for the syster) 7 00 G 1 (It also inciudes the start up code) 8 GOG TYPE 9 OCG (G 1 2 3 4 5 & 7 8 9 A B C D E. F. G 00 GB 1 STATE-TYPE = (A,B,C,D,E,F,G,HIJKL, , N.C, X); TS = (D8DD2, D3, D4, D508,07); 2 OGG WAR 3 OOG A G.8 SEWAR ONS 15 600 0 1 XEDMDA? A : BYE; 6 OOC A85 ; BYTE; i7 C GCC 1 TIMERLO ; BYTE, 18 000 TIMERH) ; BYTE; 19 G 380 POR.A ; SET OF BIS; 43 4,751,726 2 PORTB ; St OF BITS, 2 : FERC ; SET OF Big 2 CC: CCMC ; BYTE, 2. GC CTCG ; BYTE; 24 OC C Cl ; BYTE, 25 COC CTC-2 ; BYTE, 26 OC AGR, 27 GB AAM? ; BYTE; 28 0. STA ; STATE TYPi; 29 GO NEXISTATE ; STAFETYP; 3G COG NATE ; BYTE, 5 OGG INKSK ; SE, GF S: , S: 2 000 SEWAR OFS OGG A GOVA CN 3, E39 VICE FLA 6:AN; 36 C. SECRIS LEFT ; INTEGER; his is a gener & ii. 2 E& bec (Uniw?: 7 :) COMAN! CV ; Bie, 38 GA 3. A Here are flag. that at E SE t art. USEC for gener stion of Speciali. 64 (COLs. At 2GGE in trie Gata streaf 4. A 42 64 RNINGRS: 4 GA PTCA, 44 004 PANSiT, 4 G4 PAREACY, 48 004 VEUF ; BOOLEAft; 47 OBG9 48 00: AS 39 (Variaties f ( the Calibi at l on signal ge.ief at 0: ) SG 0.99 (Set in GtMCA-SI, here? 5 CS PRECAVA W TE: (Fiest E. va. UE -- raw A/C V8l43; 52 GBA SEPCAVA ; BYTE; (The step a Ue: S3 GB POSTCAVA ; BYTE; Post step valve) 54 GGC PREGINT , BYSE; (NVPter of G is ticks for prest a 5 000 STEPCON ; BYTE, (Nu Mber of the step) 5, GE PS COUNT , EYE; (Number after he ste)) 5 OF CAGENCOURE ; BYTE; (Tatai calibi at Oil routine tick (GUI, t) 58 00 59 OR COOH DISPCSOR ; BYTE; 6 00 $END ORGS 62 5 O G COAH6 DISP ; BYTE; DISP2 ; BYTE, 66 06 DISP3 ; BYTE; 67 GO DISP4 ; BYTE; 68 Ol $END ORG 69 O. PROCEDURE DISABLE 75; EXTERNAL (Rate sense stuff 7 OD PROCEDUREXECOM, RESET; EXTERNAL; 7 72 ) PAGES 73 CO SGLEPRC ONS 7A O. (These pi' Ocedures Manipulate the 'front panel display) 75 GO PROCEDURE CLEARDISP; 76 OOC (This routine clears a display resident in the unused RAM socket)

47 4,751,726 48 3. GG, G FUNCTION CALLNURSEPRESS ; BOOLEAN 34 GC1 2. WAR 5 OG 2 ; INTEGER; 38 OG 33 2 CNP ; BOOLEAN 37 Gl 8, 2 BEGIN 138 0186 2 CNP = FASE; 39 G13s 2 (FOR 1 = 1 TO2C DO BEGIN 46 RB 2 IF (PORT B (D1) = (Dil) THEN CN P := TRUE, 14 DCA 2 ( IF CN THEN I:= 20 ; 142 Oi CA 2 (ENE), 143 G1 CA 2 CALLNURSEPRESS := CNP, 144 OD 2 ENG; 145 OGOG SAGE 46 800 l (INDICATE IF A COMAND IS RECEIVE FRG CASPER) 47 OCO 48 000 1 FUNCTION CALGEN: BOOLEAN; 49 2 REGIN 15C 102 2 CAGEN := FALSE; 131 1D7 2 IF COMANDRCVD = GFER THEN CALGEN := TRUE; 152 EB 2 ED; 153 DO 54 GO FNCTION GOTOINTERCOM ; BOOLEAN 155 1 F 2 EIN 156 Olf O 2 GOTOINTERCOM := FALSE; 157 GiF5 2 IF COMMAND RCVD = 12H THEN GOTOINTERCOM := TRUE; 158 0202 2 END; 159 O60 160 60 FNCTION CANCELINTERCCM ; B00EAN, 6, 207 2 BEGIN 162 0207 2 CANCELINTERCOM := FALSE; 163 120C 2 IF COMMANCRCWD = G5H THEN CANCELINTERCOM := TRUE; 164 0219 2 EED, 16S 60 168 0000 FNCTION RELEASEBASE : BOOLEAk. 67 2 E 2 BEGIN 168 021E 2 RELEASEBASE := FALSE; 169 (223 2 IF COMANDRCVC = 04H THEN RELEASEBASE := TRUE; 170 023G 2 EO; 17 OOO 172 000 FNCTION NURSECALLING : BOOLEAN, 7 OR 2 EGN .74 023, 2 NURSECA LING := FASE; 175 023A 2 IF COMMANCRCVD = OH THEN NURSECAL IN := TRUE, 176 O247 2 ED; 77 OGO 78 CG 1 FUNCIN GAINUF ; BOCEAN 179 0.24C 2 EEGIN 180 924. 2 GAIN = FASE, 181 035. 2 IF COMMANDRC, E = 0A, Filt N GAINF = TRUt, 182 02, 2 END; 83 184 OGGG 1 FUNCICN GAINDHN ; B03EAN, 85 0283 2 EEN 186 0.263 2 GANEW: ;= FAS: 187 (28.8 2 IF CCMAND R = 0B1; iN Girid? , = TRJ, 188 C27, 2 EXE; 189 $PAS 4,751,726 49 50 19G GGGS 1 PROLEDURE ENABLE, EXERNAL; 191 GGG G | PROCEDURE D. SABLE EXTERNAL; 92 000 0 1 PRCEDURE SMASK EXPERNA; 93 000 94 000 SPAE 95 0000 l (1 Second til Mer countdown procedures -- Use the S.5 interrupt & CTL) 198 000 G 1 PROCEDURE TIC; .97 927A 2 BEGIN 198 027A 2 SECONDS-LEFT := SECONDS LEFT - 1 199 6287 2 IF (SECONSEFI E ) THEN BEGIN 2CO 629, 2 DISABLE 21 O293 2 INTRMS := INTRSR + D3B; (Mask 5.5 if drej 22 29B 2 SMASK; 20329E 2 ENABLE; 24 02A1 2 END; 205 02A1 2 END; 206 207 IOCG 1 PROCEDURE SETCLOCK (SECONDS; INTEGER); 28 2AB 2 EGIN 209 02AE 2 DISABLE; 210 2AE 2 SECONDSLEFT := SECON)S; 211 2B4 2 INTRASK = {INTRMSX + (D3)) - (DI), (Unmask 5.5} 212 I2C 2 SASK; 21302C3 2 CTC := C20H; (Restart the se(IIid tier Chaiinei) 214 i2C8 2 CTC. := 0H; (...it takes a 16 bit load. . .) 215 02CD 2 ENABE; 216 (200 2 END; 27 800G 28 000 PROCEDRE STOPCLOCK; 219 205 2 (This procedure Merely Masks the 5.5 interrupt which occurs at . ) 220 2D5. 2 (second intervals) 22, 20, 2 BEGIN 222 0255 2 DISAELE; 223 G208 2 INTRASK := INTRASK + ID3, Dy; (Mask 5.5, li Gott 224 02E 2 SMASK; 225 C2E3 2 ENABE; 226 26 2. END; 227 SOO 228 000 PAES 229 0000 1 PROCEDURE SENDBYTEP (8; BYTE); 230 C2FG 2 BEGN 3 02F 2 END; 232 OOO 233 000 PROCEDRE SENDTOCASPER (A; BYTE); Y 234 G2FE 2 ESIN 235 62FE 2 SENDBYTELP (FEH); 235 .303 2 SENDBYTEUP(A); 237 0308 2 ED; 238 000 239 COO 1 SPAGES 24 G B 24 OOOO 43 00: G 1 PRCCEDIRE ENAELEEKG; 24, 39E 2 BEGIN 244 C305. 2 (Unmask Inly the 7.5 reset the 7.5 FF) 245, 30E 2 (The 7.5 unmasks the 6,5) 246 030E 2 INTRNSK := (INTRMSK - ID2)) + (D4, D3D1,D}; s s 247 3 2 248 01E 2 ED; 249 OBO 25 OG PROCEDRE DISABLEEKG; 2, 3F 2 BEGIN 252 OF 2 (as the 7.5 and 6,5) 25 SF 2 ( ISABETXX; } 24 SF 2 INTRASK := INTRKSK + ID3, D2, D); 25, 327 2 SASK; 28 03A 2 END; 257 OOC 28 OO SPAE 259 GOOC 1 260 098 PROCEDURE INCREASEGAIN; $ 328 2 BEGIN 262 O2B 2 AGAIN := AGAIt li 263 G3 2 IF AGAIN ) 15 TEN AGAIN = 15; 24 OF 2 AAP := AGAIN 265 0345 2 END; 266 27 PROCEDRE DECREASEGAIN; 28 0346 2 BEGIN 269 46. 2 AGAIN = ACAIN - 1 27C 4E 2 IF AGAIN ( THEN AGAIN := 6; 27 SA 2 AAP := AGAIN; 272 36 2 END; 273 O 274 D PROCEDRE GEN CALSIG; 275 06 2 BEGIN 276 O. 2 (This shiuld generated a value representing a RV signal electrodes) 277 351 2 (It should take into accoont the gain sett i?ng) 278 ) 2 PRECAL VAL = 127; 279 366 2 STEPCAVA is 27 + (2 k AGAIN); 2BC 97. 2 POSTCALVAL = PRECALVAL; 2B 379 2 PRECOUNT = 2; 282 037E 2 STEPCOUNT := le; 283 B3 2 POSTCONI := 2; 284 088 2 DISABE; 285 OBE 2 CALENCOUNT := PRECOUN + STEFCOUN + FOSTCUU; 28, 399 2 ENABLE, 87 39C 2 END; 288 GO 289 SPAES 29 OOG (Procedures to Manipulate lights relays, etc.) 2S OO l PROCEDURE ACTIVELITEON 92 0.9) 2 BEGIN 493 0.9) 2 PORTA := PORTA + ED); 294 CAS 2 END; 25 OOOC 29 OOO PROCEDIRE ACTIVELITE OFF: 297 OA 2 BEGIN 298 A6, 2 PORTA = PORTA - (D1); 299 OG 2 END; OOOOO 30 OO PROCEDIRE CNITEON; 302 SB1 2 EGIN O3 03B 2 PORTA := PORTA + IDO); 34 0389 2 END; 4,751,726 53 54 305 COO 368 000 PROCEDLE CNLITE OFF; 37 33A 2 BEGIN 308 03BA 2 PORTA := PORTA - (DO); 369 O3C4 2 END; 3 OCO 311 COCO PROCEDLR5 BLINK, 312 OCS 2 BEGIN 313 O3C5 2 ACTIVITE ON, 314 G3C8 2 CNITECFF, 315 03CR 2 SET COCK (; ); 3i 6 O300 2 HILE (SECONCLE: , ) C) C3 (busy sting cai, 't go any where thii do?e) 317 03BF 2 END, BOCO 319 COOC 1 PROCEDRE BINki; 320 03E2 2 EGN 321 O3E3 2 ACTIVELIOFF; 322 0355 2 CNFEON, 323 C38 2 SET COCK (i); 24 OE) 2 WHILE (SECONDSLEFi () C) (, ; (busy wait is ca?t go any where tail done) 325 C3FC 2 END; 328 COO 27 800G 328 BGO G FKOCEDUR: VOICE OFF HOOK; 329 OFF 2 BEGIN 330 03FF 2 PORTA ;- FORTA + ED5); 33 04C7 2 END, 332 GOOO 333 D G O & 1 PROCEDYKE VOICE CNHCJ:; 334 (498 2 EEGN 335 04:38 2 PORTA is FORA - (D5), 336 042 2 END; 37 OGG 338 00. 1 PALES 339 000 l (This procedure is used far initialization of the box) 340 000 0 1 PROCEDURE STARTUP; "41 4 3 2 EN 342 0413 2 DISALE; 343 048 2 344 0416. 2 CLEARDISp; 34 049 2 346 0419 2 (STAR UP THE 85) 347 .419 2 TEPERD := 3; 348 041E 2 TIMEHI is 40H; 349 0423 2 (Pert A utpt ) 350 0423 2 (Port B ; input ) 35 423 2 (Pert C ; Dutput ) 352 0423 2 (Port A B interrupts disabled ) 353 423 2 (Start the timer ) 354 0423 2 A815 := OCDH; 355 (429 2 PORTA = }; 356 042D 2 (Port C controls the 823 gates ) 357 42D 2 POTC := (D2, D1, D.); 358 0432 2 (STAT THE SMS IMER} 359 432 2 (This runs off the MHZ (Gk) 36C 0432 2 CTC MODE := 11101:8; 36 047 2

4,751,726 57 418 0491 2 KINISTATE := 2; 419 0496 2 COMMANDECVD := GH, 420 049E 2 END; 421 OGG 422 OC End of COApilation number of errors=

FILE, MIAM;8CBS FE 64ii - Fasca. "808 (act: it is it COG "885" 2 COG $TITLE "MAMI BASESTATION PROGRAM - MEMORY NA;'rt IO's 3 600 G 1 PROGRAM KIAMI0; 4 OG 1 5 OGO EXTENSIONS Ots 6 00 SSE ARAE ON$ 7 OIC 8 CONST 9 OO E. s Of 80 GH, 10 000 EC2 = GF8GH; 1 1 000 FEXC = F883H, 12 000 FEC2 = OF862H; 13 OCO A GG 1 TYPE 15 OG ITTYPE = (D, D1, D2, D3, D4, DD, D7); 6 00 S8 = SET OF BIT TYPE; 17 ICGD . CHANTYPE = (CHANA, CHAN 8); 1896 CD CEETYPE = (MODE AMLOES, MODEAL); 19 GG YTEP = BYTE; 20 000 RINGINDEX = INEGR, 2 000 22 OC 1 23 GGG WAR 24 OOOO 1 GBWAR ONS ?t, OGG SFAFS - 25 GOO ------) 27 OGC 1 (HE KHE HERE HE MEMORY NAPPED I/O KEK - Ekk - 4 x i : ) 28 000 (------) 29 OOO 30 OC OR OFOH O 32 OCO ------} 3 GO (THE 855 PAALLE I/O TIER) 34 000 (------) 5 000 A835 RECORD CASE BOOLEAN CF 36 000 2 TUE : (STS : BYTE ); 37 IGO 2 FALSE: ( C : BYTE); 38 O GO EN); (RECORD) 39 000 PORTA ; S8; 40 000 FOTB ; S8, 41 800 PORTC ; S3; 42 IOCG TIMERLO ; BYTE, 43 O.S TIMER HI ; DYTE; 44 OG t 5 OG $ENDRCs 48 000 ORG BF2C is 47 OCG 59 4,751,726 60 48 C ------49 000 (THIS IS THE 823 CUNER/LNER CP} 50 CG ------} OOG 52 000 CTCG ; BYTE; 53 00 G 1 CTC 1 ; BYTE, 54 ICGC CTC-2 ; BYTE; 55 000 CTC MODE ; SB; 5 57 OD 1 SLND ORGs 58 00 RG BFAO CH6 59 OC 60 BC (------} (hii S S THE NS MMb i87 REAL it. CGCF) 62 OGO ------6 OG 1 (THESE ARE CUNERVALESS 64 1000 t CTC MS ; BYTE, (MILLISECONS: 65 SCCC 1 CRTCCS ; BYTE; (CEI ISECONS: 6t, OCC CCS : BY; (SECON] 67 GOOG 1 CRTC MiN , EY TE; (PNUIES) 68 000 CTCHS ; BYTE, CKCUR33 69 000 G 1 C RFC DC ; BYTE, (DAY UF ELK} 70 000 CTC DOM ; BYTE, (EAY OF MLRH) 71 000 CR FC MON : BY FE; (Miki i} 72 GC 73 BC (THESE ARE LATCH VAYES) 74 COG RTCMS : BYE (P.L. (SEOR 3) 75 GOO LRTLCS ; BYTE, (CENTISECONIG) 76 GOSC LRTCS ; BYTE, (SECN)3 77 60 Li C.N.IN ; BYTE, (MINUTES) 78 0000 LRTCHRS ; BYTE; (HOR33 79 0 CO LTE DOW ; BYTE, (DAY OF EX} - 8G B 000 LRTC DOM : EYE (BAY ()F MCNH2 81 000 LTC HON : BY (ONit] 82 O 83 GOB 1 RCIN ?RSIS ; S8; 84 OGC RTC INTRMSX ; SB; 85 000 86 I000 COINTERRST : BYTE; (COUNTER RESET) 8) 0000 LAFCHRST ; BYTE (LATCH RESE { } 38 000 RTCSTSBT ; BYTE; 89 000 GOCOMMAND ; BYTE; 96 IGOO STANDEY INTR ; BYTE; 9 0000 SECOND COUNFER ; BYTE; 92 OGO 93 is $ENDORCs 94 OO ORG FOHS 95 000 9 OO (------) 97 (XECO El2Of 23 OSARY ART/ODE) 98 OGO (------99 0000 XECOMDATA ; BYTE; 160 000 XECOMCOMMAND ; S8; O. O. 102 OGOO $END ORGS 1 O3 OG 1 OR OFBOs OAOCOO 4,751,726 61 62 0500 ------J 96 000 (ANALCS DEVILES AS758) 8 CHANNE ADC O7 OG (------} 8 OOO (TIS CHIP OOKS (KE 8 MEMORY LOCATINS3 09 COO CHANG : BY E; OOC CHAN-1 ; BYTE; 1 1 000 CHAN 2 ; BYTE; 12 OO CHAN-3 ; BYTE; 3 GCC CHAN 4 ; BYTE; 14 OCO3 CHAN 5 ; BYT.; 15 COO CHAN ( ; BYTE; 16 000 CHAN-7 : BY; 17 OGO B CG $ENDBx is 19 COO $RG OFAOSH 2G 00 2 OG ( (------} 22 OO l (ANALOG DEVES AD 24 hul if YiNG DAC (). LUNRL CA.N.) ) 23 OGO 24 OGO l 25 OCOO 28 0. $ENE CRCS 127 000 g $CR OFCO GHS 28 0. l 29 OCG (------} 36 GOG. (ANALOG DEVILES AD 524 MU? IPLYING DAC (OIG CUrik L. G.N) 2. 31 OOOC (------J 2 8 AMP : BY, E, OC A 30 $END ORC5 35 OCC: $0 ft CH3. 38 000 137 OOOO f (------} 38 GO (UNUSE CHIP Stile C, DECODE LOCATIUN} 39 O. (------AC 000 WHO : BYTE; i4 OGSO 42 0000 $ENIORG A3 30 144 OGG End of CIApilation, nurber of errors

Fili; CIOK.J.E.5a5. H. b4 & - Fascia: "' val ue?, a? a Gl 000 B685 2 OOC PROGRAM CLOC10; 3 00 $EXTENSIONS ONS 4 OOC OPTIMIZE ON 5 GCB $SEPARATE ONS 6 8 7 OGO (These are the input sapling retines for the Basestatin) 8 OOC 9 OCC CONST l SPIKECODE = IFFH; OGO ALARATRIP = 4; (it If SID samples Hut If last 10 for Pt alert) 2 00 ALARMREFR = 5; (ii af secnds refractory for retrip. If alar M} 4,751,726 63 64 3 OCG SFIKEREFR = 8, ( If i is ticks before spike retrigger possible) 4 CO TYPE 8 OGO INTRBITS = (M5, M6,47, IEI5,6,I7, SD); 7 OGO 8 OGG VA 9 OO EXT WAR ONS 2 C. INTRSK ; SET OF INTREI IS; 2 GO CAGENCOLIN, ; BYTE; (AUX} 22 OGO PRECAVA ; BYTE, (f)) 23 9 STEPCAVAL ; BYTE, (AUX} 24 OOO POSTCAVA ; BYTE; AX 2, OCOO PRECOUNT ; BYTE; (AX) 28 0. STEPCOUNT ; BYTE, (AUX 27 OOC POSTCN ; BYTE, (AUX) 28 IOO XMITECG ; BYTE; (SAPER} 29 (99 SEWAR OFFS 0. 2 OC GLEWAR ORS G CBUFFER ; AKKAY , , 2, Di BYSE; 34 GO C3 COMANDINS) DE : BOOLEAN (Whether We're in tie C4 (process Gf 3 tyte x filt) 694 COMMAND PTR ; BYTE; (Byte it or by te 27) 7 CS 6 GO. SPIKEE-ABE : BOOLEAN, 39 G8 4G CC8 EMF ; BYTE, 4 OE 4 OG (Co.Viters for refract Giy, etc.) 4 OG 7 SIDOF. N. : BYi E, ( of SID true i? last ti 44 08 St. POINTER ; BYTE, (Pointer into curfeit Sir value) 4S 9 INDEX : BYTE (orking iAdex into SD LEJ 48, GA SIE LINE ; ARIAY , , OF BYTE (St. of SI) for last it. Lks) A7 65 S REFR CNT : BY FE; (10 As tick counter for spike retrigger) 48 06 A REFRSEC ; BYTE, ( second Gyfter) 49 OG 7 AREFR. SUB ; BYTE; (10 As tick Counter) SC 918 5 8 (This flag is true when a 2-byte Message t ( Caber needs X Alttan, 2008 PTALERT ; RUOLEAN, 3 O 9 54 619 GEWA OFFS 55, 9 58 019 SEWAR Of$ S7 SO 9 INTRSS ; SET OF INTRBITS; 58 9 XECOMDATA : BY FE; 59 09 (These are flags that generate special code pairs in the data strea My 9 (They are tested before each byte is trashitted, If a code pair is 19 Currently being transmitted, they are held off} 2 9 SEND RATE : BOOLEAN 019 INGNURSE : BOOLEAN; 19 PTCALLIG : BOOLEAN; 65. 19 FTANTSDT : 00LEAN; 66 19 PTEADY BOOLEAN; 67 019 TCAVEP DOOLEAN; 8 9 1 RATE TO SEND ; BYTE, (Module MONITOR) 69 19 SETWAR OFF 4,751,726 65 66 7 G 71 ICIO PROCEDRE RNASX; 72 2 EXTERNAL 7 74 PROCEDURE ENABLE 75; (nodule SAMPLER) 75 OG 2 EXTERNAL; 7 77 G PROCEDURE SASK; 8 2 EXTERNAL; 79 0. 8 $BPROC ONS 8 O 82 000 8 O PROCEDRE CADIN (VAL:BYTE); BA, O9 2 BEGIN 85 009 2 COMMAND INSIDE := TRUE; 86 OE 2 COMMAND PR = 1; 87 B3 2 CBUFFER(1) := 0FEH; 88 is 2 CBUFFER (2) is VA; 89 OE END; 90 OOC 9 8 PROCEDURE RESEREFR 92 O2 2 BEGIN 93 23 2 (lip Gse a second Piri i A) 94 323 2 IF (ALAMREFR = 0) THEN A REFR SEC : - G 95 62E 2 ELSE AREFRSE := AlAkh. REFR - ; 9 33 2 AREFRSS := 0 ); 97 038 2 END; 98 OG 99 GGO PROCEDURE FRECSPIKE O39 2 BEGIN (cant sld () l} O 39 2 IF SIE OF TEN ) ALARMTRIF THEN 12 44 2 EGIN 10 OG44 2 IF (A REFRSEC + A RE FRSUE = 0 THEN 94 35 2 (Alar refractory = } 1855 2 BEGIN 06 06 2 PT ALERT := TRUE; 07 OS 2 RESETREF R; 08 058 2 ED 9 058 2 END; 11 58 2 END PROCSPIKE) 1 COO 12 OG PROCEDRE LOOKSFIKE; 13 OC59 2 BEGIN 1 4 0.59 2 (This reflects a the first (() rance of a spike) 15 659 2 (ince refractory has run out) 16 O59 2 IF (SREFRCNT = ) THEN . 7 6. 2 (Here a valid spike has curred and Will in Gt 1861 2 ccur again for SPIKEREFR il ris) 9 2 (Note that an enhanced spike will accur at the 10 OO6 2 beginning of a patient alert period als0,) 2 66 2 BEGIN 1226 2 TEMP := SPIKECODE 23 66 2 S REFRCT is SPIKE REFR; 124 65 2 END; 25 OR 2 PROCSPIKE (Lok at potential alar trip in any case) 126 06E 2 END; (LOCKSPIKE) 4,751,726 67 68 27 COO 128 000 0 1 PROCEDRE INEYTE; 129 96F 2 (This procedure is called from SAMPLER every As with the OF 2 averaged value of the ECG signal for the last 1 Ms. A the 6F 2 lariable MITEC. It is now responsible (it wasn't in the 32 OF first rate detect version) for the testing of the iD line 13 OO6F 2 for pacing spike occurance, It incorporates (a de that will 4 OF 2 send a "Patient Alert" message to Casper if the Si) is true SS OF 2 for sample times (Xel As). It will the? wait for 50 sa Mie 36 OBF 2 tires (5 Seconds) before sending a patient a left Message, Spike 7 OF 2 (Ode transMission is C8 ntrolled to a refractory also 8 OF 2 - Beck Mann 1 October 1985 39 OC6F 2 BEGIN 40 OO6F 2 (Get the ECG/artifact data byt 4 OEF 2 TENP := XMI.ECG; 42 07 2 A 75 2 The decretenting of the airt & spike refract try occurs} 44 75 2 (whether the Spike is present ar enabled 45, O7 2 IF NEi ((A REFRSC + AREFRSUE) = G) HER 146 GBA 2 BEGIN (becrement the refractory counters} 47 OCBA 2 IF NOT (AREFRSJE = 0) THEN 48 G99 2 BEGIN A999 2 A REF KSU := AREFRSE - 1 15C CA1 2 ENI) 15 AA ESE 52 A4 2 BEGIN OCAA 2 IF NCF (A REFRSEC = 0) THEN 54 SBS 2 REGIN SS OR 2 A REFRSUE 10 (; S6 BA 2 A. REFRSEC : A REFR SEC - l; 57 OCC2 2 END 58 C2 2 ENO 159 BOC2 2. END; 6. CC2 2 IF NET (SRFRCN = 8) THE i Ski F.CNI := , ki; R. CN - l; 6 OD 2 62 COD 2 (Here the spike chanfiel of th: SIE life is look E. at if elial, ec} 63 OD 2 (CONSIDCOUN reflects the of co?t nuous Sii) line ICCyrants) 64 ODE RMASX; 85 CDE 2 IF SIDFGNTER = 0 THEN SD PGiNEk := . 66 00EE 2 ELSE SPG INFER = S. PG.NER ; 67 OFS 2 IF (SID IN INFRSS) THEN SELNEESE PU: Nik ; ; ; ) '88 11 2 E3 SINESI)PUINK ; ); 169 D 2 SID OF TEN := 0; 17O 122 2 INDEX = 1; 17 27 2 HIE NOT (INDEX = 1) DC. 72 38 2 BEGIN 7. 98 2 SID OF TEN i = SID OF TEN + SIDLINE INDEX); '74 A9 2 INDEX = INDEX + 1 1755 2 END; 7 54 2 7 54 2 17854 2 IF SPIKEENABLED THEN 179 SR 2 BEGIN BC SE 2 IF (SIDLINESID. POINTER) - 1) THEN LOOKSPIKE 8 E 2 EN) 1827 2 ELSE (spike not enabled) 4,751,726 69 70 83 07 2 BEGIN 84 0171 2 (Here the spike enhancement is software-disabled, de ) 85 7. 2 (set the refract Iries to zero is that ist patient alert & splie ) 86 0171 2 (are recognized. Once enhanceMent is enabled refract Iry is ) 187 G17 2 (decreMented in the Outer loop, ) 88 07 2 A REFRSEC = l; 18917, 2 AREFSUE := 0; 196 O17s 2 SREFRCNT := 0; 19 13G 2 END; 1921 BD 2 33 18D 2 (Test for calibratin signal generator activity} 194 180 2 (Caiibration overrides the transMission of EKG data or 95 O18, 2 the spike detection cade, it does not verride the 96 88 2 transMission of special CIdes tested for be...G.) 97 OE 2 IF NOT (CAGENCOUNT = 9) 1989 2 THEN BEGIN 1990.9 2 IF (CAGENCOUNT ) (STEPCOUNT + POSCOUNE)) :00 A4 3 THM MP = F RECAVA 28 OAD 2 ELSE IF (CAGENCOUN ). PSCJN) 22 BA 2 THEN EMP := SEPCAWL 203 01C3 2 ESE TEMP := POSTCAVAL; 204 CC9 2 CALGENCOUNT := CALGENCOUN - i ; 205 OD 2 END; 28 0 2 287 CD 2 208 Ol. 2 (here flags are tested for special codes to be sefit to Calue, , ) 209 yi ) (Their Order i Miles their rank and precidence, Notice that Gly 20 OD1 2 if they are serit are they reset) 21. Gi Di 2 (CUMMA PSINSIDE indicates that a pair is in the pit cess of being 22 GC 2 tent anc blocks, the testifig for any other flags} 2 CD 2 2. A 2 IF COMMAN INSIDE THEN BEGIN EN ELS: 215 GFD 2 28 ODE 2 (Test Alert (should be a DPH) with CH (ring bel}} 217 CE 2 IF PIALRT THEN BEG.N CMN (GH); PIALERT := FALSE 28 OEC 2 END ESS 29 CEF 2 IF PCALLING THEN BEGIN COINK O2H}; PTCALLift := FALSE 22 G2G 2 END ES: 22. G20, 2 IF RINGNUSE THEN BEG.N CME N(01H), R(NNURSE := FALSE 222 024 2 E, ELS 223 927 2 IF SENE RAE THEN BEGIN 224 02E 2 (4G (it RATE TO SERI ( 2 batter be! } 25 02E 2 (38 & 39 used for special SAM cases) 226021E 2 Celi Vte 3) her E for a CCKIO trap} 227 O2E 2 ('d test it here but I don't think there's the 228 O2 E 2 (Gh hell, , , .) 229 2E 2 IF (RATE TO SEND ( 57) THEN RATE TOSE : 37; 230 022D 2 CDIN (RAIETO SEND); 1 22 2. SEND RATE := FALSE; 232 0237 2 ED ELSE 2, 23A 2 IF PTANTSDT THEN BEGIN CADIN(O3H); PTANTST := FALSE 2S4 24E 2 EID ELSE 2S 24E 2 IF PTREADY THEN BEGIN CON (GSH); PTREAY := FALSE 236 25F 2 ED ELSE 257 282 2 IF PTCAVELP THEN BEGIN CMDIN(I&A); PTGAVEP := FALSE 28 273 2 29 27, 2 71 4,751,726 72 246 27, 2 24, 273 2 (Hi HE HER} 242 273 2 (HERE E OUTPUT A BYTE) 243 273 2 (EHEEHE HEEEEEEE) 244 I273 2 IF COMAND INSIDE 245 27A 2 THEN BEGIN 24, 27A 2 XECON DATA := CBUFFER COR AND PTR); 247 288 2 COMMAND PTR = COMMAND PTR + 1 248 29, 2 IF COMMAND PTR = 3 249 295 2 THEN COMMANCINSIDE := FALSE; 2SO 29A 2 EN) 25 29D 2 (Teep (Ontains either a SPIKE code Ir EKG data) 252 29D 2 ELSE XECON DATA := TEMP; 25, 2A, 2 254 02A3 2 END; 255 G 56 0 1 457 COO 1 PROCEDURE INIIGLEVE: 258 02A9 2 BEGIN 259 B2A7 2 COMMAN: INSIDE := FALSE; 260 2AE 2 S REFRCNT := 0; 26 O2B3 2 262 253 2 INDE := }; 263 2BB 2 WLE NOT (INEEX = 1) DO 264 92CS 2 BEGIN 26S 82C9 2 SiDLINEIDEX) = 0; 266 825, 2 INDLX = INEEX + ; 267 02DA 2 END; 268 02D 2 269 B2DD 2 SID. POINTER = 1; 27 O2E2 2 IDOF TEN := 0; 271 02E7 2 COMMAN) PR = ; 272 02EC 2 AREFRSE := 0; 273 2F1 2 AREFRSE := B; 274 2F 2 275 G2Fb. 2 (Reset the flags he e) 276 C2F6 2 SEND RATE ; F FALSE 277 02FB 2 RINGNURSE := FALSE; 278 30, 2 PTCALLING := FALSE; 279 305, 2 PATSO := FALSE 28 (30A 2 PTREADY ; F FALSE; 281 030F 2 PGAUP := FALSE 82 314 2 PTALERT := FALSE, 283 319 2 ENABLE 75; 284 O3C 2 END; 283 96 $COEPRC OFF 286 800 End of COApilation, number of errorss

FILE: TELE3, BCBES H 64 OCC - Pasca) "885" Cede Gei, Erat IF D) B085 2 COG ITLE AM BASESTATION PROGRA -- ELEPHONE'S 3 COO 1 PROGRAM TELEPHONE; 4 OOO 5 OG SOPTIMIZE OFF 4,751,726 73 74 6 080 $EXENSIONS ONS 7 OC SEPARATE ONS 800 9 OCG CONS GO CASPERSNY = 1; 11 CO ALT NUM = 1; 2 OO A2N = 2; 3. GG 14 OC SPIKECUDE = IFEH; (DATA STREAN CODE FOR SPIKEDETECT) 15 O 16 GO TYPE 17 OG l XESTSBITS = (XETXRDY,XERXREY,XETXEXEPEXEDEXEFEXEDEX)Sk); 8 000 XECMI BITS = (XETXEN,XEDTRXERXENXEB8KXEERXETS, XERAEEH); 19 XESTs. TYPE = SET OF XESTSBITS; 2 300 XECMD. TYPE = SET OF XECMDITS; 21 OGO TYPE = (DD1, D2, D3, D4DD6, D7); 22 OOC l SE = SET OF BITYFE; 23 CO STATE TYPE = (STATE A, STATEB, STATEC, STATED); 24 SG9. LSTAFETYPE F (BUSY, RINEAC, VOICE, DIALTCNE, Il MEO); 25 OCG CHANTYPE = (CHANA, CHANB); 26 600 MCDETYPE = (MCEEAKUES, MGDEA); 27 OCG BYEPT = BYTE 28 OG l PHCNEN M = ARRAYO, 19 CF CHAR; 29 OC) PHONEA = ARRAY.O.,9; OF PHONLNUM 3 O GO 3 OGO SPACE$. 2 800 WA 3 CO 34 O EWAR ONS 35 IOO PHONEBOOK ; PHONETAB; 36 57 O PORTA ; S8; 38 Ol PORT) ; S8; 39 ge POTC ; S8; AG XECON ATA ; BYTE; 4 800 XECOCOMMAND : S8; 42 IGO AAF ; BYTE; 4, 8 B AMP ; BYTE; A 80 SECONDS LEFT ; BYTE; 45 COMAND RCVS : BYTE; 4 RINGRSE BOOLEAN 47 48 SEWAR OFF 49 O. BVAR (NS 5 S CO VAR 52 LASTRING BUCEAN; S 1 RING STATE ; BOOLEAN; 54 02 STSORK XESTS-TYPE; 55 003 PHYSCONNECTED, 58 03 PHYSCONNECTFAIL 57 003 NODEMCONNECTED, 58 C3 MEMCONNECTFAIL ; UOLEAft; 59 (67 RlNG COUNT ; BYTE; 60 008 CONNECTRESULT ; BYTE; 6 009 DUMMY ; BYT.; 62 GA 75 4,751,726 76 8, 1864 (This should reflect the last values written to the CD Pirand reg) 64 GCA XE CME ; XECM (TYFE; 65 OS 66 5 (This is a new layout for the status register 67 GOB 1 (Its origin foll Gus XECUMCOMMAND (They're the sake location}} 68 CE (Move this to MlAMI0 when things settle dow?, , ) 69 OOB $0R CF, HS 70 IOCE XE. STS ; XESTS TYPE 71 OOB $END ORG 72 OS 73 le GB 1 INFOFLAG, DATA.F.AG, 74 OB 1 TX FLAG : E0OLEAN; 75 GCE 76 ICOE DBYTE, IBYTE : BYTE; 77 OO 78 10 (The following are used for function manipulation) 7 1 SLLYWOIA : B0DEAN, (IF TRUE, DIALT? (If PASE W/ PASE) 80 811 1 USETI ; BOOLEAN, (IE TRUE, TRY IT FIRST TO DIAL CASPEk} 8 2 () 82 012 PRICHAN, 8, 12 SECCHAN ; BYTEPTR; (POINTER TO FRARY & SECUNDAK E () 84 OG 1 () 85 IO is 1 FILTERA, 8, 6 FILTERB ; BOOLEAN; (WHETHER TO FILTER A AN B} 87 018 AGAIN 88 18 GAIN : , , 15; 89 001A 1 ALRIHT ; BOCEAN; 90 08 . () 91 018 CASPER ANSWERED ; BOOLEAN, 92 OC RINGS : ... 10; 93 D COUN ; , , 1 ; 4 91 E 95 OE () 96 01E RESULT ; BYTE; (THIS IS THE RESULT OF ALL SENDFUNC CALLS3 97 (F 98 IBF SPAGES 99 00 G 1 PROCEDURE SETCLOCK (MA; BYTE); EXTERNAL; (ETS - starts the second in territ) 1 & 0 & 0 1 PROCEDUE STOPCLOCK; ETERNA; (ETSI - disable. Llock interrupts) 31 OO $GDBPRC ONS 102 000 13 9000 (------) 4 CD 1 (EEEEEEEEEER CEN/TELEPHONE FUNCTIONS A PROCEO ES E HE HE 95 0000 ------G6 000 -- 07000 FNCION ELITEONHOOK : 00 EAN; 168 000 2 WAR 109 OG 1 2 I ; INTEGER; 10 IOC 2 BEGIN O 2 (UST HAVE POWER TO SENSE OFFHOOK) 12 00 2 (This de-energizes the ringer relay. This puts the Elite either) 1130 2 (across the 5 If the pseudaringer r across the line) 114 GOC 2 IF ((PORT B (D) = (DI))) THEN ELITEONHOOK is TRUE ELSE 115 0012 2 Eli TEONHOOK := FALSE; 16 817 2 END; 17 OOOO 18 OG ---} 9 000 FNCION ETEOFFHOOK ; B00LEAN 4,751,726 77 78 12 COOl 2 WAR 2 C. 2 I; INTEGER; 22 OC 2 EEGIN 23 BC 2 (UST HAVE POER TO SENSE OFFHOOK 24 O1C 2 ELITEOFFHOOK := TRUE; 25 62 2 FOR I. := 0 TO GO DO BEGIN 26 034 2 (Prt bit D H indicates COOK 27 C34 2 F ((PGRB (D) = (DO))) THEN BEGIN 28 03E 2 ETEOFF HOOK ;F FALSE; 29 43 2 I ; F 1890; 3C 49 2 END; 31 49 2 END; 2 905 2 END; 133 0000 34 00 (--) 135 000 PROCEDRE Ell TEON INE; 35 G88 2 (THIS PROCEDURE PUTS THE ELITE RELAY IN THE URLINE POSITIN) 37 (60 2 BEIN 3B 060 2 PORTA := FOR A H (D7, D5, D4, D3, D2, DDS (D6 --) ZERO) 9 OO68 2 END; 4 41 800 PROCEDIRE ELITE OFFLINE; 42 069 2 (THIS PROCEDURE PUTS THE ELITE RELAY IN THE OFrLINE POSITIUM.) 43 OG69 2 BEGIN A4 006 2 PORTA is PORTA + D6); (D6 -) ONE) 45 007 2 END; 48 0000 l A7 O (--) 48 CO 1 PROCEDKE XECOMINIT (CHANGED 3-4-88) 49 OOC 2 WAR 5 COO 2 IDX ; NTEGER; 15 OO72 2 BEGIN 52 G72 2 153 G72 2 (These bytes either supply tu fissing sync bytes of 15 O72 2 one missing sync and a Mode 55 G72 2 If two rides) 6, 672 2 (The values are selected without the D6 internal reset blt 157 072 2 high and as 1.5 stop bit 126 bad async which doesn't 58 8072 2 require any sync bytes. In its own) 159 672 2 (Be careful if I y deside to change these -- if this procedure 6 072 2 is entered up in hardware reset, the KeCon will be iIoking for 1, 72 2 a Ride byte. If y V change these filving two bytes to zers 62 72 2 as reconnended in the application nate, the unit MAY link for 16 72 2 tW SYNC bytes. This means that the second zer and the reset 64. 72 2 byte could be loaded as SYNC bytes which would force the 65 72 2 desired Rode byte to be interpreted as a cAnand - VERY Ali) 16 72 2 67 672 2 (Hard reset first - Ridification done to board tying DS If PRTC ) 68 972 2 (t. RESET If the Xec, 69 G.72 2 SLIST CODEONS 17C 672 2 PORTC := PORTC + (D5); G.72 SA DA PORTC 75 F. 2d RI 2 e7 32 STA PURTC 4,751,726 79 80 7 07A 2 FOR IDX = 1 TO GO DOBEGIN END; 7A 21 E803 LXI H, 1884 67D 22 22 ShD DECUMINI 2 68 90 I Dl 83 CD 777 CALL Zintleq 08 CA 77 JZ KECO IO76 89 EB XCHG (BA XECO IO77; 188A 22 7. SHL) DXECON INIT OC EE XHG BGEE 2A LHD DIECOMiNI 2 Q91 CE 777 CA li?t nec, GG94 CA 7? J2 (ECUMI67 6. O97 E. XCHG 698 2. IX H O99 C3 JA XECOM 1077 69C ECOMIG 76; 172009C 2 PDRTC := POR) C - IB5); OG9C 3A A P3R O9F 47 M.V 5, A A EE 20 XR 32 A2 A3 ANA is 80 A3 32 SA PCR 173 a 0A 2 74 Ab 2 XECONCUARE := (D6, D3, D3, DO); A6 SE AD VI A, 77 (A8 32 STA XECO COMNAND 17 OAE 2 ( SOP Bi (, 8 BI (5/Chlia, PAKITY DISABED, 1280 BASE ASYNC) 176 OBAE 2 77 GAE 2 (Reset Errors -- parity overrun, fraxing) 78 AB 2 XECOM COMMAND := (D.O.D., D2, 34,5}, A3 - 7 A55 GAD 32 17?? STA XECUMCOMMAND 179 G 2 180 OBO 2 81 OBO 2 END; 030 RXECOMINIT; B C9 RE G8 DATA 8 DXECOMINIT; 008 OS 4 03 PROG EXECCINIT EU $ -1 182 GC LIST CODE OFF 18300 PAGES 184 GO 85 OCO (-----} 86 000 G 1 PROCEERE SNFUNC ( FUNCBYTE:CHAR VAR RESULl; CHAR ) ; 187 OBA 2 BEGIN 188 GBA 2 (SEND THE COAN; BYTE IT RTS CLEAR}} 39 BA 2 (RERE COMES THE FUNCIN) 19C OBA 2 XECONCOMMAND := (DAD2, D1, D); 19 OBF 2 (REAOY FOR THE FUNCTION?) 4,751,726 81 82 19200BF 2 WHILE (XECON COMAND H D) = (i) DO 193 GCC 2 XECON DATA := FUNCYTE; 94 CD3 2 (THEN AIT UNTIL TCRDY GO HIGH) 1958 OD2 2 WHILE (XEC COMAND (D) = ()) DO; 196 GDF 2 (THEN CHECK FOR RXRY HI ANE, DSi O FOR INF) SYTE 197 BODF 2 IF (XECON COMAND B7, D) = (1 l) THEN 198 CES 2 RESULT := XECON DATA 1999 GF3 2 ELSE RESULT := ' ' 2G0 00F8 2 CIF NO INFOBYTE, RETURN ) 21 OOF8 2 END; 292 COO 1 PAGES 203 000 204 0000 i (The following pricedures are updates of the sendfun-type) 5 800 l (function, Their purpose is to interface to the XCOf Nder) 206 000 i (in everything but mainstrean data transfers.) 27 000 26BO (--) 29 COO i PROCEDREXECO 20 (FUNC; BYTE; WAR ON: B00LEAN); 21 OR 2 21 1 003 2 (This procedure writes a function byte at t the KeCIA) 212 003 2 (It signals the AI den that a function byte is to be written) 213 003 2 (by clearing the RTS (request to send) bit in the CIAnand) 214 003 2 (register. It then looks to see if the Aoden is ready to) 215 0083 2 (receive a new function. If it isn't it sets OK t false) 26 OO 2 217 3 2 WR 218 003 2 (Used to snapshot the status of the noden) 219 1003 2. STSWORK : XESTS-TYPE; 220 B 2 22 O 2 EGIN 222 13 2 (Turn off RTS) 223 108 2 XECMD := ECMD - IXERTS); 224 0112 2 XECD := IXERXEN,XETXEX,XEDTRXEER); 225 117 2 XECON COMMAND := S8 (ECM); 226 11 A 2 227 11A 2 (Snapshot} 228 Ili A 2 STS WORK := XESf S; 229 62. 2 230 120 2 IF NOT (XEXRBY IN SSWORK) THEN 2 02A 2 O. := FALSE 232013 2. ESE BEGIN 2 el 2 OK = TRUS; 234 0.136 2 XECON DATA := FUNC; 235 i3C 2 END; (IF) 238 03C 2 237 0 13C 2 END; 238 000 249 ) (----- 240 COO 1 PROCEDLR GEl DATA (VAR GC INFO ; BOOLEAN, VAN GUDAA; BOOLEAN, 24 0004 2 VAR TXRBY ; BCCLEAN 242 CO6 2 WAR INUBY ; BYTE; VAR DAA. BYTE : BY it); 24, 14C 2 244 04C 2 (Lay Gyt of bits for CO AM.and ar, status) 245 014C 2 (XESIS EIS = (XE?XRDY,XERXROY,XETXEXErEXECEXEFE, XEDETXEDSki;) 248 014. 2 (XECMSBTS = (XETXEXEDTRXERX,XEk KXtERXEKTSXEIRXELh); } 247 64; 2 248 614C 2 (This procedure gets information from the XeLaM, it can return nothing, 4,751,726 83 84 ) 4C 2 a data byte, an in for Matl. Gil byte, or both. The rea 3 Cn we have to be 04 2 (Oficer fied here aboyt a data byte tier, the priory use of this roy tine 4C is to get in for Aati Gin from the Moden regarding a previous (IMMan G is GAC 2 that a data byte in the buffer will block the presentation of an infe 3 AC 2 byte by the McGee, ble therefore look far a data byte als.) 4 (The routine will return CANT as an and if f byte is returned and a AC 2 functiG? 1n still process1 fig ( or transmitter busy)) 94. 2 AC 2 (Note that all five parameters. If this function are variabies and ; 4C 2 need to be declared as such in uses of this procet tre, ' AC 2 OC 2 OAC 3 ESGN AC 2 STSORK := XE. STS; (Snapshot) 2 2 (Initialize) 2 2 GCT INFO := FALSE, 157 2 GOT DATA := FASE; 2 TXRBY := FASE; 6 06 (first is there data available?) 6 2 IF (XERXRDY IN STSORK) THEN BEGIN OSA 2 (First We Corsider the case with a pending data byte A 2 IF (XEDSR IN SS WORK) HE BEGIN O72 2 (If there is data, get it) 72 2 DATABYTE := XECUNDATA; 179 2. COT DATA = TRUE; B7E 2 (Take another snaashot ) O7E 2 STSURK := XESS; 184 2 (This is necessary to see if an info byte is Walting) SA 2 84 3. (Now look to see if there is an information byte) 8A 2 IF ((XERXRGY IN SS WORK) AND (NCF (XEDSR N STSORK))) TEN SEGAN 996, 2. INFC BYE := XECUMDATA; 19) 2 GCT INFG := TRUE; 1A2 2 END; (5) A2 2 Ol. A EN, ESE BEGIN (Here we knew l’s just aii info bylej GA 2 lNFC EYE := XtECMDAA, A GOT NO := TRE; s 2 END; OE OB 2 END; B 2 IF NOT (XETXRY IN STS OKK) THEN TX REY - FALSE, GC2 2 END; CO GO OGO ----- OODG PROCE)RE ABORFUR.T.)N; CF 2 All that's required here is a raising of tie ke (Yest to Send GCF 2 line on the Ace?, The GEOAA fencil?, shig.d be execut(d OCF 2 after this to clear the 'A' info byte that is ge?terate if CF a function is actually aborted, OCF 2 GN OLF 2 XECK) is XECM + (XERTS); 07 2 XECUMCOMMAND := S8 (XECM ()); OC 2 ENE; C OOO SPAS 4,751,726 85 86 37 OG (---) 38 900 PROCEDURE LOOKFOR COAND; 89 B (here we as 5 Me OAA is Vysed) 10 ODE: EGIN 11 DB GETDATA (INFOFLAG,BAA FLAG, TX FLAG, IBYTE, DETE); 312 1E8 IF DATA FLAG THEN COMAND CVP = DBYTE 13 FB ELSE COMMANDRCVD 5 IAA; 4 F END; 15 O 0. 317 GOO 1890 ---) 39 O. PROCEDIRE DIALFROPHONEBOOK (ENTRY: BYTE); 328 001 (Note that this checks SOLDIAL and places delays int1 dial inq) 21 001 (stream if tre) 22 Ol (late also that this is adaptive dialing, i.e., try first digit) 323 Ol (TT and if within 5 seconds the dialt One doesn't go a day 9 to 24 (pulse dialing.) 325 Ol 26 Ol WR 327 9 IJ, K ; INTEGER; 28 007 CH CHAR; 329 267 BEGIN 30 287 31 207 (first make sure hist Ready (DTR) arid Error Reset are set 32 267 and that RTS is led, indicating finitia? write) 33 0207 XEC2 = (XECMC + (XEER, XETR))-IXERTS); 4 23 XECON COMMAND := S8(XECMD); 350216 (Get the Elite Iffline because it causes, faise readings) 336 C25 ELITEOFFLINE; 337 O29 (lait for the dial tre 38 29 REPEAT XECOM 20 ( ')', ARIGHT, UNTIL ARIG II; 39 227 (Remember that alright indicates thist the fui (t) of CG Uld be 34 227 Written. It doesn't say anything about the Infosyte.) 34 0227 342 227 (Dial the first digit) 343. 227 CH = PHONEBGX (ENTRY, ()); 44 O23F XECC DO(CHALRICHl); 45 246 48 0248, (If we still have dialt on 2 thaf we have to go to rotary. 347 24 REFEAT XECOM DOC '', ARH) UNTI ALRIG, T, 48 024 REPEA 349 254 GEIDATA (INFOFLAG,DATA FLAG, TX. FLAG, IEYE, DEYE) 26 UNTILTX FLAG; 3 0288 (If n ( informatian byte dial tone still the E & switch to rotary) 2268 IF NOT NFOFLAG THEN BEGN O2F (C6 MP a? to suitch to rotary dial) 354 828F REPEAT XECOM D0 ('R'', ALRIGHT) UNL ALRIGli; 35 027 ; F ; $56 0.283 END ELSE 57 0288 I ; ; 58 028C 39 028C (It's ek for then to listen to diali?,g) 36 28C ELITEONINE; 36 28F 362 28 HILE PHONEBOOKIENTRY) () ' ' DL BEGIN 63 02A9 XECONDO{PHONEBOOK (ENTRY, ), ALRICHT); 87 4,751,726 88 64 2C9 2 IF SLOW)IAL THEN FOR J = O 20 e o O 365 02F2 2 I - I + l; 66 2FC 2 END; (WHILE) 367 2FF 2 368 e2FF 2 (SHOULD CHECK AFTER IS TO SEE IF RINGING) 369 2FF 2 (IF NOT, SHOULD HANGL AND SET SODEAL TO TRUE} 7, 2FF 2 AND TRY AGAIN) 37. I2FF 2 END; 372 73 0 1 (--) 374 800 0 1 PROCEDRE ANGPLINE 7S 388 2 BEGIN 376 38 2 (XECOM OHOOK) 377 308 2 XECONCOMAND := }; 378 3D 2 (ELITE OFFIN) 379 i3OD 2 PORTA = POTA + D6); 380 .315 2. ED; 81 00 382 1 (--) 383 II 0 1 PROCEDURE XECOM TODTMF; 384 31.8 2 EGIN 385 316 2 (DUMMY :=XECOMBATA; DUMMY }=XECON DATA, DUMMY }=XECODATA; 386 316 2 REPEAT XECOM D0t'D', ALRIGHT) UNTIL ARIGHT 387 324 2 (NO EVERY TIME THE RXRDY GOES HIGH, A DTMF HA, BEEN RECEIVED} 388 324 2 END; 389 000 9 OO (--) 91 ICO PROCEDURE TRANSFOND; 392 328, 2 (THIS PROCEDSE SENDS A DTMF TONEPAIR ANE EXPECTS ONL BACK} 393 326 2 (OF THE SAME VALUE WITH IN A CERTAIN AMOUNT OF TIE (5 SEC, )) 594 326 2 (ITS PURPOSE IS TO CONFIRM THAT CASPER 15 DR TR OTHER ENE OF A} 395 (326. 2 (GUIET LINE, IF IT DOES, THE WARIABLE CASPER ANSWERED IS) 396 828, 2 (SET TO RE3 397832. 2 (THIS PRODURE SENS A DTMF 'A' IF THE NO DA FRCRiTY AN) '8") 398 326 2 (OR A DAIA PRIOR Y CUNNEC 3 399 OE 2 BEGIN 40C 0328, 2 SENDF UNC 'a', RESULT); (SENE ONLY A FOR NOW A 32D 2 XECO TO DTMF; 4020330 2 (WAT FOR SEENES (5); } 43 530 2 F ((XECUMCUMANE) : (i) = ( ) THEN CASPAN RED := FALSE 404 34E 2 ESE BEGIN AS 342 2 IF XCOM. Di A = '' THEN CASPER AN3WERLE. : : TRL. (FUk TE5i) 406 032 2 ELSE CASPER ANSWCRED := FALSE; 407 0357 2 ENE; 40S 0357 2 END; 469 OCCO 41 OBO PAGES 41 30 42 GO, FNTION GOODAA ; BOOLEAN 13 G359 2 (This is only active with the Alders squelched) 44 S 2 BEGIN 415 0.35%. 2 XECO COMANE;=(C3, Bill); (enables receive!) 46 35E 2 GEDATA(NFOFLAG, DATA FLAG, TXFLAG,IBE, DYTE); 4768 2 ( IF (D1 IN XECONCOMMAND) THEN DEYE := XECUrbhi A ELSE DB?t 418 368 2 IF DAFA, FLAG THEN 49 72 2 F ( (OBYTE = '' ) OR (DBYTE = '' )) THEN A2 C394 2 GCTOOAA : TRUE

4,751,726 91 92 478 420 2 (Tura off qen here) 479 42G 2 (De-energize ringer relay) 48 42 2 PORTA = PORTA (D6DiD) (leave the Eliterelay lites all ale) 48 A2B 2 END; 482 OO POCEURE SERVICERNGBACK; 48. 429 2 BEGIN 484 429 2 IF (SECONDSLEFT = ) THEN 485 431, 2 IF RING STATE THEN BEGIN 486 438 2 RNG STATE := FALSE; 487 (43) 2 SETCLOCK (3); 488 0442 2 (Turn off gen) 489 442 2 (De-energize ringer relay) 49C 442 2 PORA := PORTA (D8, D1, D8); (Leave the Eliterelay lites alone) 49, 44A 2 END ESE BEIN 492 44, 2 RING STATE := TRUE; 493 452 2 SETCLOC(i); 494 (457 2 RINGNURSE := TRU; (Serviced and reset by Is 495 ASC 2 (Do the relay switching and generator start here) 4%, 45 2 PORTA = PORTA + D603); (Energize the Eliter elay & gate pseud ga} 497 4A 2 END; 48 46A 2 ED; 499 Oc SO GO PROCEDLRE STAR BEL; 2 VAR 52 GO 2 I; INEGER; SG 467 2 BEN 5. A 467 2 The first call to SERVICEBELL will tyin the tell III) SG 467 2 RNG.S (AfE := TRUE; 56 046C 2 SETCLOCK (: ); 5747, 2 PORA = PORA - B7, D6, D3; (Energize the Elitereia y & gate Bill gn) 508 G479 2 EN) 509 COO PROCEDIAE SOPBELL; 5 O 47E 2 BEGIN 51 47E 2 (Do not call SERVICEBELL after this) 512 047B 2 RNG STATE := FALSE; 53 (480 2 STOPCLOC; 54 433 2 (Turn off gen here} 5S 94E 2 (Deenergize ringer relay) 56 48 2 PORT A = PUR? A (D8,000); (Leave the Eliter elay lites al Gne) 57 (48E 2 END; 5B (). 1 PROCEDIRE SERVICEBELL; 519 43C 2 BEGIN SC 48C 2 IF (SECONCS LEFT = ) THEN 21 494 2 CASE RING STATE OF 522 049A 2 TRUE BEGIN 52 49A 2 Rl NG STATE := FALSE; 5.24 49F 2 SETCLOCK (3); 52 4AA 2 (Turn off gen) S2 4AA 2 (Deenergize ringer relay) 27 AAA 2 PORTA is PORTA D6DD); (Leave the Eliter elay lites aine) S28 4AC 2 END; 529 4AF 2 FNSE: EGIN 30 AAF 2 RING STATE is TRUE; 434 2 SETCLOC (1) 32489 2 RIGNURSE is TRUE; (Serviced and reset by ISR) S. ABE 2 (On the relay switching and generatir start here) 34 4.BE 2 PORTA = PORTA + ED7,06,3); (Energize the Eliter elay gate Ell on 4,751,726 93 94 SS 4C 2 END; 38 4C9 2 EN; (CASE) 537 AD& 2 END; 38 539 III PROCEDIRE PHYSCHECX; 54 49 2. BEC 54 49 2 (CHECK THE PHYSICAL CONNECTION 542 AD 2 PHYSCONNECTED = FALSE; 5434DE 2 PHYSCONNECTFAIL = FALSE; 544 4E3 2 REPEAT XECODO ('H'ARIGHT) UNTIL ARIGHT 545 4F1 2 REPEAT 546 4F 2 GETDATA (INFOFLAG,DATA FLAG, TX FLAG, IBYTEDBYTE); 547 14FE 2 UNTIL ((NOT TXFLAG) AND lNFOFLAG) SA8 5A 2 CASE IBYE OF 549 51 2 'R' : RING CONT := RING COUNT + 1, 595 B 2 'y', SS 51B 2 'T' ; PHYSCONNECTEC := TRE; 52 523 2 OTHERWISE 353 0523 2 PHYSCONNECTFAIL = TRUE; 554 528 2 ED; (CASE) 555 53D 2 IF RING COUNT ) 9 THEN PHYSCONNECTFAIL := TRut; 556 54D 2 ED; 557 C G 558 GBC 1 PROCEDIRE MODEMCHECK; 59 .54F 2 BEGIN 550 54F 2 IF (CONNECTRESUL = ' ' ) THEN BEGIN 56 557 2 MODEMCONNECTED := TRUE; 562 53C 2 GEMCONNECT AIL = FASE; 563 56 2 END ELSE REGIN 584 056A 2 MODEMCONNECTED = FALSE; 565, 569 2 MODEMCONNECTFAIL S TRUE, 566 53E 2 END; 567 055E 2 EX); 568 000 563 ICOO 1 GDBPROC CFFs 570 00 ,

End of compilatio?i, ny Mbar if errors= LOCATION OBJECT CODE LINE SOURCE IN

2 ; 3 : TELEPHONE POOK FOR MlAM) 4 5

7 GB PHONEBOK O 8 PHONEOK OO 537,233 9 ASC "S/29 G4 20202220 ASC CO28 202020202 ASC 3C 2822822 12 ASC O5 22O2C2O2 3 ASC 64 20202022O 14 ASC O878 282G20202 5 ASC 4,751,726 95 08C 222220 ASC OA 202020202 7 ASC 34 2228220 18 ASC 9 EN) k L. L. A - L' ('Ou ed u - L. Wu - Wii gi d 4 (

'885 2 000 EXTENSIONS ONS OS $SEPARATE ONS 4 00 OPTIMIZE OFFs S CBO PROGRAN XET; 6 00 TYPE 7 OOC BITS = (DD2, D3, D4E5D697); 8 OO S8 = SET OF BITS; 9 OG CDBS = (TXENDTRRXENSBRKER,RSIREH); 0. CBYTE a SET OF CADBITS; OO STSBITS = (XETXRDY,XERXRY,XETXXEPEXEDEXEFEXEDETXEDSR); 2 STSBYTE a SET OF STSBITS; 13 OO VA 1 4 00 OBWAR ONs 15 000 WRITEENABLED ; BOOLEAN; (Must be true to write to Kel A) 16 001 GLOBAR FFS 7 SEWAR ONS 8 O1 XECONCOMAND ; SET OF BI?s; 9 Ol NRSK S8; (Used by SASK to set interrupt Aak 2 EXWAR FFS 21 001 6 OFSC OS 22 Ol ED ; BYTE; (XeCOM data register) 23 O. XEC : CMDBYTE; (XeCM (I?raad register - write Iniy 24 OG $END ORGS 25 000 R OF HS 28 001 (ESTS ; STSBYTE; (XeCoA status register - read Inly) 27 G1 $END ORGS 28 001 SOR OFOH 29 Ol EMODE ; S8; (XeCon Mode register -- Write Inly) Ol $END ORGS 31 OG S OF OHS 32 G1 PORT CME ; S8; (815 COMM and por 1) OO PORTA ; S8; (CAPS A OO (7 - Ringer relay; FF) beil generator) Ol Os) pseu Ge ringback) 36 (D - Elite relay; le) across rif geferators) 37 000 0-r) in tie lite) 8 (D - Active lite; ce) in: 39 60 PCR 8 ; S8; (NPS) 4G C. POklC ; S8; (OPS 4 Ol $ENEGR ($ 42 OC) 43 O. PROCEDURE INIT, GUEUE; EXERNAL; (UEU - initializes the QUEve po?ters, e. e. the gul 44 OOC PROCEDURE SMASK EXTERNAL; (IN? -- ses INTRSK to S1M3 43 000 FROCEDLR DISABLE EXTERRA (INR -- executes the D. ( Arand 46 (OO PROCEOUR ENAE, E, EXTERNAL; (IN? R -- executes the El Corra?) 47 PROCEDURE ENAELE 7; EXTERNA (RAE ALARM STUFF) 48 00 PROCEOURE DISASE 75; EXTERNA; (RATE A, ARM STUFF} 49 OC) SO 08 4,751,726 97 98 5i 80 52 GOO PROCEDURE ACTIVELITECN: EX kNfil; 53 000 SA GOO SS OGC 1 PAGES 56 00 $COBPRGC ONS 57 OGO PROCEDRE DISABLE INOUT; 58 OOC 2 (This procedure disables the interrupts generated by the TREY Pan 59 60 2 If the XeCO and and 5 ns interrupt. It does not generally disable 6 8 2 the interrupts but des reset the 7.5 latch) 6 8 2 (Note that the 5.5 ( second) interrupt Rash status is Uneffected 82 000 2 by this rutine.) OO 2 EIN 64 OGO 2 ( ISABE; 85 00 2 ( INTRMSK := INTRSK + (D43, D2,51); 66 00 2 (SASK; 67 00 2 (ENABLE; 8 0. 2 ISABE-75; (17 Sept 85 Rate Alarm Stuff) 69 003 2 ED; 7 71 PROCEDURE ENARE INOUT; 72 04 2 (This procedure initializes the buffer for input data and enables the 73 04 2 interrupts) 74 04 2 (Note that the TRDY interrupt (8.5) is unrasked by the interrupt 75 G4 2 service routine of the 7.5 interrupt when there is a data byte to 76 04 2 Sand, de lake were it is tasked here before we enable the interrupt 5} 77 G4 2 (Note that the 5.5 (1 second) interrupt hask status is un effected 78 094 by this rutine.) 79 064 2 BEGIN 80 004 2 ( ISABLE, 8 004 2 ( INITQUEE; (Resets the Qveye -- erases wiat it stared) 82 4 2 ( INTRMSK := (INTRMSK + D4, D3D1)) - ID2), (keset 75 latch, Mask 6,5(lxkDY}} 83 004 2 ( (Un Mask 7.5 (As)} 84 04 2 ( SMASK 85 004 2 INIT GUESE; 86 007 2 ENAEE75; 87 OCA 2 XEC := TXEN, R., RXEN, ER,RTS; BB O OF 2 (ENABE; 89 GF 2 END; 9 BC 9 ) OOC PAGES 92 GOOO PROCEDUREXECOMRESET; 93 IOCO 2 (Here we hit the XeCIA hardware reset life an progra A the Mode 94 COO 2 byte and send the CIMAand register with DTR set high, Experience 95 CO 2 has shown that DTR is required for the DET (SYNDE/ERKDET) pif, t ( 96 OO 2 reliably show the bell status) 97 GO 2 VAR 98 000 2 ; INTEGER; 99 Ol 2 EGIN 10 2 PORTC := PORTC + (D5); (Hardare reset high) 08 2 FOR i := 1 TO GO DO BEGIN END; 2903A 2 PORTC := PORTC - (D5); (Hardware reset l) 3 44 2 ( 27,06 = 1 ==) 1 stop bit } 1 4 04A 2 ( 5, D4 = 00 Fr.) parity disabled ) 1 5 9044 2 ( 93,02 = 11 s) 8 bits/char 6 44 m ( ),D') = 1 =F) 128 bad async) 187 B44 2 XECOMCOMMAND := (D6, D3, D2, DO); (Set the ride per above) 4,751,726 99 100 849 2 XECO CONAND := (DOD1, D2, D4, D5); 09 CAE 2 WHILE (XECO COMAND H (DO) = ()) DO; O 58 2 ED; 11 1 000 2008 PROCEDURE INTERCOM, 13 CO 2 (This procedure sets up the intercon Mode, The telephone is Online 14 800 2 in parallel with the Xe(GM. No writes can occur here, The data 115 000 2 I/O interrupts are disabled.) 116 000 2 WAR 17 OOC 2 JUNK ; BYTE; (Used for buffer clean Vt) 18 OSC 2 BEGIN 19 OGSC 2 DISABLE INCUT, (Mask the 5 is an XRCY interrot. 2C 05F 2 XEC := (TXEN, DTR RXN); (Make sure receiver is enabled 21 64 2 22 0.64 2 (HE HE HE EX} 123 664 2 XED := 'H'; (l)iscuinet Aident--offhuk. 24 O69 2 (No informat if byte possile he e) 250069 2 REPEAT UNTIL (XTXRDY IN XE, STS); (dait for the fu fict (I to ( Met ej 26 OC7 2 27 97 2 HILE (XERXRDY IN XESIS) DL JUNK ; F X , (Here we cleai Iut the data buffer J 28 08A 2 (EH K E HEk KHEX) 129 OCB; 2 (Functief, ' W) (Culifeti a Ug in Ul for Flit.) 3 BF 2 (No information byte 55 le he 31 OCBf 2 REPEAT UNTIL (XETXKDY INXSTS); (it for the funct of O (Opite 12 608 2 3 009 2 WHILE (XERXRDY IN XE, STS) DL JUNE := Xi, (Hei E. We Cigan out the data by fief J 44 BBO 2 (3 kH & E HE k} 350 Ok 2 XEC := [DTR,ER); (Set Dlk, rese errors) 13, O OBS 2 XEC := ISTR, TXENRXEN); (Set 3R, ena, le receiver anti XMlite? } 17 ODEA 2 138 GBA 2 XED := 'D'; (ake the Accer off hook a? go tv LIMF J 139 GOEF 2 REPEAT UNIL (XETXROY IN XESTS); (Wait for the function t G can lete. 40 OOCE (lnfo byte 'l' possible.} 41 0 CE 2 (, , , , but Vnder what Clf instances 142 OCS 2 1430 CE 2 WRITEENABLED := FALSL; (DO?: 't all Iw write, here -- function.} 144 0000 2 Below 15 Eiffe to onlifiej 45 000 2 PORTA := PORTA - (D6); (Do this last to save the eas) 46 (OA 2 XEC := (DTRRXEN, XENJ; (Set up for receive) 47 ODF 2 ED; 148 BG 49 GO FUNCTION BATALINK; BYTE; 159 OCEO 2 (This sets up the digital communications in the answer Alice betwee? 51 GEO 2 the XeCOM and Casper.) 52 OCED 2. The value returned is any information byte that was returned from 53 OE 2 the Answer function, If the function returned normally, a space is 4 OOEO 2 returned) SS DEO 2 BEGIN 156 CEO PORTA := (PORTA - ID3,52) + (D6); (Trn off the ringback and bell rung efer at of 5) 157 OE) 2 (DI this 5 bel I We don't care across a beii flag lag with ea 18 OOED (Elite off the line to save the ears. 59 OE XEC := [DTR); (Set up for function write) 60 00F2 REPEAT INTIL (XETXRDY IN XE, STS); (lait for it to Crgete} FE XED := 'A'; (go into answer AG de) 62 0103 : REPEAT INTIL (XETXRDY IN XE, STS); (lait for it t (Aplete) 4,751,726 101 102 163 OF 2 IF ((XERXRDY IN XE, STS) AND (NOT (XEDSR IN XE, STS))) 164 0120 2 THEN DATALINK = XD (If we get a if f byte, here it is) 65 29 2 ESE 66 129 2 BEGIN 16729 2 DATALINK = ' '; (keturn for normal) 188 12E 2 XEC := (RFS, XEN, RXEN, E, DR }; (Set up fer 2 way link) 69 2 ENABLE NOUT; (Initialize the gee all get thing 6. ( ) 17 13, 2 END; taly 171 013& 2 ED; 72 CCG $LOBPROC CFFS 73 800 0 1 "d if CIApilatii, nVMber of errors- O FILE, SAM'LEk : vs H: 6496 - Pasa:

IGO 8085." 2 000 TITLESAMER - REAL-TIME EC PREPROCESSUk" E ERROR *430 980 4 Clio 1 : CHANCE HISTORY: 5 000 l ; 2 SEP 85 -- TLJIRAK TC EVANS - BASELIN VERSION CREATLD IEEE ERROR ^6 60 7 OISO 1 ; DESCRIPTION: 8 OOC THIS MODULE CONTAINS THE REAL-TIME ECG PREPROCESSOR AND SECMENIZEk 9 1000 l ; USED BY THE ECG RATE MONITOR SOFTWARE IN THE TransCare (tr.) PATIENT 1 GO ; BASESTATION (885 WITH MEMORY-NAFPED 10). THE RATE MONITOR SOFTWARE 1 1 0000 l ; IS A PODIFICATION OF THE SAM I (REALYST) ECG ANALYSIS ALCORTH, 12 IOCD l ; THIS MODULE WAS CREATED BY CONVERTING THE SAM I (REALYST) MODULE 13 680 G 1 ; "MAIN" (VERSION 2E) FRON INTEL ASSEMBLE FORMAT TO HP640 ASSEMBLE HE ERROR 450 45 14 000 l ; FORMAT AND MODIFING THE CODE TO USE THE BASESTATION'S IO AND HFE ERROR 202,450 150 0 1 ELIMINATE FEATURES NOT LISED IN THE RATE MONITOR APPLICATION, 16 000 l ; SOME VARIAELES HERE RENAMED, THE OkiGINAL NAMES ARE IN CURLY 17 000 0 1 ; BRACKETS, THE RATE MONTUR BACKGROUND (NON-REAL-TIME) PURTION IS 18 OC 1 ; CONTROLLED BY MODULE "S" ANE USES PROCEBURES AND FUNCILNS IN H - ERROR "A50 19 0000 l ; MQUES "RSENSE AND MONITOk", E - ERROR ^40 ^4 2C OCO SKIP 2 IOC 0 1 CHEK-TIME EU 50L ; SEl CECKECL INSERVAL TD 545-S - ERROR 7 15,455. 22 OCGC 1 FALSE E. Ot ; B09EAN FALSL - - ERROR 22 ^ 455. 2300 TRUE El H BCULEAN lit. EEEE ERROR ^ A55 24 000 C 1 SPIKECCE EGL 2555 VALUE (FER) Siki U INI (A : E PALEk 25 OG 1 ; SPKE DETEC; IGN, 28, OCO EMS EU 36 ; la Mill SECON CURSTAR 27 000 0 1 MAXSEGEX to 'O MAXIM, UF St GME BLFF tit FCIN EN 28 OCO SBS2 EU 24 (MAX SEGBXii) ; SIZE OF EAlii SLMLN1 kJFF tik Ak KAY 29 OO 39 000 31 Oc EXT INS NUCEEUkt. IN MUUlt "CUCKO' lif -ek ERRO. ? 4,751,726 103 104 FiLE: SAtk; TLJ pig H. WiFT-FALKAki, lik -- KLA in Et Pki i Ut. SUk LOCATION BJECT CODE LINE SOURCE LIN

885 4 : CHANGE HISTORY: 5 2 SEf 85 - JIRAK IC EVANS - BASELINE VESLN CREATED 7 : DESCRIPTION: 8 : THIS DELE CNTAINS THE REAL-TIME ECG PREPROCESSOR AND SECENTIZE 9 SED BY THE ECG RATE ONITOR SGFTARE IN THE TransCare (ta) PATIEN tl BASESTATION (8085 NITH REPORY-APPED IO), THE RAFE MONITOR SIFTARE il IS A GDIFICATIC OF THE SAN (REALYST) ECG AALYSIS AGRITH, 2 : THIS MODULE AS CREATED BY CONVERTING THE SAM I (RALYS) NODULE 13 "AIN" (VERSION 2E) FRON INTEL ASSEMBLE FORMAT O HP6480i ASSEELER 14 FOMAT AND COIFING THE CODE TO SE THE BASESTATION'S IC AND 15; ELIMINATE FEATRES NOT USED IN THE RATE MONITOR ALICATION, 18 ; SOE VAIABLES WERE RENAED; THE ORIGINAL NAMES ARE IN CURLY 17 BRACKETS, THE RATE MONITOR BACKGROUND (NON-REAL-Tik) PTION IS 18 ; COTROLLED BY MODULE "S" AND SES PROCEDRES AND FECTIONS IN 19 ; NODULES "RSENSE AND NONITOR, (0.032) 21 CHECK-TINE EGU 5D SEl CHECKEC, IRERVAL TO 5 GNS (OCO) 22 FALSE EU H BOOLEAN FALSE (O) 2 UE EU 1H but EAN TRUE (BFF) 24 SplkECODE EQU 255D ; VALUE (FFH) SENT TO INDICAE PACER 25 PKE DETECTION, (GE) 26 GMS EU is MILLISECOD CONSTAN: ( 0013) 27 MAX SEGIDX EQ 19D AXIAN OF SEGENT BUFFER PO) ?ilk (028) 28 SBSIZ EG 2 (AXSEGIDX+) ; SIZE OF EACHSEGEN i BUFFER ARRAY 29 6 3. EX INYE PROCEDURE IN NODULE CLOKIO' THA) 2 SENDS DATA TO CASPER, 33 EX RAVE TYPE VARIABLE IN NODULE "RSENSE INCATES LEVEl 34 OF DATA UNELIABILITY, 35 EXT SPIKEEABLED ; BOOLEAN IN CLOCKIQ SET TRUE TO ENABLE 6 SENDING SPECODE WHEN PACEA SPIKE DETECTLD. 37 38 39 GL ABSVASCALE ; DIFFEktNTIATOR SCAE FACTOR, CUNIKUL, 4. CLB BUFFER LEVEL NUMBER OF SEGMENTS DETC!ED SiRCE HE A ; CANDIDAIE (BLEVEL), A2 GB CANDIDATEFLAG SET TRUE WHENEVER A CAN) GATE GRS 43 IS DETECTED (CANGRS). 44 GL8 CANOIDATEPTR ; BUFFER LOCATION OF CAND BAE SETECE) 45 BY PREPROCESSUK (FSIGPT). 46 GL8 CHECKECG ; SET TRUE EVERY (CIIPE WHEN NE PEAKBLFER 47 ; AND ECSPP AR READY. A8 GLB DSABLE 75 ; ASK RSE 7,5 (FHRT DISARING in TEKLFTS ANG AS ; FLAG END OF RATE MONITONG. O GLE, ECGPP ; P-P & AMPITUDE. 5 GL ENAEE7. PRUCEDUE THAT INITIALIZES SAMPLER AN) 52 ; ENAEES THE RS 7.5 INEKRP i. 53 GL INST ; SEGALN'. SRSING THRESHOLS, 4 GB iMUES AiNUTES PGR: (ON F TGC Eil), 55. G. MODEMON ; ENALES DAIA TRANSMSSi UN IF SAMFLEk ALVL, 4,751,726 105 106 56 GE MUDEM (FF ; DISABLS A? A TRANSMSSIN BUI D5 hi. 57 ; Di3AEL kS: 7 (SAPEk SAYS ALT1W), 58 GL8 PEAKSLGFE PEAK LIFFERE NiiA DKNG if S? CHLCK. Irt, 5? GE SAMPLEON ; SEli TkWL TENéLE RATE MONTUR BACKROUND, 6C G8 SAMFLER ; ENRY Pui NE G 36HZ SAM,IN FROCEDRE, 6 GL SIG ; SIGNii-ICAR SEGMEN THKSULD, 62 CLE XMTECG ECG (GR PACE ARIFAC?) DAIA BYTE TO BE 63 ; Tk ANSITE TO CASFR, 64 65 ; BASE ARESSES O SEMEN DA A BUFEk5 US.) 66 ; AS PASCAL AK RAY S (SEBUF) 67 GL) EN TIME ; ENE IMt : AKKAY Q, MAXSEGlix OF NEbik 88 GLE PEAKMAG ; PEAK MAG ; ARRAYLO, MASEGDX} f iN EGtk; 69 G8 PPSTART TIME ; PFSIART TIME : ARKAYEO, MAX SEGIDX: OF IN EGEk; 70 GLE PPVALUE ; PPVALU : ARRAY (, , MAXSEEDX CF INEGEK, 7 GL START MINUE ; START-MINUE : ARRAY. S., MAXSEDXi (if N SER; 72 GLB STAR SUBIN ; STAR SUBIN : A RAYL, MAX SESIDX OF INFECR; 73 GL START TIME ; START TIME ARRAY!, AXSEGIDXJ Uf Kitt Ek; 75 RG FBGH MEMORY-MAPPED ID, FBO) 76 ECCINPUT: OS 1. ECG CHANNEL USED FOR ANALYSIS (EAD ONLY). 77 78 79 AIA 8 81 ABSWALSCALE: ; CONTROL DFFERENTIATO SCALE FALTOK - NUYEk 82 ; OF TIMES AS(UTE WALUE IS HNLVE). Ol 33 ARTFAG: PACER ARTIFACT FLAG, O2 84 BIFFERLEVEL: ; NUMBER OF SEGAENTS DEFEC? D SINCE 35 LAST GRS CANDIDATE (BLEVEL). 86 CANDIDATE FLAG; SET TRE WHEEVER A CANEIDATE 7 ; GRS 19 DETECTED (CANGRS), 64 88 CANDIDATEPTR: ; BFFER LOCATION OF CAND OATERS 9 DETECTED BY PREPROCESSLR (PSICPT), 05 9 CANISO; S 2 ; ACCUMULATES TIME FR THE LAST 91 ; SCNIFICANT SECMENT END TO THL NEXT 92 SIGNIFICANT SECENT STAT 007 93 CDPEAK; CURREN DFFERENTIAL PEAK, 08 94 CHECKECG; : SET TRUE EVERY CHECK-TIME WHEN NE PEAKBUFFEX 95 ; AND ECGPF ARE READY, 009 96 CHECKTR; USED TO CLUN I DON CHECTIE BY STICKS. OA 97 DFPTR; ; SELECTS DFFERENTIAL CUMULATION, OC 98 ECGNSUN; ; MINIMI VALU E OF SUAE). E SAfES. OOE 99 ECGMX SUN: ; MAXIMUM VALUE OF SUMMED ELS SAMPLES. 6 100 ECGPP; ; P-P ECG AMPLITUDE. 12 ENO D ; BUFFER FOR ANALYZED CHANNEL INU USED FOk O4 92 EN1; ; SUMMING SC) NSECTIVE EC BYTES. 06 03. EN2; 08 04 EN3; A 05, EN4; S C 6 ENFR; DS ; DIRECTS INFUT TO AFPKUPkiAE EIN BUFFLK, CE 07 FLAG 1 GMS; RY OS, OF 08 INSIT; ; INSIGN FILANCE THRESHOLD. 20 99 INUS; AlNUES FOR IN OF TOC (ETIP). 022 11 PEAKBUFFEK: ; ACCUM LATES PAK Dl FFEKLi Ai FDk PEAKSLUFE, 923 ill PEAKSLOPE ; PEAK CIFFERE NFIAL BURN LIST CHECK (PE, O25 12 PPIN; ; LAST PALt-O-PACE INTERVAL. 4,751,726 107 108 027 3 PPNR; DS 2 PACE-SPIKE IO PACE-SIK. TIMER. O29 4 PSFAS: DS l ; PACE-SFlk FLAG - USED IN SFAKE S. ; DETECT PROCESS, 115 SAMFLE ON: DS 1 ; SEE TRUE TO ENAEL RAE MUNE TOk. BACKGKUUN), 17 SEFLAG DS l ; SEGMENT START END FLAG, 118 (SEGBUF) - QRS SEGMENT DATA CIRCULAR BUFFERS: 19 END TIME; DS SBSIZ ; ENDTIME: ARRAY (, , MAX SEGi Ki GF lNTEGEk; 2G SECMENT DURAION (SEGTMk) - HAS A 2 MAXlMU VALUE OF 25). 054 122 PEAK, MAC; DS SE:Sll ; PEAK, MA, ; ARRAY, B, MAX SEGIDX) OF INTEGEk; 123 ; PEAK Of OIFFEREN'? AL (CDEAK) FUK EAC, 24 ; SEMEN - MAXIMUM VALUL (F 25. 125 PPSTAR Til ME: DS SBSIZ ; PPS ARTill ME: ARRAY (, , MAXSEGIDX of NiEGck; 26 VALUE OF PFTMS A SENE STAR. A4 127 PPVALUE; DS SBSIZ ; PPVALUE ; ARRAY (, , MAX SEGDK OF INTEGER; 2B ; PPIN. A? SEGMENT START, CC 129 STAR MiNUFE; DS SBS2 ; SI AR MiNUTE: ARRAY (, , MAX SCI). Or NTEER; ; VALUE OF MINUTES PUREIUN Of SYSM UC 3. ; A. S&MENT START, OCFA 132 SARTSUBAN: DS SBSIZ ; STARTSUBMN : ARRAY. G., AXSEGlDX) OF MILGEk; 33 VALUE OF SUBIN PRI ION OF SYSTEM ful 34 ; Al SEGMENT START. GC 135 STAR TIME: DS SBSIZ START TIME ; ARRAY (, , MAXSEGIDX GF lNTEER, 36 TIKE FRUe. THE ENE OF THE LAST SEGAEN TO 137 THE STAR OF THE CURENT SEGART (SECIS)), 44 38 SESCNT RMBER OF ENTRIES IN (SEGBUF) BUFFERS. 45 139 SEGIDX; POINTER O ARRAY ELEMENIS IN SECMENT DATA 4. CIRCULAR BUFFERS THAT WILL STORE DATA FKU 4 THE NEXT COMPLETED SEGAENT, 146 42 SEGIS); D$ 2 ; ACCUMULATES TIME FROM THE END OF A 4 SECMENT TO THE STAR OF TE NEX 144 SEGENT 48 45 SEGTMR: DS 1 ; SECMENT TIMER. 149 46 SGNREF; ; SIGN OF DFFERENTIAL. 4A 47 SIPR DS 1 ; CURRENT VALUE OF SEGIDX AFTER A 148 ; SIGNIFICART SEGENT HAS KEN ; DETECTED 14 15 SST: S ; SIGNIFICANCE THKESHOLD, 4C 151 SLOPE MAG; DS ; CURRENT DIFFEREN (IAL (SUf MAGNIFL). 814 152 SEM.IN; DS 2 A/D SAMPLE COUNT: RESEI 53 ; EVERY MINUTE 154 SMEUF; DS 2 ; SUM OF LI INPUT FOR FIVE SAMPLES (OVLK SS ; 6,666,667 MS) (AVEBUF). 85 156 SNC; ; BUFFERS FOR ELL BYTES SUMMED OVER 16.6/MS - 153 57 SUN. ; ; USED FOR CUMPUTING : HE SAND-LIMITE 155 158 SN2; ; DIFFEkENTIAL (AVEING THkU AVLINE), 57 59 SMN3; 159 6 SN4; 05B 16 SUMINS: 15 l62 XXIT ACTIVE: ; SET Tkit WitN MUDE IS U SEND DAIA, SE 163 XMIFAR FLAG; ; FLAG PAL ARIFACT CUPE L E lNSERE) 64 ; FOR lik AN-3) ON, 65 XMT ECG; D S ; AVERAG) CS (OR PAER ARTIFACT) )AA BYI 6. TG 3 RARG. FED TO CASPEk. GSG l67 XMIT SUM3Lif; S l ; BUff ER F UK UM Of tLL BYTES U 5i RUCES3. 68 ; FUR Ik ANS!...SSON, 4,751,726 109 110 17 PROG 17 172; INTERRUPT RUTINE SAPER - DRVEN BY A 3 H2 SAFE CLICK CINE.L.D 173; TO RST 7.5, UPDATES SOFTARE TIMER DOES ECG REAL-TIME PROCESSIN, STORES 174 ; STORESECG SANPLES IN AVEFA EORY AND CAS THE TRANST 175 PROCEDLEE EVERY IS, 17 FS 17 SAMPER: PUSH PS C. 178 PSH 602 DS 179 PSH OCES 8 PUSH 004 ECO 181 NVI A, 11 III 00B ; SOD HITO CHECK REAL TIME USE. 06 SG 182 S 83 184; HANAGE SYSTENTINE OCURRANCE CLOCK (TOC), DC72A14) 85 D SIN ; UPDATE LO-ODER PART OF TOC. A 23 186 INX H 08 2214) 87 SHL SBMIN OE 1390 188 LXI D-80 TEST FOR ELAPSED INUTE 19 89 DA ) 12 2002F 19 JNC GETSAPLE ; IF MINUTE NOT ELASED 5, 210 9. XI H, RESE, SAMPLE CON Ol 2204D 192 S SBMIN 83 2A962 9 H.) INES ; IDEX MINUTE COUNT E 23 94 INX H OF 7C 195 Oy AH ; CfECK IF ANUIES HAS ROLLED OVEk Fk(s C2 17 9. RA ; 7FFFH (POSITIVE INTEGER) TO 80 C (NEGA VE O2 D2O2C 19 JNC STILL POS ; INTEGER), 24 EB 98 VI A,8 TELL QRS DETECTION PROCESS TO IGNGRE THE O2 3200 199 STA RAVETYFE ; NEXT FE BEAlS, 29 20 2 LXI. He ; RESET MINUTES, O2C 22O2C 201 STILL POS; SHLD AIRUTES 22 203 ; INPUT ECG SAMPLE AND STRE FO, AVERAGING, 82F 2 FBG 204 GET-SAMPLE: LXI H,ECGINPUT ; LOAD 8-BIT SAMPLE INTO DE. 25E 2. MOVE, G3 800 29, VI D.G GS 2ACC 27 HD EINPR ; JUMF O SFORALE REAVINE. O38 E9 28 PCHL 39 ER 2 ESTOR; XCH G3A 2282 20 SHE ENO STORE SAMPLE G, GG 21 OG3 2. XI HESTER 6840 C30 G68 212 IP EN OG 43 EE 23 ES, OR1 : XCHG 44, 224 24 SHL) EN1 ; STURE SAPPE 1. 47 2004) 2 LXI HESTOR2 O4A 3068 26 P EN 4. Ek 2i ES; OR2; XCH 4E 2200 28 SHL Elia SYCRE SAMPLE 2. OOS 2.057 29 LXI HESTOk3 54 CEO68 22 F EIN) O57 EB 221 EST Ok3; XCHG 9.8 228 222 SL) EN STORE SAMPLE 3. GS 206 223 LXI HEST DR4 5E 8088 224 P ENN W6 EB 25 ESIOk4; XCH 062 220 A 226 SHD EN4 ; SURE SAMPLE 4, 4,751,726 111 112 665 21839 227 LXI HESTORG 68 221C 228 ENDUN; SLD ENPR ; (EAOY FOR NEXT SAPLt. 229 23G LOCK FOR PACE SFXE. 68 229 231 LXI. HPSFLAG 8E 2 22 RI ; LOCK Al SplkE DETECOi OUTPU F 17 2. A. (B7 = 1 HEN SPIKEBE ?eCTED), 07 baQ (87 234 C SPIKE 873 6. 2S NI NFALSE NO DETECT, SO CLEAR PSFLAG, 752A627 26 IPPT: HLID PPR INCREMENT PPTPR, 78 23 27 X H O79 7C 238 OVAH CHECK IF PPTAR HAS ROLLED OVEk Fk. 17A 7 239 RA 7FFFH (POSITIVE INTEGER) TO BIO (NEGATV: 67 2008 24 JNC SPPT ; INTEGER), 7E 27FFF 241 LXI. H.7FFFH PREVENT TIMER ROLLOWER, O8 22027 242 SPP; SD PPR STORE PPTPR, 84 C9F 24 P IST 87 7E 244 SPIKE ON AN ; SPIKE DETECTED - IGNORE IF 088 B7 245 ORA A ; NOT LEADNG EDGE, OB9 C2075 246 JNZ IPP 8C 60 247 VI M, TRUE sT PSFLAG ON SPIKE DETECT, O8E 2A027 246 HD PPTR ; SAVE CURRENT PPTN WAUE. 89 226025 249 SHL) PPN 94 200 2. LXI h, ; Ztko PFTMR. 697 2227 25 SH PP 9A 3EO1 23 KY. A TKUt SE ARTIFACT DETECTED FLAG, 9C 320 2 SA AR FLAG 254 255 ; INCIMENT THE SECMENT TIMER. 69F 2648 26 ST: I hSEGTR OA2 34 27 INR OAS C20A8 258 JNE SUMIN ; IF SEGTMR ( FFH GA 38FF 2. VI FF ; ELSE HOLD A FFhi 260 261 ; COMPUTE THE SL OF THE ELG SAMPLE, TAKEN 262 ; DURING THE LASF 6,66667 MS. OA8 2A02 26 SN: LHL ENG HLJ = EINU, GA EB 284 (CH 80 A 2A04 265 LHE IN OAF 9 286 OA: ) ; ii) = EIN 0 t Ei Ni, OB EE 287 XCKG 08 2A6, 268 LHL EN2 634 9 289 DA) D IHL} = EINE + EEN i t Ei N2. OBS EB 276 CHG 086 2A38 27 HD EN3 O39 19 272 DA) ; LH) - ENO + El N1 + EI N2 OBA EB 273 XCHG El N3. OBB 2AOA 274 HD EN4 OBE 9 275, DAD ) (HL) = EING + El N1 + El N: 276 ; : El N3 + EM4, OBF 224F 277 SHE SUMBUF ; STORE CURREN SUM, CC: B 278 CHG OCS 2AOCA 279 LHD DIFPR ; JUMP TO APPROPRIAlE C E9 28 PK ; UPUATION ROUTINE, 28 282; COf UTE DIFF ERLNTIAL AND SORE CURRLNY SUM 283; - SUMS ARE SURED IN THE SUMIN. VARIABLES 4,751,726 113 114 C7 2A15 284 DIFF LD SIN ; Cil C.DES SU, GCA EB 285 CHS 2205 288 SHD SIN ; REPLACE Il ITH NEST. CE CD. 287 CA. ASWA ; COMUTE Oi FFERENTIA, 2007 288 LXI HDIFF LEAD NEXT POINTER, 4 C48 289 P FON D72AOS 29 DIFF LD SIN GET ODEST St. DA EB 29 CHG D 22153 292 SD SIN ; REPLACE IT WITH NEEST. DE Cl 293 CA ABSVAL CPUTE DIFFERENTIA, El 2 OE7 294 LXI HDIFF2 LEAD NEXT POINTER, EA CAB 295 P DEFON E72A55 296 DIFF2: LD SIN2 GET OLDEST SM, EA E8 297 CHG IE 22O155 298 SHD SN2 ; REPLACE IT WITH NEWEST, GE CO 299 CA ABSWA ; CPUTE OFFERENTIA, F1 2296 SHLD XIT_SUMBUF TIME TO SEND DAE TO CASPER, S, STOk F4 2. XI HARTFLAG DATA iN BUFFERS AND SET SEN) FLAG, F77E 2 NOVA, F8 OC 303 NI,FALSE FA 2 OSE 4 LXI. HXITAKTFLAG F 77 35 MOV A FE 200E 36 LXI H,FLAG ONS 6 EO 07 VI M, TRE O 21 O9 8 XI H, DIFF3 LA) NXT POINTER, 6 CS 48 39 AP FOUN 9 2A057 DIFFS: HL SUN E DESY S. C EB CHG O 22O157 2 SHL SMN REPLACE IT ITH NEST, 1 C331 3. CALL ASVAL ; COMr JTE ). FFERENTIA, 2019 A XI HDIFF 4 LifB NEXT POlNTEk. 18 C38148 P DFDUN 19 2A159 6 DIFF 4: HC SUNA ; GET OLDEST SUM. C EB 317 CHG 22O159 18 SHL SUMINA ; REPLACE IT W H NEWLST. 12 C3 39 CALL ABSWA ; CMUTE OFFERENTIA, 12, 20129 2. LXI HDIFF5 LA, NEXT POINEk, 126 CE 48 321 P OF OUN 129 2AOSB 22 DIFFS: LHC SN GE OLDESf SU, 2 EB 323 KCHG 12 220SB 24 SHL SUN. N. RACE JI H S CO31 25 CALL ASVAL Citi E DIFFERENTIA, 13 221 28 SHL, XM SUMBJ Tift O SEND DATE U CASPEk, S, STUkL 136 21600 327 XI HARTFLAG ; DATA l BUFFERS ANS SE SEK. FLAG, 139 7. 28 4GW AN A 60 29 NVI M.FALSE 2015 LXi H,XMITAKTFLAG 3F 77 MCW MA 4 2109E 3. LXI H, FLAG OMS 4 381 33 MYI M, TRE 45 21 OCC7 34 LXI HDIFFG LOAD NEXT DIFPI k, 48 220 OA SS DIFOUN; SH) FPR ; FiNili Uf COMPUTAILN. 1 4 21049 38 LXI HSNREF CHECK IF DIFFERENTIA 4E 78 37 MOY AE ; CHANGED SIGN, 14F BE 38 CA M CAE 339 J. F. 1S 76 40 OW ME Silk CHANGE sit is E. 4,751,726 115 116 S EDO 41 VI C, SGN ANE ZERO Dif FEkENTIAL 156 2G23 342 DIFFS: XI SEF LAG ; TEST BIFFERENTIAL (C) O DECDE 1579 4. NOV AC 1SA 2014C 344 STA SLOPE MAG ; AGNITUDE OF CURENT DIFFERENTIAL. SD 3ABOF 345 A SIGT ; WHA? NEXT. 39 46 CPC 16 A828 37 JC SEG EXISTS (C))INSICT UNTIL SEGEN ENDS, 4 7E 48 HON AM BIFFERENTIAL (= INSIT SO 85 37 349 CRA A ; SEE IF SEGENT EVER STARTED, 186 CA02.7F 5 J7. ONE Sl 352 : A SEGMENT JUST ENDED, SD DOEXE OF SEGENT PROCESSING. 69 360 53 NI M, FALSE ; FLAG SEGENT END, AO 148 S4 DA SESTR NO OFHER PROCESSING NEDED E FE05 55 CPI 5 ; IF SEGENT (= 13 SEC, 17 A827F S6 JC N. 357 358 STORE SEGMENT END DATA AND, IF NECESSARY, FLAG NON 359 ; REAL-E PORTION TO ANALYZE SEM, BUFFER, 17, 2014.4 60 LXI H, SEGCN ; INCREMENT SEGMENT COUNT 76 34 36 IR 72A145, 63 LLD SE.DX ; DS AIR BUFFER INEX 17A 2600 363 NVI H, O DON'T WANT GP BY it 17C 29 84 DA) H ; : 2 7) EB S65 XCH ; (E) = 2ESEGi DX 68 367; END TiMEISEGIBX) := SEGTMR 7E 248 68 LX H, SEGTR B 4E 9 OY C,N 82 (600 7 MVI 8,0 zero tap byte bc = SEGTM 84 2002C 7 LXI HENITIM ; H = base of Pasca integer array 187 9 372 bA) add SEGIDXR2 1887 73 POV M,C store to array 89 23 374 INX H polnt to other half 18A 70 375 MOVM, E: store te array 78 377; PEA. MAGISEGIDXj := CDPEAK 8E 2007 78 LXI HDPEAK 8E 4E. 379 MUV CM 8F G6 0. 36 MV B, G ; zer ( t ) byte b( - SEGi MR 691 2 GO54 38 LXi H, PEAKMFG ; L = base of Fasai integer array O94 9 332 O) D add SECIDX42 1957 383 MCW MC ; store to array 19623 384 INX H polnt t Other half 97 70 8. MOV 2,8 ; store t array 386 387; STAT TIESEGEX) := SEGISG 998 2A46 88 0 SEGISO 93 44 389 POV BH 19 4 390 MOVC, ; BL = vs Jue to be sta: eit i? array 9, 201C 39 LXI H STAR IME ; H = base of Pascal inteyer arr dy A 9 392 DAE act SEGlbX2 All 71 393 NOV M,C stare to array A2 23 394 INX H point to other half A37 395 MOVM, E: ; stre t array 396 357 TEST FOR LARGE SEGMLM, 4,751,726 117 118 1 A4 21007 398 LXI. HCDPEAK CDPEAK ) SlT A7 A48 399 DASIST 1 AA BE 49 CMP AB D2DF 4. JNC NORMAL END 402 403 A LARGE SEGMET JUST ENDED, SUTES 1F CANDIDATt, 1. AE A7 A4 ANA A ESET CARRY BIT 1 AF 2AOS 45 HD CANISD 1B2 EB 406 XC ; (E) =CANISO 18, 21 OE 47 LXI. H., TIAS (H) = 11 SEC CONSTANT 1B6 CD365 48 CA CP18. ; TEST FOR CANISO) Till MS B9 2010 49 JNC LARGE END 41 411 : LARGE SESMENT ISLATED, SD FLAG START OF NON-REAL-T). AALYSlS, BC 203 412 LXI h, CANDIDATE FLAG F 60 43 VI M, TRUE 1C1 A4A 414 LDA SIGPTR C 204 45 STA CANDIDATEPTR ; CANDDATE IS LAST LARE SECMENT, C7 244 46 XI HSESCNT CA 7E 417 OY AM 1 C8 2002 48 STA BUFFEREVEl ; FELEVE := SEGENT 1 CE 360 49 AVI A, ; RESET SEGCNT 420 421 ; CLEANLF AFTER ENE OF LARGE SEGMENT, 0. A 45 422 LARGE ENE); LDA SEGIDX D3 2C4A 42. STA SIFT k SGFTR is SEGlpX 106 2000 424 LXI. He 09 220S, 425 SH CANS ; RESEI CANISO DC CBEC 426 JP ALENDS 43) 428; CLEANUF AFTER TYFICAL SEGMENT ENE, OF 2A 48 429 NORMAL END: LHD SEGMR ; IF COPEAK (= SIGT E2 EB 4. XCHG E3 G 4. MVI D.G ; (DE) = SEG?MR 1. ES 2A05 433 HL CANISO 1 EB 19 43 DA) OES 22C5 434 SHLE CANS ; CAN. S. = CAN SU StLIMR 435 436 ; COMPLETE SEGMENT EN CLEANUF, EC 2000 437 AL ENDS; LX H, & EF 22014.6 438 SHE SESL R. Still SEGISO F2 AF 49 XRA A 1F 248 4A) STA SMR ; RSL SEGi Mk F6 245 44 LXI HSEGIDX ADVANCE SEGi DX 1F97E 442 MOV AM FA FE3 443 CP PAX SEGEX ; TEST FOR SEGID) ) - MAX SEL) DX FC 02203 444 JNC S X ; IF TruE, ELSE FF 34 445 INK ; INCREMENT SEGIDX 2O C327F 4A6 JMP ONE 203 60 447 RSTIDX; MV M, ; KLSE: SEIDX 25 C302.7F 448 JP DONE 449 50 SEG ENT IN PROCESS OR JUb? S'? ARTE), 208 7E 451 SEG EXISTS; POV A,X 269 B7 42 ORA A 20A C29276 453 JN CKPAK 2C 60 44 V: A TRUt ; S. GMEXT JUST STARTED, St. 4,751,726 119 120 2CF 79 4S5 AON AC SET FLAG fNI) 21 32007 456 STA CDPEAK STORE INITIA CDPEAK, 23 2A48 457 SESTR ; UPAfE SEGISO AN2 CANASO 2 E. 48 XC 27 60 459 WI), 29 2A014 46 D SEGIS 21C 9 461 A 21 7C 482 POV AH CHECK IF SEGISO RULLED OVER FRUM Prs TiVi. 21E 17 463 RA ; TO NEGATIVE WALUES, 2F D20225 444 JNC WDSEGISO 222 217FFF 465 LXI h,7FFFH HOD SEGISO AS POSITIVE PASCAL INTEGER. 225 220 48 468 DSEGISO; SHLD SECISD SEGISO = SEGISU + SEGTMk 228 2A005 487 hD CAISO 223 19 468 AD D 22C 7C 46% NOVAH ; CHECK IF CANISE RULED OVER FRU P(S) TIVE 22, 17 47 RA ; TO EGATIVE WALES, 22E 2024 47 JNC UE CANISO 23, 21.7FFF 472 LXI H,7FFFH ; HOLD CANISO AS POSITIVE PASCAL INTEGER, 234 22005 473 UE CANISO; SHLD CANISO ; CARISO = CANISO + SEGTMK 474 475 : LOAD CIRCAR BUFFERS WITH SEGMEXT START DATA 257 2Al4S, 478 StGibX ; OBIAN BUFFER INDEX 23A 250 77 AV HO 23C 29 A78 A H 2) EK 479 XCHG ; (IDE) = 2ESEGl)) 48 481 ; SA MIA’? EISElDX = MINUES 23E 2A602 482 LHL MNUIES R4 44 48.5 MOV BH 242 4 494 MUW Cl ; EL = Vaive to be stored i? array 243 2 OGCC A95 LXI H, STAR ANUTE ; H = base of Sai integer ari dy 3348 9 483 DA. D agd SEIDX82 O247 7 487 UV N, C tire to array 248 23 48S INX H (int t e ther half 249 76 489 MLV MB ; stir et array 49 491 ; SlATSUMAN (StLIDX; ; F SUBIN 4'2 LHL) SUN 924, 44 43 POV sh 24E 4 49A MOV Cl BL = valve to test Died in array 24, 219 f4 A3 LXI il,SAR SUBIN HL base of Pascal integer array 352 , 4. DA) E add SEGIEX2 253 7 47 MV M, C st are to arr Jy 2 4 3 499 IN); H point to ther half 255 ; 499 MCV A, B ; store t array 560 50: ; PF STARTTIME ISEGDX) := FTMk 256 2AGG27 502 PPTAR 359 4A 53 MOV BH G25A 4 54 MV C. ; it. = valve to be stored in array 2SB 2.067C 505 LX H, PPSTARTIME ; HL F base of Pascal integer array 25E S SD6 A D acid SElDX*2 25f 71 507 POV AC ; St Ire to array 26. 23 598 INX H point to ther half 26 7 SO9 MOV MB ; star et array 5 511; PIVALUESEGIDX := PPINT

4,751,726 123 124 2C2 EB 589 XCG 2C2A96E 57 LLD ECS X.SUM 2C 7D 57 OVA, (HL) - (DE) PUT INTO (HL) 2C9 572 S3 E 2C8 SF 573 HOW A 2C97C 74 OYAH 2CA 9A 575 S38 ) 2C 67 5 POV HA 2CC C.6B 577 CAL DIVBYS ; ECPP IS NU IN LA 2F F 578 OW A STORE AS A PASCAL INTEGER. 20 2. 579 VI H, 22 220 SB SHLD ECGPP 20 2A14F 58 SBUF RESET ECG MNSIM ECGSU4. 2D 22OC 32 SLD ECGNSUM 2.8 220 OE 58 SHD ECG (SUM 2EE 2022 SBA LXI. H.PEAKBUFFER GE PEAKSLOPE 2E 6E 585 MOY L. 2E2 260 586 V H, STORE PEAKSLOPE AS PASCAL INSEk. 2E4 222 587 SKD PEAKSLOPE 2E7 222 588 LXI H,FEAKBUFFER 2EA 360 589 VI A, O ; ESET PEAKBUFFER 2E EG 590 VI ATRUE INCATE NEW DATA S READ. 2EE 208 59 STA CHECKECG 2F A915D 592 CKMODEM. LDA XMATACTIVE ; 15 MODEM. ENAELEl 2F4 B7 593 RA A 2FS CAO:28 594 JZ RESFOR 595 596; ACDEMENABLED, SO PKEFAk: EC PATA AND CALL THE MODE HANDLEk, 2F8 ADO 597 LDA SPIKEENABLED DUS CASPER CAE IF PACER SPIKES Ake 3FE 87 598 ORA A ; DEFELIED 2FC CASOB 599 J2 NSPIKEF FF 2015 6 LXi H, XMI AR FLAG SEND CODE IF PALER Ali FAC DEILLE, 62 7E 66 MOVA, M 33 37 602 ORA A SET 2 FLAG IFNU CODE TU BE SER. 34 600 3 VI. M., FALSE C EFF 64 VI. ASF. KECODE INSER CUD JU's lit (ASE 38 C232 65 JNZ SENET JLMP TO SEN SPKCU). IF ARiif ACT DECEG, 30 2AO 506 NCSPIKEFLG: LHD XM: ISUMBJ NU SF. K. CODE TO SEND, S, COAUT CE CD36. 607 CAL DIV3Y5 ; AVERAGE EC INPUT (WR 16,675 NERF), 3 FEE 688, CF 24 I, AVERAE OVER 2.3 (; )h) 3 DACSB OS JC LT24 EF WI. A 23 ; li MIT TO 253, 318 CO22 ill JMP SENIT 31. FEC 1 612 LT254; CP 1 IS AVKAGE UNDER 12 3D 2322 6i JNC SEKD IT 32 El 64 MV A, SEE TO i. 22 2SF 5 SEND IT STA XHITECG 325 COO 616 CALL INEYTE 328 E. 67 RESTORE PUP 3.29 EA 68 VI All 3606003 SU, LO TO CHELK REAL THE USE. 32 69 SM 32C D 626 P D 320 C 62 POF 32E. F. 828 POF FS 32F FB 62 EI 33 C9 24 RE 4,751,726 12S 126 626 ; SUBROUTINE ABSVA - RETURNS ABSOLUE VALUE OF HI)- DEJ IN C) 627 AND SETS (B) = TRUE IF (DE) ) (HL), (B) = FALSE THEIS), 628 (ML) (BC) UNCHANGED BY PROCESS, THE ABSOLUT WAVE CAN E SAE) 629 BY AVING ONCE OR TE CONTROLLED BY ABSWASCAE), IF THE 63C SCAE OR SCNEC VALE IS GREATER THA 2, 2 IS RETURD, 631 E5 2 ASWA PUSH H FREE Hi FOR OTHER USE, 332 600 633 VI D, FALSE ASSUE (HL) y= IDE. 334 7D 834 OW Al 3359 65 St E 36 AF 636 ON CA ; LOG BYTE OF DFFERENCE, 37 7 67 NOVAH 38 9A 838 SBB 9 23.43 39 NC ABVDUN 3C 601 VI B, TRUE ; BRKO OUT OF HIBYTE 3E 78 641 OV AE ; SAS (DE) ) (HL). 33F 95 642 SUB L. 34 AF 64 HOY CA ; REDONE LOld BY E. 34 A $44 OVA, 342 9C 645 SB. H 343 87 646 ABVDUN, HOY H. A ; SAVE HlBYE. 344 AGO 647 LDA AESVASCALE SHUULD SLOE Si. HAVED2 347 87 48 ORA A 348 CASE 49 Z ABVMT 34 F 50 AON LA SAVE TO TEST AGAIN A7 85 ANA A ; DIVDE DIFFERENE BY 2. 34 70 63 MOV AH 34E F 65 RAR 34F 7 64 MOY HA ; SAVE HIBYTE, 3.5G 79 65 OV AC 35 F. 56 RAR 352 4 857 OV CA ; : NTAIVE ABSOLUTE VAU, 20 858 DCR ; SHUL) SLOPE R OLDE) AGAIN 354 CAOSS SS JZ ABVLMI 357 A. 66 ANA A ; Divist lN HALF AGAIN. 58 7. E. MOV AH 9 F 662 RAR 35A 57 883 AOy H, A SSB 79 684 KOY AC 35 F. 665 RAR 35 AF 66& OY CA 35E 7C 667 AVLIII; MO. Ah if El 668 POP 36 37 86 ORA A TLSI DIFF KitKLL HABYTE, 36i C8 670 RZ 36 EFF 671 MV C2. ; LIMI1 RETURNED DIFFERENCE TO 2. 354 C9 672 RET 67 : SUBROUTINE CAP16 - COMPARES THC 16-87 NUMBERS ANE RETURNS Th LAKI 875 SET IF (Hill ( (DE) AND ZERO SET IF EHL) = IDE, ONLY ACCAILATOR 576 AD FLAGS CHANGED, 77 35 7C 678 CHP16; OVAH CUFARE HIGH BYTE, 366 BA 879 CP) 37 C. 8 NZ 36 7D OVA, HIGH BYTES IDENTICAL SO 36 BB 682 CS E ; TEST LON BYTES,

4,751,726 129 130 339 S4 39 E.IV6; OV DH ; REPLILATE H IN DE, BA SD 74 MOVEL 3B 7 74 AL ; CAkk Y=1 IF El H). BC FFF 742 LXI B-18 SBF 9 743 DAD 8 3C9 DAC4 744 JC EIV7 3C EE AS XCH ; NE K(, SOUSE OLD, 3C4 7 746 EV7; RAL ; REPLICATION UN-RESSRY 3CS 1FFFB 747 LXI B-5 ; ON LAST CYCLE. C3 9 748 A B 749 RAL ; A = GULTEN i ! : 75 RET 752 ; SUBROUTINE ENAELE 75 - INITIALIZE VAKIABLES USED BY SAMPLEX, 753 SETS SAMPLE ON TRUE, UNMASKS THE RSI 7,5 INTERRUPE, 74 ; AD ENABLES INTERRFTS, 755 3C FS 756 EABLE 75; PUSH PS 3CC ES 757 P.S H SC AF 758 XRA A INITIALIZE CUNTRLL BYTLS TO ZEku 3CE 3203 759 STA CANDIDATEFLAG ; OR FALSE, 3D 2029 768 STA PSFLAG 304 223 761 STA SEFLAG 3D 320CE 72 STA FLAG iMS DA28 7 STA ART FAG 3D 3205E 64 STA XMITARTFLAG 3E 248 75 STA SEGT 3E 20145 766 STA SEGIDX E6 244 77 SA SEGCNT 3E 2002 768 STA BUFFERLEVEL EC 2007 769 STA CD,EAK 3EF 2022 70 SIA PEAKBUFFER 3.F2 328 77 STA CHKECG 3F5 E32 7. KV ACHECK-TIME ; INI (IA12 CHECKTMk , F7 2009 773 Sf A CHECKTAR 3FA El 774 AVI Al FC 28 OC 75 STA AESVASCALE ; DFFERENTIAL LL BE HALVED D.C., 3FF El 77 VI. A TRUE ; INIAIZE CUNTROL 8YitS Rui, 4 2015D T7 STA XII ACVE Ste) DAA. W. A UEM, 404 292A 778 STA SAMFLEON : fELL BACKGROUN) ECG IS EING SAMP), 407 21 OOO 79 LXI HO SE DJUELE BYTES TU 7th U. 46A 220S, 780 SHED CAN SO 40 2246 78 SHL SEISO 40 22002 782 SHL.D NES 4, 22014) SHE SENIN 46 22006 784 SHLD ECG.' 49 22023 w SHLD PEAKSLOFt. 4C 2.7FFF 786 LXI H,7FFFH SE DISLE BY S J 32767), 4F 2225. 78 SHL; PFNT 422 22827 788 SHL PPR 425 21 OBO 789 LXI H, 128 ; 1N1 ALIZE ELL BUFF Ek: , 428 2212 79 SHL EiNC 423 220 C4 79 SHE EIN 42E 2: ) i8 792 SHL) EN As 2208 7S3 SHL El N: 434 22 A 794 SHD EN4 437 220 15 5 SHL SUMNO 143A 220 153 796 SH 54 N. 4,751,726 31 32 0422055, 797 SHL SUPIN2 40 257 79 St.) SUN 443 22059 795, SHL SUMM4 446 220 15 800 SLD SON 449 22O4F 8 SHL SUMU: 44C 228 OCC 802 SHD ECG MRSU 44F 220 CE 83 SHL ECMX SUM 4522265 S84 SHD XM TSUK:UF 455 219 805 LXi HESFORG IN ill AIZE ELL. NUT HANDLER, 458 220 C 806 SHL) EPR 45. 2 C7 867 LXI HDIFFO INITIAillt EC, DFFERN A, 45E 220 GA 868 SH OFPR 46 F. 8% 42 20 8 R GET RST 6.5 AND 5.5, ASKS, 483 E803 Bll ANI ICB ASK 7.5. 485 F618 812 CR B CLEAR 7.5 F/F AND ENABLE NAS SET. 467 3 83 SI 488 FR 14 E. START SAPLING ! 469 El 815 PP H 46A Fl 36 POP Psy 468 C9 B7 RET 18 819 82 82 SUBOUTIE DISABLE 75 - MASKS RST 7.5 (BUT PRESERVES INTERRUPT 822; STATUS) AND SETS SAMPLEON FALSE. 82 48C F5 824 DISABLE 75; PUSH PSW 46 E. 825 PUSH H 48E AF 828 XRA A EANS FALSE. 46F 202A 827 STA SAMPLEON TELL BACKGROUND EL: Nil B. N. SANFL). 472 2S) 828 STA XMIT ACTIVE ; SEND NO IATA, 475 29 29 RIM ; GET RST 6.5 AND 3.5 KASKS AND STATUS. 47 F 830 DI 477 67 83 OV HA SAVE PASKS AND STA US, 478 E63 832 AN OOB PRESERVE 6.5 & 5.5 STATUS, 847A F6C 8. B ; CLEAR 7,5 F/F AND SET 7.5 KASK, 47C 834 SIM 47 7C 835, (JW AH TEST INTERRUFT STATUS, 47E E608 836 ANI DOO 1008 48 CAD484 837 JZ INTROFF 4 F8 838 EI ENABLE ONLY IF PREVIUSY ENABL), 484 El 83% INTROFF: POF H 48 F1 BAC POP PS 48 C9 84 RT 842 84 84.4 845 : SUBROUTINE MUEr, ON -- TURNS ON DATA TRANSM551 UN ASSUMING Thai 846 ; SAMPLER (RST 7.5) IS ACTIVE. 487 F 847 M2EMON: PSH PS 48B SSG 848 MVI AKUE ABA 32 (5. 849 STA XM:1. ACIVE 43) Fl 85 POP PC A8E CS 8. R 852 8. 4,751,726 133 134 BSA 855 SUBROUTIN MUDEM C F - TURNS OF DAiA TRANSMISSION AND LEAVES 836 ; SAMFuER (RST 7,5) ACTIVE. 48F F. 857 MGDEMOFF: PUSH PS 49 AF 888 XRA A 649 3205 859 STA XM1T ACTIVE 494 F. 86 PP PS 495 CS 8, RE Error SF FE; RSENS:808S HP 640 ( - Pasai "808" Late Geleist of

1 000 "885" 2 000 PROGRAM RSENSE; OO SEXTENSIONS ONS 4 SEPARATE ONS 5 O. $OPTIMIZE OFFs 6 00 7 OIO THIS NULE CONTAINS THE QRS SEGENT DEFINER AN) GKS DEELTOR, 8 PROCERES IN THIS MODULE ARE CALED FROM OTHE MOOLES, ) 9 10 00 CONST 2 NAX SEGIDX = 19; (AXIMUM VALUE OF SEGIDX IN NODULE SAMPLER) RRAVENUM = 4; (NMBER OF R-Rs AVERAGED TO COMPUTE RATE 4 09 5 OO 6 CONST TIME LIMITS FOR 30H2 A/D SAPERATE) 17 O. T2BMS = 6; 8 TBOAS = 24; 19 TiOS = 30; 20 he Tl2S = 36; 2 000 T 160 PS = 4.8; 2 CO T-188AS = 54; 2, 60 12 OPS = 69; 24 CO T26E4S = 78; 25 00 l T 30 MS = 9); 28 000 T34KS = 102; 27 OOO T.60MS = 18t; 28 000 T10 IIM = 300; 29 (6) 30 CO 3. GO SEWAR ORS 2 OO WAR 33 CO BUFFER LEVEL ; BYTE, 34 000 l CANIDATEFLAG : HOCLEAN 80 CANEIDAl E. PTK ; BYTE; 36 BC INSIT : BY&; 37 BC NUIES ; INTEGER; 38 GOOC l SICT ; BYTE, 39 OC THE FULOWING ARRAS CONS: UTE HE SEGMEN BUFFER} A 900 END IME ; ARRAY (G, MAX SEGDX OF NEGEk; A CG PEAKMAG ; ARRAYO, MAX SLGBX OF IN EGEN 42 G8 GG STAR F MINUTE ; ARRAY (, , MAX SEGIDX) CF INTEGER 43 000 STAR SUBIN : ARRAYI, , MA). SEG EX} OF INTEGER; 4,751,726 135 136 44 (8) STARTIME ; ARRAY (, , MAX SEGEX OF INTEGEK; 45 000 $WAR OFF 46 009 47 OGG 4S CO $G OVA. ON 49 BCG VA (GLOBAL VARAELES DEFINE IN THIS UULE) 5 GO l RAVETYPE : BYTE; 5 ( INDICATES HC MAHY R-R INERVAL, IN RR BUFFER MAY NU? B. 52 OG CONSECUTIVE BECAUSE NCISE-CUNTAMINATES INTERVALS WEREDRUPPE), ) S3 G 54 OO l 5, O6 OCAL VARIABLES DEFIN) IN THIS MODUL) 56 00 AVERAGECPA ; INTEGER; 57 C3 (RUNNING AWRACE O COMPLEX PEAKA. -- USD TO 58 3 MECHANIE ADAPTIVE SENSING THRESOLD ) 59 003 l AVERAGEDR : ITEGER; 5 (RUNNING AWERACE OF WAID R-R INTERVAS (UPDATED 5 BY QSDETECTED) } 2 OS COMPLEXPEAK FAS : NTEGER; 7 PEAK AGNITE OF TE BANB-LIED FRENA A 87 URING A QRS COMPLEX) S 7 LASTINUTE : INTEGER; 66 9 WAE F SYSE TOC INUTE COUNTER A LAST 67 9 1 G8S ETECED ) 88 009 LASTSUBRIN i INTEGER; 69 B 1 VALUE OF SYSTE TOC SUN-INE COUNTER AT LAST 70 OR RS BETECTED ) 7 OB MAXIMUSTRINIVMST ; INTEGER; 72 IF S-T INTERWA RANGES - SED TO REJECT T-AVIS 3 73 OF QPTR, R-PTR, TPTR, T2 PTR ; BYTE; 74 613 SEGENT FFER POINTERS USED IN TH RS DECTION I SHAPE 75 13 EASUREMENT PROCESS - GPTR EVENTIALLY INDICATES THE G-R SECMENT 76 93 AND RPTREVENTIALLY INDICATES THE R-S SEGMENT ) 77 13 GSINTERVAL ; INTEGER; 78 C15 ( APPROXINATION OF THE O-S INTERVAL OF A kS COMFLEX 79 15 (EXACT IF THERE ARE NO NOTCHES AND NO PROMNNT 8 OS - OR S-AWES) ) 81 15 RATIO ; INTEGER; 82 017 RATIO BETEEN LEADING AND TRAILIN, PEAK SLOPS F A R ) 83 G17 RR BUFFER ; ARRAY (i., RRAVENUM) OF INTEGER; 84 ClF (BUFFER USEE TO ACCUM ILAT R-R INTERVAS, FOK AWEKAGE RATL, ) 85 OF RRINTERVAL ; INTEGER; 86 02 BFFER USE TO TRANSFER R-R INTERVA DA ) 87 021 l RR PRIOR, RRCURRENT : INTEGER, 88 O25, CIRCULAR BUFFER OF WOOSE RECIENT R-R INRWAS ) 89 25 RR PTR ; BYTE; 90 26 (POINTER TO ELEMENTS OF RR BUFFER } 9 O2 l TEMP (TEMPA1), TEMP2 (TEMPB1}, TMP3(TEMP82, fMP4 F-83) ; NTEGE; 92 82E EPORARY STORAGE FOR NON-REA-ME TASKS, ) 93 02E TAVELIIT ; INTEGER, 94 36 ( MAXIMUM VALUE OF PEAKMAG THAl ILL E: INFER PRETED 95 O. l AS A T-AVE IF If IS WITH IN HE SENSIN KEFRARY } 96 OG S. Mi, RS42, R5-3 ; INTEGER; 97 (36 COBWAR OFFS 98 IOO 99 OOC 1. O OCC FUCT lo DELTA (BASE CHANGE ; INTEGER) : NTEGER, 4,751,726 137 138 6069 2 (RETURNS A Ll MITED INCRINN TO BE At FU 102 Geo 9 2 (OR SUSTRACTED FRCM) THE BASE TO LET I Ui Ai ELY O 8009 2 REACH THE TARGET -- USE N AOAP iWE ACK iNG, ) 10499 2 BEGIN 509 2 IF CHANGE ) BASE 106 016 2 THEN CHANGE := BASE; (SEl UPPER LIMI} G7 19 2 CHANGE := SHIFT (CHANGE-3); OB 024 2 IF CHANG ) 29 O2) 2 THEN DELTA = CHANGE 933 2 ESE DELTA := 1; (LOWER IIT) 1 039 2 END; (DELTA) 2 C. 08 4 GO FLCTION UPDATE (BASE, TARGET ; INTEGER) ; INTLGEk; 15 64C 2 ( ADAPTIVELY TRACKS HE BASE WALUE OF A PARAMETER T CAR) 116 04 2 A NOVING TARGET, ) 1704C 2 BEGIN 1894C 2 IF ARGE ) BASE 19059 2 THEN UPDATE := BASE + DELTA (BASE, (TARGET - BASE)) 2 07 2 ELSE UPDATE := BASE - DELTA (BASE, (BASE - TARCET)); 2 90 2 ED; (UPDATE) 22 O 12 O 124 6 POCERE SET THRESHOLDS (REFERENCE KA; ; INTEGER); 125 A3 2 ( UPDATES QRS SEGENT SENSING THESHCO3 ) 126 CA3 2 EGIN 127 A3 2 IF REFERENCEMAC ( 24 128 AF 2 THEN REFERENCE AG := 24; (KEEP INSICT )= 3 29 B3 2 IF REFERENCE MAG) 255 3 OBF 2 THEN REFERENCE MAG = 255; (MAXIMUM POSSIBLE PEAKAAC) CC 2 AVERAGECPM := REFERENCE MAG; 132C9 2 INSICT := SHIFT (REFERENCE MAG,-3); 002 2 SIGT := INSIGT + INSIGT + INSGT; 34 ODA 2 END; (SET THKESHOLDS) 135 000 136 600 137 000 FNCTION BPM (INTERVA ; INTEGER) ; INTEGEk; 38 CEB 2 CPUTES HE RAFE VIVA ENT TO AN -R NERVAL 39 EB 2 EASRE IN TCKS OF A 3907 SAMPLE CLOCK, SLAE FALTOR 140 (E3 2 IS 1 BIT PER BPN, WITH RATES NOT COMPUTED FOR NTRVALS 41 CEB 2 SHORTER THAN S, COPUTATION INCLUES ROUVE, ) 42 E8 2 BEIN 43 08 2 IF (INTERVAL ) 1800) OR (INTERVA ( T 18 GMS) 144 GFC 2 TN RPM := OVERFL PROTECT UN ) 1459 2 ELSE 8PM := (1880 + SHIFT (NERVAL-1)) Div INTERVAL; 46 08 2 EN); (EFM) 47 OCCO 148 COC 149 000 FLCTION NEVER (CURRENTPTR ; BYTE) ; BYTE; 15, 2 2 C RETURN PON TER TO LOCATION N SEGMENT BUFFER (NE CEL 15 912C 2 "LATER THAN CURRENT PTR ) 52 12C 2 BEGIN 153 012C 2 IF CJRREN PTR = MAX SEGIDX 154 134 2 THEN NER = 15, 13C 2 ELS NEWEk := CURRENPTR + 1, 156 6 1 44, 2 EX; (NEWER) 157 000 . 4,751,726 139 140 158 DSG 159 OGOG FNCTION OLDER (CURRENT PR ; BYTE) : BYit; 16C 91.56 ( RETURN PONER C LOCATION N SEGMENT BUFE UNE CEll 81 158, "EARLER THAN CURRENTFlk } 182 016 BEGIN 163 058, IF CURREN, PTK = 54 5E THEN OLDER := MAX SEGDX 165 0188, ELS OLDER = CURRENTFTR - l; 166 (16E END; (OLDER) 67 GOO '68 008 169 CIC FLICT1 ON ISOLATED (SEGPTR ; BYTE) ; BOOLEAN 17, 18 (RETURNS RE IF SEEN IS ISOATE FRU PRUR SGMENTS ) 7 180 EGIN 72 SG IF START l'EISEG PTR ) Tito MS 17397 THEN ISOATED = TRE 74 619F ESE ISOLATED = FALSE; 75 G1 A4 END; (SOLATED} 176 (). 177 GO 78 0000 FINCTION DElTA TOC (MINUTESUBMINUTE ; INTEGER) ; INTEGER; 79 0. ( FINDS THE DIFFERENCE BETWEEN THE TOC PASSED AS PARAETERS AND HE 18 O6 TOC STORED IN THE SECMENT BUFFER AT RPTR, IT IS ASSUED THAT 18 O6 TOC PASSED) ( TOC (AT RPTR), THE VALUE BERNED IS TiE D (FFERENCE 1826 IN SAMPLE COUNTS; IF THE DIFFERENCE IS GREATER THAN ONE MINUTE 83 GD 1896 IS RETURNE ) 1846 WR 1856 BORROW ; INTEGER; (CONTAlNS SUBINUTES BORROW D FRON MINUTES) 86 B. EGIN 187 B. BORROW = 0; 188 BC IF STARTSUBXN RPTR) ( SUBKINUTE 189 103 HEN BEGIN (BORRO FRON MINUTES) 9C 103 MINUTE := MINUTE + i ; 19101DD BURROW := 1896; 1.92 E3 END; (BORO FROM MINUTES) 193 E3 IF MINUTE { STARIMINUTEIRPTR) 194 FE THEN DELTATCC := 1800C 19527 ELSE DELTA TOC := (STARTSUBKINiKPTK) + B0 k(y) - SUBINUTE; 196 223 END; (DElf ATOC) 197 BG 198 00 99 SeO3FROL ON 20 00 20 OOO 202 COO PROCEDURE IN (TRATEMNR; 23 220 ( INITIALIZES THE R-WAVE SENSING ALCRT, 3 204 022D EGIN 285 22) LAST MINUTE := MINEi S; 206 023 CANDIDATEFLAG := FALSE; 207 S238 RWAVE. TYPE := 8; 208 (23) RR PTR = 1; 269 9242 AVERAGE CRR = 1003; 20 248 MINIMUMST := T-340Ms; 21 02AE MAXi MLAST := 16833; 212 025A SETHRESHOLDS (66); 23, 259 END; (NITRATEMNTR) 214 860 4,751,726 141 142 25 OOOG 216 000 G 1 FUNCTION AVEk AGE RAE : BYTE, 217 96 Ol. 2 ( COMPUTES THE AVERAGE RATE AND RETURNS VALUES BETWEN 49 & 127 ) 28 (1 2 WAR 219 000; 2 TEMPlNT ; INTEGER; 22COCO3 2 TMFT ; BYTE; 22 825C 2 BEGIN 222 025C 2 TEMPINT := ; 223262 2 FORTMPTE := 1 TO RRAVENUM DJ TEMPINT = TEPIN1 + RR BUFFEkti MFi Ri; 224 6295 2 TEMPNT = TEMPINT DIY REAVENUM, 252A2 2 RSN! := TEMPINT; 22, 2A5 2 TEAPIN; ;= EPN (TEPINT); 227 92AL 2 R5 (2 := TEMPINT; 228 028C 2 IF EP N S 127 229 289 2 THEN AWERAGE RATE is 127 23, 2C 2 ELSE BEGIN w 2C 2 IF ENPIN ) 4 232 02CD 2 THEN AVERAGE RATE := TEPINT 2, 204 2 ElSE AVERAGE RATE := 4; 234 02D9 2 EO; 235 209 2 EN; (AVERACERATE) 2360 237 238 GIO 1 FUCTION GRS DETECTED ; DOOLEAN; 29 OG 2 ( A NON-REAL-TINE PROCEERE HAT EVALUAT tS SEGENT 240 2 BUFFER CONETS TO DECE HER A BONAFIDE 24l IO 2 RS AS OCCURRED AND TO DETERMINE ITS PARAMETERS, ) 242 000 2 LABEL 3333; (EXIT TO END OF QRS DETECTED WITHOU1 FUTHER COMPUIATIONJ 243 2DE 2 EEGIN 244 2DE 2 IF CANDIDATE FLAG = FALSE 245 2E 2 HEN EGIN 246 2E6 2 GRS DETECTED := FALSE; 247 28 2 GOTO 3333; 248 2EE 2 E. 249 2F 2 ESE PESIN (EST CANDATE) 25 I2F1 2 SM3 = 1; 2, 2F 2 CANDIDATEFLAG := FALSE; 252 (2FC 2 T2 PTR is CANDIDATEPTR; 23 O32 2 IF BUFFERLEVEL ) i. 254 3D 2 THEN BEGIN ( SURSEQUENT EN RIES INTO SECMENT BUFFER MAY 23S 30D 2 HAVE OVERRITTEN QRS DATA ) 256 30D 2 WAVETYPE is 8; - 47 O312 2 GRS DETECTED := FALSE; 258 037 2 GOTO 333; 259 31 A 2 EN 260 3D 2 ELSE BEGIN (NO-BUFFER-OVERFO} 26 3D 2 IF SOLATED (T2 PTR) 262 0325, 2 THEN BEGIN (TEST NEVER SELNT 26, 833 2 CANOIDATE AY BEARS WITH ST EP-R } 264 932, 2 IF ISOLATED(NEE (T2 PTR)) 26S, 335 2 TEN BEGIN (NISE OR T-AE) 266 335i, 2 GRS DETECTED := FALSE; 267 33A 2 GOTO 3333; 288 G3, 2 EN NUISS OR T-AVE 269 340 2 ESE BEN (SIGNI CAN LR} 27 O349 2 RPTR := NEER (T2 PTK); 27 6348 2 IF (PEAKMAGE (2 PFR) = 0) () (PEAKMAGERP ?R} = 0) 4,751,726 143 144 272 O373 2 TEN BEl N (BUFFER BAD) 273 E373 2 RAVETYPE := 8; 274 378 2 GRS DETECTED := FALSE; 275 37) 2 GOO 3353; 27, 380 2 ENE; (8JE FER BAD) 277 380 2 END; (SIGNIFICANT GR) 278 (380 2 END TEST NEER SECMENT) 279 383 2 ELSE BEGIN (SIGNIFICAN RS) 280 0383 2 T2 PTR INDICATES "NEWEST POSSIBLE R-S, FIND LAkGEST 28 038 2 OLDER SEGMENT IN GROUP AND ASSUME O 8 THE R-S } 82 383 2 IF (PEAKMAG OLDER (T2 PTR)) = 8) 28, 383 2 OR (PEAK AAC(T2P TR) = } 284 083 2 THE BEGIN BUFFER ERROR) 285 B3 2 RAVELTYPE := d; 286 338 2 GRS DETECTED is FALSE; 287 (38C 2 GOTO 333; 38 C. 2 E (BUFFER ERROR) 289 3C3 2 ELSE BEGIN (REFINE RS LOCATION 29 3C3 2 TEP2 = 1; TEP3 is ; TEMP4 := 0; 291 CF 2 RPTR = T2 PTR T1 PTR = T2PTR; 292 G308 2 HILE (E2 ( 4) 293 DB 2 AD (NOT ISLATED (TPTR)) DO BEGIN CLOCATERS) 294 CE) 2 TENP2 is TEMP2 + 1 295 O3F4 2 IF PEANAGTPTR) ) TEMP3 29 ADB 2 THEN BEGIN (LARGER SECENT) 297 4.B 2 TEP3 E PEAKAGITPTR); 298 40 2 RPT = T1PT.; 299 420 2 ED (LARGE SECENT) o 42 2 TPTR is OLER (TPTR); 30, 428 2 TEMP4 = ODER (TPTK); 2 4 2 IF (ENDIIPEITEMP4) (= T-2BMS) 433 2 O (PEAK KAGITEP4) = } 4 457 2 THEN TEMP2 = 6; ( STOP PROCESS ) 545A 2 END; (LOCATERS) 5 450 2 END; (REFINE RS LCCATION) 307 ASD 2 END, (SIGNIFICANT RS) 38 45) 2 39 45D 2 RS (3 := 2; 3 463 2 (R-PTR NON LOCATES THE R-S, SOCOMPUTE R-R CHECK VALDY } 31 (46 2 RRINTERVAL := DELTA TOC (LASTINUTE, LASTSUMIN); 3 2 946) 2 IF (RRINTERVAL ( MINIMUMST) S13 477 2 THEN BEGIN (NSIDE ABSOLUTE REFRACTORY) 34 0477 2 GRS DETECTE := FALSE; 315 47C 2 GOTO 3353; 36 47F 2 END; (INSEE ARSOLUTE REFRACORY } 317 O47F 2 318 047F 2 ( FIND Q-R AS ALLES OF P T 3 SCENIS PRCEEDNG It R-5 3 39 47F 2 T1 PTR = RPTR; 32 485 2 TEMP2 := 0; TEMPA = I; 32 48E 2 WHILE (NOT ISOLATED (TPR)) AND (TEMP2 ( 3) 322 04BE 2 AND (PEAKAGT1 PR) ) i) DO BEGIN (FINE G} 23 48A 2 TERP2 is TEMP2 + 1; 24 404 2 T1 PTR := OLDER (T1 PTR); 25 G4CC 2 IF (TEM 4 + lNSIGT) ( PEAKMAGIT Plk 28 04E. 2 THEN BEGIN (ARER WAE) 27 4EE 2 TEMP4 := PEAKMAG (T1 PTR }; 28 OSGO 2 GTR := T1FTR; 4,751,726 145 146 329 SO3 2 END (LARGER VALUE 3 O 593 2 END; (FINE G) 3 0508, 2 2 56 2 ( DETERIME MANITUDE OF CANDIDAE, ) 333 386 2 CUPFLEXPEAKMAG := TEMP4; 34 OSC 2 1F TEMP3) COMPLEXPEAKMAG 335 (56 2 THEN COMPEXPEAKMAG := TEMP3; 36 6519 2 IF (RRINTERVAL ( MAXIMUMST) 337 519 2 AND (COMPLEXPEAK FAG ( TAVE LIMIT) 38 532 2 THEN BEGIN CLO SINA IN RELATIVE REFRATORY } 39 532 2 GSEETECTED := FALSE; 340. 57 2 GOTO 333; 34 3A 2 END; (LUSIGNAL lN RELATIVE REFRACTOKY) 42 5A 2 343 53A 2 RS3 := 3; 44 540 2 ASSUE CANDIDATE IS A QRS ) 4S 54 2 PEA AGIRPTR) is 0; 48 055 2 LAST MINUTE is STARTAINUTE(RPTR); 47 55 2 LASTSB := STARTSUBAh R. PTR); 348 58F 2 TAVE LIMIT is SHIFT (3 COPEXPEAKAG), -2); 349 58 2 IF RAVE TYPE ) SO 8C 2 THEN RUAVETYPE is RAVETYPE - 1; S1 594 2 IF WETYPE ) 5 S259F 2 HEN EG (NOISE CONTAINATED R-R DATA3 S3 (59F 2 GSETECTED is FALSE; S4 SA4 2 GOTO 333; S5 5A 2 EN (NOISE CONTAINAE) R-R AA} 58 5AA 2 ESE EN (RELIABLE RS DATA) 357 5AA 2 Rs 43 := 4; 58 580 2 RATIO = (16 TEPP4) DIV TEP3; 359 SC4 2 GSINTERVA = ENO TIME (RPTR} 36 504 2 + DELTA TOC(START-MINUTEPTR), STAR SUBINIGPFR)); 36 SFC 2 RR PRIOR = R. CURRENT; 362 62 2 RCURRENT = ARINTERVAL; 63 668 2 ADAPTIVELY AUST REFACTORY FERIDS ) 364 68 2 AVERAGEDRR := UPDATE(AVERAGEPRR, RRINTERVA); 365 62 2 MAXIMAST = T20 MS + SHIFT (AVERAGEDRR,-4); 366 061 E 2 TEP1 = SHIFT (AVERAGEDRR-2); 367 829 2 NNlMST := 1.8t S + TEMP; 388 630 2 If MAXIMIST (NINKAST 69 83A 2 THEN MINIMUST := MAXIMUMS); 70 063; 2 IF MINIMLAST ) T26MS 7 649 2 THEN MINILMS? := T26MS; 72 64D 2 IF MINIMUST ) SHIFT (TEFil) 37 65F 2 THEN MINIMUMST := ShiFT (EMP1, ); 74 66A 2 IF TEMP ) T 16MS 75 676 2 THEN TEMP1 := T-16CMS; 78 987A 2 AXIMUST := TEMP1 + MIN MUMS'?; 77 885 2 AAPIVELY ADS SENSIVY } 78 (685 2 IF RRCURRENT )= RR PRIOR 379 692 2 THEN SET THRESHOLDS (UPDATE (AWEKAGCPA, CUPLEXPEAKMAG)); 38 36A 2 R BUFFERERR. PTR} := RRCURRENT 381 684 2 Ra PTR := RR PT + 1; 382 0689 2 IF RR PTR ) RRAVENUM 383 C1 2 THEN RRP (R = i ; 384 OSCE 2 GS DETECTED := TRUE; 38 08CE 2 GOTO 3333; 4,751,726 147 148 388 OSCE 2 ENE); (RELIABLE GRS DATA) 387 86CE 2 EN), (NO-BUFFER-OVERFLO 388 OSCE 2 END; (TEST CANElDATE) 89 CE 2 399 BCE 2 3,333; (EXIT AFTER QRS PROCESSN COMFLETE 39 06CE 2 392 66CE 2 RSM3 := 5; 393 064 2 END; (GRS DETECTED) 394 O60 395 OG '96 COGC GLOEPOC FFS 397 GO End of Compilation number of errrs= FILE: MNIT Ok; BOSS: HP 640 OG - Pasco. '6'8" Code .e., it at G'

IOOO 8085 2 IOC PROGRAM MONITOR; EXTESIONS ONS 4 IO SEPARAE 5 00 OPTIMIZE BFFs 6 C 7 8 C TYPE 9 II RSTATE_TYPE s (RESET, AITSETUP,NTR); OC 1 2 WA. SEWAR ON 3 0. ECGPP ; INTEGER (Adle SAMPLER) 14. I AVETYPE : BYTE; (Adle RSENSE) 15 0. SAMPLEON : BOOLEAN; (AIdle SAMPER Anit or on/off control) 16 06 EXTWAR OFF 17 O. 18 0. 9 ISO WA. GDRWAR ON ( Provide Cimonication/handshaking between rate 2 Initr and basestation CIntroller backgr Ivad state Machines. ) 2 ICO SV ; BYTE; 22 01 G/2 ; BYTE; 23 O2 CV3 ; BYTE; 24 03 G4 : BYTE; 25 G4 GV5 ; BYTE; 26 S. ECAIN ; BOOLEAN (ECG gaif change handshaking} 27 90 RATE TO SEND ; BYTE; (ECG rate and Monitar statys) 28 07 GLOBWAR OFF 29 O7 30 07 3 07 VA. 6GCEVAR ON ( Rate Anitar state variabies, , ) 32 07 NEXT RMSTATE : RMSTATETYPE 3 08 RMSTATE : RMSTATE TYPE; 34 009 SBVAR OFF S 8 36 00 37 OO PROCEDURE INITRATENTR; EXTERNAL (Advie R&ENSE} 38 800 FUNCTION GRS DETECfE) : RCDL&AN, EXTERNAL; Cridle RSENS) 39 G FUCTION AVERAGE RATE : BYTE; EXTERNAL (Module RSENSE) A 660 4,751,726 149 150 4 OOO 42 OCG $BPR ONs 43 00 44 OOO ! PROCEDLRE CRRENTRMS OPS; 45 ICC 2 ( Carry I t Operations for the current rate Nenit or state, eviate 46 800 2 triggers that May cause state changes, and exit the current state, } 47 O 2 BEGIN 48 00 2 49 OGG 2 CASE STATE OF 5 006 2 5 006 2 AIT; BEGIN 52 06 2 (RATE TO SENE stays at t ificiate rate Monitat in IT, 53 OG 2 Leave AIT when patient basestation ants data seit. ) 54 2 IF SAMPLE.ON 55, O6) 2 THEN NEXT RMSTATE := SETUP; 58, 8.2 2 END (AIT) 57 15 2 58 15 2 SETUP IEGIN 59 15, 2 GW = 1; W 6 A 2 Real-time process samples ECG and sends a byte to Casper 6. A 2 every MS, ECC arplitude is tested -- syster lil At 62 A 2 leave SETUP if ECS amplitude is ?ider 6. Sarple units pip, A 2 GRS detection occurs to let algar the stabilize and had 64 A 2 the rate CIAputation buffer, RATE USEN) is held at 65 A 2 if ECC applitude is Under 6. Inits p-p, and at 2 if ECS 66 1A 2 aplitude is adedquate, leave SETP if sampling is to stop 7 1A 2 or after ECG arplitude is satisfactory and GRS detect in 68 A 2 has stabilized. ) 69 BA 2 IF GRS DETECTED 7 2 2 THEN RAFE TO SED is RATE TO SEND; (Detector stabilizes) 71 26 2 IF RAVETYPE is 72 I2E 2 THEN NEXTRMSTATE := NTR; 7 3 2 IF NOT SAPEON 74. A 2 THEN NEXTRASTATE := AIT; 75 3F 2 SV is l; 76 44 2 END; (SETUP) 77 47 2 78 47 NR; BEGIN 79 B47 2 GV2 := 0; 8 4C 2 Real-time process samples ECG and sends a byte to Caper 8 S4C 2 every 1 MS. ECG arplitude is tested and RS detect. In 82 94C 2 ICCrs, R-R data is used t crpete RATE TO SEND as the 8 CAC 2 average rate of the si Most recent beats Vale 55 ECC 84 04C 2 a?plitude stays under 33 sample Units pp or no kS5 are 85 4C 2 detected for 4 seconds. RATE TO SEN) will be set t if 86 4C 2 ECG anslitude is lid and set to 4 if no QRS are detected, 87 04C 2 Leave NTR if sapling is to stop or if EC gain has been 88 04C 2 changed by the basestation controller . ) 89 4C 2 IF GRS DETECTED 90 852 2 THEN RATE TO SENC = AVERAGE RATE; 9 C58 2 IF NGT SAPLEON 92 65F 2 THEN NEXTRX STATE := AIT; 9 864 2 CV2 is l; 94 069 2 END (NTR} 95 06 2 96 6. 2 ESE: BEGIN 97 08C 2 (This is a transitio is initializatian state J 4,751,726 151 152 98 8C 2 NEXT R STATE := WAT; 99 B7 2 ENE, CRESET) 100 4 2 10 OC74 2 OTHERWISE NEXTRMSTATE := RESET; (Fault recovery} 2 (79 2 103 0679 2 END (CASE RMSTATE OF) 4 93 2 105 0.053 2 ED; (CURRENTRMSOPS) 08 () 7 08 OO 1986 PRCEDLRE CHANGERMS; lil 094 2 ( Initialize new rate Anit or states, ) 9A 2 EGIN 112 04 2 113 085A 2 CASE NEXT R STATE OF 4 9A 2 15, 'A 2 A: EGIN 18 G9A 2 (Sapling already off, 5 indicate to Casper that 7 89A 2 rate nitr is in AT) 18 OA 2 RATE TO SEND := 39; 19 9F 2 END; (AIT) OA 2 21 A3 2 SEP: EGN 22 A2 2 Real-time sampling is an Initialize RS detect. In 2 A2 2 and rate averaging, Indicate that SETUP is initiated. ) 24 AE 2 INITRATENNTR; 25 AS 2 RATE TO SEND := 39; 26 AA 2 END; (SETUP) 27 AD 2 28 AD 2 MNTR BEGIN 29 AD 2 ( No special initialization needed -- processes are 3 AD 2 initialized when SETUP rons, ) 13 AD 2 END; (NIR) 32 E 2 133 GBG 2 OTHERWISE NEXT RMSTATE := RESET; (Fault rec very) 14 BS 2 1359 GR5, 2 ENE); (CASE NEXRMSTATE OF) SCA 2 137 OEA 2 ED; (CHANGERMS) 38 000 39 000 SOEPCC OFF $ lid if (Orpilatin number of errors FILE INT BOESS HERETT-PACKAR); "R. A55eer LOCATION OBJECT CODE INE SORCE LINE 885 HESE ARE THE LOY EVE INTERRUPT HANDLERS SAE G ENABE CB SAS 4,751,726 153 154 ASK CB SR55 KT Sri STATE MACHINE CD. 2 E SALER i EXT ECODATA 4. TIC 1S EX INSTS 6 EX INRS 17 EXT CTC. 8 19 RESET VECTOR 2. RC H CO 21 JP S. 2 23 EST 5.5 VECTOR 24; 1 SECON INTERRUPT 25 R 2CH 2C COE 26 P ISRSS 27 28 RST 6.5 VECTOR 29 TXRBY FRON THE ECON G OR 3AH 34 Y34 C3004 2 JP Y34 34 RST 7,5 VECTOR 35; 300 KZ SAMPLING INTERRUPT 36 ORG BCH 3C CO 37 P SAPER 39 PROGRAM AREA 4. PROG 4. O 42 SABLE I O C9 44 RE 45 A ENAEE 7 EI 48 RE 49 04 5 SAS 04 A000 51 DA NRSK 7 52 SN 08 CS 53 RE 54 9 55 RASK OS 2. 56 R A 320 57 SA RSS OOC CS 58 RET 59 60 OOE 61 ISR55 OGEF 2 PUSH PS 83; 64 RESAR THE TER 85; 4,751,726 155 156 OF E2c 68 V A 20:4 320 57 STA CTCG 4 EO 68 V A Gi 208 59 SA CTCG Ol C 7t PSH S A 5 7 PUSH E5 72 FSH H 73; DC CDOCC 74 CALL CK 75 Olf El 7. POF H 20 0 77 POP 2 C. 78 PF B 22 Fl 79 POP PS 8 23 FB B EI - O24 C9 2 RE 8. 84 85 88. EK)

Errors= In connection with the above description, we claim: 30 said modem means with a digital signal for transmission 1. A telemetry base station, comprising: from said modem, indicating that said telephone set has radio receiver means for receiving telemetered radio gone off hook. signals containing physiological information; 3. A telemetry base station, comprising: modem means for transmitting and receiving digital 35 radio receiver means for receiving telemetered radio signals, said modem means adapted to be coupled signals containing physiological information; to a telephone line; modem means for transmitting and receiving digital a telephone set adapted to be coupled to said tele signals, said modem means adapted to be coupled phone line for voice communication; to a telephone line; command decoding means for decoding the presence a telephone set adapted to be coupled to said tele of command signals within said digital signals re phone line for voice communication; ceived by said modem means; means for providing a signal which indicates when control means coupled to said command decoding the telephone set is off hook; means for coupling and uncoupling said telephone command decoding means for decoding the presence set from said telephone line, and for inhibiting 45 of a command signal within said digital signals received by said modem means which indicates a transmission of digital signals from said modem desire on behalf of a source of the digital signals while said telephone set is coupled to said tele received by the modem means for voice communi phone line in accordance with said command sig cation; nals detected within said signals received by said 50 means coupled to said command decoding means for modem means; coupling the telephone set from said telephone line signal means for providing simulated call progress during a voice communication mode and decou signals to the telephone set when the telephone set pling the telephone set from the telephone line is uncoupled from the telephone line and the during a data communication mode, based upon modem means is transmitting digital signals; and 55 the command signals; means for causing simulated operation of the tele A/D converter means coupled to said receiver means phone set during the data communication mode; and to said modem means for converting said radio and frequency signals received by said receiver means A/D converter means coupled to said receiver means to digital signals for transmission by said modem 60 and to said modem means for converting said radio 2S frequency signals received by said receiver means 2. A base station according to claim 1 wherein said to digital signals for transmission by said modem control means is also coupled to said telephone set and e3S in response to said telephone going off hook, provides is k k is : 65