forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
- Loading branch information
Showing
7 changed files
with
217 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; --------------------------------------------- | ||
; Hello World for Win64 Intel x64 Assembly | ||
; | ||
; by fruel (https://github.com/fruel) | ||
; 13 June 2016 | ||
; --------------------------------------------- | ||
|
||
GetStdHandle PROTO | ||
ExitProcess PROTO | ||
WriteConsoleA PROTO | ||
|
||
.data | ||
msg BYTE "Hello World!",0 | ||
bytesWritten DWORD ? | ||
|
||
.code | ||
mainCRTStartup proc | ||
sub rsp, 5 * 8 ; reserve shadow space | ||
|
||
mov rcx, -11 ; nStdHandle (STD_OUTPUT_HANDLE) | ||
call GetStdHandle | ||
|
||
mov rcx, rax ; hConsoleOutput | ||
lea rdx, msg ; *lpBuffer | ||
mov r8, LENGTHOF msg - 1 ; nNumberOfCharsToWrite | ||
lea r9, bytesWritten ; lpNumberOfCharsWritten | ||
mov QWORD PTR [rsp + 4 * SIZEOF QWORD], 0 ; lpReserved | ||
call WriteConsoleA | ||
|
||
mov rcx, 0 ; uExitCode | ||
call ExitProcess | ||
mainCRTStartup endp | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
project('test-masm', 'c') | ||
|
||
if get_option('backend').startswith('vs') | ||
error('MESON_SKIP_TEST: masm is not supported by vs backend') | ||
endif | ||
|
||
cc = meson.get_compiler('c') | ||
|
||
# MASM must be found when using MSVC, otherwise it is optional | ||
if not add_languages('masm', required: cc.get_argument_syntax() == 'msvc') | ||
error('MESON_SKIP_TEST: masm not available') | ||
endif | ||
|
||
executable('app', 'hello.masm') |