Ignore:
Timestamp:
Sep 23, 2010, 4:39:43 PM (15 years ago)
Author:
markus
Message:

watcom calling conventions...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/include/devhelp.h

    r21 r25  
    11/* DEVHELP.H - DevHelp header file for Watcom-based device drivers
     2 *
     3 * Markus Thielen 09/2010:
     4 *    some modifications for OpenWatcom/os2ahci.add
     5 *
    26*/
    37
     
    59#define DEVHELP_INCLUDED
    610
    7 #ifdef __WATCOMC__ 
     11#ifdef __WATCOMC__
    812
    913#ifndef OS2_INCLUDED
     
    242246
    243247typedef struct _SELDESCINFO {
    244   UCHAR    Type;                       
    245   UCHAR    Granularity;                 
    246   LIN      BaseAddr;                   
    247   ULONG    Limit;                       
    248 } SELDESCINFO, __far *PSELDESCINFO; 
    249                                        
    250 typedef struct _GATEDESCINFO {         
    251   UCHAR    Type;                       
    252   UCHAR    ParmCount;                   
    253   SEL      Selector;                   
    254   USHORT   Reserved_1;                 
    255   ULONG    Offset;                     
     248  UCHAR    Type;
     249  UCHAR    Granularity;
     250  LIN      BaseAddr;
     251  ULONG    Limit;
     252} SELDESCINFO, __far *PSELDESCINFO;
     253
     254typedef struct _GATEDESCINFO {
     255  UCHAR    Type;
     256  UCHAR    ParmCount;
     257  SEL      Selector;
     258  USHORT   Reserved_1;
     259  ULONG    Offset;
    256260} GATEDESCINFO, __far *PGATEDESCINFO;
    257261
     
    383387
    384388/* DevHelp_MonWrite has one change compared to the original specification.
    385    The DataRecord parameter was originally a far (16:16) pointer.  It has 
     389   The DataRecord parameter was originally a far (16:16) pointer.  It has
    386390   been changed to a near pointer because DS must point to the default data
    387    segment and therefore the DataRecord parameter must be near.  This 
     391   segment and therefore the DataRecord parameter must be near.  This
    388392   allows the compiler to catch the error.
    389393*/
     
    443447   modify exact [ax cx dx di];
    444448
    445 /* NOTE: After the DevHelp call, SI contains the modified selector. However, 
     449/* NOTE: After the DevHelp call, SI contains the modified selector. However,
    446450   the C interface has no provisions for returning this value to the caller.
    447451   You can, however, use the _SI() inline function defined in include.h.
     
    913917USHORT DevHelp_VirtToPhys(PVOID SelOffset, PULONG PhysAddr);
    914918#pragma aux DevHelp_VirtToPhys = \
     919   "int 3" \
    915920   "push ds" \
    916921   "mov  dl,16h" \
     
    939944#define VMDHA_RESERVE           0x0100                               /*@V76282*/
    940945#define VMDHA_USEHIGHMEM        0x0800                               /*@V76282*/
    941  
     946
    942947USHORT DevHelp_VMAlloc(ULONG Flags, ULONG Size, ULONG PhysAddr, PLIN LinearAddr, PPVOID SelOffset);
    943948#pragma aux DevHelp_VMAlloc = \
Note: See TracChangeset for help on using the changeset viewer.