Could somebody help me figure out what is going on here:
PROG1.ASM:
.586P
.MODEL FLAT, STDCALL
EXTERN PROC1@0:NEAR
_DATA SEGMENT
_DATA ENDS
_TEXT SEGMENT
START:
CALL PROC1@0
RET
_TEXT ENDS
END START
PROG2.ASM:
.586P
.MODEL FLAT, STDCALL
PUBLIC PROC1
_TEXT SEGMENT
PROC1 PROC
MOV EAX, 1000
RET
PROC1 ENDP
_TEXT ENDS
END
ML /COFF /C PROG1.ASM
ML /COFF /C PROG2.ASM
LINK /SUBSYSTEM:WINDOWS PROG1.OBJ PROG2.OBJ
When PROG1.EXE is loaded into OLLYDBG, Error message: Access violation when executing [7C57B74C] - use Shift+F7/F8/F9 to pass exception to program. All I can see is an empty CPU window.
Macro Assembler Version 6.14.8444
Incremental Linker Version 5.12.8078
OllyDbg v1.10
The example is from "The Assembly Programming Master Book" (2005) by Vlad Pirogov.
Thanks in advance for help!
Works fine for me (with version 7.10.4035 of ML and 8.00.50727.220 of LINK). Maybe you could try a later version of the linker? I can't remember which one comes with the MASM32 package - mine came from one of Microsoft's development kits.
Cheers,
Zooba :U
And it works for me, with /SUBSYSTEM:WINDOWS or /SUBSYSTEM:CONSOLE.
I used Incremental Linker Version 5.12.8078, included in the MASM32 package.