Re: Formatting in assembly



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

.