Question: Translate the following C program into NASM ( 2 0 pts ) . #include int ary [ ] = { 1 2 , 4 0
Translate the following C program into NASM pts
#include
int ary;
int main
int sum ;
int highest ;
for int x ; x ; x
if highest aryx
highest aryx;
sum aryx;
printfSum is d
sum;
printfHighest value is d
highest;
Use indexing the ebxesi or ebxedi form You can have several dw values on the same line. Use the loop command.
Translate the following C program into NASM. pts extra credit
#include
int main
int x ;
char sent;
printfEnter sentence: ;
scanf
s sent;
while sent x
if sentxa && sentxz
sentx sentx & xDF;
x;
printfs
sent;
Use indexing the ebx form You can use the following pseudocode in the bss to allocate the array:
slen equ
sent resb slen
Note: the scanf format string of
s keeps reading characters until the newline otherwise it would end at the first space
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
