Atari ST series Technical Reference Manual page 281

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Fread()
T h is f u n c ti o n r e a d s a s p e c if ie d n u m b e r o f b y t e s f r o m a n o p e n file .
C macro format
l o n g s t a t u s , c o u n t ;
i n t h a n d l e ;
c h a r ^ b u ff e r ;
s t a t u s =
F r e a d ( h a n d l e , c o u n t , b u f f e r );
Machine language format
m o v e .l
b u f f e r , - ( s p )
m o v e .l
# c o u n t , - ( s p )
m o v e .l
# h a n d l e , - ( s p )
m o v e . w
# $ 3 F , - (s p )
t r a p
# 1
a d d .l
# 1 2 , s p
Inputs
b u f f e r
l o n g
c o u n t
l o n g
h a n d l e
w o r d
Results
DO
s t a t u s
w o r d
See also
F o p e n ( ) , F c l o s e ( )
Fread
Read File
A p o i n t e r to t h e b u f f e r w h e r e th e d a t a
t h a t is r e a d in w ill b e s t o r e d .
T h e n u m b e r o f b y t e s t o r e a d . N o t e : T h is
m u s t b e a l o n g v a l u e .
T h e file h a n d l e o f th e file t o r e a d .
If th e f u n c t i o n s u c c e e d s , th e a c t u a l n u m b e r o f b y t e s
r e a d is r e t u r n e d . If t h e f u n c ti o n a t t e m p t s to r e a d
p a s t t h e e n d o f th e file , 0 is r e t u r n e d . F o r a n y o t h e r
e r r o r , a n e g a t i v e G E M D O S e r r o r n u m b e r is r e t u r n e d
Opcode = 63 ($3F)
i
273

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents