8271/8271-6 CPU INTERRUPT POLLED INTERRUPT C START _) Cc START D) READ FOC STATUS a REGISTER NO INTERRUPT ' ? INTERRUPT REQUEST BIT set ? READ RESULT BYTE READ RESULT BYTE t C END +) C_ END ) Figure 18. Getting the Result _The Result Phase During the Result Phase, the FDC notifies the CPU of the outcome of the command execution. This phase may be initiated by: 1. The successful completion of an operation. 2. An error detected during an operation. PROGRAMMING A, Ao CS RD cS WR 0 0 Status Reg Command Reg 0 1 Result Reg Parameter Reg 1 0 _ Reset Reg 1 1 — — STATUS REGISTER FOC Status D, Dg 0, D, Dz D2 D, Dy CT TT) I tele) COMMAND BUSY J NON-DMA MODE COMMAND REG FULL INTERRUPT REO PARAMETER REG FULL RESULT REG FULL Bit 7: Command Busy The command busy bit is set on writing to the command register. Whenever the FDC is busy processing a commana, the command busy bit is set to a one. This bit is set to zero after the command is completed. Bit 6: Command Full The command full bit is set on writing to the command buffer and cleared when the FDC begins processing the command. Bit 5: Parameter Full This bit indicates the state of the parameter buffer. This bit is set when a parameter is written to the FDC and reset after the FDC has accepted the parameter. x Bit 4: Result Full This bit indicates the state of the result buffer. It is valia only after Command Busy bit is low. This bit is set when the FDC finishes a command and is reset after the result byte is read by the CPU. The data in the result buffer is valid only after the FDC has completed a command. Reading the result buffer while a command is in progress yields no useful information. Bit 3: Interrupt Request This bit reflects the state of the FDC INT pin. it is set when FDC requests attention as a result of the comple: tion of an operation or failure to complete an intended operation. This bit is cleared by reading the result register. Bit 2: Non-DMA Data Request When the FDC is utilized without a DMA controller, this bit is used to indicate FDC data requests. Note that in the non-DMA mode, an interrupt is generated (interrupt request bit is set) with each data byte written to or read from the diskette. Bits 1 and 0: Not used (zero returned). After reading the Status Register, the CPU then reads the Result Register for more information. THE RESULT REGISTER This byte format facilitates the use of an address table to look up error routines and messages. The standard result byte format is: D7 Dg Ds Dg D3 D2 Di Do CofoT Tf | i ie) \ Ji VN / — NOT USED = 0 COMPLETION CODE COMPLETION TYPE DELETEO DATA FOUND NOT USED = 00 Bits 7 and 6: Not used (zero returned). Bit 5: Deleted Data Found: This bit is set when deleted data is encountered during a transaction. Bits 4 and 3: Completion Type The completion type field provides general information regarding the outcome of an operation. The completion type field provides general information regarding the outcome of an operation. Completion Type Event 00 Good Completion — No Error 01 System Error — recoverable errors; 10 operator intervention probably required for recovery. 11 Command/Drive Error — either a program error or drive hardware failure.