flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Using FASMG in Visual Studio Code:

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4249
Location: vpcmpistri
bitRAKE 28 Feb 2019, 05:01
.\.vscode\tasks.json
Code:
{
    "version": "2.0.0",
    "inputs": [
        {
            "id": "DisplayErrors",
            "description": "Set maximum displayed errors",
            "default": "1",
            "type": "promptString",
        },
        {
            "id": "AllowedPasses",
            "description": "Set maximum number of passes",
            "default": "100",
            "type": "promptString"
        },
        {
            "id": "StackDepth",
            "description": "Set maxumum stack depth",
            "default": "10000",
            "type": "promptString"
        },
        {
            "id": "ShowAllLines",
            "description": "Boolean flag to show all stack lines",
            "default": "0",
            "type": "pickString",
            "options": [
                "0",
                "1"
            ]
        },
        {
            "id": "InsertCode",
            "description": "Code to insert at start of source",
            "default": "; nothing",
            "type": "promptString"
        }
    ],
    "tasks": [
       {
            "label": "Advanced build with fasmg",
            "type": "shell",
            "command": "fasmg",
            "windows": {
                "command": "fasmg.exe"
            },
            "args": [
                "${fileBasename}",
                "-e", "${input:DisplayErrors}",
                "-p", "${input:AllowedPasses}",
                "-r", "${input:StackDepth}",
                "-v", "${input:ShowAllLines}",
                "-i", "${input:InsertCode}"
            ],
            "options": {
                "env": {
                    "PATH": "D:\\GIT\\fasmg\\core",
                    "INCLUDE": "D:\\GIT\\fasmg\\packages\\x86\\include"
                }
            }
       }
    ]
}    
To use the above build task just configure a task for your workspace, and correct the directories to match your installation. In Windows this task works with either the Powershell or CMD shell. No testing has been performed in Linux.

VS Code has some very extensive language integration features, but I'd like to just supporting the base language first. I'll try to add features as I work on them.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 28 Feb 2019, 05:01
View user's profile Send private message Visit poster's website Reply with quote
guitmz



Joined: 11 Jan 2019
Posts: 6
Location: Berlin
guitmz 12 Jun 2019, 08:55
a-ha! I was thinking about writing something like that, thanks for sharing!
Post 12 Jun 2019, 08:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8427
Location: Kraków, Poland
Tomasz Grysztar 12 Jun 2019, 11:27
BTW, the "-v" switch is now officially documented to allow value 2 in addition to 0-1.
Post 12 Jun 2019, 11:27
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 36
Greg_M 09 Jun 2025, 06:53
Helpful from bitRAKE! I'm also seeking FASM syntax highlight extension(s) for VSCodium/VSCode.
Post 09 Jun 2025, 06:53
View user's profile Send private message Reply with quote
dosmancer



Joined: 20 Feb 2025
Posts: 36
Location: Kingdom of Sweden
dosmancer 09 Jun 2025, 14:48
Greg_M wrote:
Helpful from bitRAKE! I'm also seeking FASM syntax highlight extension(s) for VSCodium/VSCode.


https://marketplace.visualstudio.com/search?term=fasm&target=VSCode&category=All%20categories&sortBy=Relevance

I think I tested them all and none, from sub-optimal memory, highlights calminstructions, though seems to be a bit of fasmg in some of them (predating calminstructions perhaps?). Maybe test all of them and see which one works the best? I don't know if anyone of the authors is on this forum.

Though, if keywords are missing in the extensions above you can clone them and add the missing keywords yourself perhaps.

I'm working on syntax highlighting for pure/raw fasmg specifically (no x86 instructions at all) but it's very opinionated and messy with ultra-high-contrast rainbow colors so it's currently a private repo. Can share in PM maybe if there's interest.

_________________
fasm68k
Post 09 Jun 2025, 14:48
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 36
Greg_M 09 Jun 2025, 19:35
For any language with customizable keywords. instructions, etc, I think that, for each person who performs such customizations, the ability to control their own syntax highlighting, is important.
Post 09 Jun 2025, 19:35
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4249
Location: vpcmpistri
bitRAKE 10 Jun 2025, 00:42
I've configured a number of editors for use with fasmg. For me it adds to the readability of source code, accelerates navigation, etc. - a small nicety for the long days at the screen.
Post 10 Jun 2025, 00:42
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 36
Greg_M 10 Jun 2025, 02:48
Thanks!

Update: I have an existing Visual Studio (IDE) extension and I'm planning to add FASM to it, e.g. FASMG projects, build FASMG, syntax highlighting.
Post 10 Jun 2025, 02:48
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.