isu-examples/.vscode/isu.code-snippets
2023-04-26 10:13:12 +02:00

64 lines
1.7 KiB
Plaintext

{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"ISU code snippet":{
"prefix": "isu",
"body": [
"%include \"rw32-2022.inc\"\n",
"section .data\n",
"\t${1:; data}\n\n",
"section .text\n",
"CMAIN:",
"\tpush ebp",
"\tmov ebp,esp\n",
"\t${3:sub esp,${4:local variables space}}\n",
"\t${5:; code}\n",
"\txor eax,eax",
"\tmov esp,ebp",
"\tpop ebp",
"\tret",
],
"description": "File template for the ISU"
},
"ASM Function Body Snippet":{
"prefix": "fun",
"body": [
"${1:function}:",
"\tpush ebp",
"\tmov ebp,esp",
"\t${2:sub esp,${3:N bytes (for the local variables)}}\n",
"\t${4:; code of the function}\n",
"\tmov esp,ebp",
"\tpop ebp",
"\tret\n",
],
"description": "Template of the ASM function"
},
"ASM String Snippet":{
"prefix": "str",
"body": [ "${1:sName} db \"${2:string}\",0" ],
"description": "Template of the ASM string definition"
},
}