top | item 46255007

Z8086: Rebuilding the 8086 from Original Microcode

51 points| nand2mario | 2 months ago |nand2mario.github.io

24 comments

order

tasty_freeze|2 months ago

Despite what the article says, the 68000 was microcoded too. Another difference is that the 68K was a 32b architecture, not 16b, and that required investing more transistors for the register file and datapath.

ErroneousBosh|2 months ago

Not only was it microcoded, but it was sufficiently divorced from the assumptions of the 68000 instruction set that IBM were able to have Motorola make custom "68000-based" chips that ran S/370 code directly.

Want a different architecture? Sure, just draw it with a different ROM. Simple (if you've got IBM money to throw around).

jecel|2 months ago

The 68000 actually had both microcode and nanocode, so it was even further from hardwired control logic than the 8086. In terms of performance the 68000 was slightly faster than the 286 and way faster than the 8088 (I never used an 8086 machine).

retrac|2 months ago

Not for the data path; the 68000 operates on 32 bit values 16 bits at a time, both through its external 16 bit bus and internal 16 bit ALU. Most 32 bit operations take more cycles. But yes, it has a 32 bit programming model.

CodeWriter23|2 months ago

"Oddball string instructions", as an assembler coder bitd, they were a welcome feature as opposed to running out of registers and/or crashing the stack with a Z-80.

tasty_freeze|2 months ago

The Z80 had LDIR which was a string copy instructions. The byte at (HL) would be read from memory, then written to (DE), HL and DE would be incremented, and BC decremented and then repeated until BC became zero.

LDDR was the same but decremented HL and DE on each iteration instead.

There were versions for doing IN and OUT as well, and there was an instruction for finding a given byte value in a string, but I never used those so I don't recall the details.

MarkusQ|2 months ago

Did anyone else read the headline and think....Zilog? WTF?

rep_lodsb|2 months ago

Yes, with that name it really should have an emulation mode similar to the NEC V20/V30 (although that one only did 8080, not Z80)