www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/06/15:09:12

From: "Charles Wood" <c DOT dot DOT r DOT dot DOT wood AT worldnet DOT att DOT net DOT null>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Assembler documentation
Date: Thu, 6 Jan 2000 10:51:36 -0800
Organization: AT&T WorldNet Services
Lines: 52
Message-ID: <852l5g$bcn$1@bgtnsc01.worldnet.att.net>
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10001060751410 DOT 669-100000 AT yahoo DOT com>
NNTP-Posting-Host: 12.72.133.149
X-Trace: bgtnsc01.worldnet.att.net 947181552 11671 12.72.133.149 (6 Jan 2000 17:59:12 GMT)
X-Complaints-To: abuse AT worldnet DOT att DOT net
NNTP-Posting-Date: 6 Jan 2000 17:59:12 GMT
X-Newsreader: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thank you very much for you perfect answer, exactly what I was looking for.

(I know it's bad to give thanks on newsgroups, but Prashant deserves credit
for a clear consise answer.)

--
Charles Wood
REMOVEMEc DOT r DOT wood AT worldnet DOT att DOT net


Prashant TR wrote in message ...
>
>
>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