flat assembler
Message board for the users of flat assembler.

Index > Main > addressing memory.

Author
Thread Post new topic Reply to topic
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 23 Sep 2007, 17:41
hi. i have some question about memory addressing:
-in protected mode, is the segment base address (in descriptors) only for protection (to sign the begining of a segment), or that used to calculate the memory ( i mean that the physical address will be the offset ([ebx] for example) plus the segment base address).

-how descriptor cashes used in real mode (on new processors)? i mean, that are they only for protection, to controll the operand and address size and such, or not ( i guess yes)?


Last edited by matefkr on 23 Sep 2007, 18:14; edited 1 time in total
Post 23 Sep 2007, 17:41
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Sep 2007, 17:58
segment base address is also used to count final address. so final address is segment base address + offset.

segment limit still works under real mode, segment base is ignored, 32/16bit code works (but interrupt still push only 16bit IP on stack), don't know about others.
Post 23 Sep 2007, 17:58
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 23 Sep 2007, 18:09
ok thank you!
Post 23 Sep 2007, 18:09
View user's profile Send private message Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 05 Oct 2007, 07:52
Just one more thing:

[quote="vid"](but interrupt still push only 16bit IP on stack), don't know about others.[/quote]

Is that mean, that even hardware interrupts (i guess)? so if i hit a key on the keyboard, it will push only 16 bit offset when interrupt?
Post 05 Oct 2007, 07:52
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 05 Oct 2007, 10:29
yes... no way to place code above 1MB
Post 05 Oct 2007, 10:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 13 Oct 2007, 13:13
Another questions:
-can i use address and operand size prefix in real mode?
-You mean no way to place code above 1mb if i want interrupts to work correctly or you meant that no way to hold the cs descriptor cache (will it updated anyway?).
Post 13 Oct 2007, 13:13
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 14 Oct 2007, 17:36
- yes, use can use prefixes.
- you can't. Not because cached CS - that stays unchanged. It is because offset pushed is 16 bit even if code is 32bit.
Post 14 Oct 2007, 17:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 15 Oct 2007, 17:41
thanks!
Post 15 Oct 2007, 17:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.