asm {
mov ax,a
xchg ah,al
}
asm {
mov ax,a
xchg ah,al
}
int a=12345; // dummy value.
int b= a & 0xffff;
b<<=16;
int c= a & 0xffff0000;
c>>=16;
a=b|c;
not exact but close enough.
Last edited by Stoned_Coder; 01-17-2002 at 09:14 PM.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
erm... isn't that a little long-winded?? ax is 16 bits right??
U.Code:short ax = a; ax = (ax >> 8) | (ax << 8);
Last edited by Uraldor; 01-17-2002 at 09:39 PM.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
yes you are right ax is 16 bits wide. Dont know why i thought it was 32 lol
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
thx guys