Answer the question
In order to leave comments, you need to log in
How to perform addition, multiplication and display a comparison of the resulting numbers?
Good day, assembler experts
For the first time I encountered this PL, and most likely the first and last time, so I don’t see the point of fully delving into its study.
You need to run it in visual studio 2017. You
need a simple code .
// int main()
{
int a;
int b;
int x, y, z;
x = 1;
y = 2;
z = 3;
Answer the question
In order to leave comments, you need to log in
int main()
{
int a;
int b;
int x = 1;
int y = 2;
int z = 3;
__asm {
mov eax, y
mul z
add eax, x
mov a, eax
mov eax, y
mov ebx, z
add eax, x
add ebx, x
mul ebx
mov b, eax
mov eax, a
mov ebx, b
cmp eax, ebx
je equal
jb more
jmp less
};
equal:
printf("a = b");
return 0;
less:
printf("a > b");
return 0;
more:
printf("a < b");
return 0;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question