Giter VIP home page Giter VIP logo

Comments (4)

hlorenzi avatar hlorenzi commented on May 15, 2024

This one looks like another annoying limitation of the current implementation of tokendefs...
It seems a revamp of that system is highly called for!

Basically, it doesn't allow you to have an instruction with any plaintext tokens that also happen to be valid tokendefs in another instruction, at the same position. So your {dest:REG} instructions will clash with your REG <- REG instructions, and also your {jmp:J} instruction at the end will clash with the plaintext JMP, JP, and CALL instructions at the start.

For now, I think your best bet would be adding some tokens to disambiguate them, like using LD! A, B for example.

from customasm.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 15, 2024

what if i make all of them plain text. i mean it would be annoying since then i would need to manually write down all ~200 Instructions but then it couldn't clash anymore, right?

from customasm.

hlorenzi avatar hlorenzi commented on May 15, 2024

I was able to do a quick fix for this! It's in master and in the web version, but not yet in a release.

It should now allow what you're trying to do, but watch out for the order of definitions: in your case, you should put the REG <- REG instructions before the {dest:REG} ones.

The rule of thumb now actually works as intended: you should generally define instructions with fixed patterns before the ones with parameters.

from customasm.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 15, 2024

thanks for that!

greta i could help improve the program.

from customasm.

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.