Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

os dev

Hi
I have a littel problem, witch i cant find the error in.
Im dev. a bootloader, but when i want to load sector 2 on floppy, and want to excute it, nothing happens. But when i use mt2002's (were it first searches for the file) works.
I use boch, and there i see a problem too,
[b]RIP 0000000[/b]
how can this be, after i in the code made a jump?
code:

Thanks

Kmt

Comments

  • MT2002MT2002 Member Posts: 1,444

    I am to recommend not loading raw sectors for so many different reasons.

    Anywhoo... Insure there is valid code at that sector location. When I tested your code, it loads the sector just fine. However, invalid code was being executed after that jump--which seems to be the cause of RIP being nulled out.

    Also, remember the sector number begins at 0 not 1... (Your code seems to assume it started at 1)

    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • kmtdkkmtdk Member Posts: 30
    I see now a change..
    It were the sector to load...
    But it double faults ?
    But why dont you recommend to load a new raw sector ??

    Thanks

    Kmt
  • MT2002MT2002 Member Posts: 1,444
    Sorry for the late reply - I did not know anyone replied back ;)

    I recommend against loading raw sectors because there is no structure to it. It is not possible to know what the sector is for. It can contain a part of a file, a program, the file system, or even garbage - it is completely impossible to tell--which is a very big problem.

    The only place that should read raw sectors is your filesystems file loading routine, and no more. Technically, your floppy driver should do it, but it depends on you systems' design.

    loading raw sectors all of the time is like reading or writing to specific areas of random memory - you never know what you are going to get. And, if you are not careful, who knows what can happen.

    Can you please elaborate on your recent post? i.e., What do you mean by "I see now a change.." and "It were the sector to load..."?

    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • kmtdkkmtdk Member Posts: 30
    Yes
    Well,
    When i changed the code, it trippled faulted, with it didtn before.
    So that was what i ment by " i see a change now"
    My problem is just that it dont load the sector to the specifed memory area, with means it cant contiune:
    and i have tryed
Sign In or Register to comment.