On Mon, Sep 28, 2020 at 10:58:11AM +0200, Nicolas Boulenguez wrote:
> Package: src:efp
> Followup-For: Bug #966968
> 
> asm_to_a65.pl translates efp.asm (DASM format) to efp.a65 (XA65
> format). The related lines are:
>   # "org FOO" ==> "*=FOO"
>       s/\s*org\s+/*=/;
>           and
>                 s/\s*SEG\.U\s+\w+/.zero/;
>                         s/\s*SEG\s+/./;
> They rewrite
> ; *********** DATA SEGMENT
>     SEG.U   data
>                 org $0000
> as
> ; *********** DATA SEGMENT
>     .zero
>             *=$0000
> The '.zero' line is rejected by xa65 2.3.11.
> There has probably been a change in the syntax described in
> http://www.floodgap.com/retrotech/xa/dists/xa-2.3.11.tar.gz
> /doc/fileformat.txt

Hmm, this is strange. AFAICT, the '.zero' directive should be allowed. I
did a bit more investigation, and it definitely seems like there was a
change in xa65 to add an extra check for relmode on allowing that
statement. Looking at the diff for xat.c between 2.3.8 and 2.3.11, I
see:

  if(n==Kzero) {
    -/*         if(segment!=SEG_ABS) {   */
      +           if(relmode) {
      segment = SEG_ZERO;
      t[0]=Ksegment;
      t[1]=SEG_ZERO;
      *ll=2;
      er=E_OKDEF;
      -/*         } else {
+           } else {
              er=E_ILLSEGMENT;
              -           }                        */
        +           }
  } else

At this point, I think the easiest fix is to just use DASM and skip this
whole translation business. I downloaded it from
https://github.com/dasm-assembler/dasm and it seemed to run with no issues
and produce an identical efp.nes file. So, maybe we should just package it
and then update the efp to use that instead... it seems to be a much more
active project lately than xa65.

--Joe

Reply via email to