forked from KolibriOS/kolibrios
CMM Array: new function indexArray
git-svn-id: svn://kolibrios.org@7831 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a8324ce5d2
commit
3805e04938
@ -142,7 +142,7 @@
|
|||||||
dword checkSum1 = 1;
|
dword checkSum1 = 1;
|
||||||
dword checkSum2 = 0;
|
dword checkSum2 = 0;
|
||||||
dword beginAddress = 0;
|
dword beginAddress = 0;
|
||||||
|
|
||||||
beginAddress = text;
|
beginAddress = text;
|
||||||
WHILE(DSBYTE[text])
|
WHILE(DSBYTE[text])
|
||||||
{
|
{
|
||||||
@ -173,4 +173,13 @@
|
|||||||
RETURN array.init(size);
|
RETURN array.init(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dword indexArray(dword address, key)
|
||||||
|
{
|
||||||
|
dword offset = key&11b;
|
||||||
|
dword offsetAddress = offset*4+address;
|
||||||
|
IF (key==offset) RETURN 4*4+offsetAddress;
|
||||||
|
IF (!DSDWORD[offsetAddress]) DSDWORD[offsetAddress] = malloc(4*4*2);
|
||||||
|
RETURN indexArray(DSDWORD[offsetAddress], key>>2);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user