Skip to content

Commit 269df3b

Browse files
committed
增加代码片段
1 parent fadce78 commit 269df3b

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
"configuration": "./language-configuration.json"
4141
}
4242
],
43+
"snippets": [
44+
{
45+
"language": "assembly",
46+
"path": "./snippets.json"
47+
}
48+
],
4349
"grammars": [
4450
{
4551
"language": "assembly",

snippets.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"Macro":{
3+
"prefix":"macro",
4+
"body":[
5+
"${1:name} MACRO ${2:params}",
6+
"\t$0",
7+
"ENDM"
8+
]
9+
},
10+
"Procedure":{
11+
"prefix":"proc",
12+
"body":[
13+
";${2:description}",
14+
"${1:name} PROC",
15+
"\t$0",
16+
"${1:name} ENDP"
17+
]
18+
},
19+
"Segment":{
20+
"prefix":"segment",
21+
"body":[
22+
";${2:description}",
23+
"${1:name} SEGMENT USE16",
24+
"\t$0",
25+
"${1:name} ENDS"
26+
]
27+
},
28+
"DOS print Char":{
29+
"prefix":"cprint",
30+
"body":[
31+
"MOV DL, '${1:char}'",
32+
"MOV AH, 2H",
33+
"INT 21H"
34+
],
35+
"description":"Prints a charcters"
36+
},
37+
"helloworld":{
38+
"prefix":"helloword",
39+
"body":[
40+
".386",
41+
"DATA SEGMENT USE16",
42+
"${1:MESG DB 'Hello word','$'}",
43+
"DATA ENDS",
44+
"CODE SEGMENT USE16",
45+
"\tASSUME CS:CODE,DS:DATA",
46+
"BEG:",
47+
"\tMOV AX,DATA",
48+
"\tMOV DS,AX",
49+
"${2:\tMOV AH,9\n\tMOV DX, OFFSET MESG\n\tINT 21H}",
50+
"\tMOV AH,4CH",
51+
"\tINT 21H;back to dos",
52+
"CODE ENDS",
53+
"END BEG"
54+
],
55+
"description":"HELLO WORD assembly sample"
56+
}
57+
}

0 commit comments

Comments
 (0)