Question: Assembly language Pep9 only and translate to C program. Please only answer if you are positive on how to answer this.... Write a C function

Assembly language Pep9 only and translate to C program. Please only answer if you are positive on how to answer this....
Write a C function that is equivalent to the following Pep/9 subroutine. Q1 subsp 2,i ldwa 0,i stwa 0,s ldwx 0,i loop: cpwx 8, s brgt exit ldba 4, sfx cpba 6, sfx breq next ldwa 0, s adda 1, i stwa 0, s next: addx 1,i br loop exit: ldwa 0,s stwa 10,sf addsp 2, i ret
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
