"Invalid Opcode"

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.
Post Reply
kinghajj
Posts: 2
Joined: Wed Jun 22, 2005 11:00 pm

"Invalid Opcode"

Post by kinghajj »

When I run my OS on an AMD processor (AMD Athlon XP 2600, to be exact), I get an "Invalid Opcode" hardware interrupt error. However, when I run my OS on an Intel processor (an Intel Celeron 233 Mhz and an Intel Pentium 4 2.6 Ghz), everything works fine. What does "Invalid Opcode" mean, and how can I fix it?
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re:

Post by Legend »

An invalid opcode exception happens when the cpu hits an instruction that it does not know. It would be helpful if you know the location of the opcode that is unknown (meaning, the EIP that caused the exception). Then you can hopefully find out which instruction should have run using a disassembler.
*post*
kinghajj
Posts: 2
Joined: Wed Jun 22, 2005 11:00 pm

Re:

Post by kinghajj »

I solved the problem (sorta). I started using GRUB, and compiling my kernel as an ELF binary (instead of a flat binary), and it works now.
Post Reply