News:

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

Main Menu

Recent posts

#71
Assembly discussions / Re: Combining object files
Last post by Vortex - May 16, 2026, 10:07:19 PM
Hi Timo,

Thanks, it's all about practical programming. Right tool for the right job.
#72
Add-ins / Re: SelectLine
Last post by John Z - May 15, 2026, 05:53:57 PM
Well I guess idle for the moment - so here is a better version of SelectLine Add-in.  Version 2 will do both partial line selects and whole line select (when cursor is anywhere in the line).

Operation mode is user configured using Main Menu Tools, Options, Add-ins.
Select the add-in 'Click to select line', then click the Options button on the right.  Answer the dialog question, this will configure the select line mode.  Change anytime using the same procedure.  The mode is retained even when Pelles IDE is closed and reopened. 


Project sources attached, easy to build or use existing SelectLine.dll


John Z
#73
Assembly discussions / Re: Combining object files
Last post by TimoVJL - May 15, 2026, 11:19:54 AM
Hi Erol,

Basically a nice idea to avoid using msvcrt.dll in some projects with poasm.
#74
Assembly discussions / Re: Combining object files
Last post by Vortex - May 13, 2026, 03:35:06 PM
Hi Timo,

I guess you are referring to the duplicate symbols issue. Polink cannot link those combined object files. This is why I used MS Link. I think my example should be fine as it's a very simple one.
#75
Assembly discussions / Re: Combining object files
Last post by TimoVJL - May 13, 2026, 01:43:56 PM
Sadly have to say, that is a bad idea, as no COMDATs  :(
#76
Assembly discussions / Combining object files
Last post by Vortex - May 11, 2026, 09:45:46 PM
Ld, the GNU linker has an interesting feature, it can combine object files to create one monolithic object file. The example below combines StdOut.obj ( function to write to the console window ) and the dependency StrLen.obj ( string lenght calculator ) to output one file named Modules.obj

\PellesC\bin\poasm /AIA32 StrLen.asm

\PellesC\bin\poasm /AIA32 StdOut.asm

\PellesC\bin\poasm /AIA32 Sample.asm

C:\msys64\mingw32\i686-w64-mingw32\bin\ld -r -m i386pe -o Modules.obj StdOut.obj StrLen.obj

C:\Masm64\bin64\link /SUBSYSTEM:CONSOLE /LIBPATH:\PellesC\Lib\Win Sample.obj Modules.obj kernel32.lib user32.lib

#77
Expert questions / Re: Link error with minhook
Last post by John Z - May 11, 2026, 01:38:00 PM
Hi ander_cc,

Try this version of MiniHook.rc might work -

John Z
#78
Add-ins / Re: SelectLine
Last post by John Z - May 10, 2026, 12:51:20 PM
Minor update to build a version that always selects the entire line regardless of the cursor position in the line.  To build this way define ALWAYS_WHOLE before building.

Original build a cursor in the middle will select from the cursor to the EOL.
An ALWAYS_WHOLE build a cursor in the middle, or anywhere in the line, selects the entire line.

John Z

Newer source zip include below for version 2
#79
Assembly discussions / Re: Burst Sort sample
Last post by Vortex - May 10, 2026, 11:55:33 AM
Here is the 64-bit sample :

ExitProcess PROTO :QWORD
printf PROTO :QWORD,:VARARG
BurstSortStrings PROTO :QWORD,:QWORD,:QWORD

.data

s1      db 'lemon',0
s2      db 'apple',0
s3      db 'orange',0
s4      db 'banana',0
frmt    db '%s',13,10,0

strtabl dq OFFSET s1,OFFSET s2,OFFSET s3,OFFSET s4

.code

start:

    sub     rsp,8+4*8
    call    main
    invoke  ExitProcess,0

main PROC USES rsi rbx PARMAREA=4*SIZEOF QWORD

    invoke  BurstSortStrings,ADDR strtabl,4,0

    mov     rbx,4
    mov     rsi,OFFSET strtabl
@@:
    invoke  printf,ADDR frmt,QWORD PTR [rsi]
    add     rsi,SIZEOF QWORD
    dec     rbx
    jnz     @b
    ret

main ENDP

END start
#80
Announcements / Re: Version 14.10 is now avail...
Last post by CandCPlusPlus - May 07, 2026, 11:24:35 PM
Thank you for the new releases. That was fast.