[fpc-pascal]Re: sound blaster

Balogh, Karoly (Charlie/iNQ) charlie at scenergy.dfmk.hu
Sat Dec 14 16:07:04 CET 2002


Hi,

On 02.12.14., Szilasi RĂ³bert wrote:

> I would like to compile BP code into FREE P 
> but I can't translate the following rows:
>  mov  ax, Seg @DATA
>  port[DMA_mask] := SB_DMA or 4;

To use port[]/portw[] array, you need to use Ports unit. 
So simply add "Uses Ports;" to the header of your program.

The assembler part is a bit more difficult, and also
you need to rework the whole IRQ and DMA handling stuff 
in protected mode. You need to use DPMI, and the GO32
unit for this. The documentation contains examples on
this topic.
 
> If somebody can help me to translate Seg @DATA and 
> port[DMA_mask] into free pascal source, please send me
> an example to rszilasi at pirin.hu.

I implemented a Sound Blaster handler for my XM module
player available at http://scenergy.dfmk.hu/inqcoders/.

But there are other Sound Blaster programming examples
available at www.freepascal.org, on the contributed units
page.

Bye,
-- 
Charlie/iNQ
.:%[ Cybernetic Hydraulic Android Responsible for ]%:. 
.:%[    Logical Infiltration and Exploration      ]%:.
.:%[         Member of TeamOS/2 Hungary           ]%:.
.:%[     Member of Hungarian Amiga User Group     ]%:.





More information about the fpc-pascal mailing list