2

im very new to assembly and i just recently downloaded sasm and I'm trying to run this code.

; AddTwo.asm - adds two 32-bit integers
; Chapter 3 example

ExitProcess PROTO, dwExitCode: DWORD
.386
.model flat, stdcall
.stack 4096

.code
main PROC
mov eax, 5  ; move 5 to the eax register
add eax, 6  ; add 6 to the eax register

INVOKE ExitProcess,0
main ENDP
END main

but the console says

Unable to start assembler. Check your settings.

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
Vitas
  • 149
  • 13
  • 2
    From the SASM docs: _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 http://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._ – Michael Petch Nov 24 '17 at 07:53
  • Oh i see. thanks for the help! – Vitas Nov 24 '17 at 08:05

2 Answers2

1

From the SASM docs:

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 http://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.

If you don't install the appropriate assembler for your platform you'll get the error you are encountering.

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
0

I got the same error after compiling assembly code with SASM (SimpleASM) 3.11.1 on Linux Mint VERSION="20.2 (Uma).

Unable to start assembler. Check your settings.

I resolve this issue with executing the next commands:

  1. sudo apt install nasm
  2. sudo apt install gcc-multilib
nix
  • 744
  • 9
  • 16
  • Same error message, but this question is about using MASM (on Windows), not NASM. The source code in the question is MASM syntax. If there's a SASM question about setting it up on Ubuntu, that would be a better place to post this answer. – Peter Cordes Oct 22 '22 at 08:08
  • I'm a also new in assembly. You are right. Question is about windows os. But ı got the same error message on linux os. Should I remove my answer? – nix Oct 24 '22 at 06:01
  • If there's another Q&A with the same error message, but about Linux, then yeah repost there and delete this. Otherwise it's probably not doing any harm, and people in the same situation as you (using Linux but google sent them here) might also end up here. – Peter Cordes Oct 24 '22 at 10:01