dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [dmidecode] dmidecode for DOS?


From: Anderson, Ian
Subject: RE: [dmidecode] dmidecode for DOS?
Date: Sat, 10 Sep 2005 20:15:47 -0400

Hi Jean,

    Got in touch with Eric Auer over at FreeDOS and his suggestion was to
use _farpeekb or DPMI access.

http://www.delorie.com/djgpp/doc/libc-2.02/libc_270.html

or

http://www.delorie.com/djgpp/doc/libc-2.02/libc_8.html

    _farpeekb seems a lot simpler.  If I am reading your code correctly
(50/50 chance of that), and recall the compiler error message it appears
there is only one line in mem_chunk -- mmp=mmap(0, mmoffset+len, PROT_READ,
MAP_SHARED, fd, base-mmoffset); that needs to be changed, unfortunately
_farpeekb takes a different number of arguements, so where to start? :S
    So close, yet so far.

Ian


-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Jean Delvare
Sent: Saturday, September 10, 2005 5:19 PM
To: address@hidden
Subject: Re: [dmidecode] dmidecode for DOS?

Hi Ian,

[Ian Anderson]
> This may seem like a strange request in this day and age, but is it 
> possible to compile dmidecode so that it will run under DOS?

Compiling it shouldn't be too hard, as I paid much attention to having a
very clean and standard-compliant code. The problem is that running it will
fail because there is no /dev/mem file nor equivalent under DOS.

So, in order to get dmidecode to run on DOS, one would need to rewrite the
mem_chunk() function in util.c to use a different memory access method. I
separated the code in such a way that only this function should need to be
modified. I'd guess this can be done relatively easily in real mode by just
doing a direct access to the memory and copying data to a buffer. However,
I've never written C code for DOS so I don't really know how to do that,
sorry.

> I have a DJGPP enviroment set up and did a quick, unsuccessful compile 
> of it.  I am not a C programmer, so I will need help, if this is 
> possible at all.

This is certainly possible, modulo my comments above. If you post the errors
you have, maybe we will be able to help you, but this is most certainly a
generic Unix C -> DJGPP issue, so someone with DJGPP knowledge would
probably be more helpful.

--
Jean Delvare


_______________________________________________
http://lists.nongnu.org/mailman/listinfo/dmidecode-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]