.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib
.data

s1 db 'the sum is %x',0
s2 db 'window',0
s3 db 1 DUP(?)
.code
start:
mov eax,4
mov edx,2
div edx
invoke wsprintf,addr s3,addr s1,eax

invoke MessageBox,NULL,offset s3,offset s2,MB_OK
invoke ExitProcess,NULL
end start

thank you!
Posted on 2004-06-06 11:15:36 by cccer
You have already asked this question before ;)

http://www.asmcommunity.net/board/index.php?topic=18451
Posted on 2004-06-06 11:26:23 by DeX
Try this one:


.386
.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.data
s1 db 'the result is %d',0
s2 db 'window',0

.data?
s3 db 16 dup(?)

.code
start:
mov eax,4
mov ecx,2
xor edx,edx
div ecx
invoke wsprintf,addr s3,addr s1,eax
invoke MessageBox,NULL,ADDR s3,ADDR s2,MB_OK
invoke ExitProcess,NULL

END start
Posted on 2004-06-06 11:29:06 by Vortex