News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#51
Announcements / Re: Release Candidate for vers...
Last post by Pelle - April 03, 2025, 12:12:34 PM
Quote from: Vortex on April 03, 2025, 11:15:53 AMKindly, could you mentioned about the amendments of the Poasm syntax? I think I will have to modify my Poasm source code archive.
Well, the thing is... it's not so much changed syntax as it is interpretation of the syntax.
The general idea is to find a more predictable internal format, where things not just happen by pure chance...

I think it's mainly about adding < and > in some places where it previously just "happened" to work without them. I also need to fix OPTION RIPRELATIVE handling for INVOKE.

I have collected many (old) X86 examples, but not so many X64 examples. If you have more (different) problems, please post them... (in a new bug thread)
#52
Announcements / Re: Release Candidate for vers...
Last post by Vortex - April 03, 2025, 11:15:53 AM
Hi Pelle,

It will be my homework to read the updated manual of Pelles C, no problem. Kindly, could you mention about the amendments of the Poasm syntax? I think I will have to modify my Poasm source code archive.
#53
Announcements / Re: Release Candidate for vers...
Last post by Pelle - April 03, 2025, 11:06:00 AM
Quote from: TimoVJL on April 03, 2025, 09:18:31 AMsomething have changed ?
Yes. Everything (in a sense). New MASM-mode specific expression format, only converted to the older/generic expression format after macro evaluations.

Looks like I can reproduce the problem. I will think about a fix...

EDIT:
This should be the correct form now:
MessageBox EQU <MessageBoxA>
I think some errors comes from the (late) addition of OPTION RIPRELATIVE ...


#54
Bug reports / Re: A Simple "Hello" can be a ...
Last post by Pelle - April 03, 2025, 10:37:51 AM
Hello Robert,

Thank you.

"Interesting" problem. In the comment on line 8, in <wow64apiset.h>, there is a typo: a garbage "tick" character with byte code 180. This looks too much like the beginning of a (broken) codepoint, causing a conversion from UTF-8 to UTF-16 to fail.

I will fix this.

#55
Announcements / Re: Release Candidate for vers...
Last post by TimoVJL - April 03, 2025, 09:18:31 AM
poasm 13
with INVOKE

error: Invalid use of 'MessageBox'.
MessageBoxA PROTO :QWORD,:QWORD,:QWORD,:DWORD
MessageBox EQU MessageBoxA
something have changed ?

error: Invalid address specification.
MessageBoxA PROTO :QWORD,:QWORD,:QWORD,:DWORD
MessageBox EQU <MessageBoxA>
#56
Bug reports / A Simple "Hello" can be a Fata...
Last post by Robert - April 03, 2025, 01:30:42 AM
Hi Pelle:

Thanks for the update.

Running
Pelles C 13.0.0 RC2
on
Windows 11 24H2

This code:

/****************************************************************************
 *                                                                          *
 * Filename: hello.c                                                        *
 *                                                                          *
 * Purpose : Standard C sample for Pelles C for Windows.                    *
 *                                                                          *
 * History : Date      Reason                                               *
 *           02-09-10  Created                                              *
 *                                                                          *
 ****************************************************************************/

#include <windows.h>
#include <stdio.h>

/* entry point */
int main(void)
{
    printf("Hello, world!\n");
    return 0;
}


Compiled with:

"C:\Program Files\PellesC\Bin\pocc.exe" /Gd /Go /MT /O2 /utf-8 /W2 /Ze /Zx /Tamd64-coff hello.c

Errors as:

Setting 64-bit environment for Pelles C...
Compiling "E:\T\hello.c" with Pelles C pocc.exe
C:\Program Files\PellesC\Include\Win\wow64apiset.h(1): fatal error #1065: Failed converting input from 'UTF-8'.
Linking ................
POLINK: fatal error: File not found: 'E:\T\hello.obj'.

The same hello.c code compiled without the /utf-8 option

"C:\Program Files\PellesC\Bin\pocc.exe" /Gd /Go /MT /O2 /W2 /Ze /Zx /Tamd64-coff hello.c

Errors as:

Setting 64-bit environment for Pelles C...
Compiling "E:\T\hello.c" with Pelles C pocc.exe
C:\Program Files\PellesC\Include\Win\wow64apiset.h(1): fatal error #1065: Failed converting input from 'ANSI'.
Linking ................
POLINK: fatal error: File not found: 'E:\T\hello.obj'.

If the C:\Program Files\PellesC\Include\Win\wow64apiset.h file is loaded into an editor and saved in UTF-8 No BOM format, then there is no error compiling with the /utf-8 option.

#57
Announcements / Re: Release Candidate for vers...
Last post by Pelle - April 02, 2025, 10:05:46 PM
Quote from: MrBcx on April 02, 2025, 10:02:01 PMThat's more like it! 
I completed test building hundreds of apps, large and small, CLI, Desktop, and DLL and have encountered zero issues.
Thanks Pelle!
Great, Thanks!  :)
#58
Assembly discussions / Re: Saving a bitmap from handl...
Last post by Vortex - April 02, 2025, 10:03:35 PM
Hi Pelle,

Thanks, specifying the sizeof operator in the source files eliminated some error messages.

This updated source file reports :

E:\PellesC\sample>\PellesC\bin\poasm /AAMD64 SaveBmpFromHandle.asm
E:\PellesC\sample\SaveBmpFromHandle.asm(37): error: Invalid use of ','.
E:\PellesC\sample\SaveBmpFromHandle.asm(37): error: Invalid use of ','.
E:\PellesC\sample\SaveBmpFromHandle.inc(242): fatal error: Invalid use of ')'.

SaveBmpFromHandle.asm, Line 37 :

    coinvk  pPicture,IPicture,SaveAsFile,pStream,TRUE,ADDR BmpSize
This is a macro to execute COM methods, here the SaveAsFile method of the IPicture interface.

SaveBmpFromHandle.inc , Line 242 :

  attr=OPATTR(arg)
#59
Bug reports / Re: Issue with symbol defined ...
Last post by Pelle - April 02, 2025, 10:02:17 PM
I think this is OK as is.

The new (internal) expression format is "richer" in the sense that it can describe more "object" types.
The old generic object file expression format could (barely) handle names and strings, but couldn't really describe the result from f.e. CATSTR (as in this example). The result is more <literal> rhan name or "string".

I see the .echo directive as a debug aid, so displaying the result now as <something> seems more helpful than something or "something" or s-o-m-e-t-h-i-n-g or whatever.
#60
Announcements / Re: Release Candidate for vers...
Last post by MrBcx - April 02, 2025, 10:02:01 PM
Quote from: Pelle on April 02, 2025, 08:46:09 PM
Quote from: MrBcx on April 02, 2025, 04:37:01 PMConfirmed:
C:\PellesC\Include\Win\winbase.h(23): fatal error #1035: Can't find #include file <fileapifromapp.h>.
"...so you wanted <fileapifromapp.h> to be included in the Setup? Why didn't you say so...?"

Now in Release Candidate #2 (from the same place) ...


That's more like it! 

I completed test building hundreds of apps, large and small, CLI, Desktop, and DLL and have encountered zero issues.

Thanks Pelle!