This trap sets or reads the file version number.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $4E | D0.L | Error return. |
D1.L | Version | D1.L | Version. |
D3.W | Timeout | D3.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
Any I/O sub system errors including
ERR_NC | Not complete. |
The example below shows the use of this trap call to set the version number of a file in D7.L and prevent its being incremented when the file is closed.
vers moveq #io_open,d0 ; $01 moveq #-1,d1 ; This job moveq #0,d3 ; OPEN lea name,a1 ; Name of file trap #2 ; Open the file tst.l d0 ; OK? . . bne error ; . . no! moveq #0,d1 ; To find the version number moveq #-1,d3 ; Timeout moveq #iof_vers,d0 ; $4E trap #3 ; Find the version tst.l d0 ; OK? . . bne error ; . . no! move.l d1,d7 ; Set the version number in D7.L moveq #io_close,d0 ; $02 tst.l d0 ; OK? . . bne error ; . . no! name dc.w name_e-name-2 ; Length of name dc.b "flp1_klok" name_e ds.b 0