Questions about Euphoria and ASM/machine

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

Hello,

I've been playing around with the call() function and the mini-assembler stuff from the archive. I've had some great results and have been able to code some graphics functions with speeds way faster than I thought possible. I do however have a few questions that I was hoping someone might be able to help me out with. Forgive me for being overly curious hopefully I'm not too much of a bother. If someone can point me in the right direction I can do my own research, unfortunately I don't know which direction to look at the moment. I'll start with the question I'm pretty sure is the stupidest first:

1) When I call() some machine code that will take a long time lets say it tries to find all the prime numbers from 1 to 1e8 with some inefficient method -- will the processor be unable to do anything else until the code finishes? Or do the mysteries of the Windows OS and threads and the like keep the other tasks on the computer running without me doing anything special.

1a) Does multi-core vs single-core have an affect on this?

1b) If it does lock the processor up, what are the common options for resolving the issue? Having the code "ret" every now and then?

Forgive me for any ignorance or stupidity in the above questions, if those haven't put you off, I have a couple more.

2) Is there an easy-ish way for me to allocate memory from inside the machine code. I understand there are standard libraries that can give me malloc, but I was wondering if I couldn't use whatever euphoria is using. In machine.e the allocate() function calls machine_proc() with a value of 16. Is that something I could trigger from the machine code?

3) Speaking of triggering euphoria functions, could someone point me in the direction of the documentation that might help me unravel the representation of euphoria variable and procedures in memory. (Sorry that last sentence was a handful). This is open information now, right? So how do I go about being inducted into the mysteries?

Thank you for your help in satiating my curiosity, Damien

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

Search



Quick Links

User menu

Not signed in.

Misc Menu