To implement a program that computes the LCM of any given two numbers.
The program to compute the LCM and its equivalent low-level language instructions executed by the hardware. The low-level language instructions used are:
|It performs division operation of the values contained in two registers and puts the remainder in the first register.
|Passing variable value back to caller function.
|It pushes a variable on to the stack.
|It pops out the variable out of the stack.
|It stores the value from the given register to the global or local variable.
|It prints the output value to the screen.
|Check if the values in two registers are different.
|It multiplies the values contained in two registers and puts the result in the first register.
|Local copying- used to copy the value of a variable within the same memory segment.
|It loads a value of a global or local variable to the given register.
|Is used to mark the position in the low-level language instructions to enable jumping to the marked position.
|It reads the input from the user and stores it in a variable.
|Checks if the condition evaluated to true.
|Checks if the condition evaluated to be false.
|It returns the control from the called function to the caller.
|It changes the control of execution to the called function.
|It initiates a call to the given function.
|Signifies the end of program.
|It divides the values contained in two registers and puts the result in the first register.
|It copies the value of a variable between segments of memory.
|It assigns a value to a variable.
LCM(a, b) = (a * b) / GCD(a, b)