Need some help
-
Curufir
Re:Need some help
Code: Select all
OEM_Name???db???'WonkeeOS'
nBytesPerSec???dw???0200h
nSecPerClust???db???01h
nSecRes??????dw???014h
nFATs??????db???02h
nRootEnts???dw???0E0h
nSecs??????dw???0B40h
mDesc??????db???0F0h
nSecPerFAT???dw???09h
nSecPerTrack???dw???012h
nHeads??????dw???02h
nLogSec0
nSecHidden???dd???00h
[org 7c00h]???????????????;makes sure that the program begins here
???jmp???start
This might be the problem, because if execution starts at the first byte of your program (And NASM doesn't move the data you've put there in your code at assemble time) then it's going to be interpreting 'WonkeeOS' as machine code instructions not data. Things would probably fall down at this point pretty rapidly I think.
**
Took another look.
You never setup the data segment (It's probably a typo, but you actually set dx to 0, not ds).
Code: Select all
jmp???begin_boot
begin_boot:
You never setup es so it could be anything. The BIOS read sector interrupt stores data at es:bx.
You never setup a stack in real mode. Interrupts are likely impossible to use until you do as they have to push a return address onto the stack in order to iret (I say likely because it's always possible the BIOS has left you with sensible values of SS and SP, but don't count on it).
You're using cl instead of dl as the drive number in the 'ReadA:' function.
You're relying on the attribute byte of all your output text chars to be something useful (Hint: Moving '1 ' [note the space] into video memory will produce a green '1', handy if you just want something to check with).
Basically there's lots of problems. Hopefully what I've pointed out will be useful in fixing them.
-
jrfritz
Re:Need some help
Curfir keeps telling me GDTs like that are bad....but he won't tell me how to fix it....Curifir...could you fix the GDT so I could know how to fix it?
-
whyme_t
Re:Need some help
He already did. http://www.mega-tokyo.com/forum/index.php?board=1;action=display;threadid=2609;start=0 8th post down.
-
Slasher
Re:Need some help
Hi,
Computers just execute bits! and the way your boot code starts it will execute from OEM_Name db 'WonkeeOS'
what you should bo is place
[org 7c00]
jmp start]
as you first lines in the boot code
Computers just execute bits! and the way your boot code starts it will execute from OEM_Name db 'WonkeeOS'
what you should bo is place
[org 7c00]
jmp start]
as you first lines in the boot code
-
weathermanfrank
Re:Need some help
I thank you all for you input. I'll work with this till something comes out. I hope:)
Thank you again
Frank
Thank you again
Frank