Re: [cc65] ca65 question

From: Greg King <greg.king41verizon.net>
Date: 2008-01-30 21:22:55
From: silverdr; on Sunday, January 27, 2008; at 11:57 AM -0500
>
> On 2008-01-27, at 13:38, Ullrich von Bassewitz wrote:
>
> > On Sun, Jan 27, 2008 at 05:32:52AM +0100, silverdr wrote:
>
> >> Hm, that is interesting, in any case.  So, the main difference
> >> between .global and set of .import/.export is that one doesn't have
> >> to care about whether a particular module exports or imports the
> >> symbol -- it just comes out of the context (or rather, content) of
> >> a particular file?  Smart indeed, and will certainly come in handy.
> >
> > The nice thing is that you can use the same "header" file for both
> > purposes:
> > The module that implements an API and others that use it. This will
> > give you a
> > great range of consistency between the modules.
>
> Exactly -- that's what I understood, and it's a really smart (even if
> *NOW* seemingly almost obvious ;-) way to deal with the ever-growing
> amount of inter-dependent .exports and .imports, in an efficient and
> elegant way.  Even if it doesn't address my original question, I find
> it immediately an invaluable, general-purpose hint.

Both of them have their own advantage:  .GLOBAL supports the goal of getting
the consistency that Uz described.  But, .IMPORT/.EXPORT does some
error-checking.

If you mistype a label-name, then the assembler will catch it.  CA65 will
tell you which file, and possibly which line, has your mistake.

When you use .GLOBAL, you won't find out about your mistake until you link
the object files.  And, LD65 won't know where you messed up; you will be
forced to search through your source files (while hoping that you will
recognize the typo).

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jan 30 21:30:22 2008

This archive was generated by hypermail 2.1.8 : 2008-01-30 21:30:26 CET