Questions tagged [z80]

The Zilog Z80 microprocessor. Prefer [game-boy] instead for questions about the Game Boy CPU nicknamed the ‘GBZ80’.

Filter by
Sorted by
Tagged with
5
votes
2answers
2k views

Why did TI-8x calculator series use the Z80 processor?

Many early Texas Instruments calculators used a Z80 processor. The Z80 is notoriously limited when it comes to mathematical calculation. For example, while it can do addition, multiplication must be ...
19
votes
4answers
4k views

Why is the Z80's supply pin in the middle of the data pins?

I recently came across this question, Why are IC pinouts often so illogical?, which asks: Another example - the Z80's data bus: I mean, that one just makes no sense to me whatsoever. Not only are ...
33
votes
3answers
4k views

What are the registers W and Z inside a Z80?

Looking at the Z80's architecture diagram, there is the obvious register file in pink near the middle of the diagram. But four of those registers are not usable by programmers. Those are W, W', Z and ...
28
votes
4answers
14k views

How did 8 bit processors perform 16 bit arithmetic?

How did 8 bit processors such as the Z80 and 8080 perform 16 bit arithmetic? They have an 8 bit data bus, so how does the ALU perform 16 bit arithmetic on the register pairs? Z80 architecture diagram ...
22
votes
4answers
4k views

Why does the Z80 include the RLD and RRD instructions?

The Z80 has an instruction RLD, which apparently treats the lower 4 bits in the accumulator and the full 8 bits in (HL) as a twelve bit integer which it then rotates left by 4 bits. The carry flag ...
6
votes
3answers
709 views

Which Z80 opcodes can I use without a stack?

Quick question, as the title implies. I'm in the process of writing an 'OS' for my DIY Z80 computer and one of the things I need to do to help debug any issues during the boot process is send a ...
9
votes
2answers
2k views

Did Microsoft BASIC ever use Z80 only instructions?

Did Microsoft BASIC (or any of the OEM versions) ever use Z80 only instructions? For the purposes of this question I'm ignoring the equivalent of BIOS I/O layers which OEMs would have provided.
9
votes
1answer
606 views

Is S-100 alive?

1) Is S-100 still supported or available for serious home brew? Does anyone still actively sell new boards, cases, designing, support, etc? If not, then about what year did S-100 development stop? 2) ...
14
votes
1answer
483 views

Zilog's relationship with Mostek

The Wikipedia page on Mostek, one of the original fabricators of Z80 chips, includes the following claim: When Vin Prothro, President, and L. J. Sevin, Chairman of the Board, discovered that ...
96
votes
9answers
35k views

Why do C to Z80 compilers produce poor code?

When reading some other questions about compiling C for the Z80, How much benefit should be expected on a more advanced compiler for z80/r800 based computers? Native C compiler for Sinclair ZX ...
3
votes
1answer
650 views

Can't get the AY-3-8913 sound chip to work with my z80 (added schematic)

I'm trying to get the ay-3-8913 sound chip to work with my z80 but so far I haven't gotten any sound output yet. I know the chip, my amp circuit and the clock circuit work because it works when I ...
6
votes
1answer
614 views

Z80 ctc gold ICs speed

Does anyone have any information on what is the maximum speed for the gold ceramic z80 CTC?
14
votes
3answers
3k views

Why do only the low 7-bits of the R register increment?

On the Z80 the R register is 8 bits wide, as evidenced by LD A,R and LD R,A And every M1 cycle, R increments by 1. But the uppermost bit does not participate in this increment. R will not go from 0x7F ...
11
votes
2answers
952 views

ZX BASIC REM statement overhead

Since my other question has been answered and has given me a way to do high-precision timing, I've been experimenting with it a bit. The first thing I did was write a simple benchmark using the FRAMES ...
19
votes
5answers
2k views

Uptime in ZX BASIC

How can I obtain the uptime of a Sinclair ZX Spectrum machine (ZX48, ZX128, or Pentagon clone) via their BASIC interpreter? Specifically, the same value used by RANDOMIZE 0 to seed its PRNG. I would ...
6
votes
4answers
2k views

What are some example uses of the Z80's BUSRQ/AK pins?

What are some examples of devices that would use the Z80's bus request input? From the technical manual re. BUSRQ: Input, active low. The bus request signal is used to request the CPU address bus, ...
25
votes
4answers
14k views

Z80 x 6502 raw performance

A lot have been said in the internet about the 6502 at 1MHz being roughly equivalent in performance to the Z80 at 4 MHz. Is said that the Z80 have a typical 4 clock ticks per instruction while the ...
4
votes
4answers
1k views

When did the Z80 compatibles reach very high clock speed?

In the early eighties, the Z80B and Z80H at 6 and 8 MHz respectively, were released. In 1985, the Hitachi HD64180 reached 10 MHz (with some enhancements such that it seems to be reckoned the ...
8
votes
1answer
655 views

Breakeven number of bytes for programmable DMA

Contemporary with the old 8-bit chips, existed powerful but unsung programmable DMA controllers like the Zilog 8410 and the Intel 8257, that could copy data from one memory location to another, much ...
9
votes
4answers
3k views

How do Z80 Block Transfer instructions work?

I'm familiar with the Hitachi 6309's block transfer instructions (TFM). It can work as a "poor man's" DMA controller or Blitter, and is one of the things that makes the 6309 the best 8-bitter of all ...
40
votes
6answers
7k views

Did any computers use the Z80B?

The Z80 was one of the most popular CPUs of the seventies and eighties. In almost all cases that I know of, the version used was the Z80A, rated for 4 MHz, sometimes clocked a little slower in order ...
5
votes
1answer
1k views

How much faster is the Z80H?

The Z80A, rated for a maximum clock speed of 4 MHz, was a very widely used CPU in the 8-bit era. The Z80H, introduced in 1986, was rated for a maximum clock speed of 8 MHz. This would at first glance ...
6
votes
1answer
530 views

How does the SAM Coupé refresh its RAM?

The SAM Coupé was a ZX Spectrum compatible computer with a 6MHz Z80, 256K RAM minimum, enhanced graphics and sound and an improved BASIC amongst other features. My question is about its memory. The ...
29
votes
4answers
8k views

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

In a Zilog ad from 1976 comparing the Z80 and Intel 8080, the following table is presented: What is the difference here between "Instructions" and "OP Codes"? In my experience, the two terms are ...
11
votes
3answers
1k views

z80 crashes after executing some instructions

I'm building my own Z80 computer but I'm having a very strange problem. Consider this code: ld a,0xaa out (00),a jp a That works as expected, outputting 0xaa on port 0x00. Now consider this code: ...
40
votes
10answers
13k views

Fastest non-emulated CP/M Z80-based computer ever built?

What were the fastest CP/M computers ever built? I'll restrict this to the Z80 variant of CP/M, no CP/M-86, CP/M-68k etc. Z80 compatibles with higher clock frequencies or more instructions/clock or ...
25
votes
4answers
5k views

Z8410 DMA chip as GPU?

There are basically two ways to design a 2D graphics system: Provide lots of hardware support in the form of tiles, hardware scrolling and sprites, to put together each frame on the fly from a small ...
13
votes
7answers
3k views

Z80 and video chip contending for random access

Back in the 8-bit days, I used 6502 computers, where the story about memory access was easy to understand. RAM chips of the late seventies and early eighties could do 2 MHz (or a bit more e.g. 2.6 in ...
9
votes
3answers
1k views

Game cartridges on the S-100 bus?

Many Z80 computers in the seventies and early eighties used the S-100 bus, into which you could plug many kinds of expansion cards. Would it have been possible to plug suitably designed game ...
17
votes
4answers
5k views

How fast is memcpy on the Z80?

I gather the fastest way to implement memcpy (copy a certain number of bytes from one place in memory to another) on the Z80 is to use an instruction called LDIR. But how fast is the result, when ...
24
votes
2answers
4k views

How did Z80 multiprocessing work in the Namco Galaga hardware?

Galaga was a popular arcade game developed and released by Namco (Midway in N. America) in 1981. It had amazing, fast, smooth 2D-sprite graphics, and relied on Namco hardware that utilized 3 Z80 CPUs ...
15
votes
11answers
3k views

Commercially available computer with single-step feature?

Was there ever a commercially available hobbyist/teaching computer with the ability to single-step the processor? Maybe a Z80-based machine?
18
votes
5answers
4k views

Why does the Z80 have a half-carry bit?

The Z80 apparently had a 4-bit ALU, and computes 8-bit values in two stages. The half-carry bit preserves the carry from bits 3 to 4. Why did the designers of this chip choose to preserve that value ...
31
votes
2answers
3k views

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

When RAM is at a premium, as it was in the old days, a greater code density of an instruction set can be a substantial advantage. (Click saver: Code density refers loosely to how many microprocessor ...
24
votes
5answers
4k views

DIY Project using 1970s 8-bit CPU, is it possible?

I've recently really wanted to try and design a computer system around a retro 8-bit CPU such as the Zilog Z80 or the Intel 8080, and I would appreciate some sanity checks! I was inspired by Ben Eater'...
22
votes
7answers
2k views

Separate code and data address spaces on the Z80

Reading through the Z80 datasheet, I noticed something interesting. The Z80 separates its instruction execution into separate phases (which are called "machine cycles" in the official literature, but ...
9
votes
2answers
1k views

ZiLOG Z80 fan-out (CMOS version, Z84C0006PEC)

I am building a z80 based 8 bit computer, and I really don't want to fry my chip. I was looking at this datasheet, but I couldn't find the fan-out specified. There are some electrical characteristics ...
7
votes
2answers
701 views

Can I power a z180 with 3.3v [closed]

I'm planning to buy a Z8018006PSC. A z180 CPU (which I found is compatible with the z80 and has some advantages, for instance, able to address up to 1MB of RAM). I'm planning to use it together with ...
17
votes
3answers
4k views

How much did the 6502 and Z80 cost?

It is said that the 6502 was cheaper than the Z80. As of 1978, what were the actual prices of the two chips, in wholesale quantity?
9
votes
1answer
547 views

When were the various frequency Z80 CPUs introduced?

The Z80 was introduced, as I understand it, at a clock speed of 2 MHz. Later, Z80-based computers at 3.5 MHz started showing up. In what year did this faster clock speed become available? (In ...
6
votes
1answer
593 views

pop af and flags

I'm writing a Z80 emulator in Swift for Mac OS and I have got as far as implementing the 16 bit pop instruction. The documentation I have found (i.e. The Z80 CPU User manual UM008011-0816 and also ...
11
votes
1answer
795 views

On the Z80, how can we use LD instead of JR?

The Galaksija ROM disassembly has a link to "A tutorial on how to use "ld" instructions instead of "jr" and save a few bytes in the process." My question is how does this work! It can see at l038ch ...
19
votes
2answers
2k views

First computer emulator in Windows

I released my ZX Spectrum emulation Wspecem, and GPL sources first time publicly in the Internet at large, the 15th May 1996, for Windows 95. I am quite sure it was the first ZX Spectrum emulation ...
8
votes
1answer
1k views

z80 CPU User Manual AND P/V Flag

I'm writing an emulator for the z80 CPU using the "z80 CPU User Manual" from zilog.com as reference. When I got into the AND operator I got confused. In the Condition Bits Affected is declared "P/V ...
5
votes
2answers
826 views

What does the blinking of the cpu address bus actually means?

I'm currently running NOP on a Z80A cpu. All it does it flash some led, I expected it to flash 1 by 1. The led are place from address 16-0
1
vote
1answer
370 views

How to I give instructions to a Z80 CPU [duplicate]

I found a Z80 CPU lying around my house. I've search all over the Internet but I still don't know how do I input stuff and tell it what to do. Help me please
21
votes
3answers
6k views

Wiring a Zilog Z80

I've recently got hold of an old Zilog Z80 microprocessor and I know how to clock and test it. I do not however know how to connect RAM, I/O ports, control switches (for programming instructions into ...
24
votes
4answers
4k views

How did the Apple II forward binary instructions to the Z80 software card with CPM?

Microsoft produced the Z80 Softcard for the Apple II enabling it to run CPM and many Z80 binary programs. This seems to be an unthinkable achievement. (For a kid who had an Apple IIe but was only a ...
55
votes
8answers
9k views

How were Western computer chips reverse-engineered in USSR?

The British ZX Spectrum computer had many clones in the Eastern Bloc. It seems many of them were built using Russian-made chips from the Angstrem factory in Zelenograd in/near Moscow. The Russian ...
29
votes
2answers
5k views

Why did Sinclair choose the Z80 for its range of home computers?

The Sinclair computers are known for their low cost compared with other computers that were popular in the early 1980s. This is why they had membrane keyboards, or that rubber stuff in the case of the ...