Skip to content

Commit 9a1ae32

Browse files
committed
Added 'Hello World' example
1 parent 28953a8 commit 9a1ae32

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

hello.alpha

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
main() {
2+
print "Hallo Welt"
3+
}

hello.s

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.text
2+
.globl _alpha_main
3+
_alpha_main:
4+
pushl %ebp
5+
movl %esp, %ebp
6+
# Begin Scope
7+
# Begin print
8+
pushl $L_0_STR
9+
call _print_str
10+
addl $4, %esp
11+
call _print_ln
12+
# End print
13+
# End Scope
14+
popl %ebp
15+
ret
16+
L_0_STR:
17+
.ascii "Hallo Welt\0"

0 commit comments

Comments
 (0)