forked from AgileEhsan/winasm-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodFileIO.asm
More file actions
44 lines (33 loc) · 859 Bytes
/
modFileIO.asm
File metadata and controls
44 lines (33 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.386
.MODEL FLAT, STDCALL ;32 bit memory model
OPTION CASEMAP:NONE ;Case sensitive
;DEBUG_BUILD EQU 1 ;Uncomment for debug builds
Include WINDOWS.INC
Include gdi32.inc
Include kernel32.inc
Include user32.inc
include shell32.inc
;IFDEF DEBUG_BUILD
; include masm32.inc
; include debug.inc
;ENDIF
IncludeLib USER32.LIB
IncludeLib KERNEL32.LIB
IncludeLib GDI32.LIB
includelib SHELL32.LIB
;IFDEF DEBUG_BUILD
; includelib masm32.lib
; includelib debug.lib
;ENDIF
.CODE
StreamInProc Proc hFile:DWORD,pBuffer:DWORD,NumBytes:DWORD,pBytesRead:DWORD
Invoke ReadFile,hFile,pBuffer,NumBytes,pBytesRead,0
XOR EAX,1
RET
StreamInProc EndP
StreamOutProc Proc hFile:DWORD,pBuffer:DWORD,NumBytes:DWORD,pBytesWritten:DWORD
Invoke WriteFile,hFile,pBuffer,NumBytes,pBytesWritten,0
XOR EAX,1
RET
StreamOutProc EndP
End