flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Calculate string len and split cmp parts. |
Author |
|
revolution 10 Jun 2023, 15:08
Use a hash of the string as an identifier.
Or: Code: rep cmpsb |
|||
10 Jun 2023, 15:08 |
|
Roman 10 Jun 2023, 15:11
Quote: rep cmpsb Then I must using edi,esi,ecx. Sometimes its not handful. If I have three words I must do three times rep cmpsb I found memcmp str1,str2,len |
|||
10 Jun 2023, 15:11 |
|
bitRAKE 11 Jun 2023, 13:02
There is this pattern I like to use: It consists of building a string on the stack (in reverse part order), and then I gather all the parts together:
Code: macro MULTICATA ; 21 bytes local more_strings, more_characters, no_more_strings more_strings: pop rcx jrcxz no_more_strings more_characters: mov al, [rcx] inc rcx test al, al jz more_strings mov [rdx], al inc rdx jmp more_characters no_more_strings: mov [rdx], cl end macro Would it help to programmatically construct your comparison target values on the stack, and then perform the comparison? I am perhaps completely wrong and have wasted your time. |
|||
11 Jun 2023, 13:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.