www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/05/22:54:36

Date: Thu, 6 Jan 2000 08:15:10 +0500 (MVT)
From: Prashant TR <prashant_tr AT yahoo DOT com>
To: djgpp AT delorie DOT com
Subject: Re: Assembler documentation
In-Reply-To: <00010607464801.00509@yahoo>
Message-ID: <Pine.LNX.4.10.10001060751410.669-100000@yahoo.com>
MIME-Version: 1.0
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


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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019