•  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-FileDsp_LoadSubroutine()
Dsp_LoadProg()                                                        XBIOS

Syntax

WORD Dsp_LoadProg( file, ability, buf )
char *file;
WORD ability;
char *buf;

Function      Dsp_LoadProg() loads a '.LOD' file from disk, transmits it
              to the DSP, and executes it.

Opcode        108 (0x6C)

Availability  Available only when bit #3 of the '_SND' cookie is set.

Parameters    file is a pointer to a NULL-terminated string containing
              a valid GEMDOS file specification. ability is the unique
              ability code that will be assigned to this program. buf
              should point to a temporary buffer where the DSP will place
              the binary code it generates. The minimum size of the buffer
              is determined by the following formula:

              3 * ( #program/data words + (3 * #blocks in program))

Binding       pea      buf
              move.w   ability,-(sp)
              pea      file
              move.w   #$6C,-(sp)
              trap     #14
              lea      12(sp),sp

Return Value  Dsp_LoadProg() returns a 0 is successful or -1 otherwise.

Comments      Before loading you should determine if a program already
              exists on the DSP with your chosen ability with
              Dsp_GetProgAbility().

See Also      Dsp_LoadSubroutine()