Behavior Research Methods, Instruments, & Computers 1988, 20 (4), 432
mM PC tachistoscope: II. Assembly language subroutines
SIDNEY J. SEGALOWITZ
Brock University, St. Catherines, Ontario, Canada
Segalowitz (1987) provided a BASIC routinefor using an mM PC or compatible as a tachistoscope. The present article supplies a set of Assembly language subroutines that perform most of the needed components that were included in the BASIC routine. The inherent benefit is, of course, speed. Each individual component's overload was timedat much faster than 1 msec; this rapid screen switching provides a solidbasisfor using the machine as a tachistoscope. All the subroutines have been successfully compiled and usedwithBASICA and the BASCOM compiler, andwiththeQuickBasic series (toVersion 4.0). SYNC.ASM. This subroutine waits for the beginning of the raster return so that the screen can be switched. The return itself takes just under 2 msec, allowing for screen switching in Assembly. PAGER.ASM. This subroutine switches the screen page. As Graves and Bradley (1988) pointed out, QuickBasic 4.0 takes toolong to switch screen pages to be useful in a tachistoscope paradigm. Unfortunately, in Assembly, the videointerruptdoes not changethe activescreen page, only the visual one, so the subject's keyboard response willbe written to the lastactive screen (set, e.g., by the SCREEN statement in BASIC). WAITNEW. This subroutine waits for a set number of raster returns, at 16.7 msec each, and then switches the screenpage. For the PC to be usedas a multichannel tachistoscope, some waiting period must be set for each page. Using a timing loopof somesort, evenoneprovided by Segalowitz (1987) or Gravesand Bradley (1987), can
Preparation of this article was supported in part by a grant from the Natural Sciences and Engineering Research Council of Canada. Requests for reprints should be sent to S. J. Segalowitz, Department of Psycho1ogy, Brock University, St. Catbarines, Ontario L2S 3AI, Canada.
Copyright 1988 Psychonomic Society, Inc.
allow incremental inaccuracies with respect to the sync pulse. This subroutine allows for a set numberof raster returns and then changes the screen. Of course, if the screen pageindicated is the same as thatcurrently viewed, there will be no perceived change. TRIGGER. Thissubroutine sends out a signal through the communications (serial) port. This signal can be used as a triggerby several devices (such as an analog-to-digital converterfor evoked potential use). The advantage of using this method, as opposed to sending the signal through BASIC, is that the signal is sent passively through the communications port, whichdoes not have to be opened first. TIMERSET and TMRREAD. Thesesubroutines read the time from the internal clock as indicated by Graves and Bradley (1987). The versions presented here differ from theirs in that no DATA SEGMENT is required, making the collation of new subroutines into the library easier. I found these subroutines to workon several clones andcompatibles: the Zenith Z-181, Compaq Deskpro 386, Power Systems 386, PS/2 Model 50, three no-name PC/XT clones, a no-name PC/AT clone, and the Tandy 1000. This means that the timing chip has not been altered significantly or at all acrossthe new machines. The limitation on timing resolution inherent in these subroutines was discussed by Graves and Bradley (1988). A compiled version of thislibrarythat is ready for linking using QuickBasic or BASCOM, together with the sourcecode, is available from the author for $10 (Canadian) to cover postage, handling, and materials. REFERENCES
GRAVES, R., & BRADLEY, R. (1987). Millisecondinterval timer and auditory reaction time programs for the IBM-PC. BehaviorResearch Methods, Instruments, & Computers, 19, 30-35. GRAVES, R., & BRADLEY, R. (1988). More on millisecond timing and tachistoscope applications for the IBM PC. Behavior Research Methods, Instruments, & Computers, 20, 408-412. SEGAWWITZ, S. J. (1987). IBM-PC tachistoscope: Text stimuli. BehaviorResearch Methods, Instruments, & Computers, 19, 383-388.
432
(Manuscript accepted for publication May 15, 1988.)