how_to_mix_c_and_asm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
how_to_mix_c_and_asm [2006/10/15 09:35] – (old revision restored) 127.0.0.1 | how_to_mix_c_and_asm [2008/09/10 17:31] – code plugin disappearance is killing me :/ audiocommander | ||
---|---|---|---|
Line 6: | Line 6: | ||
<code c> | <code c> | ||
- | unsigned char Scale_7bit(unsigned char evnt2, unsigned char min, unsigned char max) | + | unsigned char Scale_7bit(unsigned char evnt2, unsigned char min, unsigned char max) { |
- | { | + | |
// scaled value is (<8-bit random> * ) >> 8 | // scaled value is (<8-bit random> * ) >> 8 | ||
PRODL = evnt2 << 1; // 8bit value | PRODL = evnt2 << 1; // 8bit value | ||
Line 20: | Line 19: | ||
</ | </ | ||
+ | Also, as well as the above example of ' |
how_to_mix_c_and_asm.txt · Last modified: 2008/09/29 12:27 by wackazong