Message-ID: <3248E443.1A15@gbrmpa.gov.au> Date: Wed, 25 Sep 1996 15:50:24 +0800 From: Leath Muller Reply-To: leathm AT gbrmpa DOT gov DOT au Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: Martin CC: djgpp AT delorie DOT com Subject: Re: Inline assembler with parameters References: <32489A06 DOT 3E14 AT magna DOT com DOT au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Gidday, Look, you may be Australian, but maybe you should get it right... :) its G'day! Haven't you ever seen the add!!! ;) > I am trying to get going using inline assembler with DJGPP and I have a > couple of problems/questions. Been there, done that... > Firstly, how do I represent HEX and binary numbers. Normally I would do > somthinge like 10h(for hex) and 1011001b(for binary). I also > tried creating a little routine, however it fails to compile :-( I use 0x10 = 16 decimal > void setvga(unsigned short mode) > { > __asm__ __volatile__(" movw %0, %ax\n > movb $0, %ah\n > int $16 " > : > : "g" (mode) > : "ax" ); > > } You need TWO % signs to access the registers. ie: movw %0, %%ax; movb $0, %%ah; int 0x10; Leathal.