Is there Open Watcom users who use poide with it

Started by TimoVJL, July 28, 2010, 10:48:44 PM

Previous topic - Next topic

TimoVJL

I'm testing Open Watcom C 32 compiler with poide.exe.
My first interest are those cl386.exe and link386.exe.
There seems to be some problems with some options that doesn't work at all like -Zl (nodefaultlib) etc...
Debug info CodeView doesn't work either it's just NB09 and poide.exe want's NB11 ?

May the source be with you

Vortex

Hi timovjl,

Does Open Watcom support the MS COFF object file output? I remember that they have a special name decoration system in object files.
Code it... That's all...

TimoVJL

#2
QuoteDoes Open Watcom support the MS COFF object file output?
No just OMF i think.
QuoteI remember that they have a special name decoration system in object files.
__cdecl    foo
__stdcall  foo@0
__watcall foo_

EDIT 20100811: Open Watcom C 32 without CRT library.
                     use -s switch and link with objectfile OWCNoCrt.obj.

; Open Watcom C 32 NoCrt startup code OWCNoCrt
; use WinMainCRTStartup as new stating point like MS linker do
; compile this with wasm -bt=nt -3r -ms OWCNorCrt.asm

.386p
.model flat, stdcall

       extrn   WinMainCRTStartup : near
public wstart_
.code
wstart_:
       jmp     WinMainCRTStartup
end wstart_


Here is Vortex code ported to wasm:
; Open Watcom C 32 NoCrt startup code OWCCrt0Gui
; compile this with wasm -bt=nt -3r -ms OWCCrt0Gui.asm
; wlib OWCCrt0Gui OWCCrt0Gui
; Based on Vortex crt0gui.asm

.386p
.model flat, stdcall

extrn ExitProcess@4 : near
extrn GetCommandLineA@0 : near
extrn GetModuleHandleA@4 : near
; extrn WinMainCRTStartup : near
extrn WinMain@16 : near
public wstart_

SW_SHOWDEFAULT equ 10
NULL equ 0

.data?
hInstance DWORD ?

.code
wstart_:
; jmp WinMainCRTStartup
push 0
call GetModuleHandleA@4
mov hInstance,eax
call GetCommandLineA@0
cmp byte PTR [eax],34 ;check for leading quote
jne skipfile
@@: ;look for the second quote
inc eax
mov cl,byte PTR [eax]
or cl,cl
jz finish
cmp cl,34
jne @b
jmp skipspace ;look for space chars
repeat1:
inc eax
skipfile: ;skip file name
mov cl,byte PTR [eax]
or cl,cl
jz finish
cmp cl,32
jne repeat1
dec eax
skipspace: ;skip space chars
inc eax
mov cl,byte PTR [eax]
cmp cl,32
je skipspace
finish:
push SW_SHOWDEFAULT
push eax
push NULL
push hInstance
call WinMain@16
push eax
call ExitProcess@4
end wstart_

May the source be with you

Vortex

Hi timovjl,

Many thanks for the code. If it's possible, could you post a Pelles C project using your converted module?

Once again, much appreciated.

Vortex
Code it... That's all...

TimoVJL

#4
Here:
WinMinOWC.zip

BTW:
Open Watcom snapshot:
http://owbuilder.malakovi.cz/snapshot/
There is csetup.zip if you dont want to install it.

May the source be with you

Vortex

Hi timovjl,

Thanks for the sample project. It works fine.
Code it... That's all...