Questions tagged [sasm]

SASM (SimpleASM) — a simple Open Source crossplatform integrated development environment for NASM, MASM, GAS and FASM assembly languages with syntax highlighting and debugger.

40 questions
0
votes
0 answers

NASM instruction not supported in 32-bit mode

I am using VirtualBoxVM and downloaded ubuntu(64-bit) in linux. I use the platform SASM for my assembly code in NASM in x86 mode. However when I try the use 64 bit operands (such as rax, rbx...) it gives the error "instruction not supported in…
0
votes
0 answers

How can I get output from SASM?

I am trying to run this program on SASM (based on NASM). The program runs successfully but SASM does not show any output. section .data msg db "Hello, World!", 0Ah ; The message to print msg_len equ $ - msg ; Length of the message stdout…
0
votes
0 answers

Linking SASM to C libraries

When I try to link C to SASM (using NASM), it fails to identify _printf. I am using it for Windows too global _main extern _printf section .data message db "Hello World",13,10,0 section .text _main: ;write your code here ;printf “Hello…
Neko chan
  • 1
  • 2
0
votes
0 answers

Saving the Fibonacci-Sequence in an Array in x86 assembly

I am using SASM. The x86-asm program may save the first to n-th Fibonacci-Number into an array (eg. n:5 -> [1,2,3,5,8]). The actual algorithm works, but it doesn't save the output from the EAX register into the array, I keep getting an Segfault…
HeapUnderStop
  • 378
  • 1
  • 9
0
votes
0 answers

SASM PRINT_DEC 2, ah

I'm using SASM editor for assembler. And I use PRINT_DEC from "io.inc" library to print. And here is the problem: %include "io.inc" section .text global main main: mov eax, 0 mov ah, 1 PRINT_DEC 2, ah xor eax, eax ret The ah…
Yespa16
  • 51
  • 4
0
votes
0 answers

Floating point operation in nasm

i have to multiply a number with pi(3.141592) but can´t get it to work under SASM, as i can´t calculate with floating point numbers I think i have to use hexadecimal numbers, but can’t figure out how to use them together with a floating point…
User342
  • 17
0
votes
1 answer

Where does SASM store output binary?

I've read the git's repository of SASM and the internet and can find any information on where SASM stores the binary output. I have built a simple assembly file with NASM for x64 and after it gets built. I have searched for it using "find /…
0
votes
0 answers

SASM Debugger not stopping at breakpoint

I have a problem with SASM. If I try to start the Debugger via SASM, it does not stop at my Breakpoint. The output: [18:50:03] Build started... [18:50:03] Built successfully. [18:50:03] Debugging started... [18:50:04] Debugging finished. As you can…
mor15Euro
  • 25
  • 5
0
votes
1 answer

Error while entering a large string in NASM

I am using x64 NASM on Linux (Ubuntu 20.04, using Virtual Box) Also I am using SASM IDE, which contains io64 library built in it (obviously, this library helps with console input/output) Task, which I am solving for fun, is pretty basic: Input is…
walotian
  • 3
  • 1
0
votes
1 answer

SASM assembly IDE 64 sample compile error "impossible combination of address sizes" on PRINT_STRING msg

I'm on Windows 7 64-bit and I downloaded the SASM assembly IDE from here: https://dman95.github.io/SASM/english.html Several hello world examples are included. The NASM example compiles fine but the NASM 64-bit gives a compile error. The NASM 64-bit…
user997112
  • 29,025
  • 43
  • 182
  • 361
0
votes
0 answers

Read specific bytes of a file in x86 sasm assembly

So, I have the following code: section .data sizebuf dw 1024 section .bss buf resb 1024 section .text global _start _start: ; put bmp file name in rbx pop rbx pop rbx pop rbx ; open BMP mov eax, 5 mov…
0
votes
0 answers

Comparing two values in Assembly Language using SASM

I am working on a project right now where I have to perform matrix multiplication. I have indicated in the comment in the code below that I can not change the variables given and their type. Therefore, I can not switch to section .resb macro and I…
euriseth
  • 63
  • 6
0
votes
0 answers

NASM Assembly x86 loop for finding divisible numbers not working

EDIT: Thanks to Jester I got the loop to work, but the loop that is supposed to find the divisible numbers always gives me "1" and the number I'm dividing with. Am I using div wrong inside the loop? EDIT 2: Program working as intended, code…
Just a guy
  • 21
  • 4
0
votes
0 answers

Fibonacci in NASM (using the SASM platform)

I'm trying to design an algorithm in NASM which is supposed to compute the nth Fibonacci number. I wrote some code, but, when run, it outputs only 1 and I cannot understand why. My idea was to call Fibonacci for n-1 and for n-2, where the parameter…
pauk
  • 350
  • 4
  • 15
0
votes
0 answers

GET_STRING in simple asm Assembly doesn't return string

I am new to assembly and trying to do a small excersise for the classroom. Collecting 3 input variables from user: 1st one is a math operation symbol ( + - and *) 2nd variable is a number to add or substract from other number (3rd…
DS140
  • 1