delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/24/14:21:51

Message-ID: <37726F12.9D1D3EB4@ameritech.net>
From: S Prasad <aangels AT ameritech DOT net>
X-Mailer: Mozilla 4.04 [en]C-AIT (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Faster-than-shift travel
Lines: 20
Date: Thu, 24 Jun 1999 13:46:58 -0400
NNTP-Posting-Host: 206.141.209.199
X-Trace: nntp0.detroit.mi.ameritech.net 930246917 206.141.209.199 (Thu, 24 Jun 1999 13:55:17 EDT)
NNTP-Posting-Date: Thu, 24 Jun 1999 13:55:17 EDT
Organization: Ameritech.Net www.ameritech.net Complaints: abuse AT ameritech DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello. Just have a newbie-at-asm question :-)

Lets say I have 

int i = 256;

I'd like to copy the high byte into the low byte, and save the low byte
as the var 'i'.  Sorta like this:

asm(" movb %%ah, %%al
    : "=al" (i)
    : "a" (i)
    : "%eax");

Can I, using the output registers, just save AL to the variable i, so
that I just get the low byte?



Thanx in Advance!

- Raw text -


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