1. RE: Bob, Slob, and Rob ...
- Posted by Bernie Ryan <xotron at localnet.com> Jul 29, 2001
- 390 views
mtsreborn_again at yahoo.com wrote: > > #define _get_xy(a,b,c,d,e) g_point.x = > (int)(((double)c*80)/((double)e!=0)?(double)e:0.0001)+(unsigned > short)a; g_point.y = > (int)(((double)d*80)/((double)e!=0)?(double)e:0.001)+(unsigned > short)b; > Why don't you just compile your routines in "C" but set your compiler to output a intermediate assembler file. Then use the assembler file to build routines that can be poked into memory and called from euphoria. Bernie
2. RE: Bob, Slob, and Rob ...
- Posted by mtsreborn_again at yahoo.com Jul 29, 2001
- 390 views
Good question. Now for the awnser; You can't do this because if you ask your C compiler to compile to an ASM file that is if you have teh chance your compiler can do that, what is emitted has to be hand-edited almost completely to change it to an asm.e acceptable format. This involves a lot of cutting pasting scrapping and pulling ASM code, and in the end you'd have being better off coding it in ASM by hand. And that's not why someone uses Euphoria; To code all his routines in ASM. Also, your routine will be slower in most cases even if it's in ASM, because ASM means call(), which than actually does the calling, so you have twice the calling overhead and there's no way you can say "I'm going to inline this ASM Code". Plus, it's not portable. Not just over hardware, but also over OS' and compiler. Don't let the Euphoria docs misguide you; In all the years Euphoria exists, not a single person has ever done this. It's possible, but not do-able. I guess Rob was just over-excited when he wrote that. Mike The Spike PS. Rob should just speed up the translator :p --- Bernie Ryan <xotron at localnet.com> wrote: > > > > accuracy of your credit report today! Click Here! > > > > > > > mtsreborn_again at yahoo.com wrote: > > > > > #define _get_xy(a,b,c,d,e) g_point.x = > > > (int)(((double)c*80)/((double)e!=0)?(double)e:0.0001)+(unsigned > > short)a; g_point.y = > > > (int)(((double)d*80)/((double)e!=0)?(double)e:0.001)+(unsigned > > short)b; > > > > Why don't you just compile your routines in "C" > but set your > compiler to output a intermediate assembler file. > Then use the assembler file to build routines that > can be poked > into memory and called from euphoria. > > Bernie > > > > > > > > > > > > > > > > > >