Re: Most used 6502 Assembler?

From: Ullrich von Bassewitz <uz_at_musoftware.de>
Date: Thu, 20 Jun 2013 22:54:34 +0200
Message-ID: <20130620205434.GA25115@trixie.musoftware.de>
Hi!

On Thu, Jun 20, 2013 at 07:25:52AM +0000, Baltissen, GJPAA (Ruud) wrote:
> Assuming CA65 is indeed the most used assembler, I'm thinking about changing
> my own assembler so it can use CA65 source code as well. Why not using CA65
> then? My assembler can also handle the Z80, 6800, 6802 and 6809.

ca65 is mostly table driven, so adding adding more CPUs might be less work
than adding all the ca65 features to another assembler (see below).

> A request: could anyone (Ullrich ?) provide me with a sourcefile that
> contains all possible features of CA65 that I can use as test file, please?

I don't have such a source file and creating one would be rather difficult for
two reasons:

First, ca65 generates modules with relocatable code postprocessed by a linker,
and this shows in the pseudo instructions and syntax. For example, .ORG
doesn't do what most people are used from other assemblers, and without a
linker .ORG and .RELOC don't make sense. Another example is .IMPORT/.EXPORT:
If you don't have a linker, there's nothing to ex- or import.

Second, there are some rather complex features like the macro language. Some
time ago, someone wrote a macro package that extends the input to some kind of
high level language making it possible to write something like

        IF C SET
            ; here goes the code for carry set
        ELSE
           ; code for carry clear
        ENDIF

When I saw what this guy did, I couldn't really believe that this was actually
possible using the builtin macro facilities. He actually wrote a new language
using the macros. What I want to say is that it would be time-consuming and
probably not worth the trouble making another assembler compatible in every
detail.

My suggestion (if you really want to add some ca65 compatibility) would be to
walk through the list of pseudo functions/instructions in the docs (see here:
http://www.cc65.org/snapshot-doc/ca65-10.html and
http://www.cc65.org/snapshot-doc/ca65-11.html) and add to your assembler what
can be added without too much trouble.

You may also consider adding some emulation support for other popular
assemblers like xa65 or acme. As far as I know these don't require a linker,
so at least the first problem mentioned above does not exist.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de

       Message was sent through the cbm-hackers mailing list
Received on 2013-06-20 22:01:18

Archive generated by hypermail 2.2.0.