I tried the examples and they are working well.
But my game does not compile anymore...
I get the following:
------------------------------------------------
18380 lines processed.
Creating the executable.
gcc: purebasic.o: Datei oder Verzeichnis nicht gefunden
- Feel the ..PuRe.. Power -
sh: line 1: ./purebasic.exe: Datei oder Verzeichnis nicht gefunden
markus@localhost:~/laby>
---------------------------------------------
The number of lines seems a bit too high.
I get no other error messages.
gcc error
It's the generated code which is faulty. You can compile your source with the '-c' argument like this:
pbcompiler -c yoursource.pb
Then you will have the commented assembly code in your current directory. just type this:
fasm purebasic.asm dummy.o
And it should output an error. Could you tell me which one ?
Thank you,
Fred.
pbcompiler -c yoursource.pb
Then you will have the commented assembly code in your current directory. just type this:
fasm purebasic.asm dummy.o
And it should output an error. Could you tell me which one ?
Thank you,
Fred.
Okay, I did this and I get the following:
----------------------------------------------------------------------
markus@localhost:~/laby> fasm purebasic.asm dummy.o
flat assembler version 1.45 beta 2
purebasic.asm [80214]:
MOVSX dword [PB_StringBase],word [ebp+4]
error: invalid operand.
markus@localhost:~/laby>
------------------------------------------------------------------------
I have no idea what it means.
----------------------------------------------------------------------
markus@localhost:~/laby> fasm purebasic.asm dummy.o
flat assembler version 1.45 beta 2
purebasic.asm [80214]:
MOVSX dword [PB_StringBase],word [ebp+4]
error: invalid operand.
markus@localhost:~/laby>
------------------------------------------------------------------------
I have no idea what it means.
I tell you, there's something serioulsly wrong with the PB3.91 compiler. The code below is tested on the WIN version, but the compiler should output almost identical ASM for both Linux and WIN for the expressions in the code.
For this code i get this Assembly error:
Code: Select all
Dim a.b(255)
Dim b.b(255)
y = a(255 - b(x & $ff) & $ff) ; This line makes the compiler choke
Funny, i don't even use the string base (i.e. no string or function that returns a string in the expression) why would the compiler output ASM like this?flat assembler version 1.47
PureBasic.asm [104]:
MOVSX dword [PB_StringBase],byte [ebp+edi]
error: invalid operand.
Okay here is the part something is wrong with:
(Maybe the statement is too complex. I will test that)
; If monster(labyrinth(spieler(akt_spieler) \character_x + spell_x, spieler(akt_spieler) \character_y + spell_y) \objekt) \art = 1
PUSH ebp
MOVSX ebx,byte [v_akt_spieler]
MOV ebp,dword [a_spieler]
IMUL ebx,98
ADD ebp,ebx
MOVSX edi,word [ebp+94]
MOVSX eax,word [v_spell_x]
ADD edi,eax
MOV edx,[a_labyrinth+4]
IMUL edx,edi
POP ebp
MOV ebp,edx
PUSH ebp
MOVSX esi,byte [v_akt_spieler]
MOV ebp,dword [a_spieler]
IMUL esi,98
ADD ebp,esi
MOVSX edi,word [ebp+96]
MOVSX eax,word [v_spell_y]
ADD edi,eax
MOV eax,edi
POP ebp
ADD ebp,eax
IMUL ebp,6
ADD ebp,dword [a_labyrinth]
MOVSX dword [PB_StringBase],word [ebp+4] <-------
MOV ebp,dword [a_monster]
IMUL dword [PB_StringBase],27
ADD ebp,dword [PB_StringBase]
MOVSX dword [PB_StringBase],byte [ebp+10]
CMP dword [PB_StringBase],1
JNE _EndIf2792
[/b]
(Maybe the statement is too complex. I will test that)
; If monster(labyrinth(spieler(akt_spieler) \character_x + spell_x, spieler(akt_spieler) \character_y + spell_y) \objekt) \art = 1
PUSH ebp
MOVSX ebx,byte [v_akt_spieler]
MOV ebp,dword [a_spieler]
IMUL ebx,98
ADD ebp,ebx
MOVSX edi,word [ebp+94]
MOVSX eax,word [v_spell_x]
ADD edi,eax
MOV edx,[a_labyrinth+4]
IMUL edx,edi
POP ebp
MOV ebp,edx
PUSH ebp
MOVSX esi,byte [v_akt_spieler]
MOV ebp,dword [a_spieler]
IMUL esi,98
ADD ebp,esi
MOVSX edi,word [ebp+96]
MOVSX eax,word [v_spell_y]
ADD edi,eax
MOV eax,edi
POP ebp
ADD ebp,eax
IMUL ebp,6
ADD ebp,dword [a_labyrinth]
MOVSX dword [PB_StringBase],word [ebp+4] <-------
MOV ebp,dword [a_monster]
IMUL dword [PB_StringBase],27
ADD ebp,dword [PB_StringBase]
MOVSX dword [PB_StringBase],byte [ebp+10]
CMP dword [PB_StringBase],1
JNE _EndIf2792
[/b]

