To multiply two 16-Bit Numbers > Mixed Language Program

To multiply two 16-Bit Numbers > Mixed Language Program

Microprocessor

Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;

clrscr();
printf("Enter the first number :");
scanf("%d",&a);
printf("Enter the second number :");
scanf("%d",&b);
/*
asm mov ax,a
asm mov bx,b
asm mul bx
asm mov c,ax
*/
asm{
mov ax,a
mov bx,b
mul bx
mov c,ax
}
printf("The Result Is :%d",c);
getch();
}
/*
OUTPUT-------------
Enter the first number :6
Enter the second number :3
The Result Is :18
*/

Comments

Popular posts from this blog

Intermediate Code Generation > C Program