brentru / 32to328ptranslator

Extendable shell script to translate ATMEGA32 code to ATMEGA328P code
GNU General Public License v3.0
0 stars 0 forks source link

Converter does not recognize IO vs extended IO adressing #2

Open bveina opened 8 years ago

bveina commented 8 years ago

when converting between M32 and M328p assembly code it is important to realize that registers can change absolute position. this may move some registers from IO space to extended IO space. this means that some registers can no longer use the OUT/IN addressing modes and must instead use LDS/STS addressing modes.

this converter does not take that into account.

brentru commented 8 years ago

Thanks for the advice & help! I understand what you are saying and my lab partner and I had a macro set up to do OUT/IN addressing by using STS addressing. Would you consider a better implemented translator to have used STS/LDS addressing replacements for this, instead of the program having macros?