Aslink compatibility with Asxxxx

Paulo
2010-05-19
2013-03-12
  • Paulo
    Paulo
    2010-05-19

    Hi,

    I've downloaded the sdcc project to recompile some assembler code I had from a while back.

    I can't seem to get aslink to link code I've previously produced. The linker doesn't give any warnings at all, it just spits out the no parameters/help text:

    paul@paul-desktop:~/Projects/Z80/src/rel$ aslink pass_fai.rel
    ASxxxx Linker V01.75 + NoICE + SDCC Feb 1999
    Startup:
      -c   Command line input
      -f   file[LNK] File input
      -p   Prompt and echo of file[LNK] to stdout (default)
      -n   No echo of file[LNK] to stdout
    Libraries:
      -k   Library path specification, one per -k
      -l   Library file specification, one per -l
    Relocation:
      -b   area base address = expression
      -g   global symbol = expression
    Map format:
      -m   Map output generated as file[MAP]
      -x   Hexadecimal (default),  -d  Decimal,  -q  Octal
    Output:
      -i   Intel Hex as file[IHX]
      -s   Motorola S19 as file[S19]
      -j   Produce NoICE debug as file[NOI]
      -z   Produce SDCdb debug as file[cdb]
      -u   Update listing file(s) with link data as file(s)[.RST]
    Miscellaneous:
      -a   [iram-size] Check for internal RAM overflow
      -v   [xram-size] Check for external RAM overflow
      -w   [code-size] Check for code overflow
      -y   Generate memory usage summary file[mem]
      -Y   Pack internal ram
      -A   [stack-size] Allocate space for stack
    End:
      -e   or null line terminates input
    

    Looking through the documentation I see that it says the linker supports versions 3,4,5 of the assembler.

    The version shipped with sdcc is

    ASxxxx Assembler V01.75 + SDCC mods  (Zilog Z80 / Hitachi HD64180)
    

    Should I download the latest from http://shop-pdp.kent.edu/?

    Will this screw up sdcc if I come to writing C code later?

     
  • Borut Ražem
    Borut Ražem
    2010-05-20

    This is probably because the linker script is missing. I'll take a look…

    > Should I download the latest from http://shop-pdp.kent.edu/?
    No, they are not compatible (yet).

    > Will this screw up sdcc if I come to writing C code later?
    Linking from sdcc works without problems.

    Borut

     
  • Paulo
    Paulo
    2010-05-20

    If you could give me a code snippet and a means of interfacing with aslink then that would be a good start.

    Also, is it possible to assemble and link code (in asm) via sdcc?

     
  • Borut Ražem
    Borut Ražem
    2010-05-25

    I took a look: sdcc aslink (in the latest svn versions it is called sdld) behaves in the same way as asxxxx aslink before version 3.0, regarding the command line parameters.

    > If you could give me a code snippet and a means of interfacing with aslink then that would be a good start.

    The simples way is to write a small c program, compile it with sdcc, using the -V command line option to see how the assembler and linker are invoked, and analize the generated lnk file ;-)

    > Also, is it possible to assemble and link code (in asm) via sdcc?

    Yes, you can either use the c file inline assembler code or write separate assembler files and assemble / link them with with c files. Take a look to sdccman.pdf and to sdcc library source files.

    Borut