SX/B Compilation difference between SX18 and SX28
Hi,
I noticed a compilation difference between SX18 and SX28 regarding assigned VAR BYTE (1) locations.
In the attached file I have 19 ram bytes that on the SX18 occupy $0C-$1E and on the SX28 $0D-$1F
and 5 array bytes that occupy $F0-$F4 (forced using __RAM($xx)).
If I use VAR BYTE (1) the array bytes are assigned to these locations for a SX18,
but for SX28, the SX/B compiler tries to assign $FD and higher, resulting in an
EXCEEDING RAM error.
Is there a reason why $F0-$F4 can not or should·not be used for array variables on the SX28 ?
The·SX/B compiler used is 1.51.03
You can select SX18 or SX28 at the top of the file. Now that I forced
the array variables to $F0-$F4 the compilation is always succesful.
regards peter
I noticed a compilation difference between SX18 and SX28 regarding assigned VAR BYTE (1) locations.
In the attached file I have 19 ram bytes that on the SX18 occupy $0C-$1E and on the SX28 $0D-$1F
and 5 array bytes that occupy $F0-$F4 (forced using __RAM($xx)).
If I use VAR BYTE (1) the array bytes are assigned to these locations for a SX18,
but for SX28, the SX/B compiler tries to assign $FD and higher, resulting in an
EXCEEDING RAM error.
Is there a reason why $F0-$F4 can not or should·not be used for array variables on the SX28 ?
The·SX/B compiler used is 1.51.03
You can select SX18 or SX28 at the top of the file. Now that I forced
the array variables to $F0-$F4 the compilation is always succesful.
regards peter
Comments
· I'm not sure why the SX28 won't use $F0 to $F4 ? I don't see any problem.
· I'll check to make sure the beta version acts properly.
P.S. I checked the source code. I assume two memory areas ($F0 to $F4) and ($FD to $FF) to the same array element for the SX28. So area ($F0 to $F4) will never be used.
Thanks for catching that Peter. I will make note of it. Be aware that the next version of SX/B puts these area together. And the locations from $F0 to $F7 are free for the SX18, and $F0 to $F6 are free for the SX28.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
Post Edited (Bean (Hitt Consulting)) : 5/6/2008 12:49:50 PM GMT
I also can not reason why SX/B 1.51.03 for the SX28·skips $F0-$F4, but it does.
Luckily I can force it to use $F0-$F4.
Regarding the beta SX/B: when I compile the program with the beta,
the generated video is not good, in the sense that it appears as if
the first 3 rows are skipped, then there is a row, followed by another
skipped row, followed by another row.
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
tttttttttttttttt
xxxxxxxxxxxxxxxx
tttttttttttttttt
where x is simply blank and t is a character.
I have not compared both listings but it looks the beta
generates code that uses more cycles (or less?) but
significantly different so it shows on the video output.
So I keep SX/B 1.51.03 for this program.
regards peter
Thanks
Manually changing the BANK is really touchy in SX/B. It only really makes sense if you are using in-line assembly code.
If you post your code and explain where the trouble area is, I'll take a look at it for you.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·