Skip to content

Commit 9d44aa0

Browse files
committed
fix: some bugs when using msdosmerge hover: change the name for keywords' categary
1 parent f744909 commit 9d44aa0

File tree

10 files changed

+58
-62
lines changed

10 files changed

+58
-62
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## welcome feedback and contribution [github issue](https://github.com/xsro/masm-tasm/issues)
44

5-
### [unreleased]
5+
### 0.5.0/0.5.1
66

77
- MASM插件更新到 `6.11`,最近在想如何支持`masm6.x`语法
88
- 尝试用异步重写了一些代码,希望不要引入bug

i18n/chs/out/language/wordinfo.i18n.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"keykind.Command": "操作码助记符",
3-
"keykind.Memory": "Memory",
4-
"keykind.Instruction": "Instruction伪指令助记符",
3+
"keykind.Memory": "数据定义指令",
4+
"keykind.Instruction": "伪指令助记符",
55
"keykind.Register": "Register寄存器",
66
"keykind.Saved": "Saved保留字",
77
"keykind.Size": "Size",
@@ -45,8 +45,8 @@
4545
"ascii.US": "(单元分隔符)",
4646
"ascii.space": "(空格)",
4747
"ascii.DEL": "(删除)",
48-
"num.hex":"十六进制数",
49-
"num.oct":"八进制数",
50-
"num.dec":"十进制数",
51-
"num.bin":"二进制数"
48+
"num.hex": "十六进制数",
49+
"num.oct": "八进制数",
50+
"num.dec": "十进制数",
51+
"num.bin": "二进制数"
5252
}

package-lock.json

Lines changed: 31 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "MASM/TASM",
44
"publisher": "xsro",
55
"description": "DOS汇编语言开发环境和语法支持,win下安装即用,自带DOSBox.exe和TASM/MASM工具",
6-
"version": "0.5.1-beta.1",
6+
"version": "0.5.1",
77
"keywords": [
88
"dosbox",
99
"16位",
@@ -233,7 +233,7 @@
233233
"devDependencies": {
234234
"@types/glob": "^7.1.3",
235235
"@types/mocha": "^7.0.2",
236-
"@types/node": "^13.13.23",
236+
"@types/node": "^13.13.29",
237237
"@types/vscode": "^1.44.0",
238238
"@typescript-eslint/eslint-plugin": "^2.34.0",
239239
"@typescript-eslint/parser": "^2.34.0",
@@ -250,7 +250,7 @@
250250
"typescript": "^3.9.7",
251251
"vsce": "^1.81.1",
252252
"vscode-nls-dev": "^3.3.2",
253-
"vscode-test": "^1.4.0"
253+
"vscode-test": "^1.4.1"
254254
},
255255
"dependencies": {
256256
"vscode-nls": "^4.1.2"

scripts/playerasm.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ set "cdo=%CD%">nul
99
set path=%~f1\player\;%~f1\masm\;%~f1\tasm\
1010
cd %~f4
1111
%~d4
12-
del T*.*
13-
copy %3 T.ASM>nul
12+
::del T*.*
13+
::copy %3 T.ASM>nul
1414
if "%2" == "MASM" goto masm
1515
if "%2" == "TASM" goto tasm
1616
goto end

src/DOSBox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function runDosbox2(conf: Config, runOrDebug: boolean): Promise<str
2323
export function runDosbox(conf: Config, more?: string, doc?: TextDocument): Promise<string> {
2424
let preCommand: string = "";
2525
let boxcmd: string = '@echo off\n';
26-
boxcmd += `mount c \\\"${conf.path}\\\"\nmount d \\\"${conf.workUri.fsPath}\\\"\n`;//mount the necessary path
26+
boxcmd += `mount c \\\"${conf.toolsUri.fsPath}\\\"\nmount d \\\"${conf.workUri.fsPath}\\\"\n`;//mount the necessary path
2727
boxcmd += "d:\nset PATH=%%PATH%%;c:\\tasm;c:\\masm\n";//switch to the working space and add path\
2828
if (doc) {
2929
let filename = doc?.fileName;

src/configration.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function customToolCheck(path: string): Promise<ToolInfo> {
3131
hasTasm: false
3232
};
3333
let dir1 = await fs.readDirectory(uri);
34-
console.log(inArrays(dir1, ["boxasm.bat", FileType.File]));
34+
//console.log(inArrays(dir1, ["boxasm.bat", FileType.File]));
3535
if (inArrays(dir1, ["dosbox", FileType.Directory]) && process.platform === "win32") {
3636
let dir2 = await fs.readDirectory(Uri.joinPath(uri, './dosbox'));
3737
if (inArrays(dir2, ["dosbox.exe", FileType.File])) {
@@ -47,7 +47,7 @@ async function customToolCheck(path: string): Promise<ToolInfo> {
4747
info.hasBoxasm = inArrays(dir1, ["boxasm.bat", FileType.File]);
4848
info.hasMasm = inArrays(dir1, ["masm", FileType.Directory]);
4949
info.hasTasm = inArrays(dir1, ["tasm", FileType.Directory]);
50-
console.log(dir1, info);
50+
//console.log(dir1, info);
5151
return info;
5252
};
5353
function writefile(Uri: Uri, Content: string) {
@@ -82,11 +82,13 @@ export class Config {
8282
this.toolsUri = Uri.joinPath(content.extensionUri, './tools');
8383
if (toolpath) {
8484
customToolCheck(toolpath).then(
85-
(value) => { this.customToolInfo = value; },
85+
(value) => {
86+
this.customToolInfo = value;
87+
this.toolsUri = value.uri;
88+
},
8689
(reason) => { console.log(reason); this.customToolInfo = undefined; }
8790
);
8891
};
89-
9092
//写dosbox配置信息
9193
this.writeBoxconfig(this);
9294
}

src/language/wordinfo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ enum KeywordType {
531531
export function getType(type: KeywordType): string {
532532
switch (type) {
533533
case KeywordType.Instruction:
534-
return localize("keykind.Command", "(Command)");
534+
return localize("keykind.Command", "(Opcode mnemonics)");
535535
case KeywordType.MemoryAllocation:
536-
return localize("keykind.Memory", "(Memory)");
536+
return localize("keykind.Memory", "(Data definitions)");
537537
case KeywordType.PreCompileCommand:
538-
return localize("keykind.Instruction", "(Instruction)");
538+
return localize("keykind.Instruction", "(Assembly directives)");
539539
case KeywordType.Register:
540540
return localize("keykind.Register", "(Register)");
541541
case KeywordType.SavedWord:

src/runcode.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export class AsmAction {
5959
break;
6060
}
6161
if (goon && (DOSemu === "msdos player" || DOSemu === "auto")) {
62-
MSDos.RunDebug(this._config, DOSemu === "msdos player", runOrDebug);
62+
let flag: boolean = DOSemu === "msdos player";
63+
flag = (MASMorTASM === "masm" || runOrDebug === false || DOSemu == "auto") || flag
64+
MSDos.RunDebug(this._config, flag, runOrDebug);
6365
};
6466
}
6567
}

src/viaPlayer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export function RunDebug(conf: Config, viaplayer: boolean, runordebug: boolean)
2929
else {
3030
debug = 'DEBUG T.EXE';
3131
}
32-
if (viaplayer) {
32+
let flag: boolean = (conf.MASMorTASM === "TASM" && runordebug === false);
33+
if (viaplayer && !flag) {
3334
outTerminal(runordebug, conf);
3435
}
3536
else {

0 commit comments

Comments
 (0)