summaryrefslogtreecommitdiff
path: root/PGU/CHAP5/argtest.s
blob: aded6062be0c7bf9719c6b752b7265a9a61bb2ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.section .data

.section .text

.globl _start

_start:
	movq %rsp, %rbp
	movq (%rbp), %r12
	movq 16(%rbp), %r13

	movq $2, %rax	#SYS_OPEN
	movq %r13, %rdi
	movq $0, %rsi
	syscall

	movq %r12, %rdi
	movq $60, %rax
	syscall