??? 03/02/06 10:03 Read: times |
#111049 - Code protection and constants |
Hello,
At the moment I am writing code for the P89LPC9221 that has some constants. Everything works well before I set the 'MOVC Disable'-protection of that sector. I want to protect the code, but I must be able to access the constants within the program. Is there a solution to this problem? I think I have a possible solution: Write a asm-routine for the constants. Each byte of a constant can be accessed with a indexed jump/call to xor commands. Eg. you want to access a constant with 2 bytes (0x4E,0x2A). A jump to XOR 0x2A will have the result of 0x2A when the init value is 0x00. A jump to XOR 0x64 before XOR 0x2A will end up in getting 0x4E. I don't know much about asm, can someone help me with that? Another solution is also welcome. Kind regards, Mark |
Topic | Author | Date |
Code protection and constants | 01/01/70 00:00 | |
Another possiblilty | 01/01/70 00:00 | |
Lock bits of each sector.![]() | 01/01/70 00:00 |