Have troubles
-
beyondsociety
Have troubles
I changed a few things in my bootsector that loads into pmode and I am having sort of a problem with it.
When I run my bootsector, it loads two messages and enters protected mode. The last message for some reason gets printed twice instead of once. In front of the duplicated second message is an upside down arrow. By the way, it actually enters into pmode.
Does anybody know what could be wrong without actually looking at the code?
When I run my bootsector, it loads two messages and enters protected mode. The last message for some reason gets printed twice instead of once. In front of the duplicated second message is an upside down arrow. By the way, it actually enters into pmode.
Does anybody know what could be wrong without actually looking at the code?
-
jrfritz
Re:Have troubles
Could also be your loading some incorrect or random data into the registers your print function uses.
-
hanoi
Re:Have troubles
Tom: huh?
i just put that print-things out of my bootsector..
i don't care because that won't be interesting for anybody
it isn't in my kernel's print function so i have no problem...
i just put that print-things out of my bootsector..
i don't care because that won't be interesting for anybody
it isn't in my kernel's print function so i have no problem...
-
beyondsociety
Re:Have troubles
Code: Select all
A bug in your printf!Code: Select all
Could also be your loading some incorrect or random data into the registers your print function uses.Any other suggestions?
-
Whatever5k
Re:Have troubles
hanoi:
actually, I would care about your problem. You never know if it only appears in the bootstrap process...
actually, I would care about your problem. You never know if it only appears in the bootstrap process...
-
Curufir
Re:Have troubles
Coupla gripes 
Small suggested alteration to this function
You only need to load ah and bx once, int 0x10, 0xe doesn't alter them, loading them every loop is a waste of cycles really.
The other thing would be to make your "Read" function jump back to "Reset_Disk" on failure not back to "Read", just in case a disk reset will fix the problem.
Code looks nice and clean though, very well commented.
Small suggested alteration to this function
Code: Select all
Print_Msg: ; Dump ds:si to screen.
mov ah, 0eh ; Put character
mov bx, 0007 ; Attribute
.1 lodsb ; Load byte at ds:si into al
or al, al ; Test if character is 0 (end)
jz Done
int 0x10 ; Call BIOS
jmp .1
Done:
ret ; Return
The other thing would be to make your "Read" function jump back to "Reset_Disk" on failure not back to "Read", just in case a disk reset will fix the problem.
Code looks nice and clean though, very well commented.