flat assembler
Message board for the users of flat assembler.
Index
> DOS > String handling in assembly (Dos/Windows) |
Author |
|
Tommy 24 Jun 2003, 08:25
I just found out a little bit by testing myself, but I would really like a tutorial on how to use such string-tables as in FASM....I don't really now what it's called.... But here's an example (DOS):
Code: db "string1",0 dw label1 db "string2",0 dw label2 Well, I'm not sure if this is set up correctly, but the thing I want, is if a string = for instance "string1" then jump to label1 ...etc. Sorry, I'm stupid with it .... So long! Tommy |
|||
24 Jun 2003, 08:25 |
|
roticv 24 Jun 2003, 09:41
something like
Code: lea si, buffer cmp word ptr[si], 'ts' jnz _out cmp word ptr[si+2],'ir' jnz _out cmp word ptr[si+4],'g1' jnz _out cmp byte ptr[si+6],'1' jz label1 cmp byte ptr[si+6],'2' jz label2 _out: Untested |
|||
24 Jun 2003, 09:41 |
|
Vortex 24 Jun 2003, 09:53
Tommy,
Firt of all,thanks for your kind words.I am glad to see that my little application can be usefull. Actually,I use the GlobalAlloc function for my scanner.There are other memory allocation functions such as HeapAlloc,HeapCreate, CoGetMalloc from ole32.dll etc... There are alot of discussions about memory allocation strategies/functions;you can find them in the win32 message board. f0dder has a nice article about this subject on his website. A nice thread about string manipulation: http://board.win32asmcommunity.net/showthread.php?s=&threadid=13659 I think this thread can answer some of your questions. You need to use an array of pointers to access your strings;the thread explains all about it. My scanner reads the asm source file and checks if every line contains the substring "invoke". If the scanner finds an "invoke" command, then the API function coming after "invoke" is compared with all the exported names from the required DLLs.The rest is easy,the output is directed to a file with the "imp" extension. Regards, Vortex _________________ Code it... That's all... |
|||
24 Jun 2003, 09:53 |
|
Tommy 24 Jun 2003, 10:39
Thanks a lot!! I'm sure this will be helpful .... Thanks again! ....and...keep up the good work Vortex!!
So long! Take care! Tommy |
|||
24 Jun 2003, 10:39 |
|
Tommy 24 Jun 2003, 10:40
...and thanks to you too roticv....Nice example....
|
|||
24 Jun 2003, 10:40 |
|
The Lightning Stalker 07 Nov 2006, 02:00
Error 404 not found. ;-(
|
|||
07 Nov 2006, 02:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.