Re: GNU AS and multiplatform example ...
- From: "Vortex" <spamtrap@xxxxxxxxxx>
- Date: 26 Apr 2006 10:39:21 -0700
Hi James,
Here is a simple Win32 example :
..intel_syntax noprefix
..global _start
..data
..extern _MessageBoxA@16
..extern _ExitProcess@4
..equ MessageBox,_MessageBoxA@16
..equ ExitProcess,_ExitProcess@4
message:
..asciz "Hello world!" /* define NULL terminated string */
caption:
..asciz "Message box"
..text
_start:
pushd 0 /* push DOUBLE word */
push OFFSET caption
push OFFSET message
pushd 0
call MessageBox
pushd 0
call ExitProcess
To build the project :
as -o Sample.o Sample.asm
ld -e_start -subsystem windows -Lc:\masm32\lib -o Sample.exe Sample.o
--library=user32 --library=kernel32 -s
.
- Follow-Ups:
- Re: GNU AS and multiplatform example ...
- From: spamtrap
- Re: GNU AS and multiplatform example ...
- References:
- GNU AS and multiplatform example ...
- From: spamtrap
- GNU AS and multiplatform example ...
- Prev by Date: Learning MMX
- Next by Date: Re: CISC vs RISC concepts -- from an assembly view
- Previous by thread: GNU AS and multiplatform example ...
- Next by thread: Re: GNU AS and multiplatform example ...
- Index(es):