Re: [cc65] Re: New 80 col switch API

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-09-08 15:10:56
On Mon, Sep 07, 2009 at 11:43:24PM +0100, Jonathan Graham Harston wrote:
> The simplest /implementation/ as opposed to /specification/ is to
> ignore the rows parameter, viz:

Even this makes it larger. On the C128, the #defines are made up so that they
match the kernal code in $D7, which saves some code.

> Those program that need fuller access should link to a larger,
> more-complete library. As long as the API lets you pass
> rows&columns, it's largely irrelavanet that the implementation only
> implements columns.

That's a valid argument. On the other side, I hear people complaining how
bloated the code is. So we have to find a compromise. Maybe we can make
argument and return code an unsigned. This won't have a big impact on code
size, and we can change the meaning later provided that we have constants with
the same name.

> Which is essentially what I expended on, Oliver suggests
> videomode(40) selects a 40-column screen mode with the default set
> numer of rows, I suggest that vidoemode(40) selects a 40-column
> screen mode with no row parameter supplied, so selecting a default
> number of rows. In effect, the same thing.

Not exactly. Olivers proposal allows the implementor to choose the constants
as he likes, only the names must be the same. For example, I have choosen

        /* Video mode defines */
        #define VIDEOMODE_40COL         0x00
        #define VIDEOMODE_80COL         0x80

I could have used

        /* Video mode defines */
        #define VIDEOMODE_40COL         40
        #define VIDEOMODE_80COL         80

but this would have generated larger code.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 8 15:12:40 2009

This archive was generated by hypermail 2.1.8 : 2009-09-08 15:12:43 CEST