flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > May be it's time to make more than 1 instruction in string?

Author
Thread Post new topic Reply to topic
Zetus



Joined: 03 Jun 2004
Posts: 37
Zetus
May be it's time to make more than 1 instruction in string?
Sometimes its good to group some instructions...
this code:
mov al,[esi]
mov ah,[edi]
or ah,ah
je .n1
cmp al,ah
jne .n2

is better to see as:
mov al,[esi] mov ah,[edi]
or ah,ah je .n1
cmp al,ah jne .n2

One string - one *functional instruction*.?
Post 14 Sep 2006, 11:03
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
Post 14 Sep 2006, 11:08
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Zetus, that leads to pretty ugly spaghetti code... if you want that kind of mess, check out RosAsm.
Post 14 Sep 2006, 11:31
View user's profile Send private message Visit poster's website Reply with quote
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
al=[esi] ah=[edi] test ah jz .n1
cmp al,ah jne .n2

if you like this kind of mess check out Octasm,also Rosasm and the special version of fasm allow multiple instructions per line.
Also take a look to Terse.
Post 14 Sep 2006, 12:27
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:  


< 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.