BIOS Exception handlers...
BIOS Exception handlers...
When I'm programming in asm still in real mode, if I commit an exception, the BIOS (or DOS?) handles it... but the handlers are a bit (very) strange...
They just say, for example, "Invalid opcode at", and then a bunch of misterious hexadecimal digits, organized in groups of four (words)... they haven't got (as far as I've found) anything to do with the code that caused the exception...
Can someone explain me what they exactly mean?
JJ
They just say, for example, "Invalid opcode at", and then a bunch of misterious hexadecimal digits, organized in groups of four (words)... they haven't got (as far as I've found) anything to do with the code that caused the exception...
Can someone explain me what they exactly mean?
JJ
That's the natural answer: the handler displays the processor state... But do you actually know what handlers I'm talking about?Combuster wrote:they give the offending CS:IP, i.e. the location where the exception occurred
DOS extenders usually display the processor state in a pretty table, but BIOS (or DOS, doesn't really metter) don't...
The handler prints about 8 or 9 (don't remember exactly at the moment) groups of four hex digits each (i.e. 16 bit integers/pointers), so I ask: what group of digits represents the 16 bits CS and what of them does represent the 16 bit IP?
For example:
Coprocessor not found at 54DA 768B FEA5 34FE 432F FEA5 34FE 54DA CD78 432F 6AB4 .... .... ....
Invalid opcode at CD78 432F FEA5 34FE 54DA 768B FEA5 34FE CD78 432F 6AB4 .... .... ....
Thanks,
JJ
Maybe it is actually opcodes. It is just a guess. However it is odd because I don't (or 'ndisasm' so to speak) see any invalid opcodes, which the second exception is about. It disassembles to:JJeronimo wrote:For example:
Coprocessor not found at 54DA 768B FEA5 34FE 432F FEA5 34FE 54DA CD78 432F 6AB4 .... .... ....
Invalid opcode at CD78 432F FEA5 34FE 54DA 768B FEA5 34FE CD78 432F 6AB4 .... .... ....
Code: Select all
# 54DA 768B FEA5 34FE 432F FEA5 34FE 54DA CD78 432F 6AB4 ...
0000 54 push sp
0001 DA768B fidiv dword [bp-0x75]
0004 FE db 0xFE
0005 A5 movsw
0006 34FE xor al,0xfe
0008 43 inc bx
0009 2F das
000A FE db 0xFE
000B A5 movsw
000C 34FE xor al,0xfe
000E 54 push sp
000F DACD fcmove st5
0011 7843 js 0x56
0013 2F das
0014 6AB4 push byte -0x4c
# CD78 432F FEA5 34FE 54DA 768B FEA5 34FE CD78 432F 6AB4 ...
0000 CD78 int 0x78
0002 43 inc bx
0003 2F das
0004 FE db 0xFE
0005 A5 movsw
0006 34FE xor al,0xfe
0008 54 push sp
0009 DA768B fidiv dword [bp-0x75]
000C FE db 0xFE
000D A5 movsw
000E 34FE xor al,0xfe
0010 CD78 int 0x78
0012 43 inc bx
0013 2F das
0014 6AB4 push byte -0x4c
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Sorry, i thought you got a message like "Exception at xxxx:xxxx" which dos has bugged me with quite often...JJeronimo wrote:For example:
Coprocessor not found at 54DA 768B FEA5 34FE 432F FEA5 34FE 54DA CD78 432F 6AB4 .... .... ....
Invalid opcode at CD78 432F FEA5 34FE 54DA 768B FEA5 34FE CD78 432F 6AB4 .... .... ....
As for what THESE numbers are, they look like some sort of memory dump as the messages are similar but not equal.
DOS has never shown me something of that sort...Combuster wrote: Sorry, i thought you got a message like "Exception at xxxx:xxxx" which dos has bugged me with quite often...
Thanks, I'll verify that...As for what THESE numbers are, they look like some sort of memory dump as the messages are similar but not equal.
JJ