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?
User Libraries
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.
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.

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...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.
http://perso.wanadoo.fr/mr.skunk/
With this assembler file
and this descriptor file
I get this error message
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...
Code: Select all
section '.text' code readable executable
CMP eax,0
JNS ende
NEG eax
ende:
RET
Code: Select all
ASM
0
OBJ
0
Test
AbsI, Long
Long
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)?Line 7: AbsI: no debugger routine
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...
