X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Cristiano" Newsgroups: comp.os.msdos.djgpp References: <002d01c62031$9fc98bb0$2432a8c0 AT dcueva> Subject: Re: Converting Intel code Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: $$_ewgll_msdvl.x-privat.org Message-ID: <43d5135f_1@x-privat.org> Organization: X-Privat NNTP Server - http://www.x-privat.org X-Authenticated-User: $$g656buj-7nk5btgknyi-m X-Complaints-To: abuse AT x-privat DOT org Date: 23 Jan 2006 18:33:21 +0100 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Diego Cueva wrote: > May be this help you: > > int main(){ > int val; > asm( > "cli\n\t" > "xorb %%al,%%al\n\t" > "outb %%al,$0x43\n\t" > "inb $0x40,%%al\n\t" > "movb %%al,%%bl\n\t" > "inb $0x40,%%al\n\t" > "movb %%al,%%bh\n\t" > "sti": "=b"(val): ); It works! :-) Thank you. > Please review : > > Brennan's Guide to Inline Assembly > by Brennan "Bas" Underwood. I read that guide, but it's not clear to me (and to my English :-) , I need a very basic guide). I found a similar guide: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html which seems a bit clearer to me. But do you know any good guide? Thank you Cristiano