-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprg.s
More file actions
33 lines (25 loc) · 623 Bytes
/
prg.s
File metadata and controls
33 lines (25 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.section .data
person_info:
.ascii "Hello %s. When you write this program you are %d years old.\n\0"
person_name:
.ascii "Ceyhun\0"
person_age:
.long 25
func_arg:
.long 4
func_msg:
.ascii "This result (%d) is returned from function which is located my own lib\n\0"
.section .text
.globl _start
_start:
pushl person_age
pushl $person_name
pushl $person_info
call printf
pushl func_arg
call f_factorial
pushl %eax
pushl $func_msg
call printf
pushl $0
call exit