RE: Asmfunc

new topic     » topic index » view thread      » older message » newer message

Daniel,

This can be done using fptr.e (check the archives or my page
www14.brinkster.com/matthewlewis/projects.html).  It should work for DOS,
though you'll need to comment out the calls to callback(), of course.  It
doesn't support floating point arguments, though you could probably get
around that (if they are passed on the stack).

Matt Lewis 

-----Original Message-----
From: xerox_irs at lvcm.com [mailto:xerox_irs at lvcm.com]


Dear Rob Craig,

I think the only thing nessesary to do is make small modifications to,
define_c_func, and define_c_proc. the same c_func and c_proc could be used,
just like you added support for different calling conventions in c, but just
add support to define_c_func. like such. the asm could use stdcall. This not
only for dos, but for all operating systems.

---------------beware hard hat area, euphoria code
below!!!!-----------------
include asm.e
include dll.e

constant mem_address_of_asm=get_asm(
"pop eax \n"&--load param
"pop ebx \n"&--load param
"ret \n")

my_asm_func=define_c_func("",mem_address_of_asm,{C_POINTER,C_FLOAT,,,,,},C_I
NT)
my_asm_proc=define_c_func("",mem_address_of_asm,{C_POINTER,C_FLOAT,,,,,})

? c_func(my_asm_func,{12,1231.22,,,,})
c_proc(my_asm_func,{12,1231.22,,,,})

------------------------<end of the code>---------------------
then "" in define_c_XXXX symbolizes no dll name, thus asm, the mem_address
to call goes in the routine in spot, and the rest is normal, actually as if
we were dynamically loading a c's dll and called that way, but the asm
belongs to the program, not a dll you see?
bwt: I don't remember how to std_call in asm anymore, so you may not want to
use my example verbatim.
I realise there are alot of requests that you get, while in my opinion this
would be easy, i dont really know, this improvement would IMENSLY help me in
my projects that i'm working on, and I have considerd to pay you to put this
as a high priority, im not a rich person(by any strech) but i would give
what i can to see this done quickly, you tell me how much.

Thank you
Daniel Kluss

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu