Given that MS linker doesn't build 16-bit binaries anymore, and for a long time for that matter, what is the purpose of maintaining the SEGMENT directive in MASM?

Belloc 21 Reputation points
2021-11-01T12:15:07.183+00:00

See the answers by @ildjarn and @Milan Danes for this question in Visual C++.

The page that I'm trying to link to above is https://social.msdn.microsoft.com/forums/vstudio/en-US/58c10e36-16c1-4161-b002-7b7c3b509884/16-bit-code-assemble-with-vs.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,849 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YujianYao-MSFT 4,291 Reputation points Microsoft Vendor
    2021-11-03T09:36:42.61+00:00

    Hi @Belloc ,

    For some knowledge about SEGMENT, you could refer to this link, MASM programs consist of file modules made up of segments, logical segments contain the three components of a program: code, data, and stack. SEGMENT is a must for every standard assembler, it can realize the segmentation management of memory. After segmentation, the system will load these data into different areas of the memory segment when the program is running.

    Best regards,

    Elya


    If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.