Giter VIP home page Giter VIP logo

Comments (6)

hlorenzi avatar hlorenzi commented on May 14, 2024 1

Sorry, I might have missed to update that directive on v0.11! I'll try to work on it shortly.

from customasm.

hlorenzi avatar hlorenzi commented on May 14, 2024 1

OK, I fixed the debug print, and I made it only be applied to top-level labels! It's in v0.11.2 now.

from customasm.

ClementNerma avatar ClementNerma commented on May 14, 2024

Just to say, I just tried the latest version from the main branch which adds support for #labelalign, but the problem is still present. I don't know if this is normal or not but I thought it'd be better to indicate it in this issue :)

from customasm.

hlorenzi avatar hlorenzi commented on May 14, 2024

Ah, yes! Did you try with #labelalign at the top-level, like this?

#labelalign 16
#ruledef
{
	test => 0x01 @ 0x02 @ 0x03 @ 0x04
}

This is the new intended way to use it.

from customasm.

ClementNerma avatar ClementNerma commented on May 14, 2024

I just tried it and it seems the directive is correctly recognized, but I still have a bug with the program I'm assembling - it may come from my VM though so I'll dig into that.

What I also notice is that the value of the #labelalign directive is printed many times within the Assembler::assemble() method.

EDIT 2: The number seems to come from this line, seems like a forgotten debug instruction ^^

EDIT 1: So it seems like I have a bug due to the fact sub-labels (e.g. .sublabel) are also affected by this directive.

Thanks for solving this issue 😃

Is there a way to only apply it to global labels (e.g. label:)? That would avoid having to jmp to the sub-labels manually in codes like this:

label:
    instr 1

.sub:
    instr 2
    ifnot cond
    jmp .sub   

from customasm.

ClementNerma avatar ClementNerma commented on May 14, 2024

I just updated my project and it works fine now, thanks a lot ! 😃

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.