Hi Jk,
After replacing the XWORDs with DWORDs, I managed to assemble your source code with Poasm. Disassembling the object module with Agner Fog's objconv :
.386
option dotname
.model flat
public _TESTME@0
public _start@0
extern _ExitProcess@4: near
@feat.00 equ 00000001H
.drectve SEGMENT BYTE PUBLIC 'CONST'
db 2FH, 64H, 65H, 66H, 61H, 75H, 6CH, 74H
db 6CH, 69H, 62H, 3AH, 4BH, 45H, 52H, 4EH
db 45H, 4CH, 33H, 32H, 2EH, 4CH, 49H, 42H
db 20H, 2FH, 65H, 6EH, 74H, 72H, 79H, 3AH
db 73H, 74H, 61H, 72H, 74H, 40H, 30H, 20H
.drectve ENDS
_text SEGMENT PARA PUBLIC 'CODE'
_TESTME@0 PROC NEAR
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
xor eax, eax
TESTME.__el1 LABEL NEAR
test eax, eax
jnz ?_002
lea ebx, [TESTME.__el1]
mov dword ptr [ebp-4H], ebx
jmp ?_001
?_001: add eax, 1
jmp dword ptr [ebp-4H]
_TESTME@0 ENDP
?_002 LABEL NEAR
pop edi
pop esi
pop ebx
leave
ret
_start@0 PROC NEAR
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
call _TESTME@0
int 3
xor edx, edx
start.__el1 LABEL NEAR
test edx, edx
jnz ?_004
lea ebx, [start.__el1]
mov dword ptr [ebp-4H], ebx
jmp ?_003
?_003: add edx, 1
jmp dword ptr [ebp-4H]
_start@0 ENDP
?_004 LABEL NEAR
push edx
call _ExitProcess@4
pop edi
pop esi
pop ebx
leave
ret
_text ENDS
END
Could you please show the issue(s) here in this output?
Listing the symbols of the object module :
E:\PellesC\Bin>podump.exe /SYMBOLS test.obj
Dump of erol.obj
File type: OBJ
SYMBOL TABLE
0000 00000001 ABS notype static | @feat.00
0001 00000000 SECT1 notype static | .drectve
length of section 28, #relocations 0, #linenumbers 0
0003 00000000 SECT2 notype static | .text
length of section 57, #relocations 3, #linenumbers 0
0005 00000000 UNDEF notype external | _ExitProcess@4
0006 00000000 SECT2 notype () external | _TESTME@0
0007 00000025 SECT2 notype () external | _start@0
0008 0000000B SECT2 notype static | TESTME.__el1
0009 00000037 SECT2 notype static | start.__el1
SUMMARY
28 .drectve
57 .text
Removing the instruction int 3, I rebuilt the application. A session of Ollydbg didn't report any issues.