In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwatts wrote: I like your suggestion. I would also like to see... varD VAR WORD @ $30 From your example, it looks like you're also saying that variables defined with the new "@" parameter would be treated differently by the compiler, i.e. they would always be accessed using direct addressing. So, as you said, the programmer would have to be sure BANK is set. Do I understand that correctly? That might be confusing. I think the assumption might be that adding @ $30 to a variable declaration is simply forcing it to a specific RAM address. There would still be the expectation that the compiler would handle the BANK transparently. It might be clearer if you used an extension to the variable name, such as _REG, to refer to the 5-bit register portion of the address. Something like this maybe... BANK array1 varB_REG = 5 ' Generates MOV varB,#5 [without regard to the current value of BANK] varC = 100 ' Generates MOV FSR,#varC; MOV IND, #100; BANK array1 [just like it does now - regardless of BANK] BANK This gives the programmer the option of declaring variables anywhere in RAM without worrying about BANKing. And it also gives him the option of reducing execution time and code space if he needs to. This form would remind the programmer to keep up with BANKing when he sees the _REG. If all the additional symbols this would add is a problem, you coulrd require an explicit form of the declaration to create the _REG. Maybe... varC BYTE @$30 REG 'defines varC at address $30 and creates a symbol varC_REG How does that sound? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=146212#m146255 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)