flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
mike.dld 22 Sep 2004, 10:51
Hash tables are already done. Look at SYS32.INC, you'll find smth like:
Code: ... table: dd eax_eq_00 ; define window dd eax_eq_01 ; put pixel ... eax_eq_00: ; process window definition here ... ; int 0x40: jmp dword[eax*4+table] ... |
|||
![]() |
|
f0dder 22 Sep 2004, 14:44
THat looks more like a jumptable than a hash table to me?
Also, if you wanted a "non-massive" table, order the entries and do a binary search. |
|||
![]() |
|
Mike Hibbett 22 Sep 2004, 15:29
The system table will never be massive, so a table lookup is a sensible choice ( 4 bytes per entry, 60 odd entries ).
Mike. |
|||
![]() |
|
Wishing 22 Sep 2004, 17:00
Ahh yes... that is a hash.
to f0dder: A binary search would be slower than a hash. In a hash there is no need to search at all.. you automatically know where to go by mathematicle means. Thats what the jmp dword[eax*4+table] is. The table just makes it so you dont ahve to do my silly version fo block-ifying the API... odd i didnt think of that ![]() Thanks for clearing this up for me. Im glad the menuet kernal is as sophistimacated as i had hoped ^_^ Now if we could only load and unload hardware drives without recompiles ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.