From: "Nick Bull" Newsgroups: comp.os.msdos.djgpp Subject: Calling Software interrupts Date: Tue, 8 Sep 1998 17:22:30 +0100 Message-ID: <905271833.2795.0.nnrp-05.d4e48d0d@news.demon.co.uk> NNTP-Posting-Host: imat.demon.co.uk Lines: 44 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi. I'm trying to write a CDDA -> WAV program using DJGPP. I've got the basics working, and now I'm having a bit of hassle. This is the original code I'm working from : int ReadLong(DWORD loc, WORD secnum, char far *buf) { struct ReadL { struct ReqHdr req; BYTE mode; void far *address; WORD secnum; DWORD loc; BYTE readmode; BYTE skip[2]; } cmd; // snip // cmd.address=buf; // snip // } I think this is where the problem is. I've removed the "char far *buf" from the arguments and the "far" from the structure, but I think I'm running into problems here. The function should call an interrupt in the MSCDEX driver that fills buf with data. All of my other interrupt calls are working OK, but they don't fill any memory with information. Can anyone help ? What am I doing wrong ? buf is allocated using a malloc, and I know my calling procedure for the interrupt works (copies the command block to dos memory and calls using __dpmi_interrupt). Help ! Cheers, Nick. PS (Sorry for the long and probably not very clear posting)