Mail Archives: djgpp/2001/08/28/05:00:08
From: | "±θΗΠΑΦ" <kimguy00 AT orgio DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | problem in inline assember
|
Date: | Tue, 28 Aug 2001 16:57:19 +0900
|
Organization: | Inet Internet Services
|
Lines: | 26
|
Message-ID: | <9mfivi$j0g$2@news.nuri.net>
|
NNTP-Posting-Host: | 203.231.145.146
|
X-Trace: | news.nuri.net 998985522 19472 203.231.145.146 (28 Aug 2001 07:58:42 GMT)
|
X-Complaints-To: | abuse AT nuri DOT net
|
NNTP-Posting-Date: | 28 Aug 2001 07:58:42 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hello !
I need a somebody's help.
Now I'm studing inline asm.
and I thought %0, %1, %2.. are just a kind of a mapping sequencely.
So I thought %0 is gate_addr, %1 is dpl, %2 is type
but I think it's doesn't work.
please help me
How can I understand a source stuff below.
#define _set_gate(gate_addr,type,dpl,addr) \
__asm__ __volatile__ ("movw %%dx,%%ax\n\t" \
"movw %2,%%dx\n\t" \
"movl %%eax,%0\n\t" \
"movl %%edx,%1" \
:"=m" (*((long *) (gate_addr))), \
"=m" (*(1+(long *) (gate_addr))) \
:"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \
"d" ((char *) (addr)),"a" (KERNEL_CS << 16) \
:"ax","dx")
- Raw text -