Unhandled interrupt 0x5a

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
User avatar
casnix
Member
Member
Posts: 67
Joined: Fri Jan 14, 2011 7:24 pm

Unhandled interrupt 0x5a

Post 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.
Attachments
Screenshot of the error.
Screenshot of the error.
You are a computer.
~ MCS ~
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Unhandled interrupt 0x5a

Post 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.
If a trainstation is where trains stop, what is a workstation ?
User avatar
casnix
Member
Member
Posts: 67
Joined: Fri Jan 14, 2011 7:24 pm

Re: Unhandled interrupt 0x5a

Post 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
You are a computer.
~ MCS ~
User avatar
casnix
Member
Member
Posts: 67
Joined: Fri Jan 14, 2011 7:24 pm

Re: Unhandled interrupt 0x5a

Post 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.
You are a computer.
~ MCS ~
Post Reply