Re: Formatting in assembly
- From: "sevagK" <kahlinor@xxxxxxxxx>
- Date: 30 Mar 2006 22:52:18 -0800
It's a matter of opinion, I think.
Personally, this style hurts my eyes. It's easier/faster for me to
read code vertical than horizontal.
There are several instrcution/combos that are worthwile to combine into
a single line:
multiple push
multiple pop
invoking/call with arguments
any instruction that changes flags register combined with jcc
I would definitely avoid things like this:
movzx ebx,B$esi | sub ebx,'0'
mov edx,10 | mul edx | add eax,ebx
It just looks terrible! By the time I can mentally separate these
lines, I could have read 3 times as many lines had you written them 1
instruction to a line.
However, this is okay:
test eax,eax | jnz L0<
Overall, your NASM presentation is much better. The code is easier to
read and understand.
-sevag.k
www.geocities.com/kahlinor
.
- References:
- Formatting in assembly
- From: James Daughtry
- Formatting in assembly
- Prev by Date: Re: GDI can be fast!
- Next by Date: Re: Why use assembly?
- Previous by thread: Re: Formatting in assembly
- Next by thread: Re: Formatting in assembly
- Index(es):