In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: Zoot, The banked memory allows for even better optimization for multiple identical code, for example receive uarts, because not only can you use IND but also direct addressing. See the attached file which is a header for a uart library that I am writing. Note the uart fields as being declared in the ram area $10-$1F. The code is written as a macro and will only be inserted once in the program. But this code can be called with FSR set to any bank, eg. $30, $40 or $E0 etc. The direct addressed registers are actual at the offsets in the bank addressed by FSR. So this code can support multiple receive uarts without writing code for each of those uarts seperately. All that needs to be done is to set some registers and this can be done from a datatable (that 's how I do it in my library). regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=284586#m284680 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)