Hot answers tagged

97 votes
Accepted

Fixing obscure 8080 emulator bug?

The General Advice Answer For a failure that happens so quickly (at most 89 instructions) I'd recommend simply looking at what your emulator does at each instruction and determine if did everything ...
user avatar
55 votes
Accepted

How did the Z80 instruction set differ from the 8080?

For the most part the Z-80 extends the 8080 instruction set. If we consider just the 8080 instructions themselves there are a few incompatibilities: Overflow flag. On the 8080 bit 2 of the flags ...
user avatar
53 votes
Accepted

The start of x86: Intel 8080 vs Intel 8086?

8086 was designed to make asm source porting from 8080 easy (not the other direction). It is not binary compatible with 8080, and not source-compatible either. 8080 is not an x86 CPU. 8080 is a ...
user avatar
  • 2,231
42 votes
Accepted

How does this 8080 code perform division with remainder?

As was said in the comments, this is the binary long division algorithm. The long division is performed by carefully juggling the bits between the registers and the carry flag. The algorithm is ...
user avatar
  • 17.2k
39 votes

Were people building CPUs out of TTL logic prior to the 4004, 8080 and the 6800?

It was very common to build CPUs out of TTL logic prior to the 4004, 8080 and the 6800. This was the standard way to build later minicomputers. Examples are the Data General NOVA, Xerox Alto and TI-...
user avatar
39 votes
Accepted

How did 8 bit processors perform 16 bit arithmetic?

In the case of the Z80, the ALU is only 4 bits wide. That's no problem, since the internals of the CPU are controlled by a program internal to the processor, called the microprogram (or microcode), ...
user avatar
  • 34.8k
38 votes
Accepted

What is the relative code density of 8-bit microprocessors?

An instruction set can be considered as a Huffman coding of an idealised instruction stream. So the question is really asking which CPUs have a good balance of short encodings for common tasks to ...
user avatar
  • 9,380
38 votes

8080 vs. 8086 - Are 16 Bit CPUs bloaty by nature?

[Preface: This is neither about discussing programming tricks nor how some changes could squeeze out a byte or two. Code can often be optimized by narrowing down the environment. The examples are ...
user avatar
  • 173k
38 votes
Accepted

Why did the Z80 break 8080 compatibility?

The designers of the Z80 thought it would be useful for code to quickly determine whether signed arithmetic operations overflowed. There were a few ways they could have accommodated this: Add a new ...
user avatar
  • 28.1k
36 votes

How did 8 bit processors perform 16 bit arithmetic?

How did 8 bit processors such as the Z80 and 8080 perform 16 bit arithmetic? Same way one adds multiple digit numbers on paper. One digit (-pair) at a time and iterating over all digits while ...
user avatar
  • 173k
36 votes

In the Intel 8080, where does the "Stack" start?

The stack starts wherever you as the programmer choose to initialize it to. Note that the stack grows downwards (i.e. towards lower memory addresses) so you would normally initialize the stack pointer ...
user avatar
35 votes
Accepted

Bit one of the Intel 8080's Flags register

Did bit one of the Intel 8080's Flags register, the bit between the carry and parity flags, get set to one on startup? TL;DR: No, as there is no flag register on the 8080. Only separate flags. The '...
user avatar
  • 173k
34 votes
Accepted

What's the difference between "opcode" and "instruction" in this Zilog ad?

The definition of "instruction" and "OP code" (aka operation code) is a bit fuzzy because it depends on how humans view the CPU. So the designers and their marketing department mostly get to pick the ...
user avatar
  • 9,380
33 votes
Accepted

Why are the Intel 8080's rotate instructions called opposite to intuition?

What historical reason is there for these instructions being called that? "Historical Reason" is the right key word here, as ... TL;DR: It's Piled Up Heritage The 8080 inherited the ...
user avatar
  • 173k
32 votes

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

... a scaled-down, cost-reduced, clone of the Intel 8080. The Z80 had a massively extended instruction set, featured more addressing modes and had more registers than the 8080. It also had a built-in ...
user avatar
30 votes

Why did the Z80 break 8080 compatibility?

Would providing full 8080 compatibility have interfered with or made more complicated implementing new features the Z80 designers wanted? It would have made it impossible. Any extension adding ...
user avatar
  • 173k
26 votes
Accepted

Were people building CPUs out of TTL logic prior to the 4004, 8080 and the 6800?

Here is an homebrew / educational computer made of LSI / MSI chips : http://www.kenbak-1.net/index.htm Designed in 1971 256 bytes of memory made of MOS shift registers.
user avatar
  • 1,446
26 votes

In the Intel 8080, where does the "Stack" start?

Would anyone mind helping me out where the "Stack" start on an Intel 8080? After Reset content of the stackpointer is undefined. Keep in mind, these are early 8 bit machines. There is no huge ...
user avatar
  • 173k
26 votes
Accepted

When did the Altair move ROM to the top of memory?

It didn't move anything. There is no ROM at the beginning of memory. As the system did not include any code in ROM at all by default, ROMs were optional and usually placed at the end of memory. ROM is ...
user avatar
  • 17.9k
25 votes

The start of x86: Intel 8080 vs Intel 8086?

To supplement @PeterCordes's excellent answer, I thought it would be worth going into the details of exactly how close to source code compatible the two processors are -- for example, how easy would ...
user avatar
  • 12.4k
25 votes
Accepted

Why do the i8080 I/O instructions take a byte-sized operand to determine the port?

I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports. The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller. (Maybe the system you're playing with does have ...
user avatar
  • 173k
24 votes
Accepted

Z80 to x86 asm translator?

I'm going to say "No" simply because the 8086 doesn't support the alternate registers of the Z80. That was a fairly important concept that you can not directly mimic on the 8086. Mind, if ...
user avatar
  • 10.9k
22 votes
Accepted

Details of video memory access arbitration in Space Invaders

Space Invaders uses a simple display format where bytes are read from memory in order via an address counter, and shifted out via a shift register. Timing is controlled by discrete hardware. The ...
user avatar
  • 14k
22 votes

Are there other examples of CPU architectures mostly compatible with Intel 8080 other than Z80?

Foremost, there are direct continuations, CPU's able to execute 8080 code and (basically) hardware compatible, like the 8085, Intel's answer to the Z80, as it's mostly software and hardware compatible....
user avatar
  • 173k
21 votes

Intel 8080-based home computers

The 8085, which came out two years after the 8080, rapidly became more popular for most applications because it required only +5 V power (as opposed to +5/-5/+12 V) and less external support circuitry....
user avatar
  • 21.9k
21 votes
Accepted

Will disassembling an 8080 program as Z80 code work?

The Z80 is "binary compatible" with the 8080. It adds a bunch of new instructions, but places them all in unused (well, undocumented) opcodes. yes .. err, no, they placed them on redundant ...
user avatar
  • 173k
20 votes

How did the Z80 instruction set differ from the 8080?

This document calls out some differences: http://www.msxarchive.nl/pub/msx/mirrors/hanso/datasheets/chipsz80leventhal3.pdf Z80 uses P flag for 2's complement overflow, where 8080 does not DAA ...
user avatar
  • 1,565
20 votes

Were people building CPUs out of TTL logic prior to the 4004, 8080 and the 6800?

Hmm, an interesting question to be sure. It certainly would have been possible to make something like a 4004 style microprocessor from TTL chips. In fact, when Intel made their microprocessor, the ...
user avatar
  • 919
20 votes
Accepted

Test emulated 8080 CPU without an OS?

I'm actually not aware of any major 8080 test suites; everything I've ever found has been for the Z80 rather than its parent. That aside, I'd heavily suggest you don't discard the CP/M solutions you'...
user avatar
  • 32.5k
20 votes
Accepted

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

Possibly a simple logic trick. The slow path in addition is carry propagation (not the individual half-adders). You can thus often double the clock rate by pipelining the carry. If you pipeline the ...
user avatar
  • 7,814

Only top scored, non community-wiki answers of a minimum length are eligible