Re: New three versions of C64 source code

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Sat, 13 Dec 2014 11:52:20 +0100
Message-ID: <20141213105220.GB1853@hermes.local.trikaliotis.net>
Hello,

* On Thu, Dec 04, 2014 at 11:48:09AM -0500 Greg King wrote:
> On 2014-12-03 11:39 AM, Kajtár Zsolt wrote:
[...]
> confusion.  As Ruud said, there's no shifted "+" sign.  If the table
> were written like this:
> 
>   ....
>   .byte "noT"
>   .byte "steP"
>   .byte "+"+$80
>   .byte "-"+$80
>   ....
> 
> Then, a first glance would make a reader think that it is two
> tables, two encodings, and two separate purposes.  It's more obvious
> that:
> 
>   ....
>   .byte "no","t"+$80
>   .byte "ste","p"+$80
>   .byte "+"+$80
>   .byte "-"+$80
>   ....
> 
> is only one table.

That's why the macros capability of ca65 comes very handy:

     init_token_tables

     keyword_rts "END", bEND, TokEnd
     keyword_rts "FOR", bFOR, TokFor
     keyword_rts "NEXT", bNEXT
     keyword_rts "DATA", bDATA
.ifdef CONFIG_FILE
     keyword_rts "INPUT#", bINPUTN
.endif
     keyword_rts "INPUT", bINPUT
     keyword_rts "DIM", bDIM2
     keyword_rts "READ", bREAD
     [...]   

using appropriate macros, segments and the linker file, are very nice.
You do not have to think about any special handling.

[this was partially (or completely?) "reused" (a.k.a. stolen) from Michael
Steil's sources]

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2014-12-13 11:01:02

Archive generated by hypermail 2.2.0.