Menu

#3375 SDASZ80 not reporting errors

open
nobody
z80 (14)
sdas
5
2022-04-06
2022-03-28
No

The ASM file in attach does not generate errors whneassembled by sdasz80
The assembler does not generate the rel file but silently process the ASM without reporting anything even if there are errors.
I am using this command line

F:\SDCC\MSX_Fusion-C_V1.3\WorkingFolder\sdcc_megarom-master>sdasz80 -plff -o BUILD\audio.rel src\audio.s

and SDASZ80 is from this SDCC build
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 4.2.2 #13322 (MINGW64)
published under GNU General Public License (GPL)

1 Attachments

Discussion

  • Sebastian Riedel

    I can’t reproduce this on [r13340] and neither on [r13322]. So this might be a bug that only affects Windows.

    $ ~/projects/sdcc-code/sdcc/bin/sdasz80 -plff -o BUILD/audio.rel src/audio.s
    src/audio.s:1416: Error: <u> undefined symbol encountered during assembly
    src/audio.s:1417: Error: <u> undefined symbol encountered during assembly
    src/audio.s:1418: Error: <o> .org in REL area or directive / mnemonic error
    src/audio.s:1419: Error: <u> undefined symbol encountered during assembly
    src/audio.s:1420: Error: <q> missing or improper operators, terminators, or delimiters
    src/audio.s:1424: Error: <o> .org in REL area or directive / mnemonic error
    removing BUILD/audio.rel
    

    (I commented inclusion of missing files out: sed "s/\.incbin/\.db #0xDE ;/g" -i audio.s)


    And played around with .define. If you really want to, you can define your own dotless aliases:

    .define if /.if/
    .define endif /.endif/
    

    But that might result in illbehaving code, what you want is:

    .ifeq withFade-1
            ld  (#fading),a
    .endif
    

    or

    .iifeq withFade-1, ld (#fading),a
    

    .if checks if the following expression is not 0
    And that only works if withFade exists.

    If it can happen that it does not exist, it seems it has to be:

    .ifdef withFade
    .ifeq withFade-1
            ld  (#fading),a
    .endif
    .endif
    
     

    Related

    Commit: [r13322]
    Commit: [r13340]

  • Ragozini Arturo

    Ragozini Arturo - 2022-04-02

    Definitely I need support.... I've been trying to migrate my ASM player but
    1) I do not know exactly what to change
    2) I do not get any error message, sdasz80 simply do not return anything...

    which version of sdasz80 are you using ?
    I'm on window 10pro and I'm using the snapshot build downloaded two days ago

     
    • Sebastian Riedel

      which version of sdasz80 are you using

      self compiled
      But I downloaded 20220401-13349 snapshots for Linux 64bit and Windows 64bit (mingw). I had output for both and ran the windows version with wine.

      Do you see the errors in the .lst file?

      u     000733 32 00 00         [13] 1416         ld  (#spdcnt),a
      u     000736 32 00 00         [13] 1417         ld  (#trbpsg),a
      o     000739                       1418 if withFade=1
      u     000739 32 00 00         [13] 1419         ld  (#fading),a
      q                                  1420 endif
      

      The first character shows the error.

       
      • Sebastian Riedel

        Somebody else reported as6500 (4.2.0 release) to print no errors. There the .lst file was empty, does that happen for you too?

         
  • Ragozini Arturo

    Ragozini Arturo - 2022-04-06

    I will test and report the results by tonight

     
  • Ragozini Arturo

    Ragozini Arturo - 2022-04-06

    Here the ASM source and the resulting files: they are empty
    The command line is:
    sdasz80 -plff -o BUILD\audio.rel src\audio.s

    Interestingly, I've noted that when sdasz80 reports errors, the REL file is absent.
    Here instead, sdasz80 doesn't returns errors, the REL file is generated but it is empy.

     

    Last edit: Ragozini Arturo 2022-04-06
    • Sebastian Riedel

      Interestingly, I've noted that when sdasz80 reports errors, the REL file is absent.

      SDAS was modified to remove the .rel file on error. It also ends it’s output with removing

      Something is significantly going wrong here on Windows, .lst shouldn’t be empty. Maybe it crashes silently before it starts outputting anything.

      edit: if you use older versions (like 4.2.0) it does work?

       

      Last edit: Sebastian Riedel 2022-04-06
    • Philipp Klaus Krause

      Well, when I try to assemble that file on Debian GNU/Linux (using current sdasz80 from trunk). I see errors:

      philipp@notebook6:/tmp$ ~/sdcc-trunk/sdcc/bin/sdasz80 -plff -o audio.rel audio.s 
      audio.s:1173: Error: <i> File not found.
      audio.s:1175: Error: <i> File not found.
      audio.s:1177: Error: <i> File not found.
      audio.s:1179: Error: <i> File not found.
      audio.s:1181: Error: <i> File not found.
      audio.s:1183: Error: <i> File not found.
      audio.s:1185: Error: <i> File not found.
      audio.s:1429: Error: <u> undefined symbol encountered during assembly
      
      

      Me seeing errors might be due to me using GNU/Linux or due to you having those files referenced by .incbin present, while I don't.

       
      • Sebastian Riedel

        I even saw error messages when I ran the mingw snapshot with Wine. So it might be something very Windows specific.

         

Log in to post a comment.

MongoDB Logo MongoDB