{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "assemble",
            "type": "shell",
            "command": "ml64.exe",
            "args": [
                "/I",
                "include",
                "/c",
                "src/${fileBasenameNoExtension}.asm"
            ],
            "problemMatcher": {
                "owner": "masm",
                "fileLocation": [
                    "relative",
                    "${workspaceFolder}"
                ],
                "pattern": {
                    "regexp": "^(.*)\\((\\d*)\\)\\s+:?\\s+(error|warning)\\s+([A-Z]+\\d+):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "severity": 3,
                    "code": 4,
                    "message": 5
                }
            }
        },
        {
            "label": "compile-resources",
            "type": "shell",
            "command": "rc.exe",
            "args": [
                "res/rsrc.rc"
            ],
            "problemMatcher": [],
            "group": "build",
            "dependsOn": [
                "assemble"
            ]
        },
        {
            "label": "link",
            "type": "shell",
            "command": "link.exe",
            "args": [
                "/SUBSYSTEM:WINDOWS",
                "/MACHINE:X64",
                "/ENTRY:entry_point",
                "/nologo",
                "/LARGEADDRESSAWARE",
                "${fileBasenameNoExtension}.obj",
                "res/rsrc.res"
            ],
            "dependsOn": [
                "compile-resources",
                "assemble"
            ]
        },
        {
            "label": "execute",
            "type": "shell",
            "command": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "dependsOn": "link",
            "problemMatcher": []
        }
    ]
}
