• Keine Ergebnisse gefunden

Diskette Drive Functions

Im Dokument System/32 Functions Reference Manual (Seite 196-200)

Data Handling Machine Instructions

Chapter 8. Diskette Drive Functions

Of the 77 tracks, only 75 are normally used. Track 00 contains the volume label; tracks 1-74 are primary tracks used to contain data records. Tracks 75 and 76 are available for data storage in the event that one or two of the primary data, tracks become defective.

For basrc data exchange, each track is divided into 26 into twenty-six, 128-byte sectors, but each remaining track is divided into eight 512-byte sectors" making it

possible to store 303,104 bytes of information on tracks 1-74.

The data stored in each sector is called a record.

Therefore, because the diskette is formatted into tracks and sectors, each record on the diskette has a definite address consisting of a track number and sector number. This, address is recorded at the record's physical location on the diskette. Diskettes that contain prerecorded record addresses are known as initialized diskettes; each record qonsists of an identification (10) field and a data field.

RECORD FORMAT

Cylinder Head Record Record Length Address Address Address

Indicator

Field Description

GAP 1 A gap between the data field and the next record that consists of a variable number of binary O's or 1's; the number of O's or 1's depends on the diskette speed and record length. The last gap before index consists of O's; the rest of the gaps consist of 1',s.

SYNC A 6-byte field of binary O's that synchronizes the detection circuits before reading the information from the diskette.

AM 1 A 1-byte identifier field address mark that 1-byte binary addresses are:

Byte 2

=

read correctly. The system generates these bytes during a write operation and

automatically performs a read back check to verify their accuracy.

GAP 2 Interrecord gap between the 10 field and the data field. It contains 11 bytes of hex FF and is ·generated by the system during initialization.

AM2 A 1-byte field containing either X'FB' or X'F8'.

X' FB' is a data field address mark that identifies subsequent information as a data field. X' F8' is a control field address mark that indicates that the following field contains control information.

DATA or CONTROL

The length of this field is specified by the record length indicator (N) contained in thelD field. The System/32 record length of 128 bytes (N=O) conforms to the specifications of the IBM diskette for basic data exchange.

Displacement

Bytes Field Description

2 This is the sector address of the last sector accessed.

Displacement

of Leftmost IBM Program Length in

Byte in Hex Label Bytes Field Description Byte 1 (in hex)

80 = Due to prior condition, no action attempted.

40 == Invalid control record found (not 0 or F).

20 = Li nes to 11 were not set / read correctly.

10 = Control record(s) squeezed out.

08 = Physical cylinder number greater than 76.

04 = Reserved.

02 = Reserved.

01 = Reserved.

C IIOBSNS2 2 Sense bytes 2 and 3.

Byte 2 (in hex)

80 = 11 index pulses too close together.

40 = 11 index pulses too far apart.

20 = End of cylinder found (not tested).

10= No IDs on track.

08 = Read overrun.

02 = Write overrun.

01

=

Write parity check.

Byte 3 (in hex) 80 = Head loaded.

40 = Low gate current set.

20 = Write gate on.

10 = Erase gate on.

08 = Seek to track 3 or 0 on.

04 = Seek to track 0 or 1 on.

02 = Seek to track 1 or 2 on.

01 = Seek to track 2 or 3 on.

E IIOBERR This is the error retry count.

F IIOBFLG This is the flag byte.

Bit On Meaning

0 No ERPs attempted.

1 Automatic error display and correction allowed.

2 No error logging.

3 Allow seek past logical cylinder 74 (to 75 or 76).

4 Do not return to user program if ERP completion code is 11COMPER, 11 NOTFIX, or 11INVCAM.

10 Reserved Reserved.

11 IIOBj:XP 1 This is the sector size.

12 IIOBXR2 2 This is a save area for XR2.

14 IIOBARR 2 This is a save area for the ARR.

16 IIOBDTF 2 This is the DTF address.

Figure 8-2 (Part 2 of 2). Diskette lOB Format

8-4

DISKETTE DRIVE OPERATING CHARACTERISTICS The program must build a diskette lOB (Figure 8-2) to control diskette operations and to interface with the I/O supervisor. Index register 1 must point to the lOB.

Diskettes perform most efficiently if programs use sequential data organization, which is normally used for data exchang& and data file save/restore functions. The system performs seek, read, and write which are typical direct access storage device functions. Diskette input and output operations cannot be overlapped with any other system function.

Diskette Control Fields and Data Fields

Before issuing a seek, read, or write machine instruction, the program usually must initialize the diskette control fields and data fields. These fields, which can be or write control address mark operation:

C is the destination cylinder for the automatic

corresponding portion of the identifier field of the record read. This process is called orientation. If orientation cannot be done, the system turns on the no-orient status bit (status byte 2, bit 3).

As machine instruction execution proceeds, the system modifies the R- and X-bytes of the control field after each record is successfully processed; this maintains a log of machine instruction execution for error recovery procedures.

The program must load the address of the leftmost byte of the control field into the control address register ·prior to machine instruction execution.

The control field (CHRNX) has the following meaning:

• C (cylinder number) is a 1-byte address; valid decimal addresses are 0 through 76. Cylinder addresses 77-254 set the invalid cylinder address (byte 1, bit 4);

cylinder address 255 specifies recalibrate. This byte is not changed during execution unless a cylinder boundary is crossed during a read data, write data, or write control address mark operation.

Note: For this device, the term cylinder and track are synonymous.

• H (head number) is a 1-byte address; the only valid decimal address is O. This byte remains unchanged during command execution.

• R (record number) is a 1-byte binary address that specifies the first record to be processed in a single-record or multiple-record data operation.

Decimal record numbers 1 through 26 are valid for byte remains unchanged during command execution.

• X (number of records) is a 1-byte binary number plus

Im Dokument System/32 Functions Reference Manual (Seite 196-200)