Re: Basic Floppy Disk loader help.




"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



.



Relevant Pages

  • Re: Basic Floppy Disk loader help.
    ... >> in the way of the kernel. ... > mov ax,0x09000 ... > xor di,di ... > push offset next_inst ...
    (comp.lang.asm.x86)
  • Re: [PATCH 2.6.21 1/3] x86_64: EFI64 support
    ... First this seems to be quite different from what the 32bit EFI ... What format is the kernel image? ... mov %rsi,%rcx ... Who tells you the other CPUs don't use the current pgd? ...
    (Linux-Kernel)
  • Re: bug 336022 closed but not fixed(broken binutils)
    ... After upgrading binutils to the most recent testing version I cannot compile any kernel other than 2.6.14. ... :689: Error: suffix or operands invalid for `mov' ...
    (Debian-User)
  • Re: Basic Floppy Disk loader help.
    ... Maybe I can simply place it before my kernel. ... > mov ax,0x09000 ... > xor di,di ... > push offset next_inst ...
    (comp.lang.asm.x86)
  • Re: Why is my nasm program killing itself?
    ... I think it's very unlikely that this is a kernel problem. ... standard assembler for LINUX (for the assembly programmer, ... Out-of-order execution my ass! ... mov al, 10 ...
    (alt.lang.asm)