File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ global main
2+ extern ExitProcess ; external functions in system libraries
3+ extern MessageBoxA
4+
5+ section .data
6+ title: db 'Win64' , 0
7+ msg: db 'Hello world!' , 0
8+
9+ section .text
10+ main:
11+ sub rsp , 28h
12+ mov rcx , 0 ; hWnd = HWND_DESKTOP
13+ lea rdx ,[ msg ] ; LPCSTR lpText
14+ lea r8 ,[ title ] ; LPCSTR lpCaption
15+ mov r9d , 0 ; uType = MB_OK
16+ call MessageBoxA
17+ add rsp , 28h
18+
19+ mov ecx , eax
20+ call ExitProcess
21+
22+ hlt ; never here
23+
Original file line number Diff line number Diff line change 1+ {
2+ "native" : {
3+ "stdlib" : {
4+ "kernel" : " com.Microsoft.Windows.SDK.um-8"
5+ }
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ void build (Solution &s)
2+ {
3+ auto &t = s.addExecutable (" x" );
4+ {
5+ t.setExtensionProgram (" .asm" , " org.sw.demo.yasm" _dep);
6+ t += " common.asm" ;
7+ t += " user32.lib" _slib;
8+ t.LinkOptions .push_back (" /LARGEADDRESSAWARE:NO" );
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments