need some help with my screen of death

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.
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post 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.
Author of COBOS
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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...
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post 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
Attachments
video.h
(2.81 KiB) Downloaded 24 times
printf.h
(5.55 KiB) Downloaded 38 times
mmiikkee12
Member
Member
Posts: 38
Joined: Sat Jun 03, 2006 11:00 pm

Post 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? :)
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post 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
Attachments
linker.ld
(288 Bytes) Downloaded 21 times
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post by Pyrofan1 »

sorry for the dbl. post, but i found out that i'm getting an Invalid Opcode Exception.
Post Reply