SX/28 to SX/48 Migration Gotchas
gibbman
Posts: 98
If I don't need the extra ports on the SX/48, are there any major gotchas in migrating code from an SX/28 to a 48? Aside from changing the obvious, will the assembler make any changes required?
Thanks,
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In the end, it seems that it's all about getting the LEDs to blink....
Thanks,
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In the end, it seems that it's all about getting the LEDs to blink....
Comments
The mode and bank commands are changed. Id suggest using the available macros that implement the changed mode and bank for the SX48/52, and be sure to use them.
Note that global user memory begins at $A instead of $7 or $8.
I think those changes should be enough to allow the average program to compile and run.
This document is worth looking at: http://www.parallax.com/dl/appnt/sx/An15Conv.pdf
It takes more of a hardware rather than a software point of view but it does present the important changes.
David
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Though it would take me some time to create one, a conversion check list might teach newbies how to efficently adapt to the differences. It certainly would ease locating why a program ran on SX-28, but won't assmeble on your SX-48 code.
The problem with the SX-Ubicom document is it covers everything and has pages and pages of contidional code before you really get to where the program is. It is hard to locate what you want to know.
By the way, the wonderful thing about macros is that they do not load into memory -- just the snippet of code that they manage is inserted. While they may look huge or complex, they really are a convience.
William mentions that the Banks of RAM a bit awkward. The SX-28 uses every other bank to provide 50% of what the SX-48 provides. So if you lable banks on the SX-28 as Bank 0, Bank 1, Bank 2; you are creating seeds for disaster.
Try being more Generic. On the SX-28 you can lable the banks by their true memory map positions as Bank$1, Bank$3, and so on. This will migrate with better clarity as what you see is what you get.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In the end, it seems that it's all about getting the LEDs to blink....