flat assembler
Message board for the users of flat assembler.

Index > Main > Memory Layout

Author
Thread Post new topic Reply to topic
Vertex78



Joined: 22 Feb 2004
Posts: 12
Vertex78
I am confused about the way memory is layed out in ram when the computer boots up in realmode. I've looked up stuff about it and it always discusses where do is in conventional memory and it vector tables and all that. But what if your not using dos. What if you just make a simple bootloader to diplsay a message then halt the system. How would the memory map be then? Also is it the same on every computer?
Post 23 Jul 2004, 22:01
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
iirc you (the "user" code) allways(read: for most sane IBM PC compatible) start at 7C00h.
Basically you can summ up the memory like this:
Code:
;Memmory Map:
; RM:                           Linear:                 Desc:
; 0000:0000 -> 0000:03FF        0h -> 3FFh              No-no.
; 0040:0000 -> 0040:00FF        400h -> 4FFh            No-no.
; 0050:0000 -> 0050:7DFF        500h -> 7BFF            Free!
; 0000:7C00 -> 0000:7DFF        7C00h -> 7DFFh          Boot sect (free).
; 0000:7E00 -> 9000:FBFF        7E00h -> 9FBFFh         Free!
; 9000:FC00 -> 9000:FFFF        9FC00h -> 9FFFFh        No-no.
; A000:0000 -> F000:FFFF        A0000h -> FFFFFh        No-No. (B0000h ok...)
; FFFF:000F -> FFFF:FFFF        100000h -> 10FFEF       Free! (HMA)
; --------- -> ---------        10FFF0h -> oo           Free!
;
; RM -> Linear: (BASE{slector}*16)+OFFSET=LINEAR    

iirc A000:0000 is realted to video mem, and B000:0000 is the text mode "buffer" - if you write something at B000:0000h you'll see some sort of output in text mode - iirc the size and with of an char (byte or word) depends on the viedo mode.


btw, this thread should be in "OS Construction"
Post 24 Jul 2004, 11:25
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Actually the text mode video memory (in BIOS modes) since VGA starts at 0xb800, but you can change it manually by tweaking VGA registers, if you want to do somethig tricky Wink

Take a look at OS Developement links on my website, on that sites you will find more references about memory.
Post 24 Jul 2004, 12:12
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar.

Powered by rwasa.