Page 2 of 2
Posted: Tue Jun 26, 2007 8:21 am
by os64dev
your code doesn't have any obvious mistake as AJ said so im confused about why it shouldn't work other then either the linker script is faulty or Puts and printf are.
Posted: Tue Jun 26, 2007 8:23 am
by AJ
If Qemu wouldn't run it, I just wonder if there is something more fundamental that is wrong. Does it crash, won't it read your disk image, what's the machine state when it crashes etc...?
Also, could it be that your registers contain the correct values but they aren't being interpreted correctly by printf?
Starting to clutch at straws here a bit...
Posted: Tue Jun 26, 2007 8:32 am
by Pyrofan1
Does it crash, won't it read your disk image
it says
boot from hard disk 0 failed
FATAL: not a bootable disk
but now i'm sure the problem lies in Puts or Printf
Posted: Tue Jun 26, 2007 8:43 am
by mmiikkee12
boot from hard disk 0 failed
FATAL: not a bootable disk
If it's a floppy disk image, use -fda floppy.img -boot a
Anyway, that looks like the printf I based mine on, which I know to work fine. I don't see any obvious problems with the other code either.
(Just out of curiosity, why is printf not defined in printf.h, and why do you have code in header files anyway?
Posted: Tue Jun 26, 2007 9:08 am
by Pyrofan1
why is printf not defined in printf.h, and why do you have code in header files anyway?
1. because i don't want kernel files in include files
2. because i like my code neat
here's my linker script
Posted: Tue Jun 26, 2007 9:33 am
by Pyrofan1
sorry for the dbl. post, but i found out that i'm getting an Invalid Opcode Exception.