News:

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

Main Menu

Recent posts

#11
User contributions / Re: SMBIOS info
Last post by John Z - June 21, 2026, 10:55:34 PM
Thanks Pelle,

Very informative.  I had no idea that 5GigHz was the max turbo speed of my 'travel laptop'. 
Windows only reports the leisurely 1.7GHz.

A very tiny, partial sample, of one of the output sections of the program to spark interest.
Processor Information (Type 4)
Type............................: 4
Length..........................: 48
Handle..........................: 4
Socket Designation..............: 1 => "U3E1"
Processor Type..................: 3 => 'Central Processor'
Processor Family................: 198 => 'Intel(R) Core(TM) i7 processor'
Processor Manufacturer..........: 2 => "Intel(R) Corporation"
Processor ID....................: 0xbfebfbff000b06a3
Processor Version...............: 3 => "13th Gen Intel(R) Core(TM) i7-1355U"
Voltage.........................: 0b10001010
External Clock..................: 100 MHz
Max Speed.......................: 5000 MHz
Current Speed...................: 4257 MHz
Status..........................: 0b1000001
Processor Upgrade...............: 65 => 'Socket BGA1744'
Best to direct the prodigious output to a text file for easy viewing. smbios.exe > HP_Bios.txt

John Z
#12
User contributions / Re: SMBIOS info
Last post by Pelle - June 21, 2026, 08:52:37 PM
Thanks. Maybe it can lead to something more, some day.
#13
User contributions / Re: SMBIOS info
Last post by Vortex - June 19, 2026, 09:37:59 PM
Hi Pelle,

Nice addition to the toolbox of Pelles C coders, thanks.
#14
User contributions / SMBIOS info
Last post by Pelle - June 18, 2026, 10:21:11 PM
Nothing fancy, just a program I wrote last year to dump info about my BIOS settings (to the console).
Incomplete in many ways. Maybe useful to someone...?
#15
Assembly discussions / Re: Combining object files
Last post by Pelle - June 18, 2026, 08:37:54 PM
OK. I still don't see the point in having a tool that combines object files, but never mind. Not important.
#16
Assembly discussions / Re: Variadic functions
Last post by Vortex - June 14, 2026, 09:46:07 PM
Simple printf emulator using only the bare percentage symbol to represent strings :

.386
.model flat,stdcall
option casemap:none

includelib \PellesC\lib\Win\kernel32.lib
includelib \PellesC\lib\Win\user32.lib

ExitProcess PROTO :DWORD

printfX PROTO C format:DWORD,args:VARARG

.data

format1 db 'This is a % % to % %',0
str1    db 'printfX',0
str2    db 'demo',0
str3    db 'type',0
str4    db 'strings.',0

.code

start:

    invoke   printfX,ADDR format1,
             ADDR str1,ADDR str2,
             ADDR str3,ADDR str4
             
    invoke   ExitProcess,0

END start
#17
Assembly discussions / Re: Combining object files
Last post by Vortex - June 14, 2026, 09:43:31 PM
Hi Pelle,

The purpose of merging object modules is to provide only one monolytic object file to the linker. Nothing fancy. As you said, it's preferable to create a static library.
#18
Assembly discussions / Re: Combining object files
Last post by Pelle - June 14, 2026, 09:31:20 PM
but... when is this useful??

I can only think of two things to do with an object file:
1) pass it to the linker
2) put in in a library/archive, and pass that to the linker

I mean, normally you have the source code, and anything of importance that needs to change in the object file is better handled by editing the source code and rebuild.
If you don't have the source code, well... disregarding any legal issues, if you don't known exactly what you are doing, random changes will probably cause more harm than good (and don't expect tools at this level to warn you much).
#19
Bug reports / Re: Segmentation fault with se...
Last post by Pelle - June 14, 2026, 09:17:16 PM
As suggested by TimoVJL,
replacing
malloc(...)with
aligned_alloc(16, ...)works for me...
#20
Bug reports / Re: Calling cc with CreateProc...
Last post by Pelle - June 14, 2026, 09:13:32 PM
Thomas, I have already spent a fair amount of time investigating this problem. I'm still looking for a proper solution. This is going to take some time...