intel 8271/8271-6 would be appended to the key. Consequently, the last block of sixteen bytes compared within the first sec- tor would end at the sector boundary and the first byte of the next sector would be compared with the first byte of the key. Splitting data over sector hound- arys will not work properly since the FDC expects the start of key at each sector boundary. 2. Since the first byte of the key is compared with the first byte of the sector, when the pattern does not begin with the first byte of the sector, the key must be offset using the character FF1g. For example, if the first byte of a nine byte pattern begins on the fifth byte of the sector, four bytes of FFig are prefixed to the key (and three bytes of FFig are appended to the key to meet the length requirement) so that the first actual comparison begins on the fifth byte. The Scan Commands require five parameters: Parameter 0, Track Address Specifies the track number containing the sectors to be scanned. Lega! vaiues range from 00, to 4Cy, (0 to 76) for a standard diskette and from 00,, to 22,, (0 to 34) fora mini-sized diskette. Parameter 1, Sector Address Specifies the first sector to be scanned. The number of sectors scanned Is specified in parameter 2, and the order in which sectors are scanned is specified in parameter 3. Parameter 2, Sector Length/Number of Sectors The sector length field (bits 7-5) specifies the number of data bytes allocated to each sector (see parameter 2, routine read and write commands for field interpretation). The number of sectors field (bits 4-0) specifies the number of sectors to be scanned. The number specified ranges from one sector to the physical number of sectors on the track. Parameter 3 D7~Dg: 00-EQ Indicate scan type Scan for each character within the field length (key) equal to the corresponding char- acter within the disk sector. The scan stops after the first equal condition is met. 01-GEQ Scan for each character within the disk sec- tor greater than or equal to the correspond- ing character within the field length (key). The scan stops after the first greater than or equal condition is met. 10-LEQ Scan for each character within the disk sec- tor less than or equal to the corresponding character within the field length (key). The scan stops after the first less than or equal condition is met. Ds-Do: Step Size: The Step Size field specifies the offset to the next sector in a multisector scan. In this case, the next sector address is generated by adding the Step Size to the current sector address. Parameter 4, Field Length Specifies the number of bytes to be compared (length of key). While the range of lega! values is from 1 to 255, the fieid length specified should be evenly divisible into the sector length to prevent the key from being split at sector boundaries, if the multisector scan commands are used. Scan Command Results More detailed information about the compietion of Scan Commands may be obtained by executing Read Special Register commands. Read Special Register Parameter Results (Hex) 06 The sector number of the sector in which the specified scan data pattern was located. 14. MSB Count — The number of 128 byte blocks remaining to be compared in the current sector when the scan data pattern was located. This register is decremented with each 128 byte block read. 13. LSB Count — The number of bytes remaining to be compared in the current sector when the scan data pattern is located. This register is initialized to 128 and is decremented with each byte compared. Upon a scan met condition, the equation below can be used to determine the last byte in the located pattern. Pointer = sector length ~ (Register 14H)*128 + (Register 13H)} AFN-002238