Skip to content

Commit

Permalink
Added 'Hello World' example
Browse files Browse the repository at this point in the history
  • Loading branch information
Dgame committed Dec 25, 2014
1 parent 28953a8 commit 9a1ae32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hello.alpha
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main() {
print "Hallo Welt"
}
17 changes: 17 additions & 0 deletions hello.s
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 9a1ae32

Please sign in to comment.