intel 8271/8271-6 Variable Length/Multi-Record Format Ay Ao Dy Og Os Dg D3 Oz Oy Do cmp: | 0 o | SEt | SEL | COMMAND OPCODE par: | 0 1 | TRACK ADDR 0.255 PAR: | 0 1 | SECTOR 0.255 par: | 0 1 LENGTH | NO. OF SECTORS D7-Ds of Parameter 2 determine the length of the dick record. 000 128 Bytes 001 256 Bytes 010 512 Bytes 011 1024 Bytes 100 2048 Bytes 101 4096 Bytes 110 8192 Bytes 111 16,384 Bytes Commands Opcode READ DATA 13 READ DATA AND DELETED DATA 17 WRITE DATA 0B WRITE DELETED DATA OF VERIFY DATA AND DELETED DATA 1F SCAN DATA 00 SCAN DATA AND DELETED DATA 04 Read Commands Read Data, Read Data and Deleted Data. Function The read command transfers data from a specified disk record or group of records to memory. The operation of this command .is outlined in execution phase table. Write Commands Write Data, Write Deleted Data. Function The write command transfers data from memory to a specified disk record or group of records. Verify Command Verify Data and Deleted Data. Function The verify command is identical to the read data and deleted data command except that the data is not transferred to memory. This command is used to check that a record or a group of records has been written correctly by verifying the CRC character. Scan Commands Ay Ao D7 Og Os Oa D3 D2 01 Oo cmp: | o o | SEL | seu | 0 | 0 i 0 soaTal 0 [ 0 PAR: | 0 1 TRACK ADOR 0-255 par: | 0 1 SECTOR 0.255 pan: | 0 1 LENGTH NO. OF SECTORS par: | 0 1 | SCAN TYPE | STEP SIZE par: | o 1 FIELO LENGTH (KEY) Command Dz = 0 Scan Data D2 = 1 Scan Data and Deleted Data Scan Commands, Scan Data and Scan Data and Deleted Data, are used to search a specific data pattern or “key” from memory. The 8271 FDC operation during a scan is unique in that data is read from memory and from the diskette simultaneously. During the scan operation, the key is compared repetitively (using the 8257 DMA Controller in auto toad mode) with the data read from the diskette (e.g., an eight byte key would be compared with the first eight bytes (1-8) read from the diskette, the second eight bytes (9-16), the third eight bytes (17-24), etc.). The scan operation is concluded when the key is located or when the specified number of sectors have been searched without locating the key. When concluded, the 8271 FOC requests an interrupt. The program must then read the result register to determine if the scan was successful (if the key was located). If successful, several of the FDC’s special registers can be examined (read special registers command) to determine more specific information relating to the scan (i.e., the sector number in which the key was located, and the number of bytes within the sector that were not compared when the key was located). The 8271 does not do a sliding scan, it does a fixed block linear search. This means the key in memory is compared to an equal length block in a sector; when these blocks meet the scan conditions the scan will stop. Otherwise, the scan continues until all the sectors specified have been searched. The following factors regarding key length must be considered when establishing a key in memory. 1. When searching multiple sectors, the length of the key must be evenly divisible into the sector length to prevent the key from being split at subsequent sector boundaries. Since the character FFH is not compared, the key in memory can be padded to the required length using this character. For example, if the actual pattern compared on the diskette is twelve characters in length, the field length should be sixteen and four bytes of FFu AFN-002238