mirror of
https://github.com/NishiOwO/JWasm.git
synced 2025-04-22 01:04:39 +00:00
37 lines
747 B
Plaintext
37 lines
747 B
Plaintext
|
|
;--- -pe format test
|
|
;--- this is a dll - uses exports and relocations
|
|
|
|
.386
|
|
.model flat, stdcall ;-pe requires a .model flat directive
|
|
|
|
IMAGE_FILE_RELOCS_STRIPPED EQU 0001h
|
|
IMAGE_FILE_DLL EQU 2000h
|
|
|
|
;--- reset and set bits in file flags
|
|
@pe_file_info = @pe_file_info and not IMAGE_FILE_RELOCS_STRIPPED
|
|
@pe_file_info = @pe_file_info or IMAGE_FILE_DLL
|
|
|
|
;--- define 2 import directories
|
|
ifdef __JWASM__
|
|
option dllimport:<kernel32.dll>
|
|
endif
|
|
GetStdHandle proto :dword
|
|
ifdef __JWASM__
|
|
option dllimport:none
|
|
endif
|
|
|
|
.code
|
|
|
|
Export1 proc export
|
|
invoke GetStdHandle, -11
|
|
ret
|
|
Export1 endp
|
|
|
|
LibMain proc hModule:dword, dwReason:dword, dwReserved:dword
|
|
mov eax,1
|
|
ret
|
|
LibMain endp
|
|
|
|
END LibMain
|