Skip to content
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

Can we get an alternate .asm language for KickAssembler to use "//" as line comments? #66

Open
lwestfall opened this issue Apr 28, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@lwestfall
Copy link

I'm not an extension developer, nor a seasoned assembly programmer so there might be better options, but can we get a new language definition to specifically handle KickAssembler .asm files?

Really the only reason I ask is because the line comment configuration has ";" as the line comment symbol which is great for a lot of assemblers, but not KickAssembler.

From the manual section 3.10:

Traditional 65xx assembler line comments (;) are not supported since the semicolon is used in for-loops in the script language.

I guess what I'm proposing is a second set of assembly language files, where the only difference (other than naming) is to change this to "//"

"comments": {
"lineComment": ";"
},

@rolandshacks
Copy link
Owner

rolandshacks commented May 15, 2024

Not an easy one as (to my knowledge) it's not possible to add some kind of "smart" detection of what flavor of assembly the file is. I'll try to better understand if there could be some workaround (other than using a different file extension and duplicate the grammar), but so far, I wasn't successful.

@lwestfall
Copy link
Author

Thanks for the response. I'm not sure that detecting the flavor of assembly is necessarily what I'm asking for (though if it were possible, that would be neat). If I could override this at a workspace level using a file associations override, that would be good enough for me.

For example, I could add this to a settings.json:

    "files.associations": {
        "*.asm": "kick-asm"
    }

Again, this is a little beyond my realm of knowledge so hopefully this makes some sense.

@rolandshacks rolandshacks added the enhancement New feature or request label Jul 23, 2024
@rolandshacks
Copy link
Owner

Sorry for the delayed response. Good point and actually, a good idea. Whenever I find a bit of time, I'll fiddle a bit around on that idea.

@3vi1
Copy link

3vi1 commented Oct 28, 2024

I just ran into this one myself.

As mentioned: When you're editing kick .asm files, the "Toggle Line Comment" uses the ';' style comments, which can cause some arcane errors in the Terminal window. The code will look green/commented, but will definitely start throwing compile errors.

Additionally, "Toggle Block Comment" doesn't seem to work at all - though Kick does support "/* */" style blocks. So - it would be great if you could work that in support that somehow as well.

Going back to the earlier discussion, I like @lwestfall 's idea of overriding the handling at the project level, but I'd even settle for using a different file extension like .kasm instead of .asm. Unless, of course, KickAssembler has some hard dependency on the file extension somewhere. It wouldn't change anything for existing projects, but at least we could open new .kasm files and have them treated with Kick's specific quirks.

Keep up the great work! I'm really enjoying playing with this extension!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants