Last active
August 27, 2021 10:12
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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