Board.KolibriOS.org

Official KolibriOS board
It is currently Thu Apr 25, 2019 9:11 am

All times are UTC+03:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: mistery code in taskman
PostPosted: Fri Sep 25, 2015 10:25 pm 
Offline
User avatar

Joined: Sun May 11, 2014 9:21 pm
Posts: 97
The following code is part of fs_execute, present in taskman:

Code:
        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'" ?

_________________
Greetings from Seppe


Top
   
PostPosted: Fri Sep 25, 2015 10:34 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited