Ignore:
Timestamp:
Jan 3, 2013, 1:22:56 PM (13 years ago)
Author:
rousseau
Message:

Fixed the Open Watcom build

Building with Open Watcom produced a non working driver.

Causes & Fixes

o Enum types were 8 bits when using WCC

This caused the functions with variable arguments to fail.
Adding the -ei compiler-flag to WCC solved this issue.

o Incorrect inline assembler syntax to call DeviceHelp in os2ahci.c

DeviceHelp is a 16:16 far pointer residing in memory.
MASM interprets 'call DeviceHelp' differently than WASM.
The correct syntax is: 'call dword ptr [DeviceHelp]'.

o Missing segments from TGROUP in init.asm

WLINK then generates the AUTO class, most probably causing incorrect
relocation fixups.

Enhancements

o WASM (or JWASM) can now be used instead of ALP
o WCC can now be used instead of CL
o The Open Watcom linker (WLINK) can now be used instead of LINK
o Streamlined both makefiles a notch so it's easy to use both tool-chains

To investigate

o CL barks about a missing prototype for DevHelp_Yield() in lib.c

The prototype is actually defined in dhcalls.h but CL still barks.

o Using WCC with ALP and WLINK produces an oversized image

Probaly due to misplaced BSS segments. WCC with ALP and LINK produces
a normal sized image however.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/os2ahci.def.template

    r95 r144  
    44
    55segments
    6   DEVHDR        CLASS 'DATA'
    7   _DATA         CLASS 'DATA'
    8   CONST         CLASS 'CONST'
    9   _BSS          CLASS 'BSS'
    10   c_common      CLASS 'BSS'
    11   _z_data       CLASS 'BSS'
    12   _TEXT         CLASS 'CODE' IOPL
     6  'DEVHDR'      CLASS 'DATA'
     7  '_DATA'       CLASS 'DATA'
     8  'LIBDATA'     CLASS 'DATA'
     9  'CONST'       CLASS 'CONST'
     10  '_BSS'        CLASS 'BSS'
     11  'c_common'    CLASS 'BSS'
     12  '_z_data'     CLASS 'BSS'
     13  '_TEXT'       CLASS 'CODE' IOPL
    1314  'CODE'        CLASS 'CODE' IOPL
    14   RMCode        CLASS 'CODE' IOPL
    15   LIBCODE       CLASS 'CODE' IOPL
    16   _z_text       CLASS 'CODE' IOPL
    17 
     15  'LIBCODE'     CLASS 'CODE' IOPL
     16  'RMCode'      CLASS 'CODE' IOPL
     17  '_z_text'     CLASS 'CODE' IOPL
Note: See TracChangeset for help on using the changeset viewer.