Why does NASM system call number perform 2 different operations despite specifying the same call number

Advertisements I have the following ‘hello world’ code written in NASM x86_64 assembly: section .data msg db "Hello World", 0xa msg_L equ $-msg section .text global _start _start: mov eax, 4 ; sys_write call mov ebx, 1 ; stdout mov ecx, msg mov edx, msg_L int 0x80 ; call kernel mov eax, 1 ; sys_exit… Read More Why does NASM system call number perform 2 different operations despite specifying the same call number

How to fix data write or read using pipe in c program is giving wrong output?

Advertisements I am trying to get an integer input in the child process and send it to the parent process using pipe() but I receive garbage values every time in the parent process. #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include<sys/wait.h> int main(int argc, char *argv[]) { pid_t pid; int fd[2]; char *args[] = {"", NULL};… Read More How to fix data write or read using pipe in c program is giving wrong output?