%include "\lab\vasm\inc\nagoa.inc"


[segment .code USE32]

..start:

section data
hfile   DD 0
nbyte DD 0
thefile  DB  "c:\file.txt",0
thetxt  DB  "Arab-Team",0


section code

invoke CreateFile, addr thefile,GENERIC_READ+GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0


%if hfile != INVALID_HANDLE_VALUE 
invoke WriteFile ,hfile,addr thetxt,9,addr nbyte,0
%endif
invoke CloseHandle ,hfile