Run asm in Visual Studio code

Viewed 15568

Is there some sort of plugin in Visual Studio code (mac) that can run basic assembly, for example the following:

.section .text
.globl _start
_start:
    movl $1, %eax
    movl $0, %ebx
    int $0x80

As it is, currently I am ssh'ing into a linux server in order to run this assembly but I was hoping it would be possible to build/link/execute this assembly from within VS code, perhaps with a plugin.

1 Answers

You can make a task to assemble and link your code, after that, you can use the gdb extension to debug your code.

To make this process faster, if you don't know how to do it, you can use the .vscode folder.

As you are using AT&T syntax, you'll need to use the gas option to run the code.

If you still don't have gdb, you can install it opening a terminal and executing: brew install gdb.

Related