You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[中文 in gitee](https://gitee.com/dosasm/masm-tasm/)
6
7
7
-
Language support for DOS assembly,may be suitable for studying MASM/TASM in DOSBox and the course *principles& peripheral technology of microprocessor*.
8
+
Basic language support for assembly in **DOS** environment.
9
+
may be suitable for studying MASM/TASM in DOSBox
10
+
or courses like _principles& peripheral technology of microprocessor_.
8
11
9
-
-(**Language Support**) Offer *grammar*,basic *outline* view,*hover*,*code formate* support for DOS assembly language
10
-
-**Run and debug** assembly with right click on the VSCode editor panel. You can choose using MASM or TASM in the preference-settings.
12
+
-**Language Support**: Offer _grammar_,basic _outline_ view,_hover_,_code formate_ support for DOS assembly language
13
+
-**Run and debug**: Right click on the VSCode editor panel, run and debug your code
11
14
-**Diagnose**: process the output of ASM tools and display them in VSCode
12
-
- (suitable for all OS) use JS-Dos to run your asm program in VSCode webview
13
-
-**For windows**, also support use DOSBox and [MSDOS player](http://takeda-toshiya.my.coocan.jp/msdos). All needed tools have been packaged in the extension. Just install and enjoy!
14
-
-[For other systems](#for-other-system): also support DOSBox. You need to install [DOSBox](https://www.dosbox.com) first
15
-
- Note: this extension is built for assembly in DOS, so it not works well with assembly for win32
15
+
- support all platform including **Web**, see [platform support](#platform-support)
16
+
- Note: this extension is built for learning assembly in DOS, it can not work with assembly for win32
16
17
17
18
## Demo
18
19
19
-
Now the extension supports using JSDos to run wdosbox in VSCode's Webview. Change the `masmtasm.ASM.emulator` in settings to *jsdos* to try it. And I am trying to make the extension more friendly to nice project like <http://blog.swishscripts.com/2021/02/11/cloning-nes-tetris-in-x86-16-bit-assembly-part-1/>
The extension offers some language features like "hover","formate","jump to definition" as language id `assembly`.
27
+
You can also use other extension for Assembly language Support, for example language ID `asm-collection` by installing extension [ASM Code Lens](https://marketplace.visualstudio.com/items?itemName=maziac.asm-code-lens).
22
28
23
-
### Demo 1: Run and Debug Assembly
29
+
### Demo 2: Run and Debug
24
30
25
-
| using TASM via DOSBox | using MASM via msdos-player|
||[](https://github.com/dpisdaniel/assembly-pacman)|
46
-
47
-
- Editor Command "`Open Emulator`":Open emulator at your file's folder. If your file's path is not readable for DOS emulator, your file will be copied as `T.ASM` in DOS emulator. (For DOSBox, copy your file to work space folder and mount this folder to DOSBox disk `D:`)
48
-
- Command "`Doxbox here`": The extension will Open DOSBox and mount your active editor file's folder directly to DOSBox 's disk `D:` with no path-checking.
49
-
- some ASM commands you may need: [ASM_commands](https://github.com/dosasm/masm-tasm/wiki/ASM_commands).
50
-
- Some interesting assembly codes you may need: [DOSBox ASM codes](https://github.com/dosasm/masm-tasm/wiki/dosbox)
- If your code just in a single file, set configuration `masmtasm.ASM.mode` as `single file`. The extension will copy your file to a seperate space in your machine to keep your workspace Folder clean.
44
+
- If your project is complex and making up with many files, you may set configuration `masmtasm.ASM.mode` as `workspace` and keep your files' names follow the emulator's limitation.
45
+
- Obviously, this extension may be not suitable for complex project
57
46
58
-
The extension offer some programmatic features like "hover","formate","jump to definition",you can close them in the `preferece->settings`
47
+
## Platform Support
59
48
60
-
## For other system
49
+
The extension depend on [vscode-dosbox](https://marketplace.visualstudio.com/items?itemName=xsro.vscode-dosbox) for intergration with DOS emulator.
50
+
It has packaged all binary files for windows system.
61
51
62
-
The extension is packaged with needed [tools](doc/Toolspath.md) for windows inside while **other OS** users *should* make sure DOSBox can be opened by shell command. We can download DOSBox from its website:[DOSBox](https://www.dosbox.com)
52
+
Follow [its doc](https://github.com/dosasm/vscode-dosbox#dependency-installation) for installing emulator like DOSBox in other system.
63
53
64
-
For MacOS (Darwin),the extension will use command `open -a DOSBox --args` to open DOSBox. So you need to:
65
-
66
-
1. download dmg file from [DOSBox's website](https://www.dosbox.com)
67
-
2. Double-click the `.DMG` file to mount it. A new Finder window showing its contents should appear.
68
-
3. double-click the mounted volume on your desktop and drag the app icon from there to the “Applications” icon in the Finder sidebar.
69
-
70
-
For Ubuntu and other linux system user,The extension will use shell command `dosbox` to open DOSBox. We can use command like this:
71
-
72
-
```sh
73
-
sudo apt install dosbox #install dosbox
74
-
dosbox #if successfully opened the dosbox, it is largely possible for the extension to use dosbox
75
-
```
76
-
77
-
You can also use the setting ID `masmtasm.dosbox.command` to set your command for the extension to open DOSBox.
78
-
79
-
## Extension Settings
80
-
81
-
for more,please see the `preference->settings`
82
-
83
-
-`masmtasm.ASM.MASMorTASM` use *MASM* or *TASM* assembler in DOS emulator to run and debug assembly
84
-
-`masmtasm.ASM.emulator` choose DOS emulator
85
-
-`jsdos` (recommend) run in JS-DOS in VSCode's webview
86
-
-`DOSBox` (default) more stable
87
-
-`msdos player`quiet, it runs in command prompt(CMD). So it cannot support GUI like `TD.exe`
88
-
-`auto` use DOSBox and msdos player
89
-
1. use msdos-player to compile and link
90
-
2. use DOSBox to run
91
-
3. use msdos-player for MASM(debug)
92
-
4. use DOSBox for TASM(TD)
93
-
-`masmtasm.ASM.savefirst` save file first before using
94
-
-`masmtasm.dosbox.run`:what to do after run your code in DOSBox
95
-
-`masmtasm.ASM.toolspath`: (usually do not need it) use tools from this path, see [about-tools](#about-tools)
96
-
-`masmtasm.dosbox.config`: set the DOSBox configuration. The setting will be write to a `.conf` file which will be used by the DOSBox launched by the extension. Set the configuration like below:
97
-
98
-
```jsonc
99
-
{
100
-
"masmtasm.dosbox.config": {
101
-
"SDL.windowresolution":"1024x640",//set the size of the dosbox window
102
-
"SDL.output":"opengl"
103
-
},
104
-
"masmtasm.ASM.toolspath":"E:\\tools"//set the custom ASM tools
105
-
}
106
-
```
54
+
## About DOSBox 's disk
107
55
108
-
### string replacer
109
-
110
-
the string replacer for settings `masmtasm.dosbox.more`,`masmtasm.jsdos.more`,`masmtasm.msdos.more`.Extension will replace these strings to relavant value.
|`${fullname}`| the fullname of the source code file like`c:\asm\hello.asm`|
115
-
|`${filename}`| the filename of the source code file like `hello`|
116
-
|`${fileFolder}`| the folder path of the source code file like `c:\asm`|
117
-
|`${fileDisk}`| the file disk of the source code file like `c`|
118
-
|`${toolpath}`| the folder path of the asm tools including *MASM* and *TASM* folder |
119
-
120
-
### About DOSBox 's disk
121
-
122
-
The extension will mount some folder to DOSBox 's disk. Please don't modify them.
56
+
The extension will mount some folder to DOSBox 's disk.
123
57
124
58
| in DOSBox | real path in the computer |
125
59
| --------- | -------------------------- |
126
60
| C: | the path of tools folder |
127
61
| D: | the path of the work space |
128
62
129
-
## known issues
130
-
131
-
- lack of support of assembly in not just one file
132
-
133
-
## About tools
134
-
135
-
### How the extension use tools
136
-
137
-
The extension will use the tools in the extension's folder `tools`. If defined the setting `masmtasm.ASM.toolspath`, the extension will use ASM tools in this folder instead. This may cause problem
138
-
139
-
See [built-in-tools](tools/README.md)
63
+
## Compile to `.com` files
64
+
65
+
You can change the command to exec in setting `masmtasm.ASM.actions`.
66
+
For example, if you want to compile your code to `.com`, you can add a setting like this.
67
+
And set `masmtasm.ASM.assembler` to its key `TASM-com`
68
+
69
+
```json
70
+
"masmtasm.ASM.actions": {
71
+
"TASM-com": {
72
+
"baseBundle": "<built-in>/TASM.jsdos",
73
+
"before": [
74
+
"set PATH=C:\\TASM"
75
+
],
76
+
"run": [
77
+
"TASM ${file}",
78
+
"TLINK /t ${filename}",
79
+
"${filename}"
80
+
],
81
+
"debug": [
82
+
"TASM /zi ${file}",
83
+
"TLINK /t/v/3 ${filename}.obj",
84
+
"TD ${filename}.exe"
85
+
]
86
+
}
87
+
}
88
+
"masmtasm.ASM.assembler":"TASM-com"
89
+
```
140
90
141
91
### where-are-extensions-installed
142
92
@@ -146,13 +96,9 @@ According to [VSCode-doc](https://code.visualstudio.com/docs/editor/extension-ga
146
96
- mac-OS `~/.vscode/extensions`
147
97
- Linux `~/.vscode/extensions`
148
98
149
-
### use your tools
150
-
151
-
if you want to use your tools of assembler, please paste your path to the setting `masmtasm.ASM.toolspath`, your files should follow the structure like [tools](tools/)
152
-
153
99
## Docs & Thanks & Licenses
154
100
155
-
- Thanks to my teacher *Han*. Hope 2020 and the coming 2021 happy and worthy
101
+
- Thanks to my teacher _Han_. Hope 2020 and the coming 2021 happy and worthy
156
102
- inspired by [Woodykaixa](https://github.com/Woodykaixa)'s [masm-code](https://github.com/Woodykaixa/masm-code)
157
103
- Thanks to excellent DOS emulator: [dosbox](https://www.dosbox.com), [caiiiycuk](https://github.com/caiiiycuk)'s [js dos](https://js-dos.com/) and [msdos player](http://takeda-toshiya.my.coocan.jp/msdos)
158
104
- Thanks to [Roncho](https://marketplace.visualstudio.com/publishers/Roncho) 's extension [Assembly (TASM)](https://marketplace.visualstudio.com/items?itemName=Roncho.assembly-8086),[blindtiger](https://github.com/9176324)'s [masm](https://github.com/9176324/bltg-team.masm) for ASM language information
0 commit comments