Changeset 2838 for trunk/src


Ignore:
Timestamp:
Feb 21, 2000, 10:24:02 AM (26 years ago)
Author:
bird
Message:

Nearly there!

Location:
trunk/src/win32k
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/Makefile

    r2832 r2838  
    11################################################################################
    2 # $Id: Makefile,v 1.25 2000-02-20 04:27:22 bird Exp $
     2# $Id: Makefile,v 1.26 2000-02-21 09:23:59 bird Exp $
    33#
    44# Copyright 1998-1999 knut st. osmundsen
     
    295295
    296296object\asmutils.obj:            misc\asmutils.asm     include\devsegdf.inc
    297 object\calltab.obj:             ldr\calltab.asm
     297object\buffer.obj:              misc\buffer.asm       include\devsegdf.inc
     298object\calltab.obj:             ldr\calltab.asm       include\devsegdf.inc
     299object\mytkExecPgm.obj:         ldr\mytkExecPgm.asm   include\devsegdf.inc
    298300object\d32hlp.obj:              dev32\d32hlp.asm      include\devsegdf.inc
    299301object\devfirst.obj:            dev32\devfirst.asm    include\devsegdf.inc
  • trunk/src/win32k/dev16/probkrnl.c

    r2836 r2838  
    1 /* $Id: probkrnl.c,v 1.13 2000-02-21 04:45:45 bird Exp $
     1/* $Id: probkrnl.c,v 1.14 2000-02-21 09:24:00 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    9494    {FALSE, -1,  8, "_ldrOpen",             -1,  -1,  -1,  -1, EPT_PROC32},        /* 1 */
    9595    {FALSE, -1,  9, "_ldrClose",            -1,  -1,  -1,  -1, EPT_PROC32},        /* 2 */
    96     {FALSE, -1, 12, "_LDRQAppType",         -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 3 */ /* to be removed? */
     96    {FALSE, -1, 12, "_LDRQAppType",         -1,  -1,  -1,  -1, EPT_PROC32},        /* 3 */
    9797    {FALSE, -1, 20, "_ldrEnum32bitRelRecs", -1,  -1,  -1,  -1, EPT_PROC32},        /* 4 */
    9898    {FALSE, -1, 10, "_IOSftOpen",           -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 5 */
     
    104104    {FALSE, -1, 11, "_VMAllocMem",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 11 */
    105105    {FALSE, -1, 11, "_VMGetOwner",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 12 */
    106     {FALSE, -1, 11, "g_tkExecPgm",          -1,  -1,  -1,  -1, EPT_PROC32},        /* 13 */
     106    {FALSE, -1, 11, "g_tkExecPgm",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},        /* 13 */ /* currently disabled! */
    107107    {FALSE, -1, 11, "f_FuStrLenZ",          -1,  -1,  -1,  -1, EPT_PROCIMPORT16},  /* 14 */
     108    {FALSE, -1, 10, "f_FuStrLen",           -1,  -1,  -1,  -1, EPT_PROCIMPORT16},  /* 14 */
    108109    {FALSE, -1,  8, "f_FuBuff",             -1,  -1,  -1,  -1, EPT_PROCIMPORT16}   /* 15 */
    109110/*    {FALSE, -1, 11, "",          -1,  -1, -1, EPT_PROCIMPORT16} */ /* 16 */
     
    697698                    aImportTab[i].offObject = (SegDef.bFlags & 0x01 ? SymDef32.wSymVal : SymDef16.wSymVal);
    698699                    aImportTab[i].ulAddress = aImportTab[i].offObject + KrnlOTEs.aObjects[iSeg].ote_base;
     700                    aImportTab[i].iObject   = (unsigned char)iSeg;
    699701                    aImportTab[i].usSel     = KrnlOTEs.aObjects[iSeg].ote_sel;
    700702
  • trunk/src/win32k/dev32/d32init.c

    r2836 r2838  
    1 /* $Id: d32init.c,v 1.13 2000-02-21 04:45:46 bird Exp $
     1/* $Id: d32init.c,v 1.14 2000-02-21 09:24:00 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    839839        (unsigned)myldrOpen,
    840840        (unsigned)myldrClose,
    841         0,//(unsigned)myLDRQAppType,
     841        (unsigned)myLDRQAppType,
    842842        (unsigned)myldrEnum32bitRelRecs,
    843843        0,
     
    850850        0,
    851851        (unsigned)&mytkExecPgm,
     852        0,
    852853        0,
    853854        0
     
    993994                     */
    994995                    callTab[i][0] = 0xE9; /* jmp */
    995                     *(unsigned*)(void*)&callTab[i][1] = _aImportTab[i].ulAddress - (unsigned)&callTab[i][cb+5];
     996                    *(unsigned*)(void*)&callTab[i][1] = _aImportTab[i].ulAddress - (unsigned)&callTab[i][5];
    996997                }
    997998                else
  • trunk/src/win32k/include/devSegDf.inc

    r2836 r2838  
    1 ; $Id: devSegDf.inc,v 1.4 2000-02-21 04:45:46 bird Exp $
     1; $Id: devSegDf.inc,v 1.5 2000-02-21 09:24:00 bird Exp $
    22;
    33; Segment definitions for win32k.sys.
    44;
    5 ; Copyright (c) 1998-1999 knut st. osmundsen
     5; Copyright (c) 1998-2000 knut st. osmundsen
    66;
    77; Project Odin Software License can be found in LICENSE.TXT
     
    3131EH_CODE ends
    3232
    33 CALLTAB segment dword public 'DATA' use32
    34 CALLTAB ends
    35 
    3633
    3734;DGROUP group BSS32, DATA32
    38 DGROUP group BSS32, DATA32, CONST32_RO, _VFT, EH_DATA, CALLTAB
     35DGROUP group BSS32, DATA32, CONST32_RO, _VFT, EH_DATA
    3936
    4037DATA32  segment dword public 'DATA' use32
     
    5956EH_DATA ends
    6057
     58
     59CALLTAB segment dword public 'DATA' use32
     60CALLTAB ends
     61
  • trunk/src/win32k/include/probkrnl.h

    r2832 r2838  
    1 /* $Id: probkrnl.h,v 1.9 2000-02-20 04:27:24 bird Exp $
     1/* $Id: probkrnl.h,v 1.10 2000-02-21 09:24:00 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    1616*   Defined Constants And Macros                                               *
    1717*******************************************************************************/
    18 #define NBR_OF_KRNLIMPORTS      16      /* When this is changed make sure to   */
     18#define NBR_OF_KRNLIMPORTS      17      /* When this is changed make sure to   */
    1919                                        /* update the arrays in d32init.c and  */
    2020                                        /* probkrnl32.c */
  • trunk/src/win32k/ldr/calltab.asm

    r2836 r2838  
    1 ; $Id: calltab.asm,v 1.9 2000-02-21 04:45:47 bird Exp $
     1; $Id: calltab.asm,v 1.10 2000-02-21 09:24:01 bird Exp $
    22;
    33; callTab - Call back again table - table with entry for each function which is overrided.
     
    119119f_FuStrLenZ ENDP
    120120
     121f_FuStrLen PROC FAR
     122    db MAXSIZE_PROLOG dup(0cch)
     123f_FuStrLen ENDP
     124
    121125f_FuBuff PROC FAR
    122126    db MAXSIZE_PROLOG dup(0cch)
  • trunk/src/win32k/ldr/myldrOpen.cpp

    r2837 r2838  
    1 /* $Id: myldrOpen.cpp,v 1.9 2000-02-21 05:00:52 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10 2000-02-21 09:24:01 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    4343#include "myExecPgm.h"
    4444
     45/*******************************************************************************
     46*   Global Variables                                                           *
     47*******************************************************************************/
     48extern BOOL fQAppType;                  /* From LDRQAppType */
    4549
    4650/*******************************************************************************
     
    98102         * Try get the filesize
    99103         */
    100         /*
    101104        rc = SftFileSize(*phFile, (PULONG)SSToDS(&cbFile));
    102105        if (rc != NO_ERROR)
    103106        {
    104107            kprintf(("ldrOpen: SftFileSize failed with rc=%d\n", rc));
    105         */
    106108            cbFile = (unsigned)~0;
    107         /*
    108         } */
     109        }
    109110
    110111        /*
     
    235236                }
    236237            }
    237 
     238        }
     239
     240        /*
     241         * Only unreconized files and readerror passes this point!
     242         *
     243         * * Fileformats with lower priority should reside here. *
     244         *
     245         */
     246
     247        /*
     248         * If the initial readoperation failed try to read a smaller amount, in case it is a small script...
     249         * 4 bytes is a small amount isn't it?
     250         */
     251        if (rc != NO_ERROR)
     252        {
     253            kprintf(("ldrOpen: first ldrread failed with rc=%d. tries to read 4 byte.\n", rc));
     254            cchRead = 4;
     255            if ((rc = ldrRead(*phFile, 0UL, pach, 0UL, cchRead, NULL)) != NO_ERROR)
     256                kprintf(("ldrOpen: second ldrread failed with rc=%d.\n ", rc));
     257        }
     258
     259        /*
     260         * Now we'll try again, UNIX styled script?
     261         */
     262        if (rc == NO_ERROR && *pach == '#' && pach[1] == '!')
     263        {
    238264            /*
    239              * Only unreconized files and readerror passes this point!
    240              *
    241              * * Fileformats with lower priority should reside here. *
    242              *
     265             * UNIX styled script?
     266             * FIXME! Must be more than 64 bytes long?
     267             *        No options!
     268             *        Firstline < 64 bytes!
    243269             */
    244 
    245             /*
    246              * If the initial readoperation failed try to read a smaller amount, in case it is a small script...
    247              * 4 bytes is a small amount isn't it?
    248              */
    249             if (rc != NO_ERROR)
     270            kprintf(("ldrOpen: unix script?\n"));
     271            cchRead = min(cbFile, 256);
     272            rc = ldrRead(*phFile, 0UL, pach, 0UL, cchRead, NULL);
     273            if (rc == NO_ERROR)
    250274            {
    251                 kprintf(("ldrOpen: first ldrread failed with rc=%d. tries to read 4 byte.\n", rc));
    252                 cchRead = 4;
    253                 if ((rc = ldrRead(*phFile, 0UL, pach, 0UL, cchRead, NULL)) != NO_ERROR)
    254                     kprintf(("ldrOpen: second ldrread failed with rc=%d.\n ", rc));
    255             }
    256 
    257             /*
    258              * Now we'll try again, UNIX styled script?
    259              */
    260             if (rc == NO_ERROR && *pach == '#' && pach[1] == '!')
    261             {
     275                char *pszStart = pach+2;
     276                kprintf(("ldrOpen: script debug 1\n"));
     277
     278                /* Make sure we don't read to much... */
     279                pszBuffer[cchRead] = '\0';
     280
    262281                /*
    263                  * UNIX styled script?
    264                  * FIXME! Must be more than 64 bytes long?
    265                  *        No options!
    266                  *        Firstline < 64 bytes!
     282                 * Skip blanks
    267283                 */
    268                 kprintf(("ldrOpen: unix script?\n"));
    269 
    270                 cchRead = min(cbFile, 256);
    271                 rc = ldrRead(*phFile, 0UL, pach, 0UL, cchRead, NULL);
    272                 if (rc != NO_ERROR)
     284                pszStart = pszBuffer + 2; /* skips the "#!" stuff. */
     285                while (*pszStart != '\0' && (*pszStart == ' ' || *pszStart == '\t'))
     286                    pszStart++;
     287                kprintf(("ldrOpen: script debug 2\n"));
     288
     289                /* anything left on the line? */
     290                if (*pszStart != '\0' && *pszStart != '\r' && *pszStart != '\n')
    273291                {
    274                     char *pszStart = pach+2;
    275                     kprintf(("ldrOpen: script debug 1\n"));
    276 
    277                     /* Make sure we don't read to much... */
    278                     pszBuffer[cchRead] = '\0';
     292                    char *      pszEnd;         /* Pointer to the end of the string(s) when the next step is finished. */
     293                    unsigned    cchToAdd = 1;   /* Chars to add */
     294                    BOOL        fFirst = TRUE;  /* Set if a '\0' has not been set yet.
     295                                                 * If this is clear, there are one or more parameters after the interpreter name. */
    279296
    280297                    /*
    281                      * Skip blanks
    282                      */
    283                     pszStart = pszBuffer + 2; /* skips the "#!" stuff. */
    284                     while (*pszStart != '\0' && (*pszStart == ' ' || *pszStart == '\t'))
    285                         pszStart++;
    286                     kprintf(("ldrOpen: script debug 2\n"));
    287 
    288                     /* anything left on the line? */
    289                     if (*pszStart != '\0' && *pszStart != '\r' && *pszStart != '\n')
     298                     * find linesize and make parameters ready for copying
     299                     */
     300                    pszEnd = pszStart;
     301                    kprintf(("ldrOpen: script debug 3\n"));
     302                    while (*pszEnd != '\0' && *pszEnd != '\r' && *pszEnd != '\n')
    290303                    {
    291                         char *      pszEnd;         /* Pointer to the end of the string(s) when the next step is finished. */
    292                         //char *      pszFirstArg;    /* Pointer to the first argument, the one after the interpreter name. */
    293                         unsigned    cchToAdd = 1;   /* Chars to add */
    294                         int         f = TRUE;       /* flag which tells me if I have just closed the last argument.  */
    295                         /*
    296                          * find linesize and make parameters ready for copying
    297                          */
    298                         pszEnd = pszStart;
    299                         kprintf(("ldrOpen: script debug 3\n"));
    300                         //pszFirstArg = NULL;
    301                         while (*pszEnd != '\0' && *pszEnd != '\r' && *pszEnd != '\n')
     304                        if (fFirst && (*pszEnd == ' ' || *pszEnd == '\t'))
    302305                        {
    303                             if (f)
    304                             {
    305                                 f = FALSE;
    306                                 //if (pszFirstArg != NULL) pszFirstArg = pszEnd + 1;
    307                             }
    308                             else if (!f && (*pszEnd == ' ' || *pszEnd == '\t'))
    309                             {
    310                                  *pszEnd = '\0';
    311                                  f = TRUE;
    312                             }
    313 
    314                             /* next */
    315                             pszEnd++;
    316                             cchToAdd++;
     306                            *pszEnd = '\0';
     307                            fFirst = FALSE;
     308                            if (pszEnd[1] == '\0' || pszEnd[1] == '\r' || pszEnd[1] == '\n')
     309                                fFirst = TRUE;
    317310                        }
    318                         *pszEnd = '\0';
    319                         kprintf(("ldrOpen: script debug 4\n"));
    320 
     311
     312                        /* next */
     313                        pszEnd++;
     314                        cchToAdd++;
     315                    }
     316                    *pszEnd = '\0';
     317                    kprintf(("ldrOpen: script debug 4\n"));
     318
     319                    /*
     320                     * If ldrQueryApp type we don't have any ExecPgm buffer we need to mess with.
     321                     * We'll simply try open the the interpreter.
     322                     */
     323                    if (fQAppType)
     324                    {
     325                        rc = ldrClose(*phFile);
     326                        rc = ldrOpen(phFile, pszStart, param3); /* FIXME, recusion! check that name not equal! Use flags to prevent race? */
     327                    }
     328                    else
     329                    {
    321330                        /*
    322331                         * Find the ExecPgm buffer.
     
    326335                        if (pBuffer != NULL)
    327336                        {
    328                             unsigned cchArguments = getArgsLength(pBuffer->achArgs);
    329                             kprintf(("ldrOpen: debug1\n"));
     337                            unsigned cchArguments = getArgsLength(pBuffer->achArgs); /* minus the first argument. */
     338                            unsigned cchScriptnameDelta = strlen(pBuffer->szFilename) - strlen(pBuffer->achArgs); /* scriptname size difference. */
    330339
    331340                            kprintf(("ldrOpen: script debug 6\n"));
     
    334343                             * Is there enough space in the struct?
    335344                             */
    336                             if (cchArguments + cchToAdd < sizeof(pBuffer->achArgs))
     345                            if (cchArguments + cchToAdd + cchScriptnameDelta < sizeof(pBuffer->achArgs))
    337346                            {
    338347                                kprintf(("ldrOpen: script debug 7\n"));
     
    344353                                if (rc == NO_ERROR)
    345354                                {
    346                                     kprintf(("ldrOpen: scritp debug 8\n"));
     355                                    kprintf(("ldrOpen: script debug 8\n"));
    347356                                    /* Make space for the addition arguments. */
    348                                     memmove(&pBuffer->achArgs[cchToAdd], &pBuffer->achArgs[0], cchArguments);
    349                                     memcpy(&pBuffer->achArgs[0], pszBuffer, cchToAdd);
    350                                     kprintf(("ldrOpen: script debug 9\n"));
     357                                    #ifdef DEBUG
     358                                    char *psz = &pBuffer->achArgs[0];
     359                                    int   i = 0;
     360                                    while (*psz != '\0')
     361                                    {
     362                                        kprintf(("Arg %d: %s\n", i++, psz));
     363                                        psz += 1 + strlen(psz);
     364                                    }
     365                                    #endif
     366                                    memmove(&pBuffer->achArgs[cchToAdd + cchScriptnameDelta],
     367                                            &pBuffer->achArgs[0], cchArguments);
     368
     369                                    /*
     370                                     * Copy the arguments.
     371                                     */
     372                                    kprintf(("ldrOpen: script debug 8\n"));
     373                                    memcpy(&pBuffer->achArgs[0], pszStart, cchToAdd); /* Interpreter with arguments */
     374                                    if (!fFirst)
     375                                        pBuffer->achArgs[cchToAdd - 1] = ' ';
     376                                    strcpy(&pBuffer->achArgs[cchToAdd], pszFilename); /* Scriptname */
     377                                    kprintf(("ldrOpen: script debug a\n"));
     378
     379                                    #ifdef DEBUG
     380                                    psz = &pBuffer->achArgs[0];
     381                                    i = 0;
     382                                    while (*psz != '\0')
     383                                    {
     384                                        kprintf(("Arg %d: %s\n", i++, psz));
     385                                        psz += 1 + strlen(psz);
     386                                    }
     387                                    #endif
    351388                                }
    352389                                else
     
    365402                        }
    366403                    }
    367                     else
    368                     {
    369                         kprintf(("ldrOpen: no interpereter on the first line.\n"));
    370                         rc = ERROR_BAD_EXE_FORMAT; /*?*/
    371                     }
    372404                }
    373405                else
    374406                {
    375                     kprintf(("ldrOpen: read of min(cbFile, 256) = %d failed, rc = %d\n", cchRead, rc));
     407                    kprintf(("ldrOpen: no interpereter on the first line.\n"));
     408                    rc = ERROR_BAD_EXE_FORMAT; /*?*/
    376409                }
    377             } /* else inn other formats here. */
    378         }
    379         else
    380         {
    381             kprintf(("ldrOpen: ldrRead failed with rc=%d when reading DosHdr.\n", rc));
    382             rc = NO_ERROR;
    383         }
     410            }
     411            else
     412            {
     413                kprintf(("ldrOpen: read of min(cbFile, 256) = %d failed, rc = %d\n", cchRead, rc));
     414            }
     415        } /* else inn other formats here. */
    384416        rfree(pszBuffer);
    385417    }
  • trunk/src/win32k/ldr/mytkExecPgm.asm

    r2837 r2838  
    1 ; $Id: mytkExecPgm.asm,v 1.4 2000-02-21 05:00:53 bird Exp $
     1; $Id: mytkExecPgm.asm,v 1.5 2000-02-21 09:24:01 bird Exp $
    22;
    33; mytkExecPgm - tkExecPgm overload
     
    2323    extrn  ReleaseBuffer:PROC
    2424    extrn  QueryBufferSegmentOffset:PROC
    25     extrn  f_FuStrLenZ
    26     extrn  f_FuBuff
     25
     26    ; Scans strings until empy-string is reached.
     27    ; input:  bx:di
     28    ; uses:   nearly all (save bp)
     29    ; return: cx size - CF clear
     30    ;         ax error- CF set
     31    extrn  f_FuStrLenZ:PROC
     32
     33    ; Stringlength
     34    ; input:  bx:di
     35    ; uses:   nearly all (save bp)
     36    ; return: cx size - CF clear
     37    ;         ax error- CF set
     38    extrn  f_FuStrLen:PROC
     39
     40    ;memcpy
     41    ;input:  bx:si pointer to source
     42    ;        es:di pointer to target
     43    ;        cx    count of bytes to copy
     44    ;uses:   nearly all (save bp)
     45    ;return: success CF clear
     46    ;        failure CF set
     47    extrn  f_FuBuff:PROC
    2748
    2849;
     
    81102    push    edi
    82103
    83 IF 0
    84 ;    ; Check if this overloading has anything too say, after all it is using some stack space!
    85 ;    jmp     mytkExecPgm_CalltkExecPgm_X1
    86 ENDIF
    87 
    88104    ; parameter validations
    89105    mov     ax, ds                      ; pointer to filename
     
    91107    jb      mytkExecPgm_CalltkExecPgm_X1
    92108
    93     ; This test is currently disabled. We'll pass on an empty string if the argument pointer is NULL.
    94     ; Hopefully an empty string is treated equally to an NULL pointer.
    95 ;    cmp     di, 4
    96 ;    jl      mytkExecPgm_CalltkExecPgm_X1
    97 
     109    ;
    98110    ; filename length
     111    ;
    99112    mov     ax, ds
    100113    mov     es, ax
    101     xor     eax, eax
    102     movzx   edi, dx                     ; es:di is now filename address (ds:dx).
    103     mov     ecx, 0ffffffffh
    104     cld
    105     repne scasb
    106     not     ecx
     114    pushad
     115    mov     bx, ds
     116    mov     di, dx                      ; es:di is now filename address (ds:dx).
     117    push    cs                          ; Problem calling far into the calltab segement.
     118    call    near ptr FLAT:f_FuStrLen
     119    movzx   ecx, cx
     120    mov     [ebp+cchFilename], ecx
     121    popad
     122    jc      mytkExecPgm_CalltkExecPgm_X1; If the FuStrLen call failed we bail out!
    107123
    108124    ;
    109125    ; if filename length is more that CCHMAXPATH then we don't do anything!.
    110126    ;
     127    mov     ecx, [ebp+cchFilename]
    111128    cmp     ecx, 260
    112129    jae     mytkExecPgm_CalltkExecPgm_X1; length >= 260
    113     mov     [ebp+cchFilename], ecx
    114130
    115131    ;
     
    122138    cmp     di, 4                       ; The argument might me a invalid pointer...
    123139    jb      mytkExecPgm_CalltkExecPgm_1
    124     mov     es, di
    125     movzx   edi, si                     ; es:edi is now args address (di:si), eax is still 0
    126     dec     ecx
    127     cld
    128 mytkExecPgm_CalltkExecPgm_loop:         ; loop true all ASCIIZ strings
    129     repne scasb                         ; scans forwards until '\0' is read. es:edi is pointing at the char after the '\0'.
    130     cmp     byte ptr es:[edi], 0        ; is this char '\0' ? stop looping : loop once more;
    131     jnz     mytkExecPgm_CalltkExecPgm_loop
    132     dec     ecx                         ; update count - count terminating zero too
    133     not     ecx
     140
     141    pushad
     142    mov     bx, di                      ;
     143    mov     di, si                      ; bx:di -> arguments
     144    push    cs                          ; Problem calling far into the calltab segement.
     145    call    near ptr FLAT:f_FuStrLenZ
     146    movzx   ecx, cx
     147    mov     [ebp+cchArgs], ecx
     148    popad
     149    jc      mytkExecPgm_CalltkExecPgm_X1
    134150
    135151mytkExecPgm_CalltkExecPgm_1:
    136     mov     [ebp+cchArgs], ecx
     152    mov     ecx, [ebp+cchArgs]
    137153    add     ecx, [ebp+cchFilename]      ; filename
    138154    add     ecx, 3 + 260                ;  260 = new argument from a scrip file or something.
     
    162178    ; Copy filename to pBuffer.
    163179    ;
    164     push    esi
    165     mov     edi, eax                    ; es:di  pBuffer
    166     movzx   esi, dx                     ; ds:si  Filename pointer (input ds:dx)
     180    pushad
     181    mov     di, ax                      ; es:di  pBuffer
     182    mov     si, dx
     183    mov     bx, ds                      ; bx:si  Filename pointer (input ds:dx)
    167184    mov     ecx, [ebp+cchFilename]
    168     cld
    169     rep movsb
     185    push    cs                          ; Problem calling far into the calltab segement.
     186    call    near ptr FLAT:f_FuBuff
     187    popad
     188    jc      mytkExecPgm_CalltkExecPgm_X2
    170189
    171190    ;
    172191    ; Copy Args to pBuffer + 261
    173192    ;
    174     ; stack: esi, edi, es, ds, ecx, eax
    175     pop     esi
     193    ; stack: edi, es, ds, ecx, eax
    176194    pop     edi
    177195    push    edi
    178     push    esi
    179196    add     eax, 261                    ; we'll use eax in the branch
    180197    cmp     di, 4
    181198    jb      mytkExecPgm_CalltkExecPgm_2
    182     and     esi, 00000ffffh             ; remove high part of the register
    183     mov     ds, di                      ; ds:si -> arguments
    184     mov     edi, eax                    ; es:di -> pBuffer + 261
     199    pushad
    185200    mov     ecx, [ebp+cchArgs]
    186     cld
    187     rep movsb
     201    mov     bx, di                      ; ds:si -> arguments
     202    push    cs                          ; Problem calling far into the calltab segement.
     203    call    near ptr FLAT:f_FuBuff
     204    popad
     205    jc      mytkExecPgm_CalltkExecPgm_X2
    188206    jmp     mytkExecPgm_CalltkExecPgm_3
    189207
    190208mytkExecPgm_CalltkExecPgm_2:
    191     mov     byte ptr es:[eax], 0        ; Terminate the empty string!
     209    mov     word ptr es:[eax], 0        ; Terminate the empty string!
    192210
    193211    ;
     
    206224    ; Restore variables pushed on the stack
    207225    ;
    208     ; stack: esi, edi, es, ds, ecx, eax
    209     pop     esi
     226    ; stack: edi, es, ds, ecx, eax
    210227    pop     edi
    211228    pop     es
     
    234251    ; Call g_tkExecPgm
    235252    ;
    236     push    cs
     253    push    cs                          ; Problem calling far into the calltab segement.
    237254    call    near ptr FLAT:g_tkExecPgm
    238255    pushfd
  • trunk/src/win32k/misc/buffer.asm

    r2837 r2838  
    1 ; $Id: buffer.asm,v 1.4 2000-02-21 05:00:53 bird Exp $
     1; $Id: buffer.asm,v 1.5 2000-02-21 09:24:02 bird Exp $
    22;
    33; Simple resident buffer for use when overloading tkExecPgm.
     
    251251    sub     edx, BUFFER_SIZE            ; edx points at the buffer being concidered.
    252252    dec     ebx                         ; ebx points at the "semaphore" for the buffer being concidered.
    253     cmp     byte ptr [edx], 1           ; Is buffer in use?
     253    cmp     byte ptr [ebx], 1           ; Is buffer in use?
    254254    jne     QueryBufferPointerFromFilename_next
    255255
     
    258258    push    ecx
    259259    push    edx
     260    sub     esp, 8
    260261    call    stricmp
     262    add     esp, 8
    261263    pop     edx
    262264    pop     ecx
  • trunk/src/win32k/win32k.def

    r2836 r2838  
    1616    CODE16          class 'CODE'
    1717    CODE32          class 'CODE'
    18     CALLTAB         class 'DATA'
    1918    DATA32          class 'DATA'
    2019    c_common        class 'DATA'
     
    2221    _VFT            class 'CONST'
    2322    CONST32_RO      class 'CONST'
     23    CALLTAB         class 'DATA'
    2424
Note: See TracChangeset for help on using the changeset viewer.