flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
polygon7 27 Aug 2005, 15:41
_________________ best regards p7 |
|||
![]() |
|
The_CodeMaster 27 Aug 2005, 16:33
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 27 Aug 2005, 18:07
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 27 Aug 2005, 22:02
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 27 Aug 2005, 23:55
so adress 400000h is indeed a new codesgment (since it is a multiple of 2^16), thx for clearing it up.
|
|||
![]() |
|
El Tangas 29 Aug 2005, 20:36
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 30 Aug 2005, 02:12
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 30 Aug 2005, 03:04
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.