Question: Write MASM (in x86) code to implement the following pseudo-code: if (x < 100) { if (x >= 50) { print 'M'; } else {
Write MASM (in x86) 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
