【正文】
16. Data collection ceases when the required number of paragraphs of data has been stored. Detection of keyboard entry is made via function calls to the disk operating system (Microsoft DOS). FIGURE 2 MACRO ASSEMBLER source code for control of interface. This subroutine programs the 8255 for data transfer, stores data in microputer memory, and controls the video cassette recorder. Instructions for calling the subroutine and a description of its algorithm are given in the ments. In the automatic mode the program is provided with a marker consisting of 42 previously sampled points. A 32bit template is constructed from the least significantbits of the first 32 points of the marker. The least significant bit of each sampled point is rotated into a 32bit pair of registers and is pared with the template. This parison is done in two stages. Only if the first 16 bits match, are the other 16 bits pared. Since, for real data, the least significant bits are essentially random, a 16bit match occurs with a frequency of 1 in 216 or about once every s. If a specified number of half matches occur before a total match is found the subroutine aborts and returns an error code. If a total match is found data collection is started. The first two points (corresponding to the 33rd and 34th points of the marker) are missed. The next eight points are stored in an array that immediately preceeds the data array in memory. We remend that the calling program verify that these 8 points are identical to the last 8 points of the 42point marker. Thereafter, points are stored in the data array. Control of the VCR is acplished through use of bits 6 and 7 of port C of the 8255. These are not required for handshaking and are programmed for output. A 7442 BCDtoDecimal converter is used to demultiplex these two bits. Codes C6 C7 = 00, 01, and 10 activate the play, stop, and rewind functions, respectively. Bits C6 and C7 are normally set, resulting in no action. When either or both bits are reset, the appropriate output of the 7442 is driven low, activating the corresponding 4N36 optoisolator. A software timer is used to control the duration of optoisolator activation and the period of time between VCR mands. The only defect we have observed in testing this interface is occasional failure of the subroutine to detect the marker. This occurs 1% of the time. Often, a second subroutine call with the same marker will execute correctly. We believe this failure to result from misreading of the video tape. The authors will be pleased to provide interested readers with diskette copies of the subroutine listed in Fig. 2 and its assembled object code. Such requests should include a formatted diskette in a stamped, selfaddressed diskette mailer. Received for publication 23 February 1987 and in final form 17 :Bezanilla, F. 1985. A high capacity data recording device based on adigital audio processor and a video cassette recorder. Biophys. :437441.