In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Here are two makros that help to write portable code. When you compile it for the SX48/52, have the symbol SX48_52 defined. Make sure that you only invoke the _mode and _bank macros instead of directly placing mode or bank instructions in the code. [code] _mode MACRO 1 IFDEF SX48_52 mov w, #\1 mov m, w ELSE mov m, #\1 ENDIF ENDM _bank macro 1 bank \1 ; For SX18/20/28 change ; FSR bits 7...5, ; for SX48/52 change ; FSR bits 6...4 IFDEF SX48_52 ; For SX48/52 also change IF \1 & %10000000 ; FSR bit 7 setb fsr.7 ELSE clrb fsr.7 ENDIF ENDIF endm [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=114254#m114386 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)