flat assembler
Message board for the users of flat assembler.

Index > Main > the most usefull instruction:

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 10 Aug 2011, 00:46
i propose some instructions as participants to the most usefull instruction post.

0: adc

1: mov

2: jmp

3: call/ret

4: push/pop

5: feel free to propose your team of most usefull instructions


i made the adc instruction the most usefull because of many reasons.
i think it is possible to emulate a lot of instructions with functions made only with adc...
Post 10 Aug 2011, 00:46
View user's profile Send private message Visit poster's website Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz 10 Aug 2011, 02:05
lea, shr/shl, ror/rol, add/sub, inc/dec, cmp and int3 Razz jk
Post 10 Aug 2011, 02:05
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 10 Aug 2011, 05:33
That's a different topic: http://en.wikipedia.org/wiki/One_instruction_set_computer
Yes you can only use a single instruction, but looking at some statistics, http://www.strchr.com/x86_machine_code_statistics mov is the most useful in everyday computing.

Personally I love LEA and if its not the most useful it definitely is the most powerful instruction.

EDIT by DOS386 (2011-08-17) : fixed broken link
Post 10 Aug 2011, 05:33
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1619
Location: Toronto, Canada
AsmGuru62 10 Aug 2011, 12:58
I like:

SETxx
CMOVxx

These allow for branch-less code.
Post 10 Aug 2011, 12:58
View user's profile Send private message Send e-mail Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 10 Aug 2011, 13:09
AsmGuru62 wrote:
I like:

SETxx
CMOVxx

These allow for branch-less code.
CMOVxx-like instructions would be truly cool if there was a possibility to move immediate values.
Post 10 Aug 2011, 13:09
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 10 Aug 2011, 13:16
I agree, CMOVxx could be very useful if it were to allow more options. Shuffling all the registers around makes my head hurt and it doesn't usually give any performance benefits.
Post 10 Aug 2011, 13:16
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 10 Aug 2011, 19:27
My first thought was lea
Post 10 Aug 2011, 19:27
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 17 Aug 2011, 04:24
http://board.flatassembler.net/topic.php?t=5249 "top 20"
http://board.flatassembler.net/topic.php?t=13027 "useless"

> the most usefull instruction

LOADALL286 Shocked

> CMOVxx-like instructions would be truly cool if there was a
> possibility to move immediate values.

And even more if added in 80386 or even better in 8086, and if not PageFaulting if condition is false Crying or Very sad
Post 17 Aug 2011, 04:24
View user's profile Send private message Reply with quote
nop



Joined: 01 Sep 2008
Posts: 165
Location: right here left there
nop 18 Aug 2011, 11:04
of course the most usefull instruction is nop

garanteed to never produce unpredictable results

can sprinkle liberaly through code and replace with single byte interrupt for tracing and debuging
Post 18 Aug 2011, 11:04
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


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

Website powered by rwasa.