Hi,

Today is a great day of the symbian port =) I also solved my other
problem. I learned how to use the .a files. They should be added on
the ld command line together with the other .o files, and not as lib
files.

So, here is the same program using the .a archives from DevC++:

Compile script:

C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\as hello.s -o hello.o
C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\ld.exe --entry=_E32EXE
-o hello.exe hello.o C:\Programas\Dev-Cpp\lib\libkernel32.a
C:\Programas\Dev-Cpp\lib\libuser32.a

Code:

/* Hello world to create a symbian os executable on assembler */

        .file   "hello.s"
        .text
        /* Variables */
mymessage:
        .ascii  "My Message\000"

        /* Entry point for Symbian OS executables */
        .globl _E32EXE
_E32EXE:
        /* Entry point for MS Windows */
        .globl main
main:
        /* Entry point for GCC */
        .globl [EMAIL PROTECTED]
[EMAIL PROTECTED]:
        MOV   $0, %EAX
        PUSH    %EAX
        MOV     $mymessage, %EAX
        PUSH  %EAX
        MOV   $0, %EAX
        PUSH    %EAX
        PUSH  %EAX
        CALL    [EMAIL PROTECTED]
        MOV   $0, %EAX
        PUSH  %EAX
        CALL    [EMAIL PROTECTED]
        LEAVE
        RET
        NOP
        NOP
_______________________________________________
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to