TK. Posted June 27, 2006 Report Share Posted June 27, 2006 Could you explain why the address to the high byte is moved from FSR0 to FSR2, and the FSR2 pointer incremented before reading?Taking the information from the SDCC manual, I know the data should go into FSR2+2...So why the move from FSR0L? Perhaps that information in the manual is outdated? I was also wondering why you didn't just do PREINC0?I started the wrapper at a time where this documentation was not available... so the approach was very easy: I compiled a dummy function with the same parameter list, and had a look into the resulting .asm file. I copied the generated code 1:1 to ensure that I don't oversee any side effects. I think that the compiler uses FSR2 as a temporary pointer to ensure, that a function never returns with an unbalanced stack pointer in FSR0. However, for the C wrapper we have some potential for optimizations here - with the disadvantage, that there will also be a lot of additional debugging effort ;-)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
audiocommander Posted August 26, 2006 Author Report Share Posted August 26, 2006 TK,just wanted to add a final big thanks,with the new wrapper 1.9a MIOS_HLP_Dec2BCD() works like a charm :DBye,Michael Quote Link to comment Share on other sites More sharing options...
TK. Posted August 26, 2006 Report Share Posted August 26, 2006 cheers :)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.