Date: Thu, 6 Jan 2000 08:15:10 +0500 (MVT) From: Prashant TR To: djgpp AT delorie DOT com Subject: Re: Assembler documentation In-Reply-To: <00010607464801.00509@yahoo> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 5 Jan 2000, Charles Wood wrote: > here's a sample asm function I need to inline in DJGPP please help if you > can, from this example I should be okay from there on: > > this doesn't so anything, it just covers the basics: > > char clear_and_v_plus_1(char v) { > __asm { > mov ax,0x3 > int 0x10 > mov al,v > inc al > mov v,al > }; > }; > char ...(char v) { __asm__ ("movw $0x3, %ax; int $0x10; movb v, %al; incb %al; movb %al, v;"); } (untested code) But calling int 10 like this isn't nice in protected mode. That's what __dpmi_int is for. What you are doing is equivalent to the int386 call. Prashant --------------------------------------------------- One pound of learning requires ten pounds of common sense to apply it.