My SX52 stores less variables than my sx28, I know thats wrong, BUT

I recently purchased an SX52 board and I have been using it to DEBUG programs when there wasn't any other chips required. Now I am moving my SX 28 program over to the SX 52. As soon as I change the DEVICE settings to SX52, OSCHS2, BOR42, I get ERROR #3 "exceeding available ram".
When I switch it back to SX28 the error goes away. I have ran into this before with my SX28 and I know how to fix it, But why should I have to do that with the SX52?. The only·information I have been able to find that shows the SX52·has that's less than the SX28, was the statement in the Definitions portion of the help section that states: SX28 General 19, SX52 17, but program memory is supposed to be twice the size (I don't know what "general" represents, I understand the rest of the table info)·.
From Bean's RJ_value code, the variable [noparse][[/noparse]value···· VAR······ Word] is where the problem is and like I said, it goes away just as soon as it's changed back to SX28.
Thanks
Post Edited (Capt. Quirk) : 3/22/2007 5:18:56 AM GMT
When I switch it back to SX28 the error goes away. I have ran into this before with my SX28 and I know how to fix it, But why should I have to do that with the SX52?. The only·information I have been able to find that shows the SX52·has that's less than the SX28, was the statement in the Definitions portion of the help section that states: SX28 General 19, SX52 17, but program memory is supposed to be twice the size (I don't know what "general" represents, I understand the rest of the table info)·.
From Bean's RJ_value code, the variable [noparse][[/noparse]value···· VAR······ Word] is where the problem is and like I said, it goes away just as soon as it's changed back to SX28.
Thanks
Post Edited (Capt. Quirk) : 3/22/2007 5:18:56 AM GMT
Comments
The reason you're running out of room is that the SX52 has two more ports and those live in BANK zero; on the SX28 these vars are available for general purpose use.
I understand what you are talking about and I am left with more questions.
I looked at the .lst file and saw the array addressed to the top of Bank1, does that mean only Arrays can access the top 8 rows of Bank 1 & 2 ? or can I change the output of SX/B to address normal variables there instead?
I have been kinda switching back and forth between Al William's book and Gunther's. I had decided to completely read Al's book all the way through first, until this. Gunther's book seems to cover this part a bit better, so time for a suit change and then back at it.
Thanks
It looks like you are having the same type of difficulty I am with large programs. It is easy in SX/B to use VAR BYTE statements when defining variables but unlike some other compliers these variables can not reside anyplace in RAM. They must reside in a few specific locations. When these locations are all occupied, you can not create any more new variables using VAR BYTE or VAR WORD statements even if you have free RAM. An alternative that often works is to create byte variables as part of an array. These variables work just fine with many (some say most) SX/B commands. (I am still trying to nail down exactly which commands will work and which ones will not.)
You might want to consider placing several of your byte variables in an array for some of these larger programs. This is the approach I am presently taking.
- Sparks
Using the idea of sticking with one chip, I tried 2 SX52·examples to see the pattern and I·incorporated the variables portion of the .LST file into each of the examples. Both compiled w/o errors before I put the uncommented .LST files into·each code page