This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

constant storage location

Hello all,

I am using a float variable named val which has a value 169.0 in my program .When I ran the program I got the following assembly code in my disassembly window.Now I want to know the memory location at which the value 169.0 has been stored.Is it possible to know it from the code below?

Looking for your help.


  49: val=169.0;
0x000002B8  E59F1024  LDR       R1,[PC,#0x0024]
0x000002BC  E28D0000  ADD       R0,R13,#0x00000000
0x000002C0  E5801000  STR       R1,[R0]

Parents
  • Hi Dan Henry,
    Here is the code from the disassembled window for my program.

    Thanks.

        44:   void main ()
        45: {
        46:
        47: float val,result;
        48:
    0x000002B0  E92D4000  STMDB     R13!,{R14}
    0x000002B4  E24DD008  SUB       R13,R13,#0x00000008
        49: val=144.0;
        50:
        51:
    0x000002B8  E59F1024  LDR       R1,[PC,#0x0024]
    0x000002BC  E28D0000  ADD       R0,R13,#0x00000000
    0x000002C0  E5801000  STR       R1,[R0]
        52: result=sqrt(val);
    0x000002C4  E28D0000  ADD       R0,R13,#0x00000000
    0x000002C8  E5900000  LDR       R0,[R0]
    0x000002CC  EB00014D  BL        ?C?CASTF?A(0x00000808)
    0x000002D0  EBFFFF7B  BL        sqrt(0x000000C4)
    0x000002D4  E28D1004  ADD       R1,R13,#0x00000004
    0x000002D8  E5810000  STR       R0,[R1]
        53: }
    0x000002DC  E28DD008  ADD       R13,R13,#0x00000008
    0x000002E0  E8BD8000  LDMIA     R13!,{PC}
    0x000002E4  43100000  DDIA      0x43100000
    0x000002E8  E59FC000  LDR       R12,[PC]
    0x000002EC  E12FFF1C  BX        R12
    0x000002F0  000002F5  DD        0x000002F5
                     fabs:
    

Reply
  • Hi Dan Henry,
    Here is the code from the disassembled window for my program.

    Thanks.

        44:   void main ()
        45: {
        46:
        47: float val,result;
        48:
    0x000002B0  E92D4000  STMDB     R13!,{R14}
    0x000002B4  E24DD008  SUB       R13,R13,#0x00000008
        49: val=144.0;
        50:
        51:
    0x000002B8  E59F1024  LDR       R1,[PC,#0x0024]
    0x000002BC  E28D0000  ADD       R0,R13,#0x00000000
    0x000002C0  E5801000  STR       R1,[R0]
        52: result=sqrt(val);
    0x000002C4  E28D0000  ADD       R0,R13,#0x00000000
    0x000002C8  E5900000  LDR       R0,[R0]
    0x000002CC  EB00014D  BL        ?C?CASTF?A(0x00000808)
    0x000002D0  EBFFFF7B  BL        sqrt(0x000000C4)
    0x000002D4  E28D1004  ADD       R1,R13,#0x00000004
    0x000002D8  E5810000  STR       R0,[R1]
        53: }
    0x000002DC  E28DD008  ADD       R13,R13,#0x00000008
    0x000002E0  E8BD8000  LDMIA     R13!,{PC}
    0x000002E4  43100000  DDIA      0x43100000
    0x000002E8  E59FC000  LDR       R12,[PC]
    0x000002EC  E12FFF1C  BX        R12
    0x000002F0  000002F5  DD        0x000002F5
                     fabs:
    

Children