Monday, January 5, 2009

asm keyword Using c programming language.

Q(1) What will be output of following c program?

void main()

{

clrscr();

asm{

mov ax,10;

shl,2;

}



printf("%d",_AX);

getch();

}

Output: 40

Explanation: ax and bx is general purpose register.

Statement mov ax,61 means value 61 is storing at register ax.

Statement shl 2 is equivalent to a<<2

No comments:

Blog List