Code Monkey home page Code Monkey logo

Comments (3)

KarolS avatar KarolS commented on May 25, 2024 1

There is currently no way to make it cleaner, but you found a really nice place for potential improvements, thanks!

So there are two potentials for improvement here:

  • functions are not "typed things", which is the internal Millfork term for variables, constants and similar things – functions are merely "things" – and right now, macro parameters have to be "typed things", even if we don't care about their types

  • macros should preferably know the function and segment they're in – and even normal functions should be able to refer to themselves without repeating their name

I'll figure out some improvements here, they should land in the next release.

BTW, A2600 support in Millfork was more of an afterthought, in the lines of "it'll compile, so why not". It's surprising, but nice to hear that it turned out to be practical.

from millfork.

retrac0 avatar retrac0 commented on May 25, 2024

Thanks! It'll be a help. I did notice the VCS support was minimalist, and wrote my own platform file and includes. But MFK seems pretty general purpose and can fit into many of the VCS bankswitching arrangements. And MFK is very fast... I've only needed to write about a dozen lines of the graphics kernel core loop in ASM. Otherwise pure MFK.

It is limited to the 128 B of RAM for regular variables. VCS cartridges use a complicated system for cartridge RAM, where separate addresses are used for read/write (and RMW ops like inc/dec don't work). I've had luck wrapping that in a few macros and using pointers. With care it compiles to code very similar to what I would write in assembly. :) I'll try to document some of it when I have time.

from millfork.

KarolS avatar KarolS commented on May 25, 2024

I think that the problems have been solved adequately in 0.3.30.

from millfork.

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.