View on GitHub

SASM

Simple crossplatform IDE for NASM, MASM, GAS, FASM assembly languages

Download this project as a .zip file Download this project as a tar.gz file

SASM

SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages. SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba), French (thanks Franc Serres). Licensed under the GNU GPL v3.0. Based on the Qt.

SASM

Download .exe for Windows
Download .zip for Windows
Download for Linux
Installing on Mac: link 1, link 2

To load SASM for Linux select your distribution and architecture (i386 / amd64) after following corresponding link.

Also you can build SASM from sources, placed in GitHub repository.

Contribute to SASM

PayPal and cards:

WebMoney: Z282016332582 or R331674303467

About the program

In SASM you can easily develop and execute programs, written in NASM, MASM, GAS or FASM assembly languages. Enter code in form and simply run your program. In Windows SASM can execute programs in separate window. Enter your input data in "Input" docking field. In "Output" field you can see the result of the execution of the program. Wherein all messages and compilation errors will be shown in the form on the bottom. You can save source or already compiled (exe) code of your program to file and load your programs from file.

SASM supports working with many opened projects – new files are opened and created in new tabs. At the exit from SASM current set of opened files saved. At the next start you can restore previous session. In settings you can set font, color scheme and initial text. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba), French (thanks Franc Serres). All dialog windows in SASM is docking - you can choose one of many positions of them position. Also it is possible to reassign the hotkeys.

Standard "Edit" menu extended with abilities to comment/uncomment piece of source code and to create/delete indent with 4 spaces (Tab/Shift+Tab).

In my program you can debug programs using the interface to the debugger gdb. You can watch values of variables and registers. Also you can set breakpoints and move through debugged program. In additional it is possible to perform any gdb command and see its result in the log on the bottom part of window.

SASM supports 4 working with assemblers - NASM, MASM, GAS and FASM in 2 modes - x64 and x86. You can choose mode in settings on "Build" tab. Also there you can change assembler and linker options and choose programs for assembling and linking.

SASM

Troubleshooting

If you have something does not work (errors occur when compiling, debugging, etc.), please read the chapter "Troubleshooting" in the help of the program (F1) or on the project Wiki on GitHub. Perhaps there you will find useful advice to solve your problems.

Code examples

Working code examples for various assemblers including examples of using input/output functions and "io.inc" macros are contained in Projects folder along the path where SASM is installed (usually C:\Program Files (x86)\SASM on Windows, /usr/share/sasm on Linux).

"io.inc" NASM macro library

SASM includes crossplatform input/output library "io.inc" for NASM. To use it you need to add directive %include "io.inc" (%include "io64.inc" for x64) to the beginning of your program.

Macro name Description
PRINT_UDEC size, data

PRINT_DEC size, data

Print number data in decimal representation. size – number, giving size of data in bytes - 1, 2, 4 or 8 (x64). data must be number or symbol constant, name of variable, register or address expression without size qualifier (byte[], etc.). PRINT_UDEC print number as unsigned, PRINT_DEC — as signed.
PRINT_HEX size, data Similarly previous, but data is printed in hexadecimal representation.
PRINT_CHAR ch Print symbol ch. ch - number or symbol constant, name of variable, register or address expression without size qualifier (byte[], etc.).
PRINT_STRING data Print null-terminated text string. data - string constant, name of variable or address expression without size qualifier (byte[], etc.).
NEWLINE Print newline ('\n').
GET_UDEC size, data

GET_DEC size, data

Input number data in decimal representation from stdin. size – number, giving size of data in bytes - 1, 2, 4 or 8 (x64). data must be name of variable or register or address expression without size qualifier (byte[], etc.). GET_UDEC input number as unsigned, GET_DEC — as signed. It is not allowed to use esp register.
GET_HEX size, data Similarly previous, but data is entered in hexadecimal representation with 0x prefix.
GET_CHAR data Similarly previous, but macro reads one symbol only.
GET_STRING data, maxsz Input string with length less than maxsz. Reading stop on EOF or newline and "\n" writes in buffer. In the end of string 0 character is added to the end. data - name of variable or address expression without size qualifier (byte[], etc.). maxsz - register or number constant.

General purpose registers are not modified during execution of the above macros.

Input/output functions for NASM (x86)

Another simple ability to use input/output in NASM is input/output functions corresponding to aforementioned macros (work only for x86 NASM projects). To use them you need to declare the desired functions with a directive extern <function name>, put the arguments into the registers according to the table below, and call the functions using call instruction.

 

Function name EAX EDX
io_get_dec
io_get_udec
io_get_hex
output: number
io_get_char output: character
io_get_string input: address input: size
io_print_dec
io_print_udec
io_print_hex
input: number
io_print_char input: character
io_print_string input: address
io_newline

During execution of the above functions the values of the registers EBX, EBP, ESP, EDI, ESI do not change, the values of other registers can be changed.

Implementation

Windows

As NASM assembler used nasm 2.15.05, as linker - gcc 4.6.2 from MinGW (gcc 4.8.1 from MinGW64 in x64 mode) or ld 2.22 from MinGW (ld 2.23.2 from MinGW64 in x64 mode).

SASM 3.0 and greater contains fasm 1.73.30 and gas 2.23.1 from MinGW (gas 2.23.2 from MinGW64).

Also SASM contains gdb debugger from MinGW and "io.inc" macro library.

All assemblers (excluding MASM) are included in SASM and you can use they right away after their choice. MASM assembler can not be included in the assembly because of its license. To use it, you should install MASM on your computer from site https://www.masm32.com/ and specify path to MASM assembler (ml.exe, path usually "C:/masm32/bin/ml.exe") and to MASM linker (link.exe, path usually "C:/masm32/bin/link.exe") in according fields on "Build" tab in settings.

On Windows SASM is ready for work immediately after installation.

Linux

For correct working on Linux must be installed next packages: nasm or gas (if you will use they, fasm already included in SASM), gcc, gdb (for debugging). MASM in Linux is not supported.

More information about SASM you can see on project Wiki on GitHub and in the help of the program (F1).

Changelog:

03.03.2023 - version 3.14.0 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

13.02.2023 - version 3.13.4 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

09.02.2023 - version 3.13.3 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

07.02.2023 - version 3.13.2 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

07.02.2023 - version 3.13.1 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

06.02.2023 - version 3.13.0 (zip, exe):

Recommended to click "Reset all" button in settings after update from previous versions.

09.03.2022 - version 3.12.2 installer and zip fix (zip, exe)

06.02.2022 - version 3.12.2 (zip, exe):

13.02.2021 - version 3.12.1 (zip, exe):

08.02.2021 - version 3.12.0 (zip, exe):

03.02.2020 - version 3.11.1 (zip, exe):

31.01.2020 - version 3.11.0 (zip, exe):

08.10.2018 - version 3.10.1 (zip, exe):

01.10.2018 - version 3.10.0 (zip, exe):

12.09.2017 - version 3.9.0 (zip, exe):

19.02.2017 - version 3.8.0 (zip, exe):

30.10.2016 - version 3.7.0 (zip, exe):

25.09.2016 - version 3.6.0:

26.08.2016 - version 3.5.1:

19.03.2016 - version 3.5.0:

11.02.2016 - version 3.4.0:

27.01.2016 - version 3.3.0:

14.06.2015 - version 3.2.0:

27.05.2015 - version 3.1.4: fix of localized systems debug problem.

30.03.2015 - version 3.1.3: showing description of received signal has been added.

27.03.2015 - version 3.1.2: debugging files with include has been improved.

24.03.2015 - version 3.1.1: bugs with syntax higlighting have been fixed.

29.08.2014 - version 3.1.0: changes from pull requsts and issues from GitHub - movable tabs, warning message for wrong assembler or linker executable, improve indent operation, noexecstack option for binaries in Linux.

24.07.2014 - version 3.0.1: additional registers view in debugger has been added.

13.07.2014 - version 3.0:

23.04.2014 - version 2.3.1: bug with spaces in the path to temporary directory was fixed (now SASM works on Windows XP).

03.04.2014 - version 2.3:

16.02.2014 - version 2.2:

13.11.2013 - version 2.1:

04.06.2013 - version 2.0: debugger has implemented, highlighting has been improved, many files support added, SASM (new name) has been rewrited on Qt and has become Open Source and crossplatform. Sources and new site is placed on GitHub.

21.04.2013 - version 1.0.4 - CEXTERN bug fixed.

18.03.2013 - version 1.0.3 - highlighting bug fixed, MASM bug fixed.

10.03.2013 - version 1.0.2 - bugs fixed, code autosaving added.

07.03.2013 - first version of SASM - 1.0.0.

Wishes and reports send to e-mail: Dman1095@gmail.com or left on GitHub issues.

Copyright © 2013 Dmitriy Manushin