delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/13/21:15:12.1

Message-ID: <3B281DE4.6D242A5A@QhaSecurity.com>
From: birkoss <birkoss AT QhaSecurity DOT com>
X-Mailer: Mozilla 4.5 [fr] (Win98; I)
X-Accept-Language: fr
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP Asm problems
Lines: 48
Date: Wed, 13 Jun 2001 21:13:57 -0500
NNTP-Posting-Host: 209.226.129.20
X-Complaints-To: abuse AT sympatico DOT ca
X-Trace: news20.bellglobal.com 992481020 209.226.129.20 (Wed, 13 Jun 2001 21:10:20 EDT)
NNTP-Posting-Date: Wed, 13 Jun 2001 21:10:20 EDT
Organization: Bell Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi

I create some function in Asm, but sometime, and on the other computer,
it didn't work, why ?

here is my code :

void full_screen()
{
 __asm__ volatile("
   pushl %eax\n

   movb $00,%ah\n
   movb $12,%al\n
   int $0x10\n

   popl %eax\n");
}

and :

void point(int x_p, int y_p, int couleur_p)
{
 __asm__ volatile("
   pushl %%eax\n
        pushl %%ecx\n
   pushl %%edx
   movl %0,%%eax\n
   movl %1,%%ecx\n
   movl %2,%%edx\n
   movb $0x0C,%%ah\n
   int $0x10\n
   popl %%edx\n
   popl %%ecx\n
   popl %%eax\n"
   :
   : "a" (couleur_p), "c" (x_p), "d" (y_p)
    );
}

before using the point function, I change the graphic mode.

Sorry for my English

Thanks for your help.

birkoss

- Raw text -


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