From 2d78510b9af6f70ec34d77f0e047c698bdf061a9 Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Sat, 12 Oct 2019 00:23:50 +0300 Subject: draft --- main.s | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'main.s') diff --git a/main.s b/main.s index aa1f293..7bc2b73 100644 --- a/main.s +++ b/main.s @@ -2,9 +2,17 @@ .globl _start _start: - sys write, $STDOUT, $msg, $len + movq %rsp, %rbp + + pushq $-1024 + pushq $-1024 + pushq $msg + pushq $fmt + call printf + sys exit, $0 .data -msg: .ascii "Hello, World!\n" -len = .-msg +fmt: .asciz "%s and %d and %u\n" +msg: .asciz "Hello, World" +bye: .asciz "bye!" -- cgit v1.2.3-70-g09d2