Comments (6)
Sorry, I might have missed to update that directive on v0.11! I'll try to work on it shortly.
from customasm.
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.
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.
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.
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.
I just updated my project and it works fine now, thanks a lot ! 😃
from customasm.
Related Issues (20)
- no match for instruction found HOT 2
- Feature Request: Different number base options for annotated text output. HOT 3
- Calculate `.len` of labels automatically
- Cannot reference variables in #bankdef HOT 2
- Asserts in subruledefs are ignored when calling asm{...} HOT 2
- Sometimes subruledef's aren't evaluated in asm{...} blocks
- #subruledef in #if causes rust to panic
- Output of subruledefs ignored in asm{...} HOT 2
- Bug with rules passing arguments to other rules HOT 1
- le() causes negative numbers to become positive HOT 3
- feature request: api for own rust programs HOT 1
- Include order not respected HOT 7
- #fill raises 'expected expression' error HOT 7
- Allow outputting banks to different output files
- Support for 32bit and 64bit floats HOT 1
- "no match found for instruction" when mnemonic is less than 4 characters long (and has a subruledef directly next to it) HOT 4
- pattern matching error: whitespace and constants after mnemomics cause pattern matching rules to be broken HOT 2
- Improve error message HOT 1
- No match for instruction with negative numbers HOT 7
- Feature request: allow use of \x in multi byte character string functions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customasm.