From 9a1ae329dfff7e5f693d395eb9b13f58c68098c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20Sch=C3=BCtt?= Date: Fri, 26 Dec 2014 00:26:52 +0100 Subject: [PATCH] Added 'Hello World' example --- hello.alpha | 3 +++ hello.s | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 hello.alpha create mode 100644 hello.s diff --git a/hello.alpha b/hello.alpha new file mode 100644 index 0000000..89dc1de --- /dev/null +++ b/hello.alpha @@ -0,0 +1,3 @@ +main() { + print "Hallo Welt" +} \ No newline at end of file diff --git a/hello.s b/hello.s new file mode 100644 index 0000000..de419a3 --- /dev/null +++ b/hello.s @@ -0,0 +1,17 @@ +.text +.globl _alpha_main +_alpha_main: + pushl %ebp + movl %esp, %ebp +# Begin Scope +# Begin print + pushl $L_0_STR + call _print_str + addl $4, %esp + call _print_ln +# End print +# End Scope + popl %ebp +ret +L_0_STR: + .ascii "Hallo Welt\0"