-
Notifications
You must be signed in to change notification settings - Fork 0
/
T.txt
63 lines (48 loc) · 812 Bytes
/
T.txt
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
option dotname
.drectve segment info
db "/entry:main /subsystem:windows"
.drectve ends
includelib kernel32
includelib user32
includelib opengl32
includelib gdi32
include I
externdef NvOptimusEnablement :dword
externdef AmdPowerXpressRequestHighPerformance :dword
.data
NvOptimusEnablement dd 1
AmdPowerXpressRequestHighPerformance dd 1
wc db "Static", 0
w dq ?
h dq ?
.code
main proc
push rsp
call SetProcessDPIAware
mov rcx, rax
lea rdx, wc
mov r9, 80000000h
call CreateWindowExA
mov w, rax
mov rcx, w
call GetDC
mov h, rax
mov rcx, w
mov rdx, 3
call ShowWindow
mov rcx, h
mov rdx, 41
call SetPixelFormat
call wglCreateContext
mov rdx, rax
call wglMakeCurrent
mov rcx, h
call SwapBuffers
call wglGetCurrentContext
;call GetLastError
xor rcx, rcx
mov r8, rax
call MessageBoxA
pop rsp
main endp
end