flat assembler
Message board for the users of flat assembler.

flat assembler > IDE Development > A problems for those want to help for developement of Fresh.

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Blag



Joined: 04 Jul 2003
Posts: 90
Location: Perú
Dear JohnFound:

I'm glad i was ok Very Happy .

Quote:
You are right, only not like VB but Delphi IMO.


Yeah, i totally forgot Delphi Embarassed

I'm happy with the way FRESH is going......it's even cool, that besides i'm not part of the team, i have been there since it's beginning, and help testing it......

i love programming Very Happy ........but of course i love my bride more Twisted Evil

So i'm happy to see that people that i didn't know in person, but that i consider my friends (Specially Tommy.....my Programming Guru), are doing such a great project. It's nice to me to take a little break at my job, to read and post some messages in the forum.

And of course i know that the conference post is not a secret or private.....
I just wanted to be polite Razz

_________________
Alvaro Tejada Galindo
SinglePath games design
http://www.iespana.es/singlepath
Post 16 Sep 2003, 21:57
View user's profile Send private message MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
Thank you Blag.

BTW: Especially for me, there is no need to be very polite. I am not "easy offending" (I don't know exact english word Wink ).

Bye.
I must go to sleep... Smile
Post 16 Sep 2003, 22:12
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
Actually I would be interested to help out on the string functions, but since it has already been taken up, so nevermind.
Post 17 Sep 2003, 03:44
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
roticv wrote:
Actually I would be interested to help out on the string functions, but since it has already been taken up, so nevermind.


Hi, roticv.
In Bulgaria, we have one saying: "There is a work for whole china people". Smile
There is much work in the string library, so if you want simply begin to work. Just talk with decard what functions he will make and what you, to avoid double work. We need search functions (maybe some patern search or simple regular expresions search), file functions for manitulating text files, splitting, word functions, etc. etc. I think that string functions are very very important, because the string manipulation is one of the weak sides of the assembler. We need as much power as possible.

regards.
Post 17 Sep 2003, 10:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
Hey JohnFound,

If you do not mind would you give more details? But of course due to some technically difficulties I do not think I would have time to code till next week. I will see what I can do.
Post 17 Sep 2003, 12:01
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
roticv wrote:
If you do not mind would you give more details? But of course due to some technically difficulties I do not think I would have time to code till next week. I will see what I can do.


Hi, roticv. It's great that the team grows. Smile If you look at strlib.asm you can see that there is very little functions, mainly for creating and maintaining of dynamic strings and almost no functions about string manipulations. And existing functions are not systematized in some harmonious system. I will try to make some specification, but your (and others) opinion is important.

regards.
Post 17 Sep 2003, 12:42
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
Hi JohnFound,

Do you want it to be optimised (ie prehaps using mmx technology and so on)? If so speed or size? For example there are many variants of strlen. try this

Code:
strlen:
call strptr
mov ecx, eax
@@:
cmp byte [eax],0
lea eax,[eax+1]
jnz @B
sub eax, ecx
dec eax ;return value in eax
retn
    
Post 17 Sep 2003, 16:23
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
roticv wrote:
Do you want it to be optimised (ie prehaps using mmx technology and so on)? If so speed or size? For example there are many variants of strlen. try this...


As primary goal, I want it to work Wink But optimization is OK, IMHO for size. MMX and so on is not very good idea for standard library IMHO. FASM works on 486. On other hand, there is no computers without at least MMX, so, I simply don't know. Good commented code will be great. Smile

[EDIT] I simply don't understand an idea at first reading... The strlen returns the result in ecx by the reason that there are some other routines that have length of the string as input in ecx. Most of fundamental string functions use register calling convention because of the speed.[/EDIT]
Post 17 Sep 2003, 16:42
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
Hi John,
I have finished and tested two routines: StrCat that appends one string to other, and StrPos that searches for one string in another. What another search routines do you need? Do you want me to post this version of StrLib, or meaby to add some more functions? Now I'm working with StrDup routine that will duplicate given string (it should be very useful).

roticv: Meaby you could take care about textfile routines (proably they would be kept in separate file, so it would be easier to work with them). If you want to code StrLib, write which functions you are going to provide, and then we'll think how to synchronize our work:)

about the StrLen:
I have a version that should be even faster (without any jumps):
Code:
StrLen:
        push    eax edi
        call    StrPtr
        mov     edi,eax
        mov     ecx,-1
        xor     al,al
        repne   scasb
        not     ecx
        dec     ecx
        pop     edi eax
        ret    
Post 17 Sep 2003, 17:06
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
about the optimisation: IMO you can optimize it for 486, or Pentium, as proably there are no computers with Windows working on 486, but proably there could be some people who would need to use it eg. on Pentium 133. I am using P266MMX (don't laugh Smile ), so eg. I can't run any code that uses SSE2.
Post 17 Sep 2003, 17:22
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
to decard:
You can post your changes to strlib, as often as you want. Just pack it in ZIP or RAR format and attach it to your post. I will download it and insert in the next "official" release. Of course if I, or someone else from the team needs some special string function we will post here a request. That both: StrCap and StrPos are good hit IMO. About search functions I think about some pattern matching function. Something like regular expresions in the Perl (if you don't know what is that, I can try to explain), but it is very hard to be written from scratch. Maybe it's possible to find some examples or libs with open source. Try to ask on win32asm board.

regards.
Post 17 Sep 2003, 17:26
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
When I looked at discution in "conference" thread, it occurs to me, that probably we will need some "word" functions:

proc WordCount, hString, hSeparators
proc ExtractWord, hString, WordNum, hSeparators

In this functions word separators should be set of chars, not single char.
Post 17 Sep 2003, 17:48
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
John,
OK, I will post StrLib tomorrow, when I will add some comments, and info about my routines (now I should do my homework, heh Very Happy). I'll post it in Windows forum, as it not only assigned to Fresh.
Unfortunately I don't have any idea about that regural expressions in Perl (and about the Perl Sad), so you could write what exactly do you need. Last time I was on win32asm a long time ago, I am not even subscribed there (yes, I know I should). I will subscribe when I will have some more time.

To the team, about the systemization of StrLib: IMO function names should begin with Str, eg. StrCopy, StrNew, etc. That would make them easier to remember, and if user would see "StrXXX", he would know that it is a part of StrLib.
Also, different functions get their string parameters in different registers (eg NewStr in edi, and StrLen in eax). IMO it should also be systemized (meaby to pass string parameters in edi?) I that it would make additional fork for you (changing the names), but I thing it is worth coding. What do you think about it?

regards,
Decard
Post 17 Sep 2003, 17:50
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
Quote:
Unfortunately I don't have any idea about that regural expressions in Perl (and about the Perl Sad), so you could write what exactly do you need.


Well, regular expressions are patters matching algorithm. Something like wildcards in filename searches, only more, more complex. For example you can make search of "something begining with digit, with length between 5 and 9 symbols and 3th symbol to be X". Unfortunately the full RE search algorithm is too complex, so I think we must forget about it for a while. For now Word functions will be enough.

Quote:
To the team, about the systemization of StrLib: IMO function names should begin with Str, eg. StrCopy, StrNew, etc. That would make them easier to remember, and if user would see "StrXXX", he would know that it is a part of StrLib.
Also, different functions get their string parameters in different registers (eg NewStr in edi, and StrLen in eax). IMO it should also be systemized (meaby to pass string parameters in edi?) I that it would make additional fork for you (changing the names), but I thing it is worth coding. What do you think about it?


I tend to think that we must make all functions with StdCall convention using "proc" macro. It's true, that this is more slow, but it will be more standard. I am ready to remake whole project to use this string functions. It's not for first nor for last time I think. Very Happy
Post 17 Sep 2003, 18:06
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
Fine, I'll convert those functions to the stdcall, and post the StrLib when finished. I will also change their names to StrXXX format, ok?
I will leave NumToStr by now, it requires more work than just changing to stdcall. I will try to post it tomorrow, but I don't know whether it would be possible.

I don't understand one thing about those "word" functions. What is hSeparators? Is it a string containging chars that can separate the words (eg. " -=+,")?

sorry that I'm asking about almost everything, but I just want to do it good. Very Happy

regards
Post 17 Sep 2003, 18:51
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
decard wrote:
I don't understand one thing about those "word" functions. What is hSeparators? Is it a string containging chars that can separate the words (eg. " -=+,")?


Exactly. Smile The "word" is part of the string that is enclosed in some chars from hSeparators string OR from begin or end of the string.

Good night.
Post 17 Sep 2003, 19:43
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
John,
that's again MakeName, this time it is changed to work with stdcall version of StrLib.

Code:
proc MakeName, ptrTName
.new_str dd ?
.buf rb 12   ; the number can have max. 11 digits, it should be enough
  enter
       push    ebx ecx esi edi

 xor     eax,eax                 ;   need to clear the buffer because
        mov     dword[.buf],eax         ;   NumToStr doesn't put NULL
      mov     dword[.buf+4],eax       ;   after the converted number
      mov     dword[.buf+8],eax       ;

       mov     ebx,[ptrTName]
      inc     dword[ebx+4]            ; increase number in TName struc
    mov     eax,[ebx+4]
 mov     ecx,10
      lea     edi,[.buf]
  call    NumToStr                ; convert the number into a string

      mov     ebx,[ptrTName]
      mov     eax,[ebx]
   stdcall StrDup,eax              ; duplicate preffix
 lea     ebx,[.buf]
  stdcall StrCat,eax,ebx          ; append number to the preffix
      pop     edi esi ecx ebx
     return    
Post 19 Sep 2003, 05:25
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3498
Location: Bulgaria
Thanks.
Today I will rewrite Fresh to use new lib.
Post 19 Sep 2003, 05:44
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.