Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20748

BASCOM-AVR : data problem : REPLY

$
0
0
[quote:34790e889e="albertsm"]when you put a label into the code the data need to be aligned. otherwise a RESTORE on a label will not work.[/quote:34790e889e] With all due respect :D I see no reason, why there should be only access to aligned bytes. The compiler knows, whether an even or odd flash address is accessed. The Restore command accepts no variable, so everything is set and can be done at compile time. In case a Data-label points to an odd byte address, the Z-pointer can be set to the basic word address, then a dummy LPM read is issued and voila, c'est fait. I'm a friend of large data segments, which can be either read sequentially from start till end, or read segmented by labels. Padding bytes are therefore unnecessary and annoying.

Viewing all articles
Browse latest Browse all 20748

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>