GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dosasm/masm-tasm: run and debug TASM/MASM code in VSCode via JSDos, DOSBox and DOSBox-x. compatiable for web platform

BranchesTags
Open more actions menu

Latest commit

 

History

120 Commits
120 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
dev
dev
 
 
i18n
i18n
 
 
pics
pics
 
 
resources
resources
 
 
samples
samples
 
 
src
src
 
 
syntaxes
syntaxes
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.mocharc.yml
.mocharc.yml
 
 
.vscodeignore
.vscodeignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README.zh.md
README.zh.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
language-configuration.json
language-configuration.json
 
 
package.json
package.json
 
 
package.nls.json
package.nls.json
 
 
package.nls.zh-cn.json
package.nls.zh-cn.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
snippets.json
snippets.json
 
 
tsconfig.json
tsconfig.json
 
 
webpack.config.js
webpack.config.js
 
 

Repository files navigation

Basic Support for MASM/TASM v2.x

Chinese | English 中文 in Gitee

Basic language support for assembly in DOS environment. It may be suitable for studying MASM/TASM in DOSBox or courses like Principles and Peripheral Technology of Microprocessor.

  • Language Support: Offers grammar validation, basic outline view, hover tips, and code formatting support for DOS assembly language
  • Status Bar: Quick access to switch DOS emulator and assembler independently, with executable paths shown
  • Run and Debug: Right-click on the VS Code editor panel to run and debug your code
  • Diagnose: Processes the output of ASM tools and displays diagnostics in VS Code
  • Supports all platforms including Web support try me in your browser by click vscode.dev.
  • Note: This extension is built for learning assembly in DOS, and it does not work with Win32 assembly

Demo

Demo 1: Language Features

Format Code Diagnose

The extension provides language features such as hover hints, code formatting, and jump to definition for the assembly language ID.

Code Formatting

The built-in formatter follows the style of sample .asm files:

  • Labels at column 0, instructions indented with tabs
  • Top-level directives (.386, .model, .STACK, include, etc.) stay at column 0
  • Blank lines preserved as truly empty
  • Original operand spacing and comments preserved
  • Formatting is idempotent — running it twice produces the same result
  • Use the Format Document command (Shift+Alt+F) to apply formatting. You can also use other assembly language support extensions (e.g., the asm-collection language ID) by installing ASM Code Lens.

Demo 2: Run and Debug

Using TASM via DOSBox Using MASM via jsdos

When editing assembly files, right-click in the editor panel to access the following options:

  1. Open Emulator: Launch DOSBox and prepare the runtime environment
  2. Run ASM Code: Assemble, link, and execute the program
  3. Debug ASM Code: Assemble, link, and debug the program

Run/Debug Notes

  • The extension copies your file to an isolated directory before assembling, to keep your workspace clean.
  • Note that this extension is not optimized for complex projects.

Project Configuration with dosasm.jsonc

For multi-file projects or custom build workflows, you can place a dosasm.jsonc file in your project directory. When you right-click an .asm file to run/debug, the extension searches upward from the file's directory for dosasm.jsonc. If found, it uses the configuration defined there instead of the default settings.

Example dosasm.jsonc (see dosasm.jsonc v1):

  • multi file project sample
  • compile to .com file
  • Turbo C example

Template variables:

  • ${file} — the full path of the assembly file in DOS
  • ${filename} — the file path without extension
  • ${actionFolder} — the directory containing the dosasm.jsonc file
  • ${<built-in>/TASM.jsdos} — the extracted bundle folder path (the extension automatically extracts the .jsdos zip bundle and mounts the resulting folder)

How it works:

  • The action.before commands set up the DOS environment (mount drives, set PATH, etc.)
  • The action.run commands assemble, link, and execute the program
  • The action.debug commands assemble, link, and launch the debugger
  • The action.open commands are used when opening the emulator without running
  • When dosasm.jsonc is found, the default single-file mount behavior is skipped — the before section fully controls the environment setup

Copy file before run/debug:

  • action.copyFileAs (string | null): Controls whether the active file is copied before run/debug
    • String: file is copied to this path (relative to the action folder)
    • null: file is not copied, the original file path is used directly
  • Bundle extraction: ${<built-in>/TASM.jsdos} references a built-in .jsdos zip bundle. The extension extracts this bundle to a folder and replaces the variable with the folder path, so you can mount it as a DOS drive

Platform Support

This extension interfaces with the DOSBox(-X) binary via Node.js's child_process module. You must install DOSBox or DOSBox-X first to use this feature.

Since VS Code is primarily built with JavaScript (TypeScript), we support the WebAssembly (Wasm) version of DOSBox(-X) — namely js-dos. The extension bundles all required js-dos files, and it uses js-dos as the default DOS emulator for Web platform support.

Docs & Acknowledgments & Licenses

  • Special thanks to my teacher, Mr. Han. Wishing 2020 and the coming 2021 to be happy and fulfilling years.
  • Inspired by Woodykaixa's masm-code project
  • Thanks to the excellent DOS emulators: DOSBox-x, DOSBox, caiiiycuk's js-dos, and msdos-player
  • Thanks to Roncho's extension Assembly (TASM) and blindtiger's masm for reference on assembly language support
  • We welcome issues and pull requests to help improve this extension
  • Acknowledgments
  • Additional Information: Wiki

Enjoy! 😊

About

run and debug TASM/MASM code in VSCode via JSDos, DOSBox and DOSBox-x. compatiable for web platform

marketplace.visualstudio.com/items?itemName=xsro.masm-tasm

Topics

8086assemblydosdosboxmasmtasmvscodevscode-extension

Resources

Readme
MIT license
Activity
Custom properties

Stars

182 stars

Watchers

2 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.