www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/25/16:46:10

Date: Mon, 25 Sep 95 13:44 MDT
From: mat AT ardi DOT com (Mat Hostetter)
To: ALAN L HIGHTOWER <alh AT engr DOT engr DOT uark DOT edu>
Cc: Todd Muhlfelder <twm AT escape DOT com>, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: ASM in DJGPP
References: <Pine.BSD/.3 DOT 91 DOT 950925121235 DOT 14837A-100000 AT escape DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 950925130705 DOT 12342C-100000 AT engr DOT engr DOT uark DOT edu>

>>>>> "ALAN" == ALAN L HIGHTOWER <alh AT engr DOT engr DOT uark DOT edu> writes:

    ALAN> On Mon, 25 Sep 1995, Todd Muhlfelder wrote:

    >> So, I tried to do this line in DJGPP (works fine in Turbo C++):
    >> 
    >> _AX = 0x0013 /* Gets into Mode 13H */

    ALAN> the equivalent would be:

    ALAN>      asm(" movw $0x13, %ax ");

Correct, although you wouldn't want to actually write code like that,
since it would confuse gcc's optimizer.  You're not telling the
compiler that %ax is modified, and gcc has no reason to preserve %ax's
value after this instruction has been executed.

-Mat

- Raw text -


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