•  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-FileDMAread()
Rwabs()
DMAwrite()                                                            XBIOS

Syntax

LONG DMAwrite( sector, count, buf, dev )
LONG sector;
WORD count;
VOIDP buf;
WORD dev;

Function      DMAwrite() writes raw sectors to ACSI or SCSI devices.

Opcode        43 (0x2B)

Availability  TOS versions >= 2.00

Parameters    sector is the starting sector number to write data to.
              count is the number of sectors to write. buf defines the
              starting address of the data to write. dev is the device
              number as specified in DMAread().

Binding       move.w   dev,-(sp)
              pea      buf
              move.w   count,-(sp)
              move.l   sector,-(sp)
              move.w   #$2B,-(sp)
              trap     #14
              lea      14(sp),sp

Return Value  DMAwrite() returns 0 if successful or a negative BIOS error
              code otherwise.

Comments      ACSI transfers must be done from normal RAM. If you need to
              read sectors into alternative RAM, use the 64KB pointer
              found with the '_FRB' cookie as an intermediate transfer
              point while correctly managing the '_flock' system
              variable. SCSI transfers do not actually use DMA. Handshaking
              is used to transfer bytes individually.

See Also      DMAread(), Rwabs()