and this is the routine that looks at the "shift register" on port 224h. other sources say that it always reads as 7F, but the MSB can change, and this code checks for a particular pattern.