I'm currently trying to understand what is going on in the sp_driver.s file from Atmel. And I'm not failing completely, I think.
But there is one thing I don't understand. In some of the functions, the contents of RAMPZ are first "pushed" into r19, and later "popped" back. The instructions used are
in r19, 0x3b
out 0x3b, r19
This makes sense. But writing to CCP is done like this:
ldi r18, 0x9D
sts 0x0034, r18
As I see things, out 0x34, r18 would do exactly the same thing as sts 0x034, r18. Except that "out" would take one byte and one clock cycle less than "sts". So why did someone choose "sts"?
I know it's not a big deal, but if one of you has a logical explanation, I'd like to see it.