
SASM - IDE for assembler
Hello, dear habravchane!
This post I want to introduce to the community a project that I wrote from time to time last year: SASM (SimpleASM) - IDE for developing programs in the x86 and x86-64 assembly language.

SASM is a simple cross-platform (available on Windows and Linux) development environment for assembler languages NASM, MASM, GAS, FASM with syntax highlighting and a debugger. The program works out of the box and is well suited for beginners learning assembly language. Based on Qt. Distributed under the free GNU GPL v3.0 license.
Sources are in the repository on GitHub .
Binaries can be downloaded on the program website .
Under the cut you will find a bit of history and a more detailed description of the possibilities.
At the 1st year at my university there was a training course "Architecture and assembly language", in which we studied the assembler NASM and passed the tasks on it in ejudge contests. Accustomed to using the IDE when programming before, I was not very happy to compile everything on the command line. In my opinion, there were no convenient IDEs for NASM. I did not really like universal solutions like Geany (although there is no friend for the taste and color - someone used all this and was pleased). Yes, and I already wanted to do something big and at the same time learn C ++.
So, it was decided to write your IDE for NASM, primarily for myself and maybe classmates.
I had no experience writing a GUI before. After some deliberation, it was decided to use Qt - a good free framework, at the same time and cross-platform. At first, a simple text editor was written with simple highlighting, a build log and input / output windows. The proudly called “IDE” program was able to collect the text that was in the text editor and run the built program.
Then, having learned a little regular expressions, I made a beautiful highlight. Screwed the debugger (GDB). Added tabs and all sorts of simple features in a text editor such as searching and commenting a piece of code. Gradually finished the program to a more or less normal form, corrected errors.
This spring, SASM was included in the above training course, and freshmen already used it. Recently I added support for other assemblers to the program, except for NASM - MASM, FASM and GAS.

Firstly, it’s just a code editor with highlighting, tabs and the ability to build and execute a program. Launch in a separate window.
The log shows information about the time the program is running. There are 2 forms for input and output. As I said, the program was originally intended for passing contests. The last two features are very convenient for this. If you still need to save the exe'shnik, this can be done in the File menu.

One of the most complex components in a program is a debugger. He has not so many possibilities, but there is a certain minimum basic set: he shows the current line, takes a step with entry, without entry, continues to execute / pause the program, you can set breakpoints, look at registers and memory. Also, for those who still lack the basic capabilities, a command line for entering arbitrary commands for GDB is implemented from the bottom of the window.
Yes, the debugger is based on GDB. It wasn’t very easy to make because of assembler limitations. In particular, NASM is not able to generate normal debugging information and has to determine the current location in the program, matching the listing generated by the assembler and the current address in the EIP command counter.
SASM includes a io.inc macro library for I / O, used in the course "Architecture and Assembly Language" and slightly rewritten to debug and support 64-bit mode. It is very convenient at the initial stages of training - it allows you to display data without thinking about the conventions and rules for calling functions.
For example, to display the number contained in the EAX register, it is enough to write
instead The
commands contained in "io.inc" can be found in the help.

In the program settings, you can fully customize the text editor - set the color scheme, select the font, set the initial text.
Language is also set there (Russian and English are available).

Also in the options are available the choice of assembler (NASM, MASM, GAS or FASM) and bit depth (x86 or x64). These options affect the choice of programs - assembler and linker, and options for them. Also, the new assembler adjusts the backlight and the initial text. Assembly paths and options can also be set manually.
The program contains help and sample programs for each assembler - Hello World programs in the Projects folder and initial templates so that you can immediately start writing code.
On Windows, all the components necessary for building programs are already included in SASM. The program works "out of the box" - you can start programming immediately after launch.
On Linux, install gcc, gdb, and the necessary assembler.
More information about the program and sources can be found at the links above. The quality of the code at the beginning may not be very good - I just mastered C ++ and OOP, I apologize right away just in case.
The Open Source project - so if someone suddenly wants to join and change something - Welcome!
I will also be glad to feedback, suggestions and error messages. And of course, reasonable criticism, where without it.
This post I want to introduce to the community a project that I wrote from time to time last year: SASM (SimpleASM) - IDE for developing programs in the x86 and x86-64 assembly language.

SASM is a simple cross-platform (available on Windows and Linux) development environment for assembler languages NASM, MASM, GAS, FASM with syntax highlighting and a debugger. The program works out of the box and is well suited for beginners learning assembly language. Based on Qt. Distributed under the free GNU GPL v3.0 license.
Sources are in the repository on GitHub .
Binaries can be downloaded on the program website .
Under the cut you will find a bit of history and a more detailed description of the possibilities.
Where did it all go
At the 1st year at my university there was a training course "Architecture and assembly language", in which we studied the assembler NASM and passed the tasks on it in ejudge contests. Accustomed to using the IDE when programming before, I was not very happy to compile everything on the command line. In my opinion, there were no convenient IDEs for NASM. I did not really like universal solutions like Geany (although there is no friend for the taste and color - someone used all this and was pleased). Yes, and I already wanted to do something big and at the same time learn C ++.
So, it was decided to write your IDE for NASM, primarily for myself and maybe classmates.
I had no experience writing a GUI before. After some deliberation, it was decided to use Qt - a good free framework, at the same time and cross-platform. At first, a simple text editor was written with simple highlighting, a build log and input / output windows. The proudly called “IDE” program was able to collect the text that was in the text editor and run the built program.
Then, having learned a little regular expressions, I made a beautiful highlight. Screwed the debugger (GDB). Added tabs and all sorts of simple features in a text editor such as searching and commenting a piece of code. Gradually finished the program to a more or less normal form, corrected errors.
This spring, SASM was included in the above training course, and freshmen already used it. Recently I added support for other assemblers to the program, except for NASM - MASM, FASM and GAS.
Opportunities

Firstly, it’s just a code editor with highlighting, tabs and the ability to build and execute a program. Launch in a separate window.
The log shows information about the time the program is running. There are 2 forms for input and output. As I said, the program was originally intended for passing contests. The last two features are very convenient for this. If you still need to save the exe'shnik, this can be done in the File menu.
Debugger

One of the most complex components in a program is a debugger. He has not so many possibilities, but there is a certain minimum basic set: he shows the current line, takes a step with entry, without entry, continues to execute / pause the program, you can set breakpoints, look at registers and memory. Also, for those who still lack the basic capabilities, a command line for entering arbitrary commands for GDB is implemented from the bottom of the window.
Yes, the debugger is based on GDB. It wasn’t very easy to make because of assembler limitations. In particular, NASM is not able to generate normal debugging information and has to determine the current location in the program, matching the listing generated by the assembler and the current address in the EIP command counter.
Macro Library for NASM
SASM includes a io.inc macro library for I / O, used in the course "Architecture and Assembly Language" and slightly rewritten to debug and support 64-bit mode. It is very convenient at the initial stages of training - it allows you to display data without thinking about the conventions and rules for calling functions.
For example, to display the number contained in the EAX register, it is enough to write
PRINT_DEC 4, eax ; 4 - количество байт
instead The
section .data
format db "%d", 0
section .text
push eax
push format
call printf
add esp, 8
commands contained in "io.inc" can be found in the help.
Options

In the program settings, you can fully customize the text editor - set the color scheme, select the font, set the initial text.
Language is also set there (Russian and English are available).

Also in the options are available the choice of assembler (NASM, MASM, GAS or FASM) and bit depth (x86 or x64). These options affect the choice of programs - assembler and linker, and options for them. Also, the new assembler adjusts the backlight and the initial text. Assembly paths and options can also be set manually.
Additionally
The program contains help and sample programs for each assembler - Hello World programs in the Projects folder and initial templates so that you can immediately start writing code.
On Windows, all the components necessary for building programs are already included in SASM. The program works "out of the box" - you can start programming immediately after launch.
On Linux, install gcc, gdb, and the necessary assembler.
Conclusion
More information about the program and sources can be found at the links above. The quality of the code at the beginning may not be very good - I just mastered C ++ and OOP, I apologize right away just in case.
The Open Source project - so if someone suddenly wants to join and change something - Welcome!
I will also be glad to feedback, suggestions and error messages. And of course, reasonable criticism, where without it.