Page 2 of 2

Posted: Tue Nov 14, 2006 3:22 pm
by Lprogster
Here is my bootsector (it is probably unsafe... LOL):

Code: Select all

;;;[EDIT]
Most of my boot sector has been stolen, though I _THINK_ I understand it.

Posted: Tue Nov 14, 2006 3:33 pm
by Combuster
Lprogster wrote:

Code: Select all

        mov ax, 0
        mov es, ax
        mov bx, 0x1000          ; Destination address = 0000:1000 
0000:1000 isnt the same address as 1000:0000, therefore your ORG directive is incorrect

In real mode, memory offsets are calculated as follows:
memory address = (segment value * 16) + offset
in your case thats (0x0000 * 16) + 0x1000 = 0x1000
so your ORG directive should read ORG 0x1000 instead of ORG 0x10000.

Also, try not to copy code blindly, if it goes awry you wouldnt know where to look :)

Posted: Tue Nov 14, 2006 3:54 pm
by Lprogster
...

Posted: Tue Nov 14, 2006 5:00 pm
by Combuster
Lprogster wrote:NOTE: Anyone looking at this most: Ive removed the code as it probably really sucked...
To be honest, it can be very useful to see other people's mistakes so they can avoid them. So for next time, leave your code in place so people can see what happened.

That is, until Chase comes in and complains about a full database 8)

From what i remember you posted, A20 will be on in most cases, depending on hardware. You are most certainly in Protected Mode, otherwise the code wouldnt execute properly.
Thankyou very much Combuster for all the time you have spent helping me :D.
You're welcome.