dosasm / masm-tasm Goto Github PK
View Code? Open in Web Editor NEWrun and debug TASM/MASM code in VSCode via JSDos, DOSBox and msdos-player
Home Page: https://marketplace.visualstudio.com/items?itemName=xsro.masm-tasm
License: MIT License
run and debug TASM/MASM code in VSCode via JSDos, DOSBox and msdos-player
Home Page: https://marketplace.visualstudio.com/items?itemName=xsro.masm-tasm
License: MIT License
首先还是非常感谢插件的作者。这款插件也是我上微原课,微原老师极力推荐的,也给我学习微原和汇编提供了很大的帮助。所以我想为该插件留下一些建议。
下面是我在使用新版本插件的时候发现的一些bug:
我用的是老版本vscode,安装插件最高只安装到0.7.0版本的,而0.7.0版本各功能都十分正常。上述bug是我在别的机子用新版vscode(默认安装更新版本的插件)的时候发现的。也不知道是从哪个版本开始有了上述的bug。
另外,我在研究该插件的时候发现使用TD之前插件会将tools\tasm\TDC2.TD复制到workspace里并改名为TDCONFIG.TD,然后在TD的时候才能正常默认显示上述4个窗口(0.7.0版本插件)。我尝试将workspace中的TDCONFIG.TD删除,并手动TD T.EXE,发现debug界面也没有默认显示上述4个窗口(甚至默认显示的是别的窗口)。所以我猜测上述第2点和TDCONFIG.TD这个文件有关?
我还没有学习过插件的制作,很抱歉暂时无法提供代码上的帮助。以后我学习了相关的编程语言后一定会来帮助编写!!
英语不好,就不用英语写了(
dosbox
: provide virtual workspaceassemble
, link
, list
MASM's debug.exe
to do this. I need more researchHover
: offer port address description, interrupt command description and moreSymbol
: offer the Rename Symbol featureNice tool for learning assembly!
I cannot find where the console output (from INT 21H
) is shown in TASM/MASM debug window. How can I check the console output while debugging? Thanks!
Hi.
Thanks a lot for this nice extension. I'm not able to include a macro file, the extension always terminates the Run ASM code command, with an error: can't locate file: name.inc
`include mac.inc
.model small
.stack 64
.data
msg db "hello","$"
.code
main proc far
mov ax,@DaTa
mov ds,ax
mov ah,9
mov dx,offset msg
int 21h
hlt
main endp
end main
`
Can't locate file: mac.inc
I was working on a project in Assembly and I needed to call the library Irvine32.inc but I found out that the program is isolating the executable file which is in dosbox from the real hard disk, changed the type as workspace but I couldn't handle it.
Hi, I'm reaching out to let you know that we are fixing a bug with the workspaceContains
VS Code extension activationEvent that could change the activation behavior for your extension.
Here's the issue: This event is supposed to start a search in the user's workspace with the given glob pattern. A pattern like *.txt
should activate the extension whenever the root of the workspace has a file matching *.txt
, but it should not search the entire workspace. A pattern like **/*.txt
should recursively search the entire workspace. We discovered that VS Code is incorrectly applying the **
pattern to every workspaceContains pattern that includes a *
.
Since this may impact the startup performance of VS Code, we need to scope these searches correctly. Once we fix this, a pattern like *.txt
will only match a .txt file in the root of the workspace.
The change will be in VS Code Insiders in early January. It will be released with 1.53 in early February. Please see microsoft/vscode#110510 for more details and let me know if you have any questions.
在启动DOSBox的时候命令:dosbox.exe -noconsole就不会显示启动的命令行了.
在DOSBox.ts文件的22和40行的dosbox.exe处加上"-noconsole".
let wincommand = 'start/min/wait "" "' + conf.path + '/dosbox/dosbox.exe" -noconsole -conf "' + conf.dosboxconfuri.fsPath + '" ';
It would be great if you can chose in what type to compile your source file into .COM or into .EXE file
I know you can do what using Emulator button and type command to compile but still it a lot of annoying work. Can you automate it ? Or add parameter to chose whenever compile into .COM or into .EXE?
Also how to run what pretty debugger (RUN ASM DEBUGGER button ) instead of using td debugger when you compile multy source project?
Dosbox
对特殊字符的支持效果比较差,本插件通过一些手段试图规避这个问题,但是有些地方仍然并不如意。
mount d d:\文件夹
无法工作type 你好.txt
就无法读取文件我通过cmd将文件复制到插件安装 目录再使用的方式来规避【2】,但是如果插件的安装路径中有中文就无法顺利mount挂载,由于常常有使用特殊字符作为用户名的情况,这往往是致命的
目前我的大部分文件是和插件放在一起的,
C:\Users\用户名\.vscode\extensions
,当用户名有中文的时候这个路径就无法被dosbox访问),C:/Users/用户名/AppData/Roaming/Code/User/globalStorage/kaixa.masm-code/
)也有这样的问题。有没有什么好的方法解决这个问题
data
文件夹,vscode会把插件等内容存放在这里📖用gbk编码保存配置文件,或者使用dosbox参数传递命令。0.3.1中使用了后者,但是仍然有问题
我尝试格式化如下代码,但被格式化为了非预期的结果,如下gif所示,正确的段名应为.data
而非..data
尝试进行格式化的代码
.model small
.STACK 1024
.data
message db 8 dup(?),0dh,0ah,"$"
.code
main: mov ax,@data ;主程序开始
mov ds,ax
mov al,"A" ;子程序参数1
mov si,offset message ;子程序参数2
call BinToAsc ;调用子程序BinToAsc
mov ah,9
mov dx,offset message
int 21h ;显示字符串
mov ax,4c00h
int 21h ;主程序结束
BinToAsc PROC ;子程序开始
push cx
push si
mov cx,8
L1: shl al,1 ;逻辑左移
mov BYTE PTR [si],"0"
jnc L2 ;CF=0则跳转
mov BYTE PTR [si],"1"
L2: inc si
loop L1
pop si
pop cx
ret
BinToAsc ENDP ;子程序结束
end main
VSCode: 1.53.2
VSCode运行系统: Windows 10 20H2
VSCode Remote连接至的系统: Ubuntu 20.04.2 LTS x86_64
Ubuntu上的dosbox版本: 0.74-3
shell版本: fish 3.1.0
在右键编辑器选择"Open Emulator"、"Run ASM Code"或"Debug ASM Code"时,若Emulator设置为"dosbox",则上述操作均会直接返回如图错误 exitcode 1(图中为运行"Run ASM Code"时的错误信息):
然而如果将错误信息中的命令直接复制到shell中运行,则是可以运行的(图中dosbox为X11转发至本机的窗口)
如果使用jsdos模拟器,则可以正常进行上述操作,msdos-player无法在Linux系统下运行所有没有测试。
汇编工具似乎有许多,从比较原始的MASM、TASM到现在的MASM32,GASM,我有些迷惑我应该如何组织这些工具了
我目前使用的是比较原始的MASM和TASM工具,使用dosbox进行模拟,并把win下的dosbox程序打包在插件中,对于其他系统而言并没有这个必要,我在想是否可以在程序中自动检测系统并在win下下载dosbox和msdos。
In assembly language, there are some directives related to multiple file assembly like : include
includelib
For example, include test.asm
We need to find file named test.asm
in the current folder. Should we find other files like the ones in PARH?
很感谢作者写了自动格式化的功能,但是有bug:多次按下Format Document之后,各语句最后一个操作数会被再写一遍
When I attempt to include a file in my ASM program, the compiler Can't locate file
. For example:
sound_data:
INCLUDE "kingsv.wav" ; 51.529 bytes
Note that my .asm
file and kingsv.wav
file are in the same directory (root directory)
I have also changed the setting Masmtasm.ASM
working mode to workspace
Have I missed anything? Thanks
Is there any possibility of adding NASM as an assembler, Bochs / QEMU as emulators in order to provide bare-metal x86 (x64) development and debugging experience?
As NASM is quite a quick and dirty choice for bare-metal development / learning, it's much easier for a beginner (like me) to jump in compared to MASM (or TASM maybe? I don't know that much), also it comes with a wide-range platform support.
QEMU / Bochs may be more suitable for bare-metal emulation and/or debugging.
Hello,
First, thank you for providing such a convenient extension!
I think that VSCode version requirements could be reduced to ^1.46.0
or even lower. And the relevant code could be modified before packaging to .vsix
.
I manage to install this extension directly for my Visual Studio Code 1.46.1, but the extension is failed to install.
Then I download the vsix package, and I modified ^1.47.0
to ^1.46.0
, and it is installed successfully. (I directly put the unzipped directory to .vscode
folder to install this extension.)
yours sincerely,
@WMF1997
CODE:
.model small
.8086
.data
v1 dw 4
.code
mov ax,0
mov ax,v1
.exit
end
Problem: AX value is not 4
NOTES: Assembler => MASM
Add integration with vscode breakpoints into turbo debugger
Option to open cpu view in td by default.
Greetings, After a while extensions debugger do not work it just compiles/links program and runs exe . no debugger launching.
you can still use using td debugger the emulator button(you need also compile exe file)
Tried reinstall extension but still same error
also using extension for git version
VS version - 1.53 (in previous version also did not worked)
OS - windows 10 x64
code of program for tests, uses graphic mode and displays data
;prints data from vector into console using graphics
;white bg and yellow symbol if for odd numbers
;white bg and green symbol is for even numbers
;black bg and red symbol is for zero
.model small
.data
W_BG_Y_SYM Equ 01111110b ; white background, yellow symbol ; odd
W_BG_G_SYM Equ 01110010b ; white background, green symbol ;even
BLACK_BG_R_SYM Equ 0000100b; bkack bg and red foreground ;zero
BLACK_BG_W_SYM Equ 0000111b;for splitter sign
M Equ 3 ;colons
Vector DW 12 ,3, 0
.code
.startup
mov ax, 13 ; row
mov bx, 39 ; col
; calculate offset of the position in the video memory
dec ax ; row-1
mov dl, 80 ;
imul dl ; (row-1)*80
dec bx ; col-1
add ax, bx ; (row-1)*80 + (col-1)
add ax, ax ; *2
; set address
mov bx, 0B800h
mov es, bx ; segment value for text mode video memory
mov di, ax ; calculated offset
; write symbols and attributes
mov bx,0
mov cx,M
;BE AWARE DI+BX CAN ONLY BE TO INCRASE INDEX REGISTER OTHERWISER ERROR!
loopec:
mov ax,Vector[bx]
;--if value is zero
cmp ax,0
jne check_on_even
add ax,48 ;convert into char
mov word ptr es:[di+BX], ax
mov word ptr es:[di+BX+1], BLACK_BG_R_SYM
jmp next
;--if value is even
check_on_even:
test ax,1
jnz number_is_odd
add ax,48 ;convert into char W_BG_G_SYM
mov word ptr es:[di+BX], ax
mov word ptr es:[di+BX+1], W_BG_G_SYM ; white background, yellow symbol
jmp next
;-- if val is odd
number_is_odd:
add ax,48 ;convert into char
mov word ptr es:[di+BX], ax
mov word ptr es:[di+BX+1], W_BG_Y_SYM ; white background, yellow symbol
next:
add bx,2
loop loopec
xor ax,ax
.exit
end
如题。我开启了 VSC 的“Format On Save”功能,然后惊讶地发现代码无法保存了,每次保存都会回到未修改之前的样子。排查后发现好像是插件的格式化功能存在问题,目前只能先关闭“Format On Save”功能手动保存后再格式化代码,希望能够解决。
在vscode打开目录并启动调试,能否通过设置把中间文件obj和最终生成的exe放在该源文件的目录?
我想问一下有没有什么方法可以更改您制作的MASM-TASM的配色方案。我想在其中加一些自己个性化的方案。不知道方不方便透露一下修改的方法。
[2022-05-15 02:24:50.749] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'fsPath')
at c:\Users\user.vscode-insiders\extensions\xsro.masm-tasm-1.1.0\dist\extension.js:1:46204
at c:\Users\user.vscode-insiders\extensions\xsro.masm-tasm-1.1.0\dist\extension.js:1:45130
原本是想请求作者能够将代码挂载在当前工作目录而非插件下的workspace。
但是刚刚得知dos挂载存在着目录字符限制问题。
但是如果无法实时更新文件内容,那么就意味着每次本地修改都要关闭窗口并”重新打开DOS环境“。
所以能否考虑一种折中的手段,就是每次保存文件都进行一次从工作目录到挂载目录的文件复制?
The extension mainly designed for x86 assembly (TASM/MASM)
How can I collect and classify the keyword information
according to wikipedia, there are:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.