flat assembler
Message board for the users of flat assembler.
Index
> Windows > Not fully flat? |
Author |
|
revolution 14 Jul 2015, 09:21
In protected mode CS and DS are selectors, not segments. Perhaps you are thinking of DOS real mode?
|
|||
14 Jul 2015, 09:21 |
|
l4m2 14 Jul 2015, 13:09
revolution wrote: In protected mode CS and DS are selectors, not segments. Perhaps you are thinking of DOS real mode? |
|||
14 Jul 2015, 13:09 |
|
l4m2 14 Jul 2015, 13:16
If I modify [cs:stt] in win xp, it tells me that command on 0x00401000 tried to read memory on 0xffffffff illegally
|
|||
14 Jul 2015, 13:16 |
|
revolution 14 Jul 2015, 13:24
Selectors in protected mode can have different access permissions. For example CS can be execute only, and reads/writes will cause a general protection fault.
If you want to make sure your selectors are "flat" then check the base and limit fields and you will see they are 0x00000000 and 0xffffffff respectively. But note that the paging will restrict the actual memory accesses also. You can't simply read/write/execute the entire 4GB memory space because not all memory is paged into any particular process. |
|||
14 Jul 2015, 13:24 |
|
l4m2 14 Jul 2015, 15:02
revolution wrote: Selectors in protected mode can have different access permissions. For example CS can be execute only, and reads/writes will cause a general protection fault. |
|||
14 Jul 2015, 15:02 |
|
l4m2 14 Jul 2015, 15:17
I know you now that you treat "flat" as "the seen address is just the real address"
|
|||
14 Jul 2015, 15:17 |
|
revolution 14 Jul 2015, 16:10
In protected mode it is not possible to have CS == DS. It could never work because the selectors need different values to do their job. CS must be able to execute, and DS must be able to read/write. So if you say that when CS != DS that makes it non-flat then all PM OSes will be non-flat to you.
But it doesn't matter actually. If you want to insist they are all non-flat then you can. It won't affect how they function. |
|||
14 Jul 2015, 16:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.