-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't fail on .text/.size/.align/.globl #45
Comments
@krasin, it looks like DCPU-16 assembler directives are going to start with a |
@Twisol news to me! Could you please provide a reference? Sad, if true. :( |
@krasin: As far as I know, it's based on a leaked version of the 0x10c source. I don't really care to peruse it myself, but I was shown the simple assembly program that produces the blue display from Notch's screenshots, and it used So no, I can't point you to the actual source, but it is consistent with what we've seen. |
I think I know what screenshot are you talking about. Let me find it. |
It originates from this tweet:
So, the macros are going to start with So far, I don't see any inconsistencies with Notch's assembler. |
Yes, but the other source (which, as I mentioned, I didn't actually peruse myself) is the leaked 0x10c source. Here, I dug the relevant paste out of my history for you: http://pastie.org/private/9raewofk9asszelcfayhw You can see #include in there too. Both #macro and #include are assembler directives, so it seems rational to assume that |
So far, I don't see any technical argument for the assembler not to support both prefixes, since it does not create a confusion. |
S'up to mappum then. :) |
@Twisol Thx for the reference. I have found these sources. Looking... (will not share the link in public, because it may be not be desirable by Notch) |
i just wrote a tiny perl script to translate these from the llvm backend. you have to handle .byte and .word as well and turn them into DAT statements. we really need an actual assembler/linker to do it right, as well as a C runtime stub (crt0).
|
Hi there,
LLVM backend has to emit the instructions like:
.text, .globl, .align, .size and may be a few others. It's possible to disable output of some of them (like .align), but disabling .text .globl breaks LLVM test suite and makes it impossible to develop.
In the long run, DCPU16 assemblers will likely support these directives, because they are there for a reason. Since there's no demand for proper support of these directives from the users, but there's demand to use Clang/LLVM and there's no technical possibility to avoid emitting them, I would kindly ask Mappum assembler to ignore lines with these directives.
These directives always match the regex like "[\s]*[.]globl", so it should be pretty easy to ignore such lines.
The full list of directives to ignore (for now) is:
The text was updated successfully, but these errors were encountered: