We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using the P89c51rd2's IAP function the store the data to the code space at 0xff00 ~ 0xffd0 for example, i want to call the data at oxff00 how can i do it in C51? can i use pointer? please help and many thx!
Have you read the section Accessing Absolute Memory Locations in the Manual?
Hi Peter, No one will knows where is the location of the code memory, This is the responsible of the complier. If you are talking about data memory to fixed address location you can use _at_ command to specify the location BYTE time_second _at_ 0x0005 ; then you just call time_second terrance
Check the following Knowledgebase Article: http://www.keil.com/support/docs/2045.htm Although it talks about the Philips IAP interface, you should be able to use this information to access the Atmel IAP routines as well. Jon
The P89c51rd2 is a Philips chip. Erik
See: http://www.keil.com/support/docs/307.htm Substitute the dedired target address for 0x0000.
The P89c51rd2 is a Philips chip. Uhh. Yeah. So it is. I was just doing too many thing at once, I guess, and I confused myself. :-) Jon
looking at the other reference cited earlier, it seems to me like the 0xFF00 is a sort of API call, requiring certain data to be set up in certain locations as "parameters" to the call - a bit like the old MS-DOS INT 21 "calls". I'm not sure that you could guarantee this by just casting C:0xFF00 as a function pointer? (the API may well not correspond to the C51 calling convention?)
The way the original post is worded is confusing. ...to "call" "data'. My reference is to call "code" - perhaps some self-modifying code that never gets old. The Keil macros in ABSACC.h (CBYTE,CWORD) provide easy access to "read" "data" in "code" space.