diff --git a/if1632/kernel.spec b/if1632/kernel.spec index 089132255c6..cf01ca16410 100644 --- a/if1632/kernel.spec +++ b/if1632/kernel.spec @@ -9,7 +9,7 @@ file krnl386.exe 2 stub ExitKernel 3 pascal GetVersion() GetVersion16 4 pascal16 LocalInit(word word word) LocalInit -5 pascal16 LocalAlloc(word word) LocalAlloc16 +5 register LocalAlloc(word word) WIN16_LocalAlloc 6 pascal16 LocalReAlloc(word word word) LocalReAlloc16 7 pascal16 LocalFree(word) LocalFree16 8 pascal LocalLock(word) LocalLock16 diff --git a/memory/local.c b/memory/local.c index fe91eab512b..abdb618ae24 100644 --- a/memory/local.c +++ b/memory/local.c @@ -1521,6 +1521,19 @@ HLOCAL16 WINAPI LocalAlloc16( UINT16 flags, WORD size ) } +/*********************************************************************** + * WIN16_LocalAlloc + */ +void WINAPI WIN16_LocalAlloc( CONTEXT *context ) +{ + WORD *stack = PTR_SEG_OFF_TO_LIN(SS_reg(context), SP_reg(context)); + UINT16 flags = (UINT16)stack[3]; + WORD size = (WORD)stack[2]; + TRACE(local,"WIN16LocalAlloc: %04x %d \n", flags, size); + AX_reg(context) = CX_reg(context) = LOCAL_Alloc( DS_reg(context), flags, size ); +} + + /*********************************************************************** * LocalReAlloc16 (KERNEL.6) */