Not applicable
Nov 12, 2014
12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 12, 2014
12:39 AM
Simple code..
Result:
ptr == 0x00332000 (Wrong!!!)
Disassembly:
MOV R4,#0x2000
MOV R5,#0x00CC
MOV DPP2:0x1DAE,R4
MOV DPP2:0x1DB0,R5
Question:
Why does Keil use DPP2 here? (if im not mistaken DPP2 is designed for 'near; vars)
Why do I get wrong result?
How may I fix this to get correct result?
Thank you!
char __shuge* ptr;
ptr = (char __shuge *)0x00CC2000;
Result:
ptr == 0x00332000 (Wrong!!!)
Disassembly:
MOV R4,#0x2000
MOV R5,#0x00CC
MOV DPP2:0x1DAE,R4
MOV DPP2:0x1DB0,R5
Question:
Why does Keil use DPP2 here? (if im not mistaken DPP2 is designed for 'near; vars)
Why do I get wrong result?
How may I fix this to get correct result?
Thank you!
- Tags:
- IFX
0 Replies