In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: [quote="RonW"] I like your suggestion. I would also like to see... varD VAR WORD @ $30 [/quote]Yep, Okay, WORD variables too. [quote="RonW"] 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? [/quote]Yes, you understand what I'm getting at. [quote="RonW"]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? [/quote]Hmmm, I'll have to think about how that will impact the compiler. It's an interesting idea though... Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=146212#m146256 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)