Abstract
The ffiM PC has become the de facto standard computer for use in psychology laboratories, and Turbo Pascal is a very popular language for this purpose. Unfortunately, no simple millisecond timing program is available in Turbo Pascal. Heathcote (1988) presented a Turbo Pascal program for this purpose, but it is complex and adversely affects the time of day (TOD) clock. Other programs are available only in BASIC and in assembly language, and therefore they cannot be incorporated directly into Turbo Pascal programs (e.g., see Buhrer, Sparrer, & Weitkunat, 1987; Graves & Bradley, 1987, 1988). In the present paper, a program is described that performs millisecond interval timing for the ffiM PC family of computers simply, neatly, efficiently, and accurately, entirely within Turbo Pascal 4.0. Millisecond timing. On the ffiM PC, XT, and AT, as well as compatibles, system timing (e.g., RAM refresh and updating the TOD clock) is performed by the Intel 8253 timer/counter provided on the motherboard. Regardless of the computer (i.e., PC, XT, or AT) and central processor speed (i.e., 4.77, 6, 8, 10, or 20 MHz), the 8253 timer/counter always operates at 1,193,182 Hz, with one count for every cycle. In normal operation, the TOD clock is updated every 65,536 counts of the 8253 timerthat is, every 54.925 msec. One way to obtain millisecond timing is to program the 8253 timer to update the TOD clock every 1,193 counts (i.e., approximately every millisecond) and then count the number of times the TOD clock is updated during the timing interval. However, because the BIOS assumes that a TOD update occurs every 55 msec, the TOD clock will run 55 times too fast (see Biihrer et al., 1987, and Heathcote, 1988, for examples of this type of algorithm). The 8253 is initialized with an integer between 1 and 65,536, then it repeatedly counts down from this number to O. When the counter reaches 0, three things happen automatically: (1) hardware Interrupt 8 updates the TOD clock, (2) software Interrupt 28 (lC in Hexadecimal) is executed, and (3) the counter is reset to the initial number and the countdown continues. In normal operation, Interrupt 1C does nothing useful, but it can be modified
Published Version (Free)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: Behavior Research Methods, Instruments, & Computers
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.