Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Segment attributes cannot change

Started by kkurkiewicz, August 15, 2022, 04:41:45 AM

Previous topic - Next topic


Quote from: kkurkiewicz on August 15, 2022, 04:41:45 AM
Could you please explain to me why ml thinks that I'm trying to reopen the segments instead of just opening them, or, if it's normal, when they were opened originally?

AFAICS, noone really answered your question - instead, you had to swallow a lot of propaganda about what's "modern".

Your segment definitions "reopened" the segments because the .model directive at the top of your program defines - under the hood - two segments: _TEXT and _DATA with certain attributes, and those atributes cannot be changed later.
What attributes are actually used depends on the .model that is defined and also to some degree on the cpu directive (.386, .486, .586,...). If you feed masm with the -Fl option, it will generate a listing, where you can see what segment attributes masm has actually used.
Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.



Perhaps you could have answered the question by advising that the sections,


Were the "modern" way to write 32 bit MASM code instead of a diatribe of ancient junk.


for this masm don't have modern shortcut
.drectve ENDS
but luckily very low usage, as it don't used for linkable code
May the source be with you


welcome kkurkiewicz  :thumbsup:
check included examples in masm32 package
ichelionz tutorials,search MS online for winapi documentation
any texteditor will do
whatever code style is welcome here,everything from "bare metal code" style to loads of macros style

my none asm creations
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding