flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
Ali.Z 10 Apr 2025, 13:14
nope, 5-A = 5.10 which != to 5.1.
_________________ Asm For Wise Humans |
|||
![]() |
|
Mat-Quasar 10 Apr 2025, 13:18
Ali.Z wrote: nope, 5-A = 5.10 which != to 5.1. Never knew that in FASM, need to set to: Code: format PE GUI 5.01 Now works, but Win95 look. Thanks. |
|||
![]() |
|
Mat-Quasar 10 Apr 2025, 14:58
Thanks a for your detailed analysis, now I know FASM treats version 5.1 as 5.10. No wonder.
|
|||
![]() |
|
a 10 Apr 2025, 15:00
if you compile this:
Code: format PE GUI 5.1 however if you compile this instead: Code: format PE GUI 5.01 this is because fasm treats "5.1" as "5.10", I guess that makes sense but then why it doesn't want to support a 5.001? According to: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format (look at "MinorSubsystemVersion") https://upload.wikimedia.org/wikipedia/commons/1/1b/Portable_Executable_32_bit_Structure_in_SVG_fixed.svg it allows it to go up to a 65535, but if there is a limit in fasm then why not limit it to a 1 digit instead? Why 2? Not sure why Tomasz chose 2 digits. Last edited by a on 10 Apr 2025, 15:07; edited 3 times in total |
|||
![]() |
|
a 10 Apr 2025, 15:03
Mat-Quasar wrote: Thanks a for your detailed analysis, now I know FASM treats version 5.1 as 5.10. No wonder. I have deleted the original comment, However I posted a new one |
|||
![]() |
|
Tomasz Grysztar 10 Apr 2025, 15:06
The two-digit interpretation was chosen to make "3.1" be converted into 3 and 10 values, as this is how it was done at the time of NT 3.1 and initial releases of PE support (and there was also 3.11, encoded as you'd expect). This backfired when "5.1" followed a different convention, but fasm stuck to the old one.
|
|||
![]() |
|
a 10 Apr 2025, 15:25
Tomasz Grysztar wrote: The two-digit interpretation was chosen to make "3.1" be converted into 3 and 10 values, as this is how it was done at the time of NT 3.1 and initial releases of PE support (and there was also 3.11, encoded as you'd expect). This backfired when "5.1" followed a different convention, but fasm stuck to the old one. I see, I know that fasm is 26 years old (1999) so it does makes sense. Although it would be nice to specify this info in the https://flatassembler.net/docs.php?article=win32 or in the https://flatassembler.net/docs.php?article=manual |
|||
![]() |
|
macomics 10 Apr 2025, 15:33
Considering that new exe files are no longer created under Windows 3.1, then it may be worth changing the default interpretation mode to that adopted in XP.
For Windows 3.1, you can do a separate processing so that the record does not change. |
|||
![]() |
|
a 10 Apr 2025, 15:57
macomics wrote: For Windows 3.1, you can do a separate processing so that the record does not change. So if it is "format PE GUI 3.1" then it will be dw 3 dw 10 ? And if it is "format PE GUI 5.1" then it will be dw 5 dw 1 ? That sounds like a nice idea, it will work just like in the official convention. It can also treat "5.1" and "5.01" as the same number in order to let the older assembler files to compile in new fasm versions |
|||
![]() |
|
Tomasz Grysztar 10 Apr 2025, 17:30
fasm 2 already uses the new convention for all cases, it's where I'm more inclined to make slight compatibility changes like this one.
|
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.