// Assemble and link with // gcc -c minihello.s // ld minihello.o -o minihello -e start // // A small program that does two system calls. // // Example created by G. Back for CS 3214 Fall 2011 // .data msg: .asciz "Hello\n" .text .global start start: mov $1, %rax # write mov $1, %rdi # (1, mov $msg, %rsi # "Hello\n", mov $6, %rdx # 6) syscall mov $60, %rax # exit syscall