How to call PureBasic procedures using assembly
Posted: Fri Jan 11, 2013 10:48 am
Hi everyone, I'm in the process of learning assembly and I'm stuck when trying to call a purebasic procedure using CALL.
I checked the ASM output generated by the compiler and I see all the function used are declared with the extrn keyword and prefixed with _PB_, but when I try to reproduce the same code, I get a polink error of unresolved external symbol (?) for every procedure.
I'm doing this since I want to go low level as much as possible, but at least have to open up a console and print out some strings. So I would like to be able to call the OpenConsole, Print and Input at least...
For example this is the compiler generated asm for the OpenConsole
Any clues?
Thanks
I checked the ASM output generated by the compiler and I see all the function used are declared with the extrn keyword and prefixed with _PB_, but when I try to reproduce the same code, I get a polink error of unresolved external symbol (?) for every procedure.
I'm doing this since I want to go low level as much as possible, but at least have to open up a console and print out some strings. So I would like to be able to call the OpenConsole, Print and Input at least...
For example this is the compiler generated asm for the OpenConsole
Code: Select all
extrn _PB_OpenConsole@0
...
; OpenConsole()
CALL _PB_OpenConsole@0
Any clues?
Thanks