Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!shelby!neon!minakami From: minakami@Neon.Stanford.EDU (Michael K. Minakami) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: Sound Blaster Registers Message-ID: <1990Aug14.042014.12967@Neon.Stanford.EDU> Date: 14 Aug 90 04:20:14 GMT References: <1990Aug7.153600.10175@IRO.UMontreal.CA> <28112@unix.cis.pitt.edu> Organization: Computer Science Department, Stanford University Lines: 32 In article <28112@unix.cis.pitt.edu> tjw@unix.cis.pitt.edu (Terry J. Wood) writes: > >So I look at the program loadable driver described in the back of the >manual and I finally conclude that it REALLY is just what they say it is: >program loadable. It's instructions that have to be copied into memory >(at any segment, starting at displacement zero). Well, this turned out >to be, for me, easier said than done. Whenever I link my "driver area" >(created by MS Assembler) in with my MS C main program, it's never at >displacement zero of the segment. It's always at displacement "A" or >"E". At zero is some code (I assume from MS C). I finally took the >hacker's approach and just overwrote the instructions. I'm playing the >game of "overlaying" the driver with the original code, but I'm doing >it myself. > Why not just malloc some memory (large model MSC), find the closest 16-byte boundary, and load the driver there? A little segment calculations and you can get a 0-offset address. At least that's what I did...segment arithmatic isn't the greatest thing in the world in C (lots of casting pointers to longs and back again), but it seems to work. Has anyone gotten a Sound Blaster program to work under Windows? I thought it'd be kind of neat to play some music while using QVT or something, but apparently the two don't like each other. Maybe something to do with using the DMA channel? m&m -- ----------------------------------------------------------------------- The child can explain the man better than | Michael K. Minakami the man can explain the child. | minakami@neon.stanford.edu