assembly - In a loop, dest address cannot apart from current address more than -128~+127 bytes, why? -
I am reading Assembly language for the book Intel based Computers Fifth Edition Repeat Labels:; Loop body dc cx; This instruction takes 1 byte jnz label; DC> Long JMP, 5 bytes Use as soon as there were mostly loops (are?) Very little-specific shortcut instructions were introduced to reduce the size (enough for 640kb): , the loop is a special "edge" case that I think does not use anymore Done (update: it It can be considered disliked, and it makes sense that the loop forces you to use the CX as a loop variable, so you can not make double loop or use another register. < P> Your question - What to do if your loop body is big:
The author said like TITLE, but they did not say it. Is this instruction relative to length? Think about this in the next way, making the loop necessary for you:
mov cx,
loop which only takes 2 bytes and works as a DC + small JMP
mov ax, 0 (3 bytes) With
xor ax, ax (1 byte) and so on
Comments
Post a Comment