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]
172 questions
1
vote
1 answer
PCI device check in assembly language
I have a simple program, that must read PCI configuration space (just for first PCI device). But it doesnt works.
YASM:
18: warning: value doesnt fit in 8 bit fild
19: warning: value doesnt fit in 8 bit fild
Here is the code:
[use 32]
…

Vanzef
- 453
- 1
- 5
- 17
1
vote
1 answer
What is the correct way to prevent this YASM warning?
I have this line of code in YASM (32-bit code):
call 0xC0000000
which works correctly, but which gives me this warning:
warning: value does not fit in signed 32 bit field
There are many ways to work around the warning, or to suppress, even ignore…

user541686
- 205,094
- 128
- 528
- 886
1
vote
1 answer
Yasm compiling 64 bit code with intel syntax
I have this file:
.code64
pop %rbx
that compiles nicely with yasm with the following directive:
yasm.exe asm.asm -o asm.bin -m amd64 --parser=gas
my question is: is there any way to use nasm parser to compile 64 bit code by using intel syntax? I…

Johnny Pauling
- 12,701
- 18
- 65
- 108
1
vote
2 answers
Makefile error - make: *** No rule to make target `boot.o', needed by `all'. Stop
I am working through a unix-like kernel development tutorial, and have come across a total noob problem I am sure: can anyone tell me what is wrong with this?
SOURCES=boot.o main.o
CFLAGS=-nostdlib -nostdinc -fno-builtin…

roninbv
- 13
- 4
1
vote
2 answers
Debugging assembly code created with yasm
I need some help finding and using a good debugger for asm code assembled with yasm on 64-bit Linux. The gdb debugger keeps complaining that no symbol tables are loaded. Someone on stackoverflow suggested assembling with the -dstabs switch, but that…

InvalidBrainException
- 2,312
- 8
- 32
- 41
0
votes
1 answer
Why doesn't YASM doesn't recognize the keyword "offset"?
I'm trying to compile Heaven's Gate:
yasm-1.2.0-win64.exe "Heaven's Gate.asm"
with the code below:
global main
section .text
main:
bits 32
db 9ah ;call 33:in64
dd offset in64
dw 33h
;32-bit code…

user541686
- 205,094
- 128
- 528
- 886
0
votes
0 answers
iterate over characters and convert them to ascii in x86 assembly
I want to iterate over the characters of a string and convert every single character to its respective ASCII value. So far I have created this program that takes input from the user and then stores it in the buffer. I have also created a loop that…

1nc0gn170
- 48
- 6
0
votes
0 answers
macOS Ventura 13.1(22C65) cant run yasm excutable file
asm file
section .data
message db 'Hello, World!',0
section .text
global _start
_start:
mov eax, 4 ; write syscall number
mov ebx, 1 ; stdout file descriptor
mov ecx, qword [message] ; address of message
mov…

meBe
- 154
- 9
0
votes
0 answers
Assembly Yasm x64 taking inputs for calculator
I am trying to take 3 inputs total for my calculator: 2 values to operate on, and an operator (+, -, *, /)
I'm having an issue taking the second input and not sure why. My program just skips over the second input.
When I run the code my output is…
0
votes
2 answers
How to write decimal number by one char to file 8086 YASM
I have a task and I will try to explain it clearly. There is a file with [0; 1000] lines. Each line contains 6 columns.
The first two columns contain string with [1; 20] characters. Characters could be letters, numbers, and whitespaces.
3-5 columns…

Kurbamit
- 89
- 8
0
votes
0 answers
How to manually compute IEEE-754 32-bit floating addition in assembly?
I'm following the book "Introduction to 64bit Intel Assembly Language Programming for Linux" and one of the tasks is that we should attempt to manually add two floats stored in memory.
In the following solution, I've attempted to calculate the…

Salih MSA
- 120
- 1
- 7
0
votes
0 answers
Reading number and change it into a binary
So I have a practice exam for assemblyx86 language
Write a void function, encryptStr(), that will encrypt a string. To
encrypted the string, simply add one to each alphabetic (upper and
lower case letters) character. All non-alphabetic characters…

user18875739
- 1
- 2
0
votes
0 answers
Switching macro into a function
So I have a macro code from help of the teacher (this worked previously)
%macro aBin2int 2
push rbp
mov rbp, rsp
sub rsp, 8
push rcx
push rdx
mov dword [%2], 0
mov dword [rbp - 4], 0
mov dword [rbp - 8], 2 …

Jawj
- 1
0
votes
1 answer
How to assign the contents of two arrays in yasm and calculate the result based on the following equation
I'm a beginner to assembly language. Can you guys help me to guide the steps to complete this assignment?
The equation is : Sigma notation, for i = 0 to N-1 ((-3 +a(i)) +(b(i) -14))
here is the picture
The task in the main section is to explicitly…

Hannah T
- 1
0
votes
0 answers
How to load constant value to xmm register?
This program reads values from text file and compare or value are greater or not. The problem is that I can't load a constant value as a criteria for ucomisd function. The value in this case are always 0. Can you suggest how to sort out this…

jacob3143
- 11
- 2