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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!