Shop OBEX P1 Docs P2 Docs Learn Events
SX/28 to SX/48 Migration Gotchas — Parallax Forums

SX/28 to SX/48 Migration Gotchas

gibbmangibbman Posts: 98
edited 2006-03-03 22:46 in General Discussion
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....

Comments

  • David BDavid B Posts: 592
    edited 2006-03-01 20:21
    No, the compiler won't make a few important changes.

    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
  • william chanwilliam chan Posts: 1,326
    edited 2006-03-03 01:03
    If you use fsr in SX48, be careful that the current bank might be changed !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-03 03:59
    Going from the comfort of Guenther's text [noparse][[/noparse]which is mostly SX-28] to using the Standardized SASM Template as provided by SX-Ubicom can be a bit daunting.

    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
  • gibbmangibbman Posts: 98
    edited 2006-03-03 22:46
    All suggestions most helpful. I have an inkling of the memory map changes, and the fuse changes, etc. Guess it's a matter of trying some code and see where it fails. Thanks, folks!

    Jim

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    In the end, it seems that it's all about getting the LEDs to blink....
Sign In or Register to comment.