Skip to main content
98 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 ...
George Phillips's user avatar
59 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 ...
George Phillips's user avatar
56 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 ...
Peter Cordes's user avatar
  • 3,217
44 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-...
Ken Shirriff's user avatar
  • 1,133
44 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), ...
Omar and Lorraine's user avatar
44 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 ...
user3840170's user avatar
  • 23.1k
40 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 ...
Raffzahn's user avatar
  • 226k
39 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 ...
pndc's user avatar
  • 11.4k
39 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 ...
Raffzahn's user avatar
  • 226k
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 ...
supercat's user avatar
  • 37.2k
37 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 ...
Graham Nye's user avatar
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 ...
Raffzahn's user avatar
  • 226k
36 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 '...
Raffzahn's user avatar
  • 226k
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 ...
pndc's user avatar
  • 11.4k
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 ...
Martin Rosenau's 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 ...
Raffzahn's user avatar
  • 226k
27 votes
Accepted

Anyone up for decompiling some 8080 code for Kaleidoscope?

I had a look at the source and added a few comments (*1). Might not be the expected full high level abstract description, but should be still helpful as a first, tiny step to see its workings. Doing ...
Raffzahn's user avatar
  • 226k
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.
Grabul's user avatar
  • 3,657
26 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'...
Tommy's user avatar
  • 37.3k
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 ...
Raffzahn's user avatar
  • 226k
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 ...
Justme's user avatar
  • 33.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 ...
Jules's user avatar
  • 13k
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 ...
Raffzahn's user avatar
  • 226k
25 votes

Anyone up for decompiling some 8080 code for Kaleidoscope?

Thanks to @Raffzahn commented code (in his answer) I was able to port the code into simple C++ code: //--------------------------------------------------------------------------- const int VRAM_xs=64,...
Spektre's user avatar
  • 7,296
24 votes
Accepted

Is the Game Boy Sharp LR35902 object-compatible with the 8080/Z-80?

However, looking at some of the opcodes they don't seem compatible. There's your answer. The LR35902, the Z80 and the 8080 really are different CPUs. They are similar in many ways, such as the ...
Omar and Lorraine's user avatar
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 ...
Will Hartung's user avatar
  • 12.3k
23 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's user avatar
  • 15.3k
22 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 ...
PkP's user avatar
  • 959
22 votes

Were there any 8080 computers that used a bitmapped display?

Does anyone know of any bitmap-based 8080/8085 (or, failing that, Z80) computers? The Kyotronics 85, TRS-80 Model 100, NEC PC8201 and Olivetti M-10 were 8085 based notebook-style computers all based ...
Bruce Abbott's user avatar
  • 6,703
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....
Raffzahn's user avatar
  • 226k

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