News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#11
Assembly discussions / Re: Saving the volatile regist...
Last post by Vortex - Yesterday at 11:04:33 AM
Another example :

include SaveRegs.inc

SaveRegs MACRO

    mov     QWORD PTR [rbp],rcx
    mov     QWORD PTR [rbp+8],rdx
    mov     QWORD PTR [rbp+16],r8
    mov     QWORD PTR [rbp+24],r9

ENDM

.data

msg     db 'Hello!',0
msg2    db 'rcx,rdx,r8 and r9 are saved.',0
title   db 'MsgBox',0
title2  db 'Macro test',0

.code

start PROC PARMAREA=5*SIZEOF QWORD

;   Pass rsp to the procedure main

    invoke  main,ADDR msg2,ADDR title2,10,20,rsp

    invoke  ExitProcess,0

start ENDP


main PROC uses rbp r:QWORD,s:QWORD,t:QWORD,u:QWORD,_rsp:QWORD PARMAREA=4*SIZEOF QWORD

    mov     rbp,_rsp
    SaveRegs

    _r TEXTEQU <QWORD PTR [rbp]>
    _s TEXTEQU <QWORD PTR [rbp+8]>
    _t TEXTEQU <QWORD PTR [rbp+16]>
    _u TEXTEQU <QWORD PTR [rbp+24]>
   
    invoke  MessageBox,0,ADDR msg,ADDR title,0
   
;   The first call to MessageBox destroys rcx,rdx,r8 and r9

    invoke  MessageBox,0,_r,_s,0
   
    ret

main ENDP

END start
#12
Bug reports / Re: Creating resource with man...
Last post by John Z - March 21, 2026, 10:37:25 AM
Quote from: PaoloC13 on March 20, 2026, 11:24:53 AMIntel Celeron N4020 CPU @ 1.10GHz - RAM 4,00 GB
Windows 11 Vers. 23H2

I am amazed that this works - Win 11 23H2 with such limited resources!

John Z
#13
Bug reports / Re: Creating resource with man...
Last post by TimoVJL - March 20, 2026, 12:16:48 PM
Quote from: PaoloC13 on March 20, 2026, 11:24:53 AMIntel Celeron N4020 CPU @ 1.10GHz - RAM 4,00 GB
Windows 11 Vers. 23H2

Intel Core i7-7700HQ @ 2.80 GHz - RAM 16,0 GB
Windows 10 Vers. 22H2
Perhaps capable to test Pelles C v14 too.
#14
Bug reports / Re: Creating resource with man...
Last post by PaoloC13 - March 20, 2026, 11:24:53 AM
Intel Celeron N4020 CPU @ 1.10GHz - RAM 4,00 GB
Windows 11 Vers. 23H2

Intel Core i7-7700HQ @ 2.80 GHz - RAM 16,0 GB
Windows 10 Vers. 22H2
#15
Assembly discussions / Re: Saving the volatile regist...
Last post by Vortex - March 20, 2026, 10:01:17 AM
Here is another test :

include SaveRegs.inc

SaveRegs MACRO

    mov     QWORD PTR [rbx],rcx
    mov     QWORD PTR [rbx+8],rdx
    mov     QWORD PTR [rbx+16],r8
    mov     QWORD PTR [rbx+24],r9

ENDM

.data

msg     db 'Hello!',0
msg2    db 'rcx,rdx,r8 and r9 are saved.',0
title   db 'MsgBox',0
title2  db 'Macro test',0

.data?

mainRsp dq ?

.code

start PROC PARMAREA=5*SIZEOF QWORD

;   Pass rsp to the procedure main

    invoke  main,ADDR msg2,ADDR title2,10,20,rsp

    invoke  ExitProcess,0

start ENDP


main PROC uses rsi rdi rbx x:QWORD,y:QWORD,w:QWORD,z:QWORD,_rsp:QWORD PARMAREA=4*SIZEOF QWORD

    LOCAL   temp1:QWORD
    mov     temp1,10

    mov     rbx,_rsp
    SaveRegs

    xor     rsi,rsi
    mov     rdi,1

    invoke  MessageBox,0,ADDR msg,ADDR title,0
   
;   The first call to MessageBox destroys rcx,rdx,r8 and r9

    invoke  MessageBox,0,QWORD PTR [rbx],QWORD PTR [rbx+8],0
   
    ret

main ENDP

END start
#16
General discussion / Re: Compiling using pomake
Last post by John Z - March 19, 2026, 09:56:01 PM
I made bad assumption then.  Assumed the fail to complete was a cascade due to the sqlite3.C code compile fail....

John Z

Tested on known good program. Only .obj created confirming polink not working.  No error message just crickets...

#17
General discussion / Re: Compiling using pomake
Last post by Vortex - March 19, 2026, 08:16:52 PM
Hi Timo,

Quotepomake.exe v14 works with Windows 7 x64, and CPU without MOVBE

The other tools are :

poasm.exe
podump.exe
pope.exe
porc.exe
#18
General discussion / Re: Compiling using pomake
Last post by TimoVJL - March 19, 2026, 08:16:24 PM
No, polink.exe and polib.exe don't work.

EDIT:
with v14 pocc.exe and libs and v13 polink.exe and polib.exe
Zydis 4 dll and example worked.
TLPEView worked.

SQLite3 failed, illegal instruction (movbe)

EDIT:
In some tests i needs ide, so i use poide v13 to change project filesrsrc0009.dll version 13.00.1
support.dll version 13.00.0
fdiff.dll version 14.00.0
pofmt.dll version 13.00.0
porc.dll version 14.00.0
pobr.dll version 13.00.1
sqlite3.dll version 3390400
pocc.exe version 14.00.0
poasm.exe version 14.00.0
polink.exe version 13.00.1
idespawn.exe version 14.00.0
#19
General discussion / Re: Compiling using pomake
Last post by John Z - March 19, 2026, 08:09:57 PM
Great test Timo.

So that means pomake, pocc, polink, porc, are all 'ok' as far as the MOVBE is concerned.
I also tested poviewp and it was ok.

So it is likely that only poide is affected but points out we should test each po... tool.


John Z
#20
General discussion / Re: Compiling using pomake
Last post by TimoVJL - March 19, 2026, 05:59:04 PM
pomake.exe v14 works with Windows 7 x64, and CPU without MOVBE
SET PellesCDir=C:\code\PellesC14rc1
SET PATH=%PellesCDir%\bin
pomake.exe -F sqlite364_V14.ppj
sqlite3.c needs some modifications ?
..\sqlite3.c(126948): error #2168: Operands of '=' have incompatible types: 'char *' and 'const char *'.
..\sqlite3.c(132978): error #2082: Invalid initialization type; expected 'char *' but found 'const char *'.
POMAKE: fatal error: 'pocc.exe -Tx64-coff -std:C23 -Ot -Ob1 -fp:precise -W0 -Gz -Ze -J "..\sqlite3.c" -Fo"output64\sqlit
e3.obj"', exit code 1.
POLIB: fatal error: An internal error occurred.something to test with different CPUspolib.exe -machine:x86 -def:msvcrt.def -out:msvcrt.lib