flat assembler
Message board for the users of flat assembler.
Index
> Main > Binary simplification |
Author |
|
revolution 24 Mar 2008, 05:36
Code: shr ebp, 5 ;ebp/32 add ebp, 7 ;ebp/32+7 shl ebp, 2 ;(ebp/8)&0xfffffffc+28 sub ebp, 8 ;ebp/8+20 Code: shr ebp,3 and ebp,0xfffffffc add ebp,20 |
|||
24 Mar 2008, 05:36 |
|
AlexP 24 Mar 2008, 05:46
Wow, thanks! I'll definitely start learning some of those tricks.
|
|||
24 Mar 2008, 05:46 |
|
r22 24 Mar 2008, 14:12
Architecture wise you can simplify that instruction sequence even further with...
Code: SHR ebp,5 LEA ebp,[ebp*4+20] |
|||
24 Mar 2008, 14:12 |
|
AlexP 24 Mar 2008, 14:33
No, I think I'll stick with:
Code: shr ebp, 3 add ebp, 20 |
|||
24 Mar 2008, 14:33 |
|
r22 24 Mar 2008, 23:35
Correct(127):
127/32{SHR x,5} = 3 + 7 {ADD x,7} = 10 * 4 {SHL x,2} = 40 - 8 {SUB x,8} = 32 Fail(127): 127/8 {SHR x,3} = 15 + 20 {ADD x,20} = 35 AlexP Its NOT equivalent to your initial sequence of instructions. |
|||
24 Mar 2008, 23:35 |
|
AlexP 24 Mar 2008, 23:43
Should have specified, it fits the purpose of my code.
|
|||
24 Mar 2008, 23:43 |
|
ic2 25 Mar 2008, 03:54
I always thought the usage of LEA shows a lot of garbage code in the registers but provide a added special something specially when dealing with encryption. Just wondering out loud. I'll talk logic by September...
|
|||
25 Mar 2008, 03:54 |
|
daniel.lewis 25 Mar 2008, 05:27
I hope your idea is what you think it is.
I stopped worrying about encryption after I decided my Beale Ciphers were strong enough. _________________ dd 0x90909090 ; problem solved. |
|||
25 Mar 2008, 05:27 |
|
AlexP 25 Mar 2008, 18:36
Depends, what source are you using for key?
|
|||
25 Mar 2008, 18:36 |
|
daniel.lewis 25 Mar 2008, 23:36
If I told you I'd have to kill you.
Let me say though, that any data can be used to cipher something. Any data from anywhere on any disk or network. I recommend a widely varied set of data from different places if you really care. _________________ dd 0x90909090 ; problem solved. |
|||
25 Mar 2008, 23:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.