1. crazy stuff.

does anyone know how i can run a program through euphoria in the
following situation:

need to run a '.exe' program which is written in c++ and somehow i need
to poke the machine-code equivalent of this program into memory and run
it using call() and also run some of the seperate procedures in the
machine code of the program from euphoria.

IS IT POSSABLE?????

PS: how do you mix sounds together? do you take the average of all the
sound data bytes??

--Mark Honnor;
--------------

new topic     » topic index » view message » categorize

2. Re: crazy stuff.

> need to run a '.exe' program which is written in c++ and somehow i need
> to poke the machine-code equivalent of this program into memory and run
> it using call() and also run some of the seperate procedures in the
> machine code of the program from euphoria.

yes you could do this
integer fn, addr
object tempo
sequence data

data = {}
fn = open("blah.exe", "rb")
tempo = gets(fn)
while sequence(tempo) do
  data = data & tempo
  tempo = gets(fn)
end while
addr = allocate(length(data))
poke(addr, data)
call(addr)

something like that?  although i would personally do a system()

> PS: how do you mix sounds together? do you take the average of all the
> sound data bytes??

add them


------------
Mike Burrell
http://www.geocities.com/SoHo/9036
mikpos at hempseed.com

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

3. Re: crazy stuff.

Mike Burrell wrote:

> > need to run a '.exe' program which is written in c++ and somehow i
> need
> > to poke the machine-code equivalent of this program into memory and
> run
> > it using call() and also run some of the seperate procedures in the
> > machine code of the program from euphoria.

Compile it again to a .com file, unlike .EXE they only contain the
machine executable data (and are therefor limited to 64k i believe). A
.EXE file contains multiple sections and a lot of other really
complicated stuff, if you want i can give you a file-spec...

> yes you could do this

(mentioning the code i cut out of this mail)    No, you can *not* do
this..., this does work with .COM files, but not with .EXE files.

    If you want to be able to call procedures and functions, you need to
know a lot of stuff (what there position is & how the parameters are
stored). BTW I have a file-spec for the .LIB format, if somebody
volunteers to code a include file that can call routines from .LIB files
??
    You can offcourse communicate using environment variables, or using
memory and having an interrupt that return the memory addres. Depends on
how you want the communication with your c++ program.

> > PS: how do you mix sounds together? do you take the average of all
> the
> > sound data bytes??
>
> add them

    Really cool, maybe SFX 3 can have real-time effects and edition
capabilities ??

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

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

Search



Quick Links

User menu

Not signed in.

Misc Menu