•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileFread()
Fwrite()                                                             GEMDOS

Syntax

LONG Fwrite( handle, count, buf )
WORD handle;
LONG count;
VOIDP buf;

Function      Fwrite() writes the contents of a buffer to the specified
              GEMDOS file.

Opcode        64 (0x40)

Availability  All GEMDOS versions.

Parameters    handle is the handle of the file to write to.
              count specifies the number of bytes to write. buf indicates
              the starting address of the data to write.

Binding       pea      buf
              move.l   count,-(sp)
              move.w   handle,-(sp)
              move.w   #$40,-(sp)
              trap     #1
              lea      12(sp),sp

Return Value  Fwrite() returns the positive number of bytes actually
              written or a negative GEMDOS error code if the operation
              failed.

Caveats       Prior to GEMDOS version 0.15, calling Fwrite() with a count
              parameter of 0 will hang the system.

See Also      Fread()