Re: git repository

From: silverdr_at_wfmh.org.pl
Date: Thu, 13 Nov 2014 12:03:38 +0100
Message-ID: <5464900A.5030300@wfmh.org.pl>
On 2014-11-13 09:27, Baltissen, GJPAA (Ruud) wrote:
> Hallo allemaal,
>
>> The goal is to have it fully compatible with at least the xa, 64tass and ca65
>
> Understandable. But as said before I'm not familiar with them at all. I
> already downloaded ZIPs/documentation so I must be able to convert my
> sources into those of these assemblers. But I would be grateful if
> people familiar with these assemblers could give me a quick hand.

I think a good starting point would be to look at the 1520 firmware 
sources we have. They assemble with all three assemblers (maybe more) 
and the commands needed are given on the README page.

https://github.com/Project-64/reloaded/tree/master/1520/rom

If you can use those commands to produce the same binary on all three 
then it's all fine!

The sources there don't cover every aspect but should give you a good start.

> Lee's original disassembly is one big file. I split it up in four parts:
>
> - the original header plus some lines that loads the other three parts
>
> - the declaration of the variables
>
> - the BASIC ROM
>
> - the system ROM
>
> The idea behind this is to simplify the development of other ROMs.

Understandable. I saw Lee's work as more of a documentation than a 
working set of source files.

> I
> told you I'm busy with the sources of JiffyDOS. This is in the first
> place just a copy of fourth part where I replaced some parts with the
> sources created by my disassembler. The header of this file tells my
> assembler to load the declaration of the variables and the sources of
> the BASIC ROM first. Advantage: if I need to change something in these
> files, it only has to be done at one place.
>
> I haven't any idea if the other assembler can do this trick as well. If
> they cannot, then that isn't any problem. I only have to delete these
> few extra lines in the header and to append the other three files.

I think all of them can use a kind of include directive but they may not 
be the same.


> .ba $E000   = Begin Address
>
>    XA:     * = $C000
>
>    64tass: * = $C000
>
>    CA65:   .org $C000

ca65's .org directive is somewhat different than with other assemblers 
but with the command-line switch as in the above mentioned README it can 
use the "* =" syntax.

>
> .eq Variable = $67
>    XA:     Variable = $67
>
>    64tass: Variable = $67
>
>    CA65:   Variable = $67
> ???  maximum length of labels ???

I think some were limited to eight characters. Mainly those on the 64 
itself but I never ran into limit with either xa or ca65. If you want to 
remain on the safe side, eight characters would be the safest bet. Yet, 
I am not sure if we want to follow this.

>
> .by $0D, 'Text', $0D, "Lee's work", $0D
>    XA:     .byt $0D, 'Text', $0D, "Lee's work", $0D
>
>    64tass: .byte $0D, 'Text', $0D, "Lee's work", $0D
>
>    CA65:   .byte $0D, 'Text', $0D, "Lee's work", $0D
> ???  text can only be between quotes or double quotes as well ???

I would say double quotes are safe bet. In some implementations they 
have different meanings but I think double quotes are consistent.

>
> .wo $1234, BasicColdStart
>    XA:     .word $1234, BasicColdStart
>
>    64tass: .word $1234, BasicColdStart
>
>    CA65:   .word $1234, BasicColdStart
>
> .tx 'Text', "Lee's work"
>
> Can be replaced by .by now if needed. (Hypra-Ass' .by didn't support
> text, I added it myself)
>
> .ty 'RESTORE'
>    XA:     .byt "RESTOR", "E"+$80
>
>    64tass: .byte "RESTOR", "E"+$80
>
>    CA65:   .byte "RESTOR", "E"+$80
>
> .en           ; end of the source code
>
>    XA:              ???
>
>    64tass: .end     ???
>
>    CA65:   .end
>
> Hypra-Ass only used labels without colon. I later added this feature as
> well. In the manual of 64tass I only saw labels without colon. Does it
> support labels with colon as well?
>
> XA supports both versions IMHO.
>
> CA65 supports labels with a colon. Without a colon as well?

With an extra switch but I'd opt for labels with colons anyway.

>
> Next directive I use for recombining the four files I mentioned above:
>
> .uf C64-bas.a65        ; Use File
>    64tass: .include
>
>    the other two: ???

ca65 uses .include
xa uses a C-like #include

-- 
SD!

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

Archive generated by hypermail 2.2.0.