•  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-FileDMAwrite()
Rwabs()
DMAread()                                                             XBIOS

Syntax

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

Function      DMAread() reads raw sectors from a ACSI or SCSI device.

Opcode        42 (0x2A)

Availability  This call is available as of TOS version 2.00.

Parameters    sector specifies the sector number to begin reading at.
              count specifies the number of sectors to read.
              buf is a pointer to the address where incoming data will
                  be stored.
              dev specifies the device to read from as follows:

               dev    Meaning

               0-7    ACSI devices 0-7

              8-15    SCSI devices 0-7

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

Return Value  DMAread() returns 0 if the operation was successful or
              a negative BIOS error code otherwise.

Caveats       SCSI devices will write data until the device exits its data
              transfer phase. Since this call is not dependent on sector
              size, you should ensure that the buffer is large enough to
              hold sectors from devices with large sectors (CD-ROM = 2K,
              for example).

Comments      ACSI transfers must be done to 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 on the TT030 do not actually use DMA. Handshaking
              is used to transfer bytes individually. This means that
              alternative RAM may be used. The Falcon030 uses DMA for SCSI
              transfers making transfers to alternative RAM illegal.

See Also      DMAwrite(), Rwabs()