EasyManua.ls Logo

Atari ST series - Page 285

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Fattrib
Get/Set File Attributes
Fattrib() Opcode = 67 ($43)
T his fu n ctio n ca n be u se d to rea d o r c h a n g e file's a ttrib u tes.
C macro format
in t attrib u te s, m o d e, n ew a ttr;
ch a r ^filen am e;
a ttrib u te s = F attrib (filen am e , m od e , n ew a ttr);
Machine language format
m o v e .w
m o v e .w
m o v e .l
m o v e .w
trap
a d d q .l
Inputs
n ew a ttr
n ew a ttr, - (sp )
m o d e, — (sp )
filen am e, - (sp )
# 0 , - (sp )
#1
# 6 ,s p
w o rd
A bit flag th a t in d ica tes th e file's n ew a t
trib utes.
In te rp re ta tio n of newattr flag:
Bit Number Attribute
0 R ea d -o n ly file (c a n 't b e d elete d o r w ritte n to )
1 H id d en file (e xc lu d e d from n orm al d irec to ry sea rch es)
2 S y ste m file (e xc lu d e d fro m n o rm al d irec to ry sea rch es)
3 V o lu m e lab el (ca n on ly ex ist in ro ot)
4 S u bd irecto ry
5 A rch iv e bit
m o d e w o rd A flag th a t d ete rm in es w h eth e r th e attri
b u tes a re re a d o r c h an g ed :
0 = R ea d
1 = C h an g e
filen am e lo n g A p o in te r to a n u ll-te rm in ate d A SC II
strin g th at co n ta in s th e n am e o f th e files
w h o se attrib u te s w ill b e re ad or ch an g ed .
Results
DO a ttrib utes
See also
F c r e a te ()
w o rd If mode is se t to 0, th e cu rren t file attrib u te s are
re tu rn e d h ere , in th e sa m e fo rm at a s d escrib ed
fo r newattr, a b ov e .
277