BCR Port Access
From Ron Wiesen:
The BCR interface has only a single bit of input and no output capabilities. It also can supply +5V to a device connected to the port.
The input signal is connected to two places within the laptop: at I/O Port 179 where it appears at bit position 3, and at the 8085C CPU where it appears at the RST5.5 interrupt request signal input pin.
The input appearance at the RST5.5 interrupt request signal input pin of the 8085C CPU can generate an interrupt, and its state can be read using the RIM instruction.
Executing RIM will copy the interrupt mask to the "A" register. The mask allows/prevents generation of an interrupt due to the BCR input.
However, executing the RIM instruction also copies the state of the RST5.5 interrupt request signal (as well as the RST6.5 and RST7.5 interrupt request signals) to the "A" register, and this also is relevant to the BCR input.
Executing the RIM instruction copies the state of the RST5.5 interrupt request signal (i.e., the state of BCR input) to the "A" register where it will be deposited at bit position 4.
As I understand it, the BCR drivers (i.e., the Tandy provided discriminator software) unmask the the RST5.5 interrupt request signal and, upon a subsequent generation of the RST5.5 interrupt, are invoked by the interrupt. Upon an invocation, the BCR drivers repeatedly use the IN instruction to inspect the BCR input appearance at bit position 3 of I/O Port 179 while measuring the duration of its two sustained states in order to ascertain whether the Wand is passing over a thin Bar code line or a think Bar code line.
Note that there is inconsistency among Model 10x laptops in regard to the appearance of circuit COMMON at the Bar Code Reader (BCR) connector. Various Tandy publications indicate that circuit COMMON, which Tandy designates as GND, appears both at pin 5 and at pin 7 of the BCR connector. However, this is not the case for all Model 10x laptops. Pin 5 of some Model 10x laptops does not present circuit COMMON -- that's the inconsistency.
In order to account for the inconsistency, always use pin 7 of the BCR connector for circuit COMMON, and never rely on the use of pin 5.