2 questions

Just starting out? Need help? Post your questions and find answers here.
dbellis
User
User
Posts: 10
Joined: Sun Jun 22, 2003 4:42 am

2 questions

Post 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
Codeng Makes Your Girl Friends Hate You ;)
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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)) .
SPAMINATOR NR.1
Wayne Diamond
User
User
Posts: 38
Joined: Tue Dec 30, 2003 1:37 pm
Location: Australia

Post 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 :)
dbellis
User
User
Posts: 10
Joined: Sun Jun 22, 2003 4:42 am

Post 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
Codeng Makes Your Girl Friends Hate You ;)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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:
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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 ) .
SPAMINATOR NR.1
Post Reply