please help me solve this one !!
Code:
1. The Macro program given below displays one character passed to it as an argument on the output screen. Use it complete the Main Proc to display an array of characters on the screen.
mPutchar MACRO char
push eax
mov al, char
call WriteChar
pop eax
ENDM
.data
myName BYTE “Welcome to Ajman University!”,0
.code
Main PROC
Start: MOV SI, OFFSET myName
MOV CX, LENGTHOF myName
L1: MOV BL, [SI]
----------------------------
----------------------------
----------------------------
----------------------------
----------------------------
----------------------------
----------------------------
2. Write assembly program that reads a word from the key board and compares it with an already defined word in the data segment. If the two words are the same it display “Correct Password” else it will display “Incorrect Password”.
Extra 1 mark: Incase of incorrect password it will give the user 3 tries.
3. Description: The greatest common divisor of two integers is the largest
integer that will evenly divide both integers. The GCD algorithm involves
integer division in a loop, described by the following C++ code:
int GCD(int x, int y)
{
x = abs(x); // absolute value of x
y = absyes ; // absolute value of y
do {
int n = x % y; // REMAINDER
x = y;
y = n;
} while y > 0;
return y;
}
Implement this function in assembly language