SASM | SASM - simple crossplatform IDE for NASM, MASM, GAS and FASM assembly languages

 by   Dman95 Python Version: v3.14.0 License: Non-SPDX

kandi X-RAY | SASM Summary

kandi X-RAY | SASM Summary

SASM is a Python library typically used in Editor applications. SASM has no bugs, it has no vulnerabilities and it has medium support. However SASM build file is not available and it has a Non-SPDX License. You can download it from GitHub.

sasm (simpleasm) - простая кроссплатформенная среда разработки для языков ассемблера nasm, masm, gas, fasm с подсветкой синтаксиса и отладчиком. в sasm вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера nasm, masm, gas, fasm. вводите код в форму и запускайте приложение. программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера. основана на qt. распространяется по свободной лицензии gnu gpl v3.0. 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). licensed under the gnu gpl v3.0. based on the qt.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              SASM has a medium active ecosystem.
              It has 5669 star(s) with 186 fork(s). There are 3057 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 17 open issues and 141 have been closed. On average issues are closed in 315 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of SASM is v3.14.0

            kandi-Quality Quality

              SASM has 0 bugs and 0 code smells.

            kandi-Security Security

              SASM has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              SASM code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              SASM has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              SASM releases are available to install and integrate.
              SASM has no build file. You will be need to create the build yourself to build the component from source.
              SASM saves you 20110 person hours of effort in developing the same functionality from scratch.
              It has 39610 lines of code, 1263 functions and 181 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed SASM and discovered the below as its top functions. This is intended to give you an instant insight into SASM implemented functionality, and help decide if they suit your requirements.
            • Explorer expression
            • Prints the number of fields in a list
            • Returns the number of real fields
            • Explore an expression
            • Explorer a specific type
            • Explore a specific type
            • Print to the enclosing type
            • Set python directory
            • Automatically reload modules
            • Expand variables
            • Returns the index of the value in this list
            • Explore a typedef
            • Encode an IDNA string
            • Automatically reload modules
            • Go through the context
            • Get a value from the current context
            • Print the type printer
            • Invokes the explorer
            • Register a pretty printer
            • Encode the buffer
            • Return the relative path relative to the given path
            • Internal function to decode a string
            • Add a new printer
            • Update this mapping
            • Expand ~astropy home directory
            • Explore the given type
            • Decode a Unicode string
            Get all kandi verified functions for this library.

            SASM Key Features

            No Key Features are available at this moment for SASM.

            SASM Examples and Code Snippets

            cpu-4bit-emulator,How to run
            Rustdot img1Lines of Code : 2dot img1no licencesLicense : No License
            copy iconCopy
            cargo run example/simple_calc.sasm
            
            Port (B) Out: 2
              

            Community Discussions

            QUESTION

            unable to open include file `test.inc` in sasm
            Asked 2021-Nov-03 at 22:28

            I am using SASM on Ubuntu to try out some NASM assembler coding. To test my assembler code I have created a test file and saved it in the same directory as my .asm File, but when I try to debug it in SASM I am getting the following error:

            unable to open include file test.inc

            How can I solve this issue?

            ...

            ANSWER

            Answered 2021-Nov-03 at 22:21

            You can solve this issue by going to Options -> Build and then selecting the “Build in current directory” option in the SASM Program

            Source https://stackoverflow.com/questions/69832369

            QUESTION

            Why Isn't this Assembly Program Accepting Input?
            Asked 2021-Oct-19 at 22:35

            I am writing a program that converts nonneg integers ranging from 0-4096 to a 3 digit hexadecimal number. Problem is that this program isn't even accepting my input. I am using SASM32 with custom macros. Instead, it overflows repeating the output messages and using 0 as our input. Also since the default for the return prompt is 'Y' it continues until a crash.

            ...

            ANSWER

            Answered 2021-Oct-19 at 22:35

            QUESTION

            On x64 Linux, what is the difference between syscall, int 0x80 and ret to exit a program?
            Asked 2021-Jun-12 at 16:04

            I decided yesterday to learn assembly (NASM syntax) after years of C++ and Python and I'm already confused about the way to exit a program. It's mostly about ret because it's the suggested instruction on SASM IDE.

            I'm speaking for main obviously. I don't care about x86 backward compatibility. Only the x64 Linux best way. I'm curious.

            ...

            ANSWER

            Answered 2021-Jun-12 at 16:04

            If you use printf or other libc functions, it's best to ret from main or call exit. (Which are equivalent; main's caller will call the libc exit function.)

            If not, if you were only making other raw system calls like write with syscall, it's also appropriate and consistent to exit that way, but either way, or call exit are 100% fine in main.

            If you want to work without libc at all, e.g. put your code under _start: instead of main: and link with ld or gcc -static -nostdlib, then you can't use ret. Use mov eax, 231 (__NR_exit_group) / syscall.

            main is a real & normal function like any other (called with a valid return address), but _start (the process entry point) isn't. On entry to _start, the stack holds argc and argv, so trying to ret would set RIP=argc, and then code-fetch would segfault on that unmapped address. Nasm segmentation fault on RET in _start

            System call vs. ret-from-main

            Exiting via a system call is like calling _exit() in C - skip atexit() and libc cleanup, notably not flushing any buffered stdout output (line buffered on a terminal, full-buffered otherwise). This leads to symptoms such as Using printf in assembly leads to empty output when piping, but works on the terminal (or if your output doesn't end with \n, even on a terminal.)

            main is a function, called (indirectly) from CRT startup code. (Assuming you link your program normally, like you would a C program.) Your hand-written main works exactly like a compiler-generate C main function would. Its caller (__libc_start_main) really does do something like int result = main(argc, argv); exit(result);,
            e.g. call rax (pointer passed by _start) / mov edi, eax / call exit.
            So returning from main is exactly1 like calling exit.

            • Syscall implementation of exit() for a comparison of the relevant C functions, exit vs. _exit vs. exit_group and the underlying asm system calls.

            • C question: What is the difference between exit and return? is primarily about exit() vs. return, although there is mention of calling _exit() directly, i.e. just making a system call. It's applicable because C main compiles to an asm main just like you'd write by hand.

            Footnote 1: You can invent a hypothetical intentionally weird case where it's different. e.g. you used stack space in main as your stdio buffer with sub rsp, 1024 / mov rsi, rsp / ... / call setvbuf. Then returning from main would involve putting RSP above that buffer, and __libc_start_main's call to exit could overwrite some of that buffer with return addresses and locals before execution reached the fflush cleanup. This mistake is more obvious in asm than C because you need leave or mov rsp, rbp or add rsp, 1024 or something to point RSP at your return address.

            In C++, return from main runs destructors for its locals (before global/static exit stuff), exit doesn't. But that just means the compiler makes asm that does more stuff before actually running the ret, so it's all manual in asm, like in C.

            The other difference is of course the asm / calling-convention details: exit status in EAX (return value) or EDI (first arg), and of course to ret you have to have RSP pointing at your return address, like it was on function entry. With call exit you don't, and you can even do a conditional tailcall of exit like jne exit. Since it's a noreturn function, you don't really need RSP pointing at a valid return address. (RSP should be aligned by 16 before a call, though, or RSP%16 = 8 before a tailcall, matching the alignment after call pushes a return address. It's unlikely that exit / fflush cleanup will do any alignment-required stores/loads to the stack, but it's a good habit to get this right.)

            (This whole footnote is about ret vs. call exit, not syscall, so it's a bit of a tangent from the rest of the answer. You can also run syscall without caring where the stack-pointer points.)

            SYS_exit vs. SYS_exit_group raw system calls

            The raw SYS_exit system call is for exiting the current thread, like pthread_exit().
            (eax=60 / syscall, or eax=1 / int 0x80).

            SYS_exit_group is for exiting the whole program, like _exit.
            (eax=231 / syscall, or eax=252 / int 0x80).

            In a single-threaded program you can use either, but conceptually exit_group makes more sense to me if you're going to use raw system calls. glibc's _exit() wrapper function actually uses the exit_group system call (since glibc 2.3). See Syscall implementation of exit() for more details.

            However, nearly all the hand-written asm you'll ever see uses SYS_exit1. It's not "wrong", and SYS_exit is perfectly acceptable for a program that didn't start more threads. Especially if you're trying to save code size with xor eax,eax / inc eax (3 bytes in 32-bit mode) or push 60 / pop rax (3 bytes in 64-bit mode), while push 231/pop rax would be even larger than mov eax,231 because it doesn't fit in a signed imm8.

            Note 1: (Usually actually hard-coding the number, not using __NR_... constants from asm/unistd.h or their SYS_... names from sys/syscall.h)

            And historically, it's all there was. Note that in unistd_32.h, __NR_exit has call number 1, but __NR_exit_group = 252 wasn't added until years later when the kernel gained support for tasks that share virtual address space with their parent, aka threads started by clone(2). This is when SYS_exit conceptually became "exit current thread". (But one could easily and convincingly argue that in a single-threaded program, SYS_exit does still mean exit the whole program, because it only differs from exit_group if there are multiple threads.)

            To be honest, I've never used eax=252 / int 0x80 in anything, only ever eax=1. It's only in 64-bit code where I often use mov eax,231 instead of mov eax,60 because neither number is "simple" or memorable the way 1 is, so might as well be a cool guy and use the "modern" exit_group way in my single-threaded toy program / experiment / microbenchmark / SO answer. :P (If I didn't enjoy tilting at windmills, I wouldn't spend so much time on assembly, especially on SO.)

            And BTW, I usually use NASM for one-off experiments so it's inconvenient to use pre-defined symbolic constants for call numbers; with GCC to preprocess a .S before running GAS you can make your code self-documenting with #include so you can use mov $SYS_exit_group, %eax (or $__NR_exit_group), or mov eax, __NR_exit_group with .intel_syntax noprefix.

            Don't use the 32-bit int 0x80 ABI in 64-bit code:

            What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code? explains what happens if you use the COMPAT_IA32_EMULATION int 0x80 ABI in 64-bit code.

            It's totally fine for just exiting, as long as your kernel has that support compiled in, otherwise it will segfault just like any other random int number like int 0x7f. (e.g. on WSL1, or people that built custom kernels and disabled that support.)

            But the only reason you'd do it that way in asm would be so you could build the same source file with nasm -felf32 or nasm -felf64. (You can't use syscall in 32-bit code, except on some AMD CPUs which have a 32-bit version of syscall. And the 32-bit ABI uses different call numbers anyway so this wouldn't let the same source be useful for both modes.)

            Related:

            Source https://stackoverflow.com/questions/67676658

            QUESTION

            Error while entering a large string in NASM
            Asked 2021-May-10 at 18:17
            1. I am using x64 NASM on Linux (Ubuntu 20.04, using Virtual Box)
            2. Also I am using SASM IDE, which contains io64 library built in it (obviously, this library helps with console input/output)
            3. Task, which I am solving for fun, is pretty basic:
            • Input is a string with length <= 100, where all characters are latin letters
            • Output is a string "Hello, {input}!" (without brackets)
            1. This is my code
            ...

            ANSWER

            Answered 2021-May-10 at 18:17

            You didn't reserve enough temporary storage for the input/output string.
            name db 0xa defines room for only one byte, and to no effect initializes it with the value 0xa. This value is overwritten by the first letter in GET_STRING name, 101. The next letters are stored to the undefined memory which follows behind the name. Memory allocated for section .data is rounded up, so several bytes may have been allocated behind the name byte and your program by accident works for short input strings. When the string is longer, it will try to access unallocated memory, which leads to segmentation fault.

            Omit , 0xa from output string definition and replace name db 0xa with
            name: times 101 db 0x0a , see repeating Data in NASM
            You can print output together with name as a one concatenated string.

            Source https://stackoverflow.com/questions/67473860

            QUESTION

            How do I manually dispatch actions to a store created with configureStore?
            Asked 2021-Apr-28 at 06:02

            I have a project where half of it was made with classes, and the other half is being made with hooks and Redux. For this, I have created a store with configureStore() from Redux Toolkit and provided it using the Provider component. In a very minimal way, the store is set up as follows:

            ...

            ANSWER

            Answered 2021-Apr-28 at 05:53

            The following way is a safe way to dispatch actions without misspelling the type string.

            1. Extract the action from reducer

            Source https://stackoverflow.com/questions/67294370

            QUESTION

            SIGSEGV on simple move register to memory in NASM
            Asked 2021-Mar-07 at 17:33

            I must be missing something very basic here. Searched SO but could not find the answer to this particular question. Here's my NASM code:

            ...

            ANSWER

            Answered 2021-Mar-07 at 17:33

            QUESTION

            Gcc-multilib for Fedora
            Asked 2021-Jan-24 at 11:49

            I'm trying to install gcc-multilib on fedora, but I cannot find out how. AFAIK it is a Debian/Ubuntu specific package. Nevertheless, it is required for SASM IDE, in order to compile and debug FASM, NASM and gas assembly.

            ...

            ANSWER

            Answered 2021-Jan-24 at 11:49

            The closes equivalent on Fedora are the 32-bit development libraries, glibc-devel.i686, libstdc++-devel.i686, and so on, and perhaps also their -static.i686 counterpart.

            Source https://stackoverflow.com/questions/65863241

            QUESTION

            How do i store a file with machine code into an array
            Asked 2020-Sep-18 at 21:35

            How would i store any type of file with text ex. sasm, mach(for machine code) etc. I dont want to have to write it like this and put it directly into the array https://ttm.sh/hPS.png i want to be able to take text from a file with text on it like this

            ...

            ANSWER

            Answered 2020-Sep-18 at 21:35

            QUESTION

            Can't figure out what I must I push to the stack before calling `_getch` in FASM
            Asked 2020-Feb-22 at 10:27

            I'm using the SASM IDE by Dmitry Manushin to write a program in FASM. My code is as follows:

            ...

            ANSWER

            Answered 2020-Feb-22 at 06:51

            There are a few things going on here format ELF tells FASM to create a Linux object file. Which feels a little odd because you are running Windows. But what makes it work is that SASM is using the MinGW version of the Linux gcc toolchain to create the executable. Which means you can write some Linux assembly but not everything can be Linux syntax.

            Another issue is that getch is not POSIX so could be causing problems, use getchar instead.

            And lastly windows does not exit programs by using return values in eax. The

            Source https://stackoverflow.com/questions/60342130

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install SASM

            You can download it from GitHub.
            You can use SASM like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link