-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhello.asm
More file actions
34 lines (28 loc) · 708 Bytes
/
hello.asm
File metadata and controls
34 lines (28 loc) · 708 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
34
.386P
.model flat
extern _ExitProcess@4:near
extern _GetStdHandle@4:near
extern _WriteConsoleA@20:near
public _go
.data
msg byte 'Hello, World', 10
handle dword ?
written dword ?
.stack
.code
_go:
; handle = GetStdHandle(-11)
push -11
call _GetStdHandle@4
mov handle, eax
; WriteConsole(handle, &msg[0], 13, &written, 0)
push 0
push offset written
push 13
push offset msg
push handle
call _WriteConsoleA@20
; ExitProcess(0)
push 0
call _ExitProcess@4
end