flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
polygon7
_________________ best regards p7 |
|||
![]() |
|
The_CodeMaster
well, that didn't realy help, anyway, does 32-bit assembler use the segment-selectors at all, when jumping (since 32 bit can adress 4 gig anyway)?
|
|||
![]() |
|
El Tangas
By default, all programs are loaded at address 400000h. Because of paging, all user programs "think" they are loaded at the same address. You can ask windows to load your program at other addresses with the "at" operator in Fasm.
|
|||
![]() |
|
Reverend
The address in which the loaded program is loaded is called an ImageBase and it is saved in the PE header of every windows' .exe file. Fasm (as it builds the PE file with no linker) lets you decide what should the ImageBase be (defaulting to 400000h). But in fact some addresses are unaccessible for programs. Some memory is reserved for dlls only, some is reserved for drivers, etc. I don't know them all, but I'm sure all 8xxxxxxxh addresses are unaccessible.
|
|||
![]() |
|
The_CodeMaster
so adress 400000h is indeed a new codesgment (since it is a multiple of 2^16), thx for clearing it up.
|
|||
![]() |
|
El Tangas
Quote:
Well, yes you could say that, but in protected mode segments of size 2^16 don't have much meaning because memory is managed in page units (4Kb in size). Newer processors support a larger page size, but I think windows only uses 4k. |
|||
![]() |
|
Ancient One
we don't need to bother about segment selector in windows because windows set it up for us. segment selector in p-mode purpose is not the same in real-mode vs p-mode.
|
|||
![]() |
|
f0dder
A more correct answer would be that CS,DS,ES,SS are set up as selectors for flat descriptors - segments of memory that are 4GB long and starts at base address zero
![]() And the link from Polygon7 *is* pretty damn useful. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.