Page 1 of 1

2 questions

Posted: Thu Jan 01, 2004 8:10 pm
by dbellis
i was woundering if i could use pb's inline asm support in other languages via a dll i.e. say i wanted

_Inline_Asm
Mov param,param
inc param
etc
_End_Inline_Asm

parse this into the dll then do the asm caculating in dll then return the result back into the other language.

and how would i parse that into the dll using the
_Inline_Asm as the start (were the parser starts from
_End_Inline_Asm as the end (were the parser stops)

any help is apericiated

Damian

Posted: Fri Jan 02, 2004 9:21 am
by Rings
Purebasic is a Compiler, not a interpreter.
Every calculations(including inline-asm) are converted to raw EXE-Code while compiling (PBCompiler->FASM->Linker-> EXE (or DLL)) .

Posted: Fri Jan 02, 2004 10:56 am
by Wayne Diamond
Purebasic is a Compiler, not a interpreter.
Actually Purebasic is a translater; it translates from PB source to assembly language (creating a .asm file from your .pb source). FASM is the actual assembler, and LCC the linker, or compiler if you like. But enough technicalities :)

Posted: Fri Jan 02, 2004 10:57 am
by dbellis
i mean i want to make a parser in pb that reads asm code from another app then the calculations are done in the dll then the result is passed back into the app if you get me.

Damian

Posted: Fri Jan 02, 2004 11:33 am
by Fred
Wayne Diamond wrote:
Purebasic is a Compiler, not a interpreter.
Actually Purebasic is a translater; it translates from PB source to assembly language (creating a .asm file from your .pb source). FASM is the actual assembler, and LCC the linker, or compiler if you like. But enough technicalities :)
Dunno if we can call GCC a translater too :wink:

Posted: Fri Jan 02, 2004 1:46 pm
by Rings
okay, i correct my self to answer the question :

Executables (Exe or DLL's) that are generated with Purebasic are running in a native mode.All Instructions have translated to asm and later to OpCode and bind together to a file. So You cannot parse later any asm-code , except you write a routine that temporary assemble the code and generate a DLL which you call (no easy task, but could work ) .