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 ...
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 ...
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 ...
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-...
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 ...
41
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), ...
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 ...
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 ...
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 ...
38
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 ...
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 ...
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 ...
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 '...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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,...
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 ...
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 ...
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 ...
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....
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....
21
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
8080 × 83z80 × 18
assembly × 14
game-boy × 8
intel × 7
altair-8800 × 7
history × 6
emulation × 6
8085 × 6
arcade × 5
hardware × 4
instruction-set × 4
cp-m × 4
6502 × 3
basic × 3
8-bit-microcomputers × 3
8086 × 3
graphics × 2
memory × 2
cpu × 2
x86 × 2
microprocessor × 2
interrupt × 2
80386 × 2
disassembly × 2