•  Back 
  •  XBIOS 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-FileFloprd()
Flopfmt()
Flopver()
Rwabs()
Flopwr()                                                              XBIOS

Syntax

WORD Flopwr( buf, rsrvd, dev, sector, track, side, count )
VOIDP buf;
LONG rsrvd;
WORD dev, sector, track, side, count;

Function      Flopwr() writes sectors to the floppy drive.

Opcode        9 (0x09)

Availability  All TOS versions.

Parameters    buf is a pointer containing data to write. rsrvd is
              currently unused and should be set to 0. dev specifies the
              floppy drive to write to ('A:' = 0,'B:' = 1). This function
              writes count sectors starting at sector sector, track track,
              side side.

Binding       move.w   count,-(sp)
              move.w   side,-(sp)
              move.w   track,-(sp)
              move.w   sector,-(sp)
              move.w   dev,-(sp)
              move.l   rsrvd,-(sp)
              pea      buf
              move.w   #$09,-(sp)
              trap     #14
              lea      20(sp),sp

Return Value  Flopwr() returns 0 if the sectors were successfully written
              or non-zero otherwise.

Caveats       This function writes sectors in physical order only
              (ignoring interleave). Use Rwabs() to write sectors in
              logical order.

Comments      If this call is used to write to track 0, sector 1, side 0,
              the device will enter a 'media might have changed' state
              indicated upon the next Rwabs() or Mediach() call.

See Also      Floprd(), Flopfmt(), Flopver(),Rwabs()