Translate the following C program into NASM. #include int main() { int x = 0; char sent[20]; printf("Enter sentence: "); scanf("%[^\n]s", sent); while (sent [x] != '\0'){ if (sent[x] >= 'a' &&...



Translate the following C program into NASM.



#include


int main()


{


    int x = 0;


    char sent[20];


    printf("Enter sentence: ");


    scanf("%[^\n]s", sent);


    while (sent [x] != '\0'){


        if (sent[x] >= 'a' && sent[x] <=>


            sent[x] = sent[x] & 0xDF;


        x++;


    }


    printf("%s \n", sent);


}


Use indexing (the [ebx] form). You can use the following pseudocode in the “bss” to allocate the array:



    slen equ 20


    sent resb slen



Note: the scanf format string of “%[^\n]s” keeps reading characters until the newline (otherwise it would end at the first space).



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here