From: jonklipp AT freenet DOT edmonton DOT ab DOT ca () Newsgroups: comp.os.msdos.djgpp Subject: Passing an address in ES:BX to and int. Date: 30 Nov 1996 04:07:09 GMT Organization: Edmonton FreeNet, Edmonton, Alberta, Canada Lines: 34 Message-ID: <57obtd$9ro@news.sas.ab.ca> NNTP-Posting-Host: fn2.freenet.edmonton.ab.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi All! First of all, I love djgpp, it's a great compiler! Anyway, I'm trying to port some code written for Borland C. I need to call interrupt 2eh. I know hoe to call the interrupt and everything, BUT, it needs ES:BX to point to a structures address in my code. In Borland, this is easy, you just use FP_SEG and FP_OFF. Offset can be figured out in DJGPP just by using &variable, unless I'm terribly wrong. I don't know how to figure out the variables segment is. Assuming that the structure is in the same segment as the code, would something like: sregs.es =_my_cs(); work? Anybody know how to do this? I guess I'm basically wondering if there is a DJGPP equivilant of FP_OFF and FP_SEG. For the curious, a little background on what I'm attempting (if you don't care, just skip this bit :) ). I found a small Borland C program that controls your CDROM player for playing audio tracks via MSCDEX. MSCDEX hooks INT 2Eh, function 15h. It needs to be passed some structures with commands in them via ES:BX like I mentioned above. I'm hoping I might be able to put this in the game I'm working on so you can listen to a CD, instead of my corny attempts at computer music :) hope somone knows the answer, thanx, -jon! -- jon klippenstein internet: klip AT cryogen DOT com uucp: alberta!ve6kik!dparrot!{root,klip} ham radio: ve6klp