Re: ASM Help
- Posted by Mike The Spike <mtsreborn at yahoo.com> Mar 22, 2001
- 466 views
> Matt Lewis writes: > > I wrote a little DLL (63K compressed) in VC that > > will call the funcs by pointer, taking up to 10 > arguments. > > Rob, I'd like to add this to the wishlist: call > > functions by pointer. > > Can't you use VC to disassemble, or generate an > assembly listing of your .dll? Then you could > poke the bytes of code into your Euphoria program, > and eliminate the need for the .dll. Alternatively, > you could get the address of the start of the dll > routine, > using '&' in C, and write the first 100 bytes or so > to a file. *ahem* Err... Rob? That's like, impossible ya know? It seems as if this is possible at first, but you're only making a fool out of yourself keeping those instructions in Eu's docs... Why? Because if I have a routine that does this; int crap; void doit() { crap = 1; } void showit() { printf("%d",crap); } main() { doit(); showit(); } Then if you're going to 'download' routine 'showit' from memory, and poke it somewhere else, and then call it, it's gonna cause an error because 'crap' hasn't being initialised yet. This is a simple example, but in reality it's all more complex than this, and doing what your propose, is going to leave you with a bunch of machine codes, acting upon data that just isn't there! Mike The Spike > I'm reluctant to add a feature > that only one person has asked for, > and even he doesn't really need it. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > >