Yasm is a modular assembler intended as a full rewrite of the Netwide Assembler (NASM). It is licensed under a revision of the BSD licenses.
Questions tagged [yasm]
149 questions
0
votes
1 answer
Automated way to install vsyasm
I'm trying to create an automated way to build mpir on Windows with Microsoft C++. One required step seems to be to install vsyasm, so my current mini-project is to create an automated way to do that, i.e. something that can be done by a batch file…
rwallace
- 26,045
- 30
- 102
- 195
0
votes
1 answer
Recursive Pascal's triangle (Combination func) Assembly
I am trying to write a recursive combination function in assembly (Yasm (similar to nsam)).
I cannot use loops, multiplication or division.
I certain I am on the right track but am having issues once I hit the second inner function call. Can anyone…
ojhawkins
- 3,052
- 14
- 44
- 67
0
votes
2 answers
Segmentation fault ASM on linux at printf
The following is a program from a book (Introduction to 64 Bit Intel Assembly Language Programming for Linux, by Seyfarth, 2012), chap 9. The fault (in gdb) is:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7aa10a5 in…
user3043627
- 5
- 1
- 5
0
votes
0 answers
yasm is installed in my system but in some other folder
I am trying to install ffmpeg and x264. For this to install I have followed the instructions given in "https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide". I have installed yasm and checked by using the command yasm --version it showing the…
janpal
- 11
- 2
0
votes
1 answer
x86 yasm, segfault on cmpsb; proper usage of cmpsb?
I'm writing the beginning of a bubble sort in yasm, as an exercise. But I'm segfaulting every time at the last instruction below and I don't understand why.
segment .data
arr db 5,6,2,3,8,1
segment .text
global main
main: …
user2022444
- 11
- 5
0
votes
1 answer
Using win64 unwinding data directives in VSYASM
The code all worked fine, but then I added directives to create unwinding data, and YASM started refusing to assemble my code.
The build settings are for x64, as proven by "-f x64" in the auto-generated command line: "C:\Program Files…
harold
- 53,069
- 5
- 75
- 140
0
votes
2 answers
x86: Why carry flag not set when moving to memory address?
I realize this may look like a dup, but I've not found anything quite like my question. Say I have in yasm:
segment .data
a db 0
...
main:
mov rax, 0xffffffff
mov [a], rax
Why doesn't the carry flag get set when moving into a? It's…
user2022444
- 11
- 5
0
votes
3 answers
Trouble building YASM/NASM Hello World
I'm trying to build hello.asm into a Windows executable, but when I use the suggested commands for assembling, linking, and compiling the code, I get errors. Whether I'm using Strawberry Perl's GCC or MinGW's GCC, both give errors for the same…
mcandre
- 19,306
- 17
- 77
- 140
-1
votes
1 answer
difference between brackets/no brackets nasm/yasm x86_64
i am learning x86_64 assembly code on yasm and nasm, and i came across with these expressions, and i cant figure out what is happening here, could someone explains me it please?, lets take these snippet as an example:
section .data
word db "Hello,…
Rablidad
- 35
- 2
- 6
-1
votes
1 answer
Getting relocation R_x86_64_32 error when compiling assembly file. Works on one VM, not on another
The full error the console is handing back to me is below. I'm using Lubuntu on VirtualBox and VMware (tried both). For some reason it works on my laptop but not on my desktop. After trying to find out more myself through many message forums it…
Nick Graeff
- 89
- 1
- 7
-1
votes
1 answer
Initializing a struct in yasm x86 assembly
I'm trying to initialize a WIN32_FIND_DATA structure in which to store info about files found with FindFirstFile and FindNextFile windows functions. The problem is that i can't figure out how to initialize a stuct in yasm.
Here's my code:
struc…
Wee Bey
- 1
- 2
-2
votes
1 answer
Linking assembly files not working on macOS
I am currently studying X86_Intel 64-bit assembly and I want to run my assembly code on macOS. I have my code compiling and linking correctly on an Ubuntu VM using:
yasm -f elf64 -g dwarf2 -l div.lst div.asm
ld -o div div.o
However, when I use…
-2
votes
1 answer
Understanding x86 64bit ror, shl
I'm having trouble understanding what exactly ror and shl do in assembly. I see the definitions, e.g. ror: rotates bits to the right and back into high-order bit on the left.
but what does that mean? I just can't wrap my head around it. like if
mov…
Syntactic Fructose
- 15,445
- 16
- 74
- 158
-2
votes
3 answers
FizzBuzz in assembly - segmentation fault
I am trying to write FizzBuzz in Assembly and I am seeing segmentation fault all the time. So far I have determined that it is not my printing routines (because I have removed their contents and the problem persists) and the error hides somewhere in…
kacpr
- 316
- 1
- 8
- 23