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.
As a part of an "In application programming" I am using the following assembler code:
#pragma asm MOV R0,#14 //OSC frec MOV R1,#02H //PROGRAM DATA BYTE #pragma endasm
Hi Juan, How about the following c lines? It doesn't give exactly what you want, but it should be working. Pay attention to the order of two lines and the bank you are using. I will never do that in a real project. BTW, why do you hate #pragma? Sometimes you have to deal with it, like or not.
// If you are using bank 0 *((unsigned char data *) 0x01) = 2; // == MOV R1,#02H //PROGRAM DATA BYTE *((unsigned char data *) 0x00) = 14; // == MOV R0,#14 //OSC frec asm result in .src MOV R0,#01H MOV @R0,#02H MOV R0,#00H MOV @R0,#0EH
Hi Frank, Thanks for your reply, I have tried your lines but didn't work. I guest I will keep using assembler for IAP. Thanks Juan Baez