Giter VIP home page Giter VIP logo

xsro / vsc-asmtasks Goto Github PK

View Code? Open in Web Editor NEW
47.0 0.0 11.0 8.73 MB

Custom Tasks and settings for run TASM/MASM Code via DOSBox in VSCode. So tempate this repo and write your own MASM/TASM codes !😀Now my VSCode extension xsro.masm-tasm is also available

Home Page: https://marketplace.visualstudio.com/items?itemName=xsro.masm-tasm

Assembly 5.97% Batchfile 54.92% Shell 39.11%
vscode-tasks masm tasm vscode vscode-template

vsc-asmtasks's Introduction

VSCode template for MASM/TASM via DOSBox

中文|github|how it works|release and download

Through the use of scripts and terminal tasks, this repo is suitable for you to code TASM/MASM in VSCode with a relatively convenient way to run and debug. Here are some features.Runable in both windows and linux. May be also support OSX. Getting Start.Click use this template to use this template.

😅Main Features

Terminal Tasks

Use the Run build Tasks with Ctrl+Shift+B or click Terminal->Run Build Tasks to run termianl tasks.You can also change the tasks.json to make it to your taste like set hotkey, choose group and so on.

  • Open DOSBox:open DOSBox(copy currentfile to dosbox's D: set path for TASM and MASM)
  • MASM CurrentFile:compile and run your code using MASM in dosbox
  • TASM CurrentFile:compile and run your code using TASM in dosbox
  • ASM CurrentFile:offering many selection for you to run or debug

For example, A TASM code hello tasm.ASM can be successfully compiled with TASM while if use MASM, it will ouput error messages like:

Using TASM No problem Using MASM several errors
RunBuildTasksSuccess RunBuildTasksError
using Open DOSBox using ASM CurrentFile
dosbox here 7

with Code Runner

if installed the vscode extension code runner, we can run TASM with a click or Ctrl+Alt+N.The relavant setting are in .vscode/settings.json

  • if need to use MASM,Just change A to B like
  • if in linux,Please make some changes according to comments
"code-runner.executorMapByGlob": {
    //for windows using TASM
    "*.{ASM,asm}":"$workspaceRoot\\tools\\ASMit.bat $fullFileName A $workspaceRoot\\tools $workspaceRoot\\tools\\work",
    //for linux using TASM
    "*.{ASM,asm}":"$workspaceRoot/tools/asmit.sh $fullFileName -mA -d $workspaceRoot/tools"
    //for windows using MASM
    "*.{ASM,asm}":"$workspaceRoot\\tools\\ASMit.bat $fullFileName B $workspaceRoot\\tools $workspaceRoot\\tools\\work",
    //for linux using MASM
    "*.{ASM,asm}":"$workspaceRoot/tools/asmit.sh $fullFileName -mB -d $workspaceRoot/tools"
},

coderunner

How to use

Getting Start

Recommend click use this template to build your repository using the current file structure.

  1. Clone the repository to your folder
    • download release from here
    • If installed GIT,we can use command like cd yourfolder;git clone https://github.com/xsro/VSC-ASMtasks.git
    • Or clickcode,download zip and unzip to your folder
  2. Open the Folder with VSCode Download VSCode
  3. Then you can write your own TASM or MASM code with the assitance of the powerful VSCode tasks

for linux

For linux, we should Install the dosbox first.Use command like sudo apt install dosbox or download from websiteDOSBox. Since I have put the dosbox.exe in the folder ASMtools\dosbox,so it's not necessary to install dosbox for windows users.Since I use the bash script asmit.sh,we need to allow it to run by command like chmod u+x asmit.sh.

To use Code Runner ,Please refer to with Code Runner

Overview

When I study the NJUPT's course <principles& peripheral technology of microprocessor>, I need to study some knowledge about assembly,but those assembly tools(TASM and MASM) runs in 16 bits microprocessor system which is not supported by most computers today. We use DOSBox to emulate the 16-bit environment, but DOSBox is designed for games,it is a little unfriendly for coding. So I write some VSCode settings and tasks to run the TASM assembly.Hope helpful for you:smiley:

📁Content

  1. Folder .vscode:tasks.json for Build Task,settings.json mainly for CodeRunner
  2. Folder tools
    1. dosbox:windows programs of dosbox and config file
    2. TASM: tools(16bit) includes:TASM.exe,Tlink.exe,td.exe and others
    3. MASM: tools(16bit) includes:masm.exe,link.exe,debug.exe and others
    4. work: includes asm.bat which oprating in dosbox folder for operations
    5. ASMit.bat: batch script for run dosbox
    6. asmit.sh: bash script for run dosbox
  3. hello tasm.ASM: A basic TASM code file
  4. hello masm.ASM: A basic MASM code file

🙋Need your help

Welcome to send issue or pull request

  • The dosbox windows is a little bit disturbing. Is there any way to hide it?
  • The Code Runner settings is needed to be modified when switching between different OSs.Is there a way to simplify?
  • Is there a way to add support for other Editor?

Find more

Maybe gitee is helpful to you,which has some codes of TASM and notes about <principles& peripheral technology of microprocessor>. masm-code is an extension for MASM in DOSBox

notepad++ Users

if you are notepad++ user,maybe this code is helpful to you

cmd /c del d:dos\asm\tasm\t.* & copy  "$(FULL_CURRENT_PATH)" "d:dos\asm\tasm\t.asm" & D:\DOS\DOSBox.exe -noautoexec -c "mount c d:dos\asm\tasm"  -c "c:"  -c "tasm/t/zi t.asm" -c "tlink/v/3 t.obj" -c "t.exe" -c "pause" -c "exit"

vsc-asmtasks's People

Contributors

xsro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.