Re: Value in memory changes... Why?!
- From: SpooK <keith@xxxxxxxxxxx>
- Date: Tue, 28 Aug 2007 08:13:29 -0700
Off the bat, you should know that "mov word[ds:0],ax" is really "mov
word[0],ax" as DS is the default segment selector in most
instructions.
The real issue, IIRC, is that you are trying to write data to the BIOS
which is mapped to E000:0000 to FFFF:FFFF. This will (should) fail.
The area from A000:0000 to FFFF:FFFF is riddled with non-usable memory
due to memory-mapped devices such as the BIOS, this area is called
Upper Memory (the upper 384KB of the first MB of RAM.)
You need to stick to the Conventional (usable) Memory area. This area
is from 0000:0000 to 9FFF:FFFF (the lower 640KB of the first MB of
RAM.) Watch out, as even some of those areas are not safe. The Real
Mode BIOS has the Interrupt Vector Table consuming the first Kilbyte
of RAM. Right after that as another 256 bytes being used as the BIOS
Data Area. If you are doing your own boot-sector stuff, you boot
sector will be loaded to 0000:7C00, so it is best to avoid that 512
byte area as well. So, the best place to stay safe is between
0000:8000 and A000:0000.
HtH ;)
.
- Prev by Date: Re: ELF loading
- Next by Date: Re: Value in memory changes... Why?!
- Previous by thread: Gonzales, Another one bites the dust.
- Next by thread: Re: Value in memory changes... Why?!
- Index(es):
Relevant Pages
|