Page 1 of 1
string library in kolibri
Posted: Sun Mar 02, 2008 12:46 am
by crchemist
I try to write console application and i need to parse options but i didn't find any library for processing strings. Also i had seen to cmd.asm and found strings like this:
Code: Select all
no_kill:
cmp dword [tic_table+600],'paus'
jne no_pause
cmp byte [tic_table+604],'e'
jne no_pause
cmp dword [count],5
je pause1
Is it bad written code or string lib not yet implemented?
Re: string library in kolibri
Posted: Sun Mar 02, 2008 12:58 pm
by hidnplayr
The string lib is not implented yet, and i'm not sure if we actually need one..
please, read the section 'string operations' in the flat assembler's user manual:
http://flatassembler.net/docs.php?article=manual#2.1.8
I hope this helps you
PS: the code you showed is very fast and small, i dont see a problem with it

Re: string library in kolibri
Posted: Sun Mar 02, 2008 1:26 pm
by crchemist
hidnplayr wrote:The string lib is not implented yet, and i'm not sure if we actually need one..
please, read the section 'string operations' in the flat assembler's user manual:
http://flatassembler.net/docs.php?article=manual#2.1.8
I hope this helps you
PS: the code you showed is very fast and small, i dont see a problem with it

Ok. For example i need to parse something like this:
--loaddrv=USB -v --config="config.ini"
I really don't how i can parse this string without strcmp, strstr, strlen, strsep functions. I think only for parse options i must write near 100 lines (maybe more). This functions really simplify life

Re: string library in kolibri
Posted: Sun Mar 02, 2008 1:48 pm
by hidnplayr
feel free to make such a library then
Or maybe we can port something like FasmLIB
http://fasmlib.x86asm.net/
(I would probably still parse it by hand anyway :p)
Re: string library in kolibri
Posted: Sun Mar 02, 2008 2:25 pm
by crchemist
FasmLib is cool. I think it really can increase speed of development. But it is huge. Now i am porting string.h/string.c from linux sources - it is that i really need now. I'll be happy to port FasmLib if someone help me because it is really big.