Page 1 of 1

1. Translate the following C++ code to assembly (make sure to create variables in the data section): Hassume you have va

Posted: Mon May 09, 2022 7:11 am
by answerhappygod
1 Translate The Following C Code To Assembly Make Sure To Create Variables In The Data Section Hassume You Have Va 1
1 Translate The Following C Code To Assembly Make Sure To Create Variables In The Data Section Hassume You Have Va 1 (51.66 KiB) Viewed 22 times
1 Translate The Following C Code To Assembly Make Sure To Create Variables In The Data Section Hassume You Have Va 2
1 Translate The Following C Code To Assembly Make Sure To Create Variables In The Data Section Hassume You Have Va 2 (76.59 KiB) Viewed 22 times
1. Translate the following C++ code to assembly (make sure to create variables in the data section): Hassume you have variables a, b, and tmp Jif( a if( a < b) { tmp = a; a = b; b = tmp; } cout << "The larger value is: " << a << " and the smaller value is: " << b << endl;
2. Translate the following C++ code to assembly (make sure to create variables in the data section): 11 cout << "Please enter a value: << endl; cin >> vali; cout << "Please enter a value: " << endl; cin >> val2; tmp vall; sum = 0; diff = 0; while( tmp >= val2 ) { sum = sum + tmp; diff++; tmp tmp 1; } !! << val1 cout << "The sum of values between: << " and " «< val2 << " is: " « sum << endl; cout << "The difference is: " << diff << endl; = -