Wednesday, 13 June 2018

C Program to Write inline assembly language code in C Program

#include<stdio.h>

void main() {

   int a = 9, b = 9, c;

   asm {
      mov ax,a
      mov bx,a
      add ax,bx
      mov c,ax
   }

   printf("%d",c);
}

OUTPUT:- 18

No comments:

Post a Comment