I'm making a String object dll thing in fasm.
It uses the VirtualAlloc api to make my String Obj structure
DLL...
String struct
.ptr dd 1 ;pointer to a string buffer
.len dd 1 ;length of string
.mem dd 1 ; memory used in buffer blocks of 512bytes
.hash dd 4 ; 16 byte hash of my own creation
ends
Functions...
StrNew - returns ptr to created str structure in memory
StrAdd(str struct address,buffer ptr, buffer len)
- add a buffer of specified length to str obj
StrAddStr(str struct A address, str struct B address) - append B to A
StrUpdate(str struct address) - updates the hash
- I'm using an MMX optimized 4 to 16 byte expansion of the djb hash
SCopyMem(ptr1, ptr2, len) - copy ptr2's data to ptr1
-This is an MMX optimized mem copy
...more string functions Compare, Len, Find, Replace etc.
When this is done I'm thinking about making it a C++ lib with dll2lib or some other program and then making a C++ class to wrap the functions in. I want a high speed string manipulation tool.
Any comments, input would be appreciated.
IE 'This is a waste of time' 'Good/Bad idea because ...'
|