[Coco] Problems with CC1 optimizations
Bill Pierce
ooogalapasooo at aol.com
Sat Oct 27 21:51:29 EDT 2012
If you're using the Tandy release then that may be part of the problem. There were several known bugs and work arounds. There are also a lot of "remakes" of the C compiling components that worked much better.
Stephen Fisher did a pretty good job of summing up all the changes that were made through the years in his posts here:
http://www.tandycoco.com/forum/viewtopic.php?f=23&t=113
There's a pretty good list of what's out there, you may try getting some of the updated components and that may help, though there's still some problems with C, some of which are caused by the versions of OS9/NitrOS9 you use.
In my opinion, the whole print routine needs reworking or the scf drivers in Nitros9 need reworking. Can't quite tell which it is yet. I'm trying some experimentation with different versions of OS9 to see if it's the compiler or something not right in OS9.
The problems I'm having seem to boil down to the buffers not flushing correctly. One window will print what I want in the colors I want, the next window will inherit the colors from the previous window even though the buffers were flushed and colors changed. It's even worse when working with CWArea in CGFX7. Looking through old posts from Delphi and CIS, I find a lot of mentions of bugs in OS9's handling of CWArea. I also find mentions of fixes but I don't have a clue if these fixes were incorporated into NitrOS9. I was looking through the notes in Brother Jeremy's Lv2 upgrade disks and there's mentions of fixing this there as well.
Bill P
Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Bill Pierce
ooogalapasooo at aol.com
-----Original Message-----
From: Retro Canada <retrocanada76 at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sat, Oct 27, 2012 8:45 pm
Subject: [Coco] Problems with CC1 optimizations
Hi,
I'm getting problems with the code optmizer. It doesn't work in some
situations, specially with IF-ELSE and variables being
incremented/decremented.
Dou you have such problems too ? I need to compile with -O :(
like the snippet below doesn't even step inside the while:
while(buf_pos > 0)
{
buf_pos--;
if (x-- == 0 || work_buf[buf_pos] == 0x0D)
{
buf_pos++;
step += 1;
x = scrn_siz.col;
break;
}
}
but If I do it instead:
while(buf_pos-- > 0)
{
if (x-- == 0 || work_buf[buf_pos] == 0x0D)
{
buf_pos++;
step += 1;
x = scrn_siz.col;
break;
}
}
it works.
--
Panasonic FSA1-WSX
Commodore 64
Commodore 64C
Commodore 128
Apple //c
TRS-Color Computer 3
TI-99/4A
..and more coming!
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list