Stack problem ?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Stack problem ?
hmmm ... as long as i can see,
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)
Code: Select all
mov cx,[sector_numbers]
xor ax,ax
mov es,ax
mov bx,0x0050
load_sectors:
push cx
...
Re:Stack problem ?
You might want to go just a little higher, to 0060:0000. The Bios Data Area ends at 0050:00FF. And
Re:Stack problem ?
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.
Other question
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 .
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 .