Skip to content

Instantly share code, notes, and snippets.

@OzTamir
OzTamir / fork.asm
Created March 26, 2014 11:37
Fork Process in x86 NASM. Each process will print a different message and then exit.
section .text
global _start
_start:
mov eax, 2 ; SYS_FORK Op Code
int 0x80
cmp eax, 0 ;If the return value is 0, we are in the child process
jz child
parent:
mov edx, len ;Move msg length to edx