Umeesha F.

asked • 04/08/21

Converting C to Pep9

Translate the following C program to Pep9 assembly language exactly as a compiler would translate it. Do not show the generated machine language code.

#include <stdio.h>
const int NUM1 = 87;
int num2;
char ch1;
char ch2;
int main() {
scanf(”%c %c %d”, &ch1, &ch2, &num2);
num2 = (num2 + NUM1) / 2;
printf(”Number: %d\n”, num2);
printf(”Letters: %c %c”, ch1, ch2);
return 0;}


1 Expert Answer

By:

Ben A. answered • 09/11/21

Tutor
4.7 (137)

Software Engineer Specializing in Java

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.