Hi ToanBao122,
This is not an example based on Irvine's include files but it can give you some ideas :
include ReadFile.inc
.data
FileName db 'test.txt',0 ; file to read
.data?
hFile dd ?
FileSize dd ?
hMem dd ?
BytesRead dd ?
.code
start:
call main
invoke ExitProcess,0
main PROC uses ebx
xor ebx,ebx
invoke CreateFile,ADDR FileName,GENERIC_READ,ebx,ebx,\
OPEN_EXISTING,ebx,ebx
mov hFile,eax
invoke GetFileSize,eax,ebx
mov FileSize,eax
inc eax
invoke GlobalAlloc,GMEM_FIXED,eax
mov hMem,eax
add eax,FileSize
mov BYTE PTR [eax],bl ; Set the last byte to NULL so that StdOut
; can safely display the text in memory.
invoke ReadFile,hFile,hMem,FileSize,\
ADDR BytesRead,ebx
invoke CloseHandle,hFile
invoke StdOut,hMem
invoke GlobalFree,hMem
ret
main ENDP
END start