Skip to content

Instantly share code, notes, and snippets.

@ozyx
Last active August 27, 2021 10:12
Show Gist options
  • Save ozyx/1b74a23bde2ea2b6ba0518d6f5dad0fc to your computer and use it in GitHub Desktop.
Save ozyx/1b74a23bde2ea2b6ba0518d6f5dad0fc to your computer and use it in GitHub Desktop.
Assemble, Link and Execute MASM as default build task in VSCode (with problem matcher)
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "assemble",
"type": "shell",
"args": [
"/c",
"/Zd",
"/coff",
"/Fl",
"${fileBasenameNoExtension}.asm"
],
"command": "C:/masm32/bin/ml.exe",
"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,
"loop": true
}
}
},
{
"label": "link",
"type": "shell",
"args": [
"/SUBSYSTEM:CONSOLE",
"${fileBasenameNoExtension}.obj"
],
"command": "C:/masm32/bin/link.exe",
"dependsOn": "assemble"
},
{
"label": "execute",
"type": "shell",
"command": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": "link"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment