Page 1 of 1

Unhandled interrupt 0x5a

Posted: Fri May 20, 2011 4:11 pm
by casnix
I'm using JamesM's tutorial, and the things I've changed are:

int 0x80 to 0x90
monitor_write -> puts
monitor_write_hex -> put_hex
monitor_write_dec -> put_dec
monitor_put -> putc
static void move_cursor -> void move_cursor(int x, int y)
monitor_clear -> clear_screen
the welcome messages
I've added some system calls.

When switching to user mode, I get this error:

Code: Select all

Unhandled interrupt: 0x5a.
I'm not quite sure what this means. I'ver searched google but probably missed something.
Attached is a screen shot of the error.
Thanks, Matt.

Re: Unhandled interrupt 0x5a

Posted: Fri May 20, 2011 4:23 pm
by gerryg400
When switching to user mode, I get this error:

Code: Select all

Unhandled interrupt: 0x5a.
Hex 0x5a is equal to Dec 90. I feel this is not a co-incidence.

Re: Unhandled interrupt 0x5a

Posted: Fri May 20, 2011 4:49 pm
by casnix
isn't the instruction `int $0x90' causing interrupt 90h instead of 90 in decimal?

as in the gcc inline assembly:

Code: Select all

int a;
__asm__ __volatile__("int $0x90" : "=a" (a) : "0" (7));
return a;
Is that
int 90h
or
int 90

I assume it's 90h...

Thanks, Matt

Re: Unhandled interrupt 0x5a

Posted: Fri May 20, 2011 5:02 pm
by casnix
Your reply hinted the answer. In the syscall_handler I had changed it to 0x90, but it was supposed to be just 90.

Hence, the 0x5a interrupt was because the interrupt number pushed into the stack when int 0x90 is called is just 90, and the handler expected 0x90. Thank you.