by shadowofneptune · 3y ago · 0 comments
Alternatively, the 'rep' prefix would be interesting.
So basically:
repeat: rep
cs:
scasb
jcxz done
jmp short repeat
done:LEA also gets the "register + offset" thing done in a single instruction instead of two (MOV + ADD). It's also really easy for both assembler programmers and (dumb) compilers.
The "run in parallel" stuff is you looking at modern(ish) CPUs and thinking the original 8086 looked anything like that inside.