File: win32.s

package info (click to toggle)
arch-test 0.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: asm: 461; perl: 187; makefile: 155; sh: 149; ansic: 6
file content (27 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (4)
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
.globl _start
.extern _GetStdHandle@4
.extern _WriteFile@20
.extern _ExitProcess@4

.data
msg:
	.ascii	"ok\n"
.text
_start:
	mov	%esp, %ebp
	sub	$4, %esp	# dummy variable

	push	$-11
	call	_GetStdHandle@4	# GetStdHandle(STD_OUTPUT_HANDLE)

	mov	%eax, %ebx
	push	$0
	lea	-4(%ebp), %eax
	push	%eax
	push	$3
	push	$msg
	push	%ebx
	call	_WriteFile@20	# WriteFile(stdout, msg, 3, &dummy, 0)

	push	$0
	call	_ExitProcess@4	# _ExitProcess(0)