Asm under WinNT 
Author Message
 Asm under WinNT

Hi!

When I write something like this:

push ...
push ...
push ...
push ...
call DrawMessageBox
int 0x20

and compile it, say, with NASM (doesn't really matter), what do I need
to link(?) to make excutable under WinNT 4.0?

Thanks.



Sat, 02 Nov 2002 03:00:00 GMT  
 Asm under WinNT
For one, you do not use interrupts in Windows asm.  To terminate your
program, use the following piece of code:
push UINT NULL
call [ExitProcess]

If you love seeing Win32 program crashes though, by all means use the
interrupts <grins>

In all my source codes, you'll notice that I'll always use those brackets
to enclose API call names.  This is because the call is calling to
whatever address is in the Import Address Table for the API call.

Here's a snippet of text from the source code to my Win32 hello world
program:
; To compile:
; nasmw -fobj -p win32n.inc hello.asm
; alink -oPE hello.obj

; Get win32n.inc at: http://rs1.szif.hu/~tomcat/win32/ - Look at the
Includes file section

; Get the ALINK package at:
; http://alink.home.dhs.org/

Quote:

> Hi!

> When I write something like this:

> push ...
> push ...
> push ...
> push ...
> call DrawMessageBox
> int 0x20

> and compile it, say, with NASM (doesn't really matter), what do I need
> to link(?) to make excutable under WinNT 4.0?

> Thanks.

--

Team2k PC/Palm Pilot Programming Team:
http://ppilot.homepage.com

To email me, remove '3*&' from my email address. This is to deter spam :)



Sat, 02 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Asm under WinNT

2. Services for WinNT in asm

3. accessing the net from an asm prog under WinNT

4. Translator ibm370-asm to hp-pa-asm

5. Translator ibm370-asm to hp-pa-asm

6. Is ASM ASM?

7. High Level ASM and Low Level ASM

8. Win32 asm/Linux asm newsgroups?

9. Converting 68k Asm to x86 asm

10. RFD: alt.lang.asm.68k, alt.lang.asm.x86, alt.lang

11. Problem: Receive.asm Transmit.asm

12. GCC inline ASM -- calling C functions from __asm__

 

 
Powered by phpBB® Forum Software