??? 04/27/04 14:14 Read: times |
#69309 - RE: THE LESSON OF IT ALL!!!!!!!! Responding to: ???'s previous message |
Allow me to share with you a little snippet of Atmel's flash API example code. Notice not only the write to DPTR but also the even more hair-raising use of the accumulator. I'm not sure why they didn't have the balls to write directly to R1 as well:
Uchar __api_wr_code_byte (Uint16 address, Uchar value) small { bit ea_save; ea_save = EA; EA = 0; DPTR = address; ACC = 0x02; ASM_MOV_R1_A(); ACC = value; MAP_BOOT; __API_FLASH_ENTRY_POINT(); UNMAP_BOOT; EA = ea_save; // restore interrupt state return (ACC); } |
Topic | Author | Date |
how to access DPTR using Ride c | 01/01/70 00:00 | |
RE: how to access DPTR using Ride c | 01/01/70 00:00 | |
DO NOT access DPTR using C ! | 01/01/70 00:00 | |
RE: how to access DPTR using Ride c | 01/01/70 00:00 | |
RTFM! | 01/01/70 00:00 | |
RE: how to access DPTR using Ride c | 01/01/70 00:00 | |
RE: Hack!? | 01/01/70 00:00 | |
RE: Hack!? | 01/01/70 00:00 | |
RE: Hack!? | 01/01/70 00:00 | |
Just ignore me - Im talking rubbish! | 01/01/70 00:00 | |
Hello ALL THANK YOU | 01/01/70 00:00 | |
RE: Hack!? | 01/01/70 00:00 | |
RE: Oops, many people - many suggestions | 01/01/70 00:00 | |
RE: Hack!?Oleg | 01/01/70 00:00 | |
RE: Hack!?Oleg | 01/01/70 00:00 | |
RE: THE LESSON OF IT ALL!!!!!!!! | 01/01/70 00:00 | |
RE: THE LESSON OF IT ALL!!!!!!!! | 01/01/70 00:00 | |
RE: THE LESSON OF IT ALL!!!!!!!! | 01/01/70 00:00 | |
RE: Atmel - Why??!! | 01/01/70 00:00 | |
THANK YOU ALL | 01/01/70 00:00 | |
RE: THANK YOU ALL | 01/01/70 00:00 | |
RE: THANK YOU ALL![]() | 01/01/70 00:00 |