Stack problem ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
FlashBurn

Stack problem ?

Post by FlashBurn »

[attachment deleted by admin]
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Stack problem ?

Post by Pype.Clicker »

hmmm ... as long as i can see,

Code: Select all

        mov cx,[sector_numbers]
        xor ax,ax
        mov es,ax
        mov bx,0x0050
load_sectors:
        push cx

        ...
you are loading your sectors directly to 0000:0050 -> ... (which is within the interrupt table :(. You"re likely to erase important data structures for the system with your code. I strongly suggest you choose another target for your datas (1000:0000 -> ..., for instance, should be free)
FlashBurn

Re:Stack problem ?

Post by FlashBurn »

Ups , I see !! ::)
FlashBurn

New problem

Post by FlashBurn »

[attachment deleted by admin]
crazybuddha

Re:Stack problem ?

Post by crazybuddha »

You might want to go just a little higher, to 0060:0000. The Bios Data Area ends at 0050:00FF. And
FlashBurn

Re:Stack problem ?

Post by FlashBurn »

[attachment deleted by admin]
crazybuddha

Re:Stack problem ?

Post by crazybuddha »

You might do well to write some code to read and print the values in the registers and areas of memory. It's definitely worth the bother, because you'll use it over and over.
FlashBurn

Other question

Post by FlashBurn »

When I load more than 1 sector I add 200h to bx before the next sector is load . Is this ok or not ?!

Maybe this helps , because now I cannot do programming !! When I load only 1 sector and jump to 0060:0000 , it jumps to the bootsector and it dont print out a new line , but when I laod 2 sectors it print out the new line , but I don?t see the kernel message .
Post Reply