3 ms·
>the Zilog Z80, is an early ancestor of x86! The Z80 is an enhanced clone of the Intel 8080, which of course the 8086 was heavily based on I owned an Z80 based
by DeathArrow 4y ago
>the Zilog Z80, is an early ancestor of x86! The Z80 is an enhanced clone of the Intel 8080, which of course the 8086 was heavily based on
I owned an Z80 based computer when I was 8 to 10 years old. Its instruction set and memory access does not have any
resemblance for me with 8086.
They seem like very distant relatives.
- klelatti 4y agoThe 8086 was designed to allow automated translation of 8080 assembly to 8086 assembly - so the instruction set may ‘look’ different but in fact has a lot in common. Not quite right too to call the Z80 an ancestor of the 8086 but certainly closely related due to the common inheritance from the 8080.
- NobodyNada 4y agoYeah, perhaps more of an uncle than a direct ancestor :)
- bonzini 4y agoApart from unique functionality such as the separate I/O port bus and the ability to access the 16-bit registers' two 8-bit halves, there are quite a few instruction encoding quirks that reveal the ancestry of the 8086: * the x86 encodes the first four registers in the order AX, CX, DX, BX. This roughly matches the Z80 ordering of AF (accumulator), BC (used as counter for string operations), DE (no particular purpose), HL (the "main" address register). * PUSH/POP operate only on 16-bit registers * the encoding of flags (SZ0H0P1C on x86, SZuHuPNC where u is undocumented on Z80). The "auxiliary carry" and instructions such as DAA, and the "parity" flag, are particularly weird and common to both Z80 and 8086. Flags exclusive to the 8086 (interrupt, direction, overflow) are kept in the high bit of the flag register, so that the LAHF instruction makes AX look like the Z80 AF register. * the eight conditional jumps of the Z80 are encoded in the same order in the 8086 (C<NC<Z<NZ<S<NS<PE<PO; the 8086 fits 8 more conditions in the holes)