SPP8 - ; INVOKE CreateFile, ADDR filename, GENERIC_WRITE,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
TITLE SPP8 INCLUDE Irvine32.inc .data array DWORD 47 DUP(?) fileName BYTE ". .\SPP8.txt",0 fileHandle DWORD ? bytesWritten DWORD ? b .code main PROC mov esi,0 mov array[esi],1 mov array[esi+4],1 mov ecx,45 L1: mov eax,0 add eax,array[esi] add eax,array[esi+4] mov array[esi+8],eax add esi,4 loop L1 l ;Create a new file, erasing any existing file by the same name
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; INVOKE CreateFile, ADDR filename, GENERIC_WRITE, DO_NOT_SHARE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, mov fileHandle,eax .IF eax == INVALID_HANDLE_VALUE jmp L2 .ENDIF INVOKE WriteFile, fileHandle, ADDR array, 188, ADDR bytesWritten, INVOKE CloseHandle,fileHandle L2: exit main ENDP END main...
View Full Document

This note was uploaded on 04/24/2010 for the course COS 235 taught by Professor Karagiozov during the Fall '08 term at American University in Bulgaria.

Ask a homework question - tutors are online