This trap returns information about the medium.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $45 | D0.L | Error return. |
D1.L | D1.L | Empty/Good sectors. | |
D3.W | Timeout | D3.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | Address of buffer | A1.L | End of medium name. |
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
The example below shows the use of this trap. It is assumed that A0 contains the ID either of a file on the medium or of its directory. Also it is assumed that buf(A6) is the address of a 10-byte buffer.
info moveq #fs_mdinf,d0 ; $45 moveq #-1,d3 ; Timeout lea buf(a6),a1 ; A 10-byte buffer trap #3 ; Get the information tst.l d0 ; OK? . . bne error ; . . no!