I couldn't find much information or specification that suits me, so I have no choice but to ask here. When we call some function with the call instruction and t
I have a simple C++ program that calls some NASM code: main.cpp: #include <iostream> extern "C" int foo(); int main() { std::cout << "The result
I recently been trying to execute system commands using pure assembly. I managed to achieve it in a x32 bit binary as posted here: execute system command (bash)
I have main.s file. extern printf extern exit section .data fmt: db "hi!", 0xa section .text global _start _start: mov rax, 0 mov rdi, fmt call printf
I am trying to use the write syscall in order to reproduce the putchar function behavior which prints a single character. My code is as follows, asm_putchar:
In case this helps somebody in the future: check if the global descriptor table is working check if the elements of page table entry struct are ordered correctl
Background: I have been learning x86_64 assembly using NASM on a Linux system and was writing a subroutine for strlen(const char *str) I wanted to copy one byte
I am trying to load only the first byte in a register after data is passed into it for example if I have the following ASM code global _start section .data stri
I'm doing some operating system tutorials from the book "Operating systems from 0 to 1". One of the exercises is to set the cursor to a position on the screen i
SORRY if i make you confuse about the question, but i don't know a better to describe it i'm trying to write a NASM program to reverse a string in place. i ha
I was originally trying to generate the bytes for an immediate move into a 64 bit register.The specific operation I wanted was mov rdi, 0x1337 Using https://ww
When I try to build my source into a 32-bit static executable for Linux with nasm -f elf -F dwarf -g loop.asm ld -m elf_i386 -o loop loop.o I get this R_386_
I actually want to print the content of the dx register with nasm. Thereby the content is a 16 bit hex digit such as 0x12AB. Therefore I've first implemented a
I actually want to print the content of the dx register with nasm. Thereby the content is a 16 bit hex digit such as 0x12AB. Therefore I've first implemented a
I have this code that is suppose to add two numbers, a float(3.25) and a integer(2). EDITED: extern _printf, _scanf global _main section .bss num1: resb 4 s
Learning NASM Assembly, I am trying to make a program that reads two one-digit number inputs. I have two variables declared in the .bss: num1 resb 1 num2 resb
Learning NASM Assembly, I am trying to make a program that reads two one-digit number inputs. I have two variables declared in the .bss: num1 resb 1 num2 resb