We can allocate string literals and global variables in the .data section of an
ID: 3793301 • Letter: W
Question
We can allocate string literals and global variables in the .data section of an assembly language program. Write MARS directives which would allocate the following C-like variables in the .data section. char ch 1 = ' ', ch2 = '$';//Assume char variables/values are 1-byte int x = 0, y = -1, z;//Assume int variables/values are 4-bytes char *name = "Marge Simpson";//name is a label assoc'd with the address of the first char int iarray[250] = {0};//iarray is an array of 250 ints, all initialized to 0 char carray[250] = {0};//carray is an array of 250 chars, all initialized to 0Explanation / Answer
b)
(c)
(d)
(e)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.