please modify the c language program into a pep 9 assembly language #include int num, 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( ) int modulus ( int n, int d ) { int quot, rem; rem = n; quot = 0; while ( rem >= d ) { rem -= d; quot++; } // end for return rem; } // end of modulus( ) int main() { printf("? "); scanf("%d", &num); answer = divide(num, 20); printf("%d / 20 = %d\n", num, answer); answer = modulus(num, 20); printf("%d mod 20 = %d\n", num, answer); answer = divide(num, 35); printf("%d / 35 = %d\n", num, answer); answer = modulus(num, 35); printf("%d mod 35 = %d\n", num, answer); return 0; } // end of main
please modify the c language program into a pep 9 assembly language
#include <stdio.h> int num, 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( ) int modulus ( int n, int d ) { int quot, rem; rem = n; quot = 0; while ( rem >= d ) { rem -= d; quot++; } // end for return rem; } // end of modulus( ) int main() { printf("? "); scanf("%d", &num); answer = divide(num, 20); printf("%d / 20 = %d\n", num, answer); answer = modulus(num, 20); printf("%d mod 20 = %d\n", num, answer); answer = divide(num, 35); printf("%d / 35 = %d\n", num, answer); answer = modulus(num, 35); printf("%d mod 35 = %d\n", num, answer); return 0; } // end of main
Step by step
Solved in 2 steps