1. help with C compiling for Euphoria


How do i compile the C code on http://openeuphoria.org/pastey/164.wc so i can call it as a DLL from Euphoria, on a wintel box?

useless

new topic     » topic index » view message » categorize

2. Re: help with C compiling for Euphoria

useless_ said...


How do i compile the C code on http://openeuphoria.org/pastey/164.wc so i can call it as a DLL from Euphoria, on a wintel box?

useless

That's for DOS; you simply cannot make real-mode function calls from protected-mode Windows.

You would have to use the Windows API; MSDN ought to have it listed. (If you can find the relevant functions, you should be able to call them from Eu using c_func, etc, you wouldn't need a DLL)

I assume this is for the disk access thread? A bigger problem may be that you cannot (as far as I'm aware) tell Windows to ignore a partition that it recognizes (leading to corruption), and ones that it does not (e.g., ext3) it likes to pester you to format for no apparent reason..

(If you need direct disk access, btw, note also that its downright trivial on Linux)

new topic     » goto parent     » topic index » view message » categorize

3. Re: help with C compiling for Euphoria

CoJaBo2 said...

That's for DOS; you simply cannot make real-mode function calls from protected-mode Windows.

Ironically, the reverse is true: it is possible to make real-mode function calls from an MS-DOS app that call into protected-mode Windows. (This is done via fake cpu instructions called BOPs which communicate with NTVDM.)

http://sta.c64.org/blog/dosvddaccess.html

http://www.osronline.com/ddkx/other/vdd_24px.htm

new topic     » goto parent     » topic index » view message » categorize

4. Re: help with C compiling for Euphoria

eukat said...

How do i compile the C code on http://openeuphoria.org/pastey/164.wc so i can call it as a DLL from Euphoria, on a wintel box?

You can't, period. The closest you can get is to make a custom VDD (virtual device driver) and call that directly from a Windoze process, but that's miles away from calling code in a shared library.

It'd be easier to do everything (but the VDD itself, naturally) as an MS-DOS program - for a working example, see http://ww.japheth.de/Download/DOS/IDECHECK.zip (from http://www.masmforum.com/board/index.php?PHPSESSID=8d46cd4ecb1688be429ab49694ec53e6&topic=14801.0;wap2 )

If you really want to access the int13h results from a Windoze process, then the easiest way to do that is to make a simple MS-DOS program that runs the code in the pastey and writes the results to a file, and then have the Windoze program call the MS-DOS program and read the results from the file.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu