Email or username:

Password:

Forgot your password?
Top-level
Ken Shirriff

Arithmetic and logic instructions use the ALU (Arithmetic/Logic Unit). But incrementing/decrementing the memory pointers doesn't use the ALU. Instead, it uses a special adder that calculates memory addresses. A "Constant ROM" holds the values (-6 to +2) that need to be added.

4 comments
Ken Shirriff

For more about the implementation of the 8086's string instructions, including a detailed walkthrough of the microcode, see my blog post:
righto.com/2023/04/8086-microc

Greg Kemp

@kenshirriff Fun with MOVS: x86 supports self-modifying code, but what about self-modifying _instructions_? Turns out with MOVS you could do self-modifying instructions.

Amand Tihon

@kenshirriff Thank you! I love your articles on the 8086! Just one remark: the 20 bit address bus gives access to 1 megabyte, not 4.

Go Up