Page 1 of 1
User Libraries
Posted: Thu Oct 21, 2004 10:33 pm
by Thomas
How do I create my own commands (user lib) in assembler? I tried to understand the readme.txt in the Library SDK directory but failed.
A simple example with a step by step description would be helpful.
Is there a tutorial for that somewhere?
Posted: Fri Oct 22, 2004 12:03 am
by wcardoso
Why don't use the El_Choni's utility "TailBite" ?. With it you can write libraries in PureBasic code !

Posted: Fri Oct 22, 2004 9:03 am
by Thomas
But I want to use assembler.

Posted: Fri Oct 22, 2004 9:16 am
by Moonshine
Purebasic compiles to ASM, which is how Tailbite makes the libs. So essentially youre cutting out the middle man using PB, and you can still hand optimize the PB code with inline ASM.
Posted: Fri Oct 22, 2004 11:51 am
by jack
there are some libs written in asm with sourcecode that you can download
from
http://www.purearea.net/ in the libs section.
get
SpriteEx its a recent lib written in Fasm, all source included,
also get
MathExtras this lib is written in nasm.
by the way, libs written in nasm work just fine with all windows versions of PB.
you will probably need to change the bat file used to compile this libs
to reflect the paths in your system, also you may need to install nasm.
give this libs a try, and if you run into problems let me know and i will
try to help.

Posted: Fri Oct 22, 2004 2:38 pm
by Paul
Moonshine wrote:Purebasic compiles to ASM, which is how Tailbite makes the libs. So essentially youre cutting out the middle man using PB, and you can still hand optimize the PB code with inline ASM.
TailBite/PB does not produce the optimized ASM code you would get by doing it by hand. Mr.Skunk wrote a tutorial quite a long time ago on writting ASM libs for PB which might help...
http://perso.wanadoo.fr/mr.skunk/
Posted: Fri Oct 22, 2004 4:58 pm
by Thomas
With this assembler file
Code: Select all
section '.text' code readable executable
CMP eax,0
JNS ende
NEG eax
ende:
RET
and this descriptor file
I get this error message
Line 7: AbsI: no debugger routine
Why do you need a debugger routine? The same reason you need a help directory even if you don't need a help directory (named it 'Test' here)?
The documentation for this is far from being user friendly.
Why can't PB compile into .obj files and create user libs right from the PB editor? Should not be too difficult to achieve...
