| Details | Message |
|---|
Read-Only Author Peter Pan Posted 8-Mar-2003 20:25 GMT Toolset None |  Asscess Code address Peter Pan 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!
|
|
Read-Only Author Andrew Neil Posted 10-Mar-2003 00:35 GMT Toolset None |  RE: Asscess Code address Andrew Neil Have you read the section Accessing Absolute Memory Locations in the Manual? |
|
Read-Only Author terrance peiris Posted 28-Apr-2003 07:36 GMT Toolset None |  RE: Asscess Code address terrance peiris 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 |
|
Read-Only Author Jon Ward Posted 30-Apr-2003 16:36 GMT Toolset C51 |  RE: Asscess Code address Jon Ward 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 |
|
Read-Only Author erik malund Posted 30-Apr-2003 17:42 GMT Toolset C51 |  RE: Asscess Code address erik malund The P89c51rd2 is a Philips chip.
Erik |
|
Read-Only Author Jon Ward Posted 30-Apr-2003 20:43 GMT Toolset C51 |  RE: Asscess Code address Jon Ward 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 |
|
Read-Only Author J Guy Posted 30-Apr-2003 19:35 GMT Toolset C51 |  RE: Access Code address J Guy See:
http://www.keil.com/support/docs/307.htm
Substitute the dedired target address for 0x0000. |
|
Read-Only Author Andy Neil Posted 30-Apr-2003 22:15 GMT Toolset C51 |  RE: Access Code address Andy Neil 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?) |
|
Read-Only Author J Guy Posted 1-May-2003 00:06 GMT Toolset C51 |  RE: Access Code address J Guy 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. |
|