File: i386.s

package info (click to toggle)
arch-test 0.22-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: asm: 461; perl: 187; makefile: 155; sh: 149; ansic: 6
file content (17 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.globl _start
.data
msg:	.ascii "ok\n"
.text
_start:
	cmovz	%eax, %ebx	# 686 required as of Debian stretch

	movl	$4, %eax	# syscall: write(ebx, ecx, edx)
	movl	$1, %ebx
	movl	$msg, %ecx
	movl	$3, %edx
	int	$0x80

	xorl	%eax, %eax
	incl	%eax		# syscall: _exit(bl)
	xorb	%bl, %bl
	int	$0x80