 # High-level code PartA if (i &gt;= j) f = g + h; f = f &ndas...

## Question

High-level code
PartA
if (i >= j)
f = g + h;
f = f – i;

Part B
if( a != b )
c = d;
else
b = b + 1;

Part C
// add the numbers from 0 to 9
int sum = 0;
int i;
for (i=0; i!=10; i = i+1) {
sum = sum + i;
}

PartD
// determines the power
// of x such that 2x = 128
int pow = 1;
int x = 0;
while (pow != 128) {
pow = pow * 2;
x = x + 1;
}

PartE
switch (k) {
case0:
f=i+j;
break;
case1:
f=g+h;
break;
case2:
f=g–h;
break;
case3:
f=i–j;
break;
}

PartF
main(){
int a = 19, step = 0;
printf("a = %d\n",a); //cout << a;
while(a != 1) {
step++;
if(a%2)
a = 3*a + 1;
else
a /= 2;
printf("a = %d\n",a);
}
printf("Total Steps: %d\n",step);
}

Part G
Write the complete code that has the following segment, prompt the user for entery
if(Fahrenheit < 0x20)
{
printf("Fahrenheit value too small\n");
exit(0);
}
f(Fahrenheit > limit)
{
printf("Start value is greater than limit value\n");
exit(0);
}
printf("Fahrenheit Celsius\n); // output table header
while(limit > Fahrenheit)
{
Celsius = (Fahrenheit - 32)*5/9 ;
printf("%d %d\n",Fahrenheit, Celsius);
Fahrenheit += 10;
}

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
INCLUDE Irvine32.inc
.data
; declare variables here
i SDWORD 5
j SDWORD 4
f SDWORD 3
g SDWORD 2
h SDWORD 1

.code
main PROC
; write your code here

;This part is the given high level code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Moving variables to registers
mov eax, i; eax = i
mov ebx, j; ebx = j
mov ecx, g; ecx = g
mov edx, h; edx...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

# 50% discount

Hours
Minutes
Seconds
\$13.00 \$6.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.