In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: [quote="RonW"] Following a BANK defaultbank directive, the compiler could use direct addressing to access varibles in defaultbank and use indirect addressing only for variables not in defaultbank. I think this is possible as long as arrays don't cross bank boundaries. [/quote] Ron, That would be a major undertaking. To be honest, I think you are using SX/B in ways 99% of user would never attempt. I think an easier way would be ... (see below) [quote="RonW"] Also, it would be convenient to be able to define variables (including words) above bank 0 without using arrays and aliases. [/quote] Now that would not be too hard. I'm thinking something like: [code] array1 VAR Byte(16) varA VAR array1(0) ' This is a normal aliases array element varB VAR Byte @ $30 ' SX/B will generate code for a "normal" (non-array) variable varC VAR Byte @ array1(0) ' SX/B will generate code for a "normal" (non-array) variable Now the element array1(0) can be aliased as regular array element [varA] or as a regular byte variable [varB or varC]. Of course it would be up to the programmer to make sure the BANK is set properly before using [varB or varC]. As in... [code] BANK array1 varB = 5 ' Generates MOV varB,#5 varC = 100 ' Generates MOV varC,#100 BANK [/code] Note that BANK without any parameters will restore the default bank on both the SX28 & SX48 properly. Could you live with that ? Bean. [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=146212#m146235 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)