Page 1 of 1

mistery code in taskman

Posted: Fri Sep 25, 2015 10:25 pm
by seppe
The following code is part of fs_execute, present in taskman:

Code: Select all

        xor     edx, edx
        cmp     word [6], '02'
        jne     @f
        not     edx
@@:
        mov     [ebx+APPDATA.tls_base], edx
if GREEDY_KERNEL
else
. . .

Can anyone explain the purpose of the "cmp word [6], '02'" ?

Re: mistery code in taskman

Posted: Fri Sep 25, 2015 10:34 pm
by hidnplayr
It checks if the current applications header is of the "MENUET02" type, and initializes TLS if so.
(Remember, everything below 0x80000000 is application memory)
See this thread for TLS: viewtopic.php?f=1&t=1340