SASM (SimpleASM) — a simple Open Source crossplatform integrated development environment for NASM, MASM, GAS and FASM assembly languages with syntax highlighting and debugger.
Questions tagged [sasm]
40 questions
0
votes
1 answer
Assembly check if number in range is prime
I'm trying to print prime numbers between 2 - 100000. But there's something wrong with my code. When It detects a non prime number It should go to the next one, yet it still prints it out, so instead of 2, 3, 5, 7.. I'm getting 2 3 4 5 6…
user12220595
0
votes
1 answer
multiplying 3 numbers in assembly x86
So here is the numbers
a = 234234
b = 2394729
c = 12323
a*b*c = 6912302836717278
but i am getting this result: 3945371358.
I think i have to use LONG because it is over the int's limit but i don't know how ,because there is no long in…

FAR CRY 3
- 37
- 5
0
votes
0 answers
finding surface area of hexgonal prism in assembly language
I am trying to find the surface area using this equation. A = 6*a*h+3*sqrt(3)*a^2
I do not fully understand how co-processor instructions actually work.
Here is currently by subprogram
enter 8,0
mov [ebp-4],dword 2 ; Coprocessor…

21 Average
- 27
- 7
0
votes
1 answer
How do you implement a 2D Array in NASM
I am trying to figure out how to print out both rows and columns of an array. The program asks how many rows and columns and depending on user input it would display "Enter a number for [0][0]" "Enter a number for [0][1]" and etc.
Here is what I…

21 Average
- 27
- 7
0
votes
0 answers
SASM debug x86 assembler code on Ubuntu 18.04
I'm trying to debug a x86 assembler code in SASM on Ubuntu. I haven't got this to work. When I switch SASM to x64 mode, it works just fine. Is there any workaround to make the debugger also work in x64 mode?

Simon04090
- 325
- 2
- 10
0
votes
0 answers
Cannot change name of function in SASM
I want to have a function _say_hi() in SASM, but it won't link in my C program:
SECTION .DATA
hello: db 'Hello world!',10
helloLen: equ $-hello
SECTION .TEXT
GLOBAL _say_hi
_say_hi:
mov eax,4 ; write()
mov ebx,1…

JorgeeFG
- 5,651
- 12
- 59
- 92
0
votes
0 answers
Call by value subroutine ; NASM x86 in SASM IDE
Now, I want to call a subroutine by value.
My source said you do so by
call subroutineName, (var1, var2)
subroutineName(var3, var4):
;code
I don't know how, it gives me a "invalid combination of opcode and operands"
I also tried formatting it…

Martin
- 37
- 1
- 10
0
votes
0 answers
Cannot access stack elements from another method - Assembly
I am messing around with assembly(NASM) lately, and I came up with the program bellow, which has two files. The name and the code of each file is:
mainprogram.asm:
%include "hello.asm"
section .data
message db 'Hello World!', 10, 0
section…
user5900485
0
votes
0 answers
MASM32 fatal error LNK1120: 1 unresolved externals
I installed SimpleASM and MASM32 to learn assembly. I am now reading a book and try the code written in it.
; AddTwo.asm - adds two 32-bit integers
; Chapter 3 example
.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:…

Vitas
- 149
- 13
-3
votes
1 answer
I can't get SASM to run on Linux
I'm new to linux, I don't know a lot about building and stuff. I tried to install sasm: Downloaded it, extracted it, tried all the different ways to install it, but NONE…

Martin
- 37
- 1
- 10