Code Monkey home page Code Monkey logo

Comments (5)

aralbrec avatar aralbrec commented on May 12, 2024

zcc is going to be passing a mass of files not usually one at a time and quite often as a list of files in a single .lst file to avoid command line limitations. So I don't think there is any way to add a command line parameter sensibly.

Actually that's not right. I couldn't remember if zcc passes files at the .asm stage or the .o stage to z80asm for building a library but it is the .o stage. So that means zcc individually assembles each .asm file and it would be possible to pass the original filename as command line parameter to z80asm.

Right now that parameter would become the module name.

from z88dk.

pauloscustodio avatar pauloscustodio commented on May 12, 2024

z80asm MODULE directive does just that. It replaces the source file name by the name given as argument in the linked file. zcc just has to add "MODULE original_file" to every temporary file before assembling.

In my plan for z80asm2 the linked module will be named <source_file>_<module_directive_name>

from z88dk.

aralbrec avatar aralbrec commented on May 12, 2024

Will z80asm be okay with receiving two module directives?

If zcc inserts one in the front and the user has specified one which would appear second, will z80asm be able to use the last one declared?

In my plan for z80asm2 the linked module will be named <source_file>_<module_directive_name>

Yes this is what I was thinking about. In the future, it's the source_file name that zcc should be tweaking and not the module.

from z88dk.

pauloscustodio avatar pauloscustodio commented on May 12, 2024

If zcc inserts one in the front and the user has specified one which would appear second, will z80asm be able to use the last one declared?

Today there's an error message on the second module directive. But this can be easily changed, as the module name is not used except for the name in the .o file.

from z88dk.

aralbrec avatar aralbrec commented on May 12, 2024

zcc now inserts a module directive at the start of every file at the .asm stage.

  • We've moved away from shell invokes of copy and cp to shell invokes of type and cat for appending
  • CRTs must have module directives at the top since they are processed outside zcc's loop

To form the module string, the basename is taken and non-alnum chars are replaced with '_'. So a file "clisp.c" will get module name "clisp_c" and a file "clisp.asm" will get module name "clisp_asm".

Tested on windows and this change fixes the zcc lib issue as well as makes the map file clearer.

from z88dk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.