Re[6]: [cc65] Graphics library

Date view Thread view Subject view

From: groepaz (
Date: 2001-08-15 23:46:00

Hello Mike,

Wednesday, August 15, 2001, 8:16:27 PM, you wrote:

MM> On Wed, 15 Aug 2001, groepaz wrote:

>> Hello Mark,
>> KM> DrawLine(x1,y1,x2,y2)
>> KM> {
>> KM>         switch (getsystype())
>> KM>         {
>> KM>                 case SYS_ATARI: atari_DrawLine(x1,y1,x2,y2); break;
>> KM>                 case SYS_CBM64: cbm64_DrawLine(x1,y1,x2,y2); break;
>> KM>                 ...
>> KM>         }
>> KM> }
>> KM> I guess this could work if each function was in its own .o file.
>> KM> Does LD65 handle this?
>> for a totally different thing, that kinda functionality would be just
>> _marvelous_ for the file-io stuff i am working on....... even if it
>> cant work like mentioned above, any other idea how to provide that
>> functionality?

MM> One point to make here, I think, is that the decisions can be made
MM> *once* and once *only*. One simply installs the pointers into a table.
MM> Then the tests don't have to be made over and over.

yes, i am thinking about converting those case-constructs to
jump-via-function-pointers aswell... BUT what i am asking is, would
the linker be able to fill out that jumptable at link-time? or would
an init-function that checks the modules included and sets up the
jumptable accordingly ALWAYS be needed anyway (thats what i'd like to
get off without).

Best regards,

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:41 CET