Homework Solution: b) What message will printf print for part a) (3 pts)…

    Question 3 (10 pts): Memory Map Practice a) In order to debug an embedded application or to understand an embedded application developed by someone else, it is often necessary to understand how data memory is modified by C code statements Fill in the given memory map after the C fragment below has been executed. Note: The TM4C123 uses Little Endian ordering for memory (i.e. lower significant bytes of an element are stored at lower addresses).(7 pts) char msq[4] Sal; short age [1] {0x2070}; int, speed [2]: msg [3] msg [1] 0x61; 0x6F; age [0] = age [0] + 2; speed [0] 0x696C6345; age [3] age [4] = 0x7370; = 0x65; printf(%s, msg); Mem Location 0xFF00lOxFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFFOAlOxFFOB 0xFFOCIOxFFOD Value ms age speed Index0 0 0 1 b) What message will printf print for part a)(3 pts) Question 3 (10 pts): Memory Map Practice a) In order to debug an embedded application or to understand an embedded application developed by someone else, it is often necessary to understand how data memory is modified by C code statements. Fill in the given memory map after the C fragment below has been executed. Note: The TM4C123 uses Little Endian ordering for memory (i.e. lower significant bytes of an element are stored at lower addresses). (7 pts) char msg[4] = “Sal”; short age[1] = {0x2070}; int speed[2]; msg[3] = 0x61; msg[1] = 0x6F; age[0] = age[0] + 2; speed[0] = 0x696C6345; age[3] = 0x7370; age[4] = 0x65; printf(“%s”, msg);
    Memory Location 0xFF00 0xFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFF0A 0xFF0B 0xFF0C 0xFF0D
    Value
    Array msg age speed
    Index 0 1 2 3 0 0 1
    b) What message will printf print for part a) (3 pts)
    Question 3 (10 pts): Memory Map Practice a) In order to debug an embedded application or to understand an embedded application developed by someone else, it is often necessary to understand how data memory is modified by C code statements Fill in the given memory map after the C fragment below has been executed. Note: The TM4C123 uses Little Endian ordering for memory (i.e. lower significant bytes of an element are stored at lower addresses).(7 pts) char msq[4] "Sal"; short age [1] {0x2070}; int, speed [2]: msg [3] msg [1] 0x61; 0x6F; age [0] = age [0] + 2; speed [0] 0x696C6345; age [3] age [4] = 0x7370; = 0x65; printf("%s", msg); Mem Location 0xFF00lOxFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFFOAlOxFFOB 0xFFOCIOxFFOD Value ms age speed Index0 0 0 1 b) What message will printf print for part a)(3 pts)

    Expert Answer

    Question 3 (10 pts): Fame Map Practice a) In dispose to debug an embedded impression or to conceive an embedded impression open by someone else, it is frequently requisite to conceive how grounds fame is qualified by C command statements Fill in the abandoned fame map following the C scrap under has been performed. Note: The TM4C123 uses Little Endian disposeing coercion fame (i.e. inferior telling bytes of an component are stored at inferior addresses).(7 pts) char msq[4] Sal; brief date [1] {0x2070}; int, expedite [2]: msg [3] msg [1] 0x61; 0x6F; date [0] = date [0] + 2; expedite [0] 0x696C6345; date [3] date [4] = 0x7370; = 0x65; sculpturef(%s, msg); Mem Location 0xFF00lOxFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFFOAlOxFFOB 0xFFOCIOxFFOD Estimate ms date expedite Index0 0 0 1 b) What messdate accomplish sculpturef sculpture coercion sunder a)(3 pts)

    Question 3 (10 pts): Fame Map Practice

    a) In dispose to debug an embedded impression or to conceive an embedded impression open by someone else, it is frequently requisite to conceive how grounds fame is qualified by C command statements. Fill in the abandoned fame map following the C scrap under has been performed. Note: The TM4C123 uses Little Endian disposeing coercion fame (i.e. inferior telling bytes of an component are stored at inferior addresses). (7 pts)

    char msg[4] = “Sal”;

    brief date[1] = {0x2070};

    int expedite[2];

    msg[3] = 0x61;

    msg[1] = 0x6F;

    age[0] = date[0] + 2;

    speed[0] = 0x696C6345;

    age[3] = 0x7370;

    age[4] = 0x65;

    printf(“%s”, msg);

    Memory

    Location

    0xFF00 0xFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFF0A 0xFF0B 0xFF0C 0xFF0D
    Value
    Array msg age speed
    Index 0 1 2 3 0 0 1

    b) What messdate accomplish sculpturef sculpture coercion sunder a) (3 pts)

    Question 3 (10 pts): Fame Map Practice a) In dispose to debug an embedded impression or to conceive an embedded impression open by someone else, it is frequently requisite to conceive how grounds fame is qualified by C command statements Fill in the abandoned fame map following the C scrap under has been performed. Note: The TM4C123 uses Little Endian disposeing coercion fame (i.e. inferior telling bytes of an component are stored at inferior addresses).(7 pts) char msq[4] “Sal”; brief date [1] {0x2070}; int, expedite [2]: msg [3] msg [1] 0x61; 0x6F; date [0] = date [0] + 2; expedite [0] 0x696C6345; date [3] date [4] = 0x7370; = 0x65; sculpturef(“%s”, msg); Mem Location 0xFF00lOxFF01 0xFF02 0xFF03 0xFF04 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFFOAlOxFFOB 0xFFOCIOxFFOD Estimate ms date expedite Index0 0 0 1 b) What messdate accomplish sculpturef sculpture coercion sunder a)(3 pts)

    Expert Apology

     

    Editable command:

    a)

    Using C Command:

    #include<stdio.h>

    int ocean()

    {

    char msg[4] = “Sal”;

    brief date[1] = {0x2070};

    int expedite[2];

    msg[3] = 0x61;

    msg[1] = 0x6F;

    age[0] = date[0] + 2;

    speed[0] = 0x696C6345;

    age[3] = 0x7370;

    age[4] = 0x65;

    printf(“Coercion msg[0]: %02xn”, msg[0]);

    printf(“Coercion msg[1]: %02xn”, msg[1]);

    printf(“Coercion msg[2]: %02xn”, msg[2]);

    printf(“Coercion msg[3]: %02xn”, msg[3]);

    printf(“Coercion date[0]: %04xn”, date[0]);

    printf(“Coercion expedite[0]: %08xn”, expedite[0]);

    printf(“Coercion expedite[1]: %08xn”, expedite[1]);

    }

    b)

    Using C Command:

    #include<stdio.h>

    int ocean()

    {

    //declare char changeable coercion sculpture

    char sculpture[14];

    //each estimate from the sunder a

    print[0]=0x53;

    print[1]=0x6F;

    print[2]=0x6C;

    print[3]=0x61;

    print[4]=0x72;

    print[5]=0x20;

    print[6]=0x45;

    print[7]=0x63;

    print[8]=0x6C;

    print[9]=0x69;

    print[10]=0x70;

    print[11]=0x73;

    print[12]=0x65;

    print[13]=0x00;

    //display the messdate coercion sculpturef from sunder a)

    printf(“%c%c%c%c%c%c%c%c%c%c%c%c%c%c”, sculpture[0],print[1],print[2],print[3],print[4],print[5],print[6],

    print[7],print[8],print[9],print[10],print[11],print[12],print[13]);

    }