You are on page 1of 5

LAB 12

MUHAMMAD REHAN KHAN


BCS 3A
21K-3172
LAB 12

TASK 1
• In the following c++ code I used inline assembly code in which I moved the entered
variables into different registers and used mul instruction for multiplication and
stored the result in a product variable.
LAB 12

OUTPUT:
LAB 12

TASK 2
• In the following c++ code I used inline assembly code in which I moved the entered
numbers in different registers and compared them in a while loop until they were
equal, while subtracting the smaller number form the greater number and saving
them and at the end of the loop I moved result form the register to gcd variable and
printed it.
LAB 12

OUTPUT:

You might also like