From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LX8XB-0001RG-QD for qemu-devel@nongnu.org; Wed, 11 Feb 2009 01:25:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LX8X9-0001P9-GU for qemu-devel@nongnu.org; Wed, 11 Feb 2009 01:25:20 -0500 Received: from [199.232.76.173] (port=52499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LX8X9-0001Oy-6i for qemu-devel@nongnu.org; Wed, 11 Feb 2009 01:25:19 -0500 Received: from wf-out-1314.google.com ([209.85.200.173]:57142) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LX8X8-0007u8-Sk for qemu-devel@nongnu.org; Wed, 11 Feb 2009 01:25:19 -0500 Received: by wf-out-1314.google.com with SMTP id 28so50948wfa.4 for ; Tue, 10 Feb 2009 22:25:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 11 Feb 2009 13:25:16 +0700 Message-ID: Subject: Re: [Qemu-devel] question about syscall From: Mulyadi Santosa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ricciantonio@gmail.com Hi On Tue, Feb 10, 2009 at 2:23 AM, Antonio Ricci 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.