Message-Id: <3.0.32.19970526164326.0068bc78@mbnet.fi> Date: Mon, 26 May 1997 16:43:29 +0300 To: Eli Zaretskii From: Samuli =?iso-8859-1?Q?J=E4rvel=E4?= Subject: Re: Re: FP_SEG and FP_OFF in DJGPP Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Precedence: bulk At 19:06 22.5.1997 +0300, you wrote: > >On 21 May 1997, Samuli Järvelä wrote: > >> The problem isn't converting it from Intel-syntax to AT&T-syntax, but the >> offset and seg are. How can I get offset and segment values out from a >> address? >> I read the FAQ and it didn't help me at all. > >How so? The FAQ explains this (not in assembly terms, but that's not >your problem, as you say) in sections 18.1 and 18.2. If something in >those explanations is unclear, please ask specific questions. > I read those sections and I thought it would be the easiest way to translate the procedure using ASM because I'm not so familiar with DJGPP, but after all it might not be so. I tried it with int86x like this: union REGS regs; regs.x.cx=CD_Drive; regs.x.bx=&RequestBlock; regs.x.ax=0x1510; int86x(0x2f,®s,®s); When compiling it DJGPP prompted: "storage size of 'regs' isn't known". I also tried it with _go32_info_block.linear_address_of_transfer_buffer, but it goes beyond my comprehension. I tried it like this: __dpmi_regs r; r.x.cx=CD_Drive; r.x.bx = _go32_info_block.linear_address_of_transfer_buffer & 0x0f; r.x.ax = (_go32_info_block.linear_address_of_transfer_buffer >> 4)& 0xffff; r.x.es = r.x.ax; r.x.ax=0x1510; __dpmi_int(0x2f,&r); But of course it won't work like this so I think I should copy the contents of RequestBlock to this info block, but when trying to copy it with memcpy(_go32_info_block.linear_address_of_transfer_buffer,&RequestBlock,size of(RequestBlock)) it complains "warning: passing arg 1 of `memcpy' makes pointer from integer without a cast". Have I misunderstood something badly or what is the solution? samppa AT writeme DOT com