private void execIOReadSectorByIndex() { SectorData sector = null; FloppyDiskDrive drive = this.executingDrive; if (drive != null) { sector = drive.readSectorByIndex(getArgHead(), this.sectorIdRec - 1); } drive = getExecutingDrive(); if (drive != null) { if (sector != null) { this.curSector = sector; this.curSectorReader = sector.reader(); this.remainBytes = this.dataLen; if (this.curCmd == Command.READ_TRACK) { setByteReadable(); } else { this.sectorIdCyl = sector.getCylinder(); this.sectorIdHead = sector.getHead(); this.sectorIdRec = sector.getSectorNum(); this.sectorIdSizeCode = sector.getSizeCode(); if (sector.isEmpty()) { this.statusReg1 |= ST1_MISSING_ADDRESS_MARK; this.statusReg2 |= ST2_MISSING_DATA_ADDRESS_MARK; } stopExecution(); } } else { this.statusReg0 |= ST0_ABNORMAL_TERMINATION; if (this.sectorIdRec == 1) { this.statusReg1 |= ST1_NO_DATA; this.statusReg1 |= ST1_MISSING_ADDRESS_MARK; } else { this.statusReg1 |= ST1_END_OF_CYLINDER; } stopExecution(); } } }