drac030 Posted June 19, 2023 Share Posted June 19, 2023 On 6/16/2023 at 5:56 PM, sanny said: It's there to speed up screen output. The regular OS clrear screen routine clears the GR.0 display at about 15 cycles per byte, if I count correctly. Yours - at about 12. So, it is indeed a great speed improvement at the expense of basic compatibility - because it does nothing on XEP80, on VBXE, on a load of software-driven 80-column screens, still taking the time. Not to mention the fact that on VBXE (and on XEP probably too) the system-invoked CLRSCR is probably still much faster than this (on VBXE it is 1 6502 cycle per 4 characters). Plus, we obviously have here again the home cursor position being set at 0,0 "because Commodore"; plus some code mindlessly transcribed from OS, which justs hogs memory, instead of just using the regular E: functions. No wonder why even OP wants to get rid of that. On 6/16/2023 at 5:56 PM, sanny said: You don't have to use it. Indeed, fortunately. 4 Quote Link to comment Share on other sites More sharing options...
danwinslow Posted June 19, 2023 Share Posted June 19, 2023 Well, to be fair, CC65 has never represented itself as 'the best thing to use on Atari for anything'. It is what it is - a good ANSI compatible C compiler that you can use on a host of 65xx systems. You have to expect some amount of generalization. It's a good toolset, you need to know how to use it on the Atari and when you do, it can be very good. I've used it for many things and never once had to suffer through the horrors of clrscr(). Ironically the OP's goal is to write for commodore and Atari. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 19, 2023 Author Share Posted June 19, 2023 A lot of my cc65 libraries are about making cc65 better or more efficient. I believe that some programs need size or compatibility more than speed, so, if somebody here can repost the other way to do clrscr() using the Atari OS, I'd be happy and can implement it into AtaSimpleIO. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 20, 2023 Author Share Posted June 20, 2023 BTW, yesterday, I implemented into AtaSimpleIO better support for inverse text: earlier versions have separate functions to print reverse text. Now, I provide a flag that tells the printc() function to print in inverse. Unfortunately, my reverse functions use the same variable name to hold the flag as cc65's revers() function, so you must use either one or the other exclusively. It is not online yet. If you have any other improvements, just tell me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.