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]
If u r using micro vision 2/3, u can see it in the symbol window.
Hi Neo, In the symbol window I couldnot see the address location where the variable val is getting stored.In the address coloumn its showing parameter. Hi Dan Henry, I couldnot see the variable getting stored in the nearby location in and around 9 words. looking for help.
Your subject is "constant storage location". Are you looking for 'val' or for the constant (169.0) assigned to 'val'?
I am looking for the constatant value 169.0 assigned to val.
Similar to how you provided the memory dump with disassembly in your original post of locations 0x000002B8-0x000002C0, please extract the dump of 0x000002B8-0x000002E8 and post it here.
"I couldnot see the variable getting stored in the nearby location in and around 9 words." Assuming CARM and 32-bit floats, at location 0x000002DC, you should see a word encoded with the value 169.0 encoded thusly: http://www.keil.com/support/man/docs/ca/ca_ap_float_format.htm It's just a raw value in memory that is read by the PC-relative load in your original post, not an instruction.
View all questions in Keil forum