please anything is helpful this is in assembly Write MASM co

please anything is helpful. this is in assembly.

Write MASM code to implement the following pseudo-code:
if (x < 100) {
if (x >= 50) {
print \'M\';
}
else {
print \'L\';
}
} else {
print \'H\';
}

Assume that x has already been declared as SDWORD (signed 32-bit) in the data segment, and x has been assigned a signed integer value.
Don?t write a complete procedure or program ? just implement the decision structure and printing.
Preserve and restore any changed registers.
Don\'t use reserved words (e.g. end).
I\'m going to plug this right into Visual Studio to test functionality.

Solution

cmp SDWORD 100

jl L1

printf(\"H\")

invoke ExitProcess, 0

L1:

cmp SDWORD 50

jge L2

printf(\"L\")

invoke ExitProcess, 0

L2:

printf(\"M\")

please anything is helpful. this is in assembly. Write MASM code to implement the following pseudo-code: if (x < 100) { if (x >= 50) { print \'M\'; } else

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site