In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Hit the docs -- in ASSEMBLY the vanilla BANK statement will not set all bits of the upper nibble of FSR, only three. On the SX28, it doesn't matter, as it doesn't have the upper 8 banks of RAM. Generally, if doing assembly, it helps to use a macro for BANK, e.g. [code] ASM _BANK MACRO 1 BANK \1 IFDEF SX48_52; For SX48/52 change IF \1 & %10000000 ; FSR bit 7 SETB FSR.7 ELSE CLRB FSR.7 ENDIF ENDIF ENDM ENDASM ' then in use .... ASM _BANK someVarName MOVE W, someVarName _BANK someOtherVar MOV someOtherVar W ENDASM [/code] I generally *always* use the macro for all assembly so it doesn't matter if it compiles for an SX28 or SX48. Note that on the SX48 it will always take TWO instructions to properly set the bank. The "BANK" instruction in SX/B handles this for you, so you may not ever have seen it, unless you check the assembly output carefully. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=454280#m454319 Need assistance? Send an email to the Forum Administrator at sysadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)