flat assembler
Message board for the users of flat assembler.

Index > Main > The most useless instruction

Goto page 1, 2, 3, 4, 5, 6, 7  Next
Author
Thread Post new topic Reply to topic
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
LOOP ?

everybody say it is slow and should be replaced by Jcc instr. ..

Which others instructions are "useless"?

_________________
Sorry if bad english.
Post 19 Jun 2011, 17:56
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

jecxz ?

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 19 Jun 2011, 20:20
View user's profile Send private message Send e-mail Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
xchg ebp,ebp
Post 19 Jun 2011, 20:28
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
ouadji wrote:

jecxz ?


Hmmmm ?

Would you rather

Code:
cmp ecx,0
je    .xxx
    

Post 19 Jun 2011, 21:07
View user's profile Send private message Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
edfed wrote:
xchg ebp,ebp

not so useless: a 2-bytes NOP Smile

_________________
Sorry if bad english.
Post 19 Jun 2011, 21:51
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Where is tom when we need him? Very Happy
Post 19 Jun 2011, 21:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
typedef wrote:
ouadji wrote:

jecxz ?


Hmmmm ?

Would you rather

Code:
cmp ecx,0
je    .xxx
    



maybe bc the common is

Code:
dec ecx
jz  .xxx    

?
it seems rare a cmp ecx,0 out of a loop.

_________________
Sorry if bad english.
Post 19 Jun 2011, 22:00
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
Code:
or ecx,ecx
jz mylabel    
I prefer "or/jz" to "jecxz"
with "jecxz" the jump is limited to 128 bytes, in many cases it's not enough.
There should be a "near version" of jecxz !
and it seems that it's faster too! (??)

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 19 Jun 2011, 22:41
View user's profile Send private message Send e-mail Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
lea is pretty pointless.
Post 20 Jun 2011, 03:33
View user's profile Send private message Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
jecxz is pretty useless if you use ebx as your counter Razz
Post 20 Jun 2011, 04:34
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
idle



Joined: 06 Jan 2011
Posts: 360
Location: Ukraine
idle
sub eax,eax
cmovnz eax,[eax]
Post 20 Jun 2011, 11:28
View user's profile Send private message Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
Tyler wrote:
lea is pretty pointless.

++++++++++++++1 Razz

_________________
Sorry if bad english.
Post 20 Jun 2011, 11:54
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
Quote:
lea is pretty pointless.

No way! It' saves alot of work for me :p
Post 20 Jun 2011, 12:17
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
lea is good, it means:

X=Y*scale+Z+Constant

then, it is not so pointless, it is some advanced signal processing instruction.
Post 20 Jun 2011, 12:35
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
"loop" is great instruction for programmers (also string instructions) it is not our fault they are slow. In most cases using "loop" makes your code readable and small.
For example FASM uses "non optimal" instructions all over the source, but it is still, the fastest assembler in the world.
How is it possible? Meditate on this. Smile
Post 20 Jun 2011, 12:45
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17667
Location: In your JS exploiting you and your system
revolution
FFREE

Does anyone actually use it in a beneficial way?
Post 20 Jun 2011, 13:46
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 360
Location: Ukraine
idle
fnop - dangerous nop ?
Post 20 Jun 2011, 14:44
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
I'd go for ud2 Laughing
Post 20 Jun 2011, 18:27
View user's profile Send private message Reply with quote
xleelz



Joined: 12 Mar 2011
Posts: 86
Location: In Google Code Server... waiting for someone to download me
xleelz
what is std and cld good for?
Post 21 Jun 2011, 01:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17667
Location: In your JS exploiting you and your system
revolution
xleelz wrote:
what is std and cld good for?
Both STD and CLD are good for getting you to visit the doctor.
Post 21 Jun 2011, 01:55
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3, 4, 5, 6, 7  Next

< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.