X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Tue, 15 Mar 2011 06:40:35 -0400 Message-Id: From: Eli Zaretskii To: djgpp AT delorie DOT com In-reply-to: <42d13cb8-adf4-4a86-9cf2-012d0929fb4c AT q40g2000prh DOT googlegroups DOT com> (message from Jim Michaels on Tue, 15 Mar 2011 00:37:06 -0700 (PDT)) Subject: Re: csdpmi7 not working on virtualbox, how use dosmemget with seg ofs from int21h? References: <39cdc18e-eccb-4213-b896-db3be020702e AT w9g2000prg DOT googlegroups DOT com> <3e035797-6b8e-4106-bd29-98e87a9cc121 AT a21g2000prj DOT googlegroups DOT com> <428d9bd6-efc5-4f66-bab3-961a0c4598f9 AT f31g2000pri DOT googlegroups DOT com> <42d13cb8-adf4-4a86-9cf2-012d0929fb4c AT q40g2000prh DOT googlegroups DOT com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com > From: Jim Michaels > Newsgroups: comp.os.msdos.djgpp > Date: Tue, 15 Mar 2011 00:37:06 -0700 (PDT) > >   dosmemget(adr, sizeof(extFAT32FreeSpaceStructure), pds); > > > > (assuming `pds' is correct, and you remove `wastedspace' from the > > structure, because it makes you fetch data beyond what DOS fills in). > > > > Or you could use __tb+STRUCT_OFS instead of `adr', because my reading > > of RBIL is that DOS fills the buffer whose address you passed to it in > > ES:DI when you called __dpmi_int.  Per the FAQ, you should have put > > the segment and offset of __tb in ES:DI before invoking __dpmi_int, so > > the buffer filled by DOS is in the transfer buffer, and __tb is its > > address. > > doesn't work. What does that mean, exactly? What do you get in the struct after __dpmi_int returns? Or does the program crash? Or something else? > I already check the carry flag, which If I am not > mistaken is r.x.flags & 1. Yes, that's the CF flag. I take it that it's cleared? If so, what is the value of r.x.ax after __dpmi_int returns? > I am not a total idiot. There was no word "idiot" in my message. People do make honest mistakes, you. If you can assume that the basic infrastructure of DJGPP doesn't work because "DJ forgot to include" something, I can certainly assume that someone who asks trivial questions about low-level programming with DJGPP forgot something, too. > the reason why I padded the struct to size 0x30 was because some of > the djgpp dos memory access functions require accessing memory in 16- > byte chunks (0x10), or segment size chunks. Don't. dosmemget doesn't require any such roundups. > I think I may have to take this problem to the freedos folks and see > why 7303h doesn't seem to work on their OS when they are supposed to > support it. > > I am still learning. but I need to get solid code so I can say to the > freedos folk, "your OS is broken, here's how", or, I can have a > working program that works on freedos which uses FAT32 and maybe > windows 98. You could simply ask them if they support 7303. From what you say I'm beginning to think they don't. Asking such a question does not need any code to show: since this function is not in the standard DOS, and is documented in RBIL to be supported only by Windows 9X (not even DOS 7 when Windows is not up and running), it's quite reasonable to ask if FreeDOS does support it.