Low level euphoria

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

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C315C2.4DBBD520
	charset="iso-8859-1"

Dear Rob,

I'm a very happy euphoria programmer, and I was thinking how much =
happier I would be if I could pass parameters strait to asm, and asm =
could pass params strait back. Now I know this is very similar(if not =
the same thing as c_func/c_proc/call_back) to what is available, but I'm =
a dos programmer mainly, and while I understand C and can use it well, I =
don't want to(make some kind of dos-dll system). I would very much =
apprecitive if the c_func/c_proc/call_back could be extended/combined =
with call(for asm) so I could say(do the below), I like call_back the =
way it is, but I think it should be extended to dos also(PLEASE) =
although this may require making alot of the euphoria interpreter =
reerrant(which may be more work than I relise), but the =
asm_func/asm_proc/asm_define_func/asm_define_proc should be very easy. =
Another reason for all of this is because one major things I've noticed =
is that when(In dos) I call an asm with atoms(not integer, i mean =
floating P's) the atom_to_float32/64 is very slow compared to win32's =
c_func with C_DOUBLE/C_FLOAT params, and thats probably somthing to do =
with the calling process being all builtin and not jumping back and =
forth between builtin and eu code(atom_to_float32, then poke, then call, =
then peek4, then float32_to_atom()).
I do think that a good programmer can get around the no call_back in =
dos(I have, but I wish I didn't have to) but I think the rest is way =
more needed. I hope you can see what I mean. Do keep the existing =
constructs, they have there purpose but these are more specialized for =
asm(which is all about being fast and simple, like euphoria).

Thank you very much for euphoria(I think I speak for everyone)
Daniel Kluss

<<<<<<<<<<<<<<<<<<<<<<
constant=20
func1_asm=3Dcompile_asm("pusha\n have fun\n popa\n push val1\n ret\n"),
func1_mem=3Dallocate(length(func1)),
proc1_asm=3Dcompile_asm("pusha\n have fun\n popa\n ret\n"),
proc1_mem=3Dallocate(length(proc1))

poke(func1_mem,func1_asm)
poke(proc1_mem,proc1_asm)
constant
func1=3Ddefine_asm_func(func1_mem,{C_INT,C_DOUBLE,,,,,},C_INT),
proc1=3Ddefine_asm_proc(proc1_mem,{C_FLOAT,C_UINT,,,},C_POINTER),
a=3D1,b=3D4.5,c=3D8.1,d=3D#FFFFFFFF

? asm_func(func1,{a,b})
asm_proc(proc1,{c,d})
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Saythankyoubeforeaskingforsomething
------=_NextPart_000_0005_01C315C2.4DBBD520
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Dear Rob,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm a very happy euphoria programmer, =
and I was=20
thinking how much happier I would be if I could pass parameters strait =
to asm,=20
and asm could pass params strait back. Now I know this is very =
similar(if not=20
the same thing as c_func/c_proc/call_back)&nbsp;to what is available, =
but I'm a=20
dos programmer mainly, and while I understand C and can use it well, I =
don't=20
want to(make some kind of dos-dll system). I would very much apprecitive =
if the=20
c_func/c_proc/call_back could be extended/combined with call(for asm) so =
I could=20
say(do the below), I like call_back the way it is, but I think it should =
be=20
extended to dos also(PLEASE) although this may require making alot of =
the=20
euphoria interpreter reerrant(which may be more work than I relise), but =
the=20
asm_func/asm_proc/asm_define_func/asm_define_proc should be very easy. =
Another=20
reason for all of this is because one major things I've noticed is that =
when(In=20
dos) I call an asm with atoms(not integer, i mean floating P's) the=20
atom_to_float32/64 is very slow compared to win32's c_func with =
C_DOUBLE/C_FLOAT=20
params, and thats probably somthing to do with the calling process being =

all&nbsp;builtin and not jumping back and forth between builtin and eu=20
code(atom_to_float32, then poke, then call, then peek4, then=20
float32_to_atom()).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I do think that a good programmer can =
get around=20
the no call_back in dos(I have, but I wish I didn't have to) but I think =
the=20
rest&nbsp;is way more needed. </FONT><FONT face=3DArial size=3D2>I hope =
you can see=20
what I mean. Do keep the existing constructs, they have there purpose =
but these=20
are more specialized for asm(which&nbsp;is all about being fast and =
simple, like=20
euphoria).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you very much for euphoria(I =
think I speak=20
for everyone)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Daniel Kluss</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;=
&lt;&lt;&lt;&lt;&lt;&lt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>constant </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>func1_asm=3Dcompile_asm("pusha\n have =
fun\n popa\n=20
push val1\n ret\n"),</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial =
size=3D2>func1_mem=3Dallocate(length(func1)),</FONT></DIV>
<DIV>proc1_asm=3Dcompile_asm("pusha\n have fun\n popa\n ret\n"),</DIV>
<DIV>proc1_mem=3Dallocate(length(proc1))</DIV>
<DIV>&nbsp;</DIV>
<DIV>poke(func1_mem,func1_asm)</DIV>
<DIV>poke(proc1_mem,proc1_asm)</DIV>
<DIV>constant</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>func1=3D</FONT><FONT face=3DArial=20
size=3D2>define_asm_func(func1_mem,{C_INT,C_DOUBLE,,,,,},C_INT),</FONT></=
DIV>
<DIV><FONT face=3DArial=20
size=3D2>proc1=3Ddefine_asm_proc(proc1_mem,{C_FLOAT,C_UINT,,,},C_POINTER)=
,</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>a=3D1,b=3D4.5,c=3D8.1,d=3D#FFFFFFFF</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>? asm_func(func1,{a,b})</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>asm_proc(proc1,{c,d})</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;=
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&=
lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</FONT></DIV>
<DIV><FONT face=3DArial=20

------=_NextPart_000_0005_01C315C2.4DBBD520--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu