pep/9 assembly language.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question
Please help me answer the questions
please can you translate the following c
program below to a pep/9 assembly language.
Please use the pep/9 reference in the
screenshot.
int number, base, answer;
int divide ( int numer, int denom ) {
int quotient, remain; remain = numer;
quotient = 0; while ( remain >= denom)
{ remain -= denom; quotient++; } // end for
return quotient;
} // end of divide()
void findLog (int *result, int num, int b ) { int
k; num--; *result = 0; while (num > 0) { *result
= *result + 1; num = divide(num, b);
} // end while
} // end of findLog()
Transcribed Image Text:please can you translate the following c program below to a pep/9 assembly language. Please use the pep/9 reference in the screenshot. int number, base, answer; int divide ( int numer, int denom ) { int quotient, remain; remain = numer; quotient = 0; while ( remain >= denom) { remain -= denom; quotient++; } // end for return quotient; } // end of divide() void findLog (int *result, int num, int b ) { int k; num--; *result = 0; while (num > 0) { *result = *result + 1; num = divide(num, b); } // end while } // end of findLog()
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning