[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] question about syscall
From: |
Mulyadi Santosa |
Subject: |
Re: [Qemu-devel] question about syscall |
Date: |
Wed, 11 Feb 2009 13:25:16 +0700 |
Hi
On Tue, Feb 10, 2009 at 2:23 AM, Antonio Ricci <address@hidden> wrote:
> Hi Muladi,
>
> some times ago someone said me to do something like this:
>
> /****************************************************/
> a piece of code handling interrupt in translate.c:
> case 0xcd: /* int N */
>
> val = ldub_code(s->pc++);
> /* asia: start */
> if (val == 0x80){
> gen_op_handle_syscall();
> break;
> }
>
> if (s->vm86 && s->iopl != 3) {
> gen_exception(s, EXCP0D_GPF, pc_start - s->cs_base);
>
> } else {
> gen_interrupt(s, val, pc_start - s->cs_base, s->pc - s->cs_base);
> }
> break;
>
> /*********************************************************/
>
>
> I can't understand why I have to intercept the case 0xcd. Can you explain
> me?
My guess is, 0xcd is the opcode of "int" instruction. Try to check
Intel instruction manual....
regards,
Mulyadi.