•  Back 
  •  The File Descriptor (FD) 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File11.5.16.35.3  fd_mode                                              TOS

fd_mode contains the mode, as described for xfs_fopen. If two FDs 
point to the same file, then the modes have to be compatible. Thanks 
to the simple MagiC-internal mode notation, a plain rotation and 
ANDing of the bits is sufficient, e.g.:

  move.w   fd_mode(a0),d1
  btst     #BOM_NOCHECK,d1  ; No check by the XFS?
  bne.b    _opf_nxt         ; Yes, ddev_open checks
  ror.b    #4,d1
  and.b    d0,d1
  bne      opd_eaccdn       ; Conflict: return(EACCDN)