Re: Basic Floppy Disk loader help.
- From: "Benjamin David Lunt" <spamtrap@xxxxxxxxxx>
- Date: Fri, 30 Dec 2005 15:50:43 -0700
"Jean-François Michaud" <spamtrap@xxxxxxxxxx> wrote in message
news:1135967677.622597.125310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>> Is this the case?
>
> Absololutely!
>
> All I have to say is: Very nice. I'm impressed ;-). Darn bootloader is
> in the way of the kernel. Now I have to find a better place for it.
>
Hi,
No need to find a different place, move your boot code instead.
Since you are placing your kernel at 0x00500, I am going
to assume you are using real mode. So why not move your
loader up to 0x90000 or so. As long as you don't overwrite
the EBDA (usually just before 0xA0000, you will have
0x90000 - 0x00500 bytes for your kernel.
To move your code, you simply have to do a movsb[w|d]
then do a far jmp to the next instruction.
If your code is at 0x07C00 and you will be moving it
to 0x90000:
org 00h
mov ax,0x09000
mov es,ax
mov ax,0x007C0
mov ds,ax
mov cx,(512/2) ; size of your code / sizeof(word)
xor di,di
xor si,si
rep movsw
push es
push offset next_inst
retf
next_inst:
; continue on.
Happy New Year,
Ben
.
- Prev by Date: Re: why LIDT needed in Real Mode?
- Next by Date: Re: why LIDT needed in Real Mode?
- Previous by thread: Re: Basic Floppy Disk loader help.
- Next by thread: why LIDT needed in Real Mode?
- Index(es):
Relevant Pages
|