The problem is when I build a 32-bit application.exe I get an application with 16-bit machine code.
Here is the code (taken from a book):
.386
.model flat
.const
URL db "http://www.lionking.org/`cubbi/", 0
.code
_start:
xor ebx, ebx
push ebx
push ebx
push ebx
push offset URL
push ebx
push ebx
; call ShellExecute
push ebx
; call ExitProcess
end _start
To build the application I write in console
- ml winurl.asm (I tried ml /c winurl.asm but there is no other result)
- link winurl.obj
Then I have an EXEcutable file with 16-bit machine code:
PU = ?86, Uirtual 8086 Mode, Id/Step = 0F62, A20 enabled
09E4:0000 33DB XOR BX,BX
09E4:0002 53 PUSH BX
09E4:0003 53 PUSH BX
09E4:0004 53 PUSH BX
09E4:0005 680000 PUSH 0000h
09E4:0008 0000 ADD [BX+SI],AL
09E4:000A 53 PUSH BX
09E4:000B 53 PUSH BX
09E4:000C 53 PUSH BX
09E4:000D 0000 ADD [BX+SI],AL
09E4:000F 006874 ADD [BX+SI+74h],CH
09E4:0012 7470 JZ Short 0084
I don't need a properly working code. I just want to assembly an application with 32-bit code or I want to understand what I'm doing wrong.
Thank you for paying attention.