Questions tagged [z80]

For questions regarding the Zilog Z80 microprocessor

Filter by
Sorted by
Tagged with
6
votes
2answers
244 views

Why isn't the 'restrict' keyword useful in SDCC when compiling for Z80 target? [closed]

Context SDCC claims to support C11. I use it to write games on Z80 target (for fun and experience). C11 defines restrict C11 specifies the restrict keyword on pointers, which can improve generated ...
10
votes
3answers
2k views

Disable memory refresh on Z80

Is there a software method of disabling memory refresh on the Z80? Or would it be acceptable to create a hardware method of disabling the address bus during the refresh cycle? If I switch off the ...
38
votes
1answer
3k views

Z80 CPU address lines not stable

I just got a Z84C0020PEC and wired it up to test it, using this circuit: Except that I've added LEDs to A0 through A9. It appears that A0 through A6 operate correctly, but A7 though A9 (I've not ...
5
votes
1answer
265 views

How can I change the MSX function keys using ASM?

How can I change the texts assigned to MSX function keys using Z80 ASM?
4
votes
4answers
658 views

How slow is Z80 compared to Arduino Uno?

How slow is z80 compared to Arduino Uno when they read an output pin if the Z80 is 2.5Mhz?? I/O cycle and cpu herz and is there anything else to consider?
5
votes
1answer
149 views

What are examples of providing non-RST instructions for 8080 interrupts?

When a peripheral in an 8080 system generates an interrupt request and the 8080 acknowledges the interrupt, the peripheral is expected to put an instruction opcode on the data bus which the 8080 will ...
9
votes
2answers
897 views

Is there any difference between Т34ВМ1 and КМ1858ВМ1/3?

In the Soviet Union, Z80 compatibles were manufactured under at least the following designations: Т34ВМ1 КМ1858ВМ1 КР1858ВМ3 At least some of these were manufactured from the U880 masks that were ...
2
votes
2answers
279 views

Will the circuit work normally if different chip speeds (eg 8088-2 and 8255-1)

Old processors came out with support chips. That is, there was a family - the processor and its chips. Over time, the same kits came out with higher frequencies. Will the circuit work properly if ...
3
votes
5answers
411 views

How to teach the Z80 to count milliseconds and microseconds like Arduino?

I make a homebrew (for hobby) game console on Z80A, and I need help. Now I'm stuck - I need to be able to count milliseconds and microseconds in the code. For example, how it is done in Arduino : ...
3
votes
1answer
391 views

Z80N multiply compared to MC68000 [closed]

According to this answer (How did multiply instructions work in the various 68ks?) the MC68000 can take up to 70 clock cycles to multiply. The ZX Spectrum Next's FPGA based Z80N has a MUL DE ...
16
votes
1answer
612 views

In the original Z80 layout, where are the “traps” located? And what are their effects?

According to Zilog Oral History, Zilog only had a tight schedule to design the Z80. Facing the potential competition, Federico Faggin and Masatoshi Shima were worrying about Japanese semiconductor ...
13
votes
2answers
444 views

What is known about the internal workings of the Z80?

There is a wonderful project called Visual6502, and I've used it from time to time to figure things out, like exactly the difference between rti and rts. It is good to see which control lines were ...
2
votes
2answers
265 views

Sinclair ZX Spectrum with DivMMC load issue

I use a Sinclair ZX Spectrum Issue 2 with a DivMMC EnJOY! Pro One and the boot process shows no error and I'm even able to enter the file browser but if I choose any game/demo/program I get always ...
5
votes
4answers
753 views

How does the Z80 determine which peripheral sent an interrupt?

My understanding of how interrupts (and more specifically, interrupt daisy-chaining) works in the Z80 is limited, to say the least, so if I get anything wrong please correct me. Anyway, let's say I ...
23
votes
1answer
2k views

Where does the Z80 processor start executing from?

Strangely I can't find this information anywhere online -- I've thoroughly looked at the datasheet, and I've searched things like "Z80 program counter initial value" -- but I can't find anything! My ...
-2
votes
1answer
364 views

What does ld a,(hl) do in this piece of Z80 ASM code, and why is HL incremented?

ThinkPositive equ 1 PrintChar equ &BB5A org &8100 ld hl,Introduction call PrintString call NewLine ld hl,Message call PrintString ret PrintString: ld a,(hl) cp ...
4
votes
3answers
413 views

Z80 unexpected output

I am trying to build a Z80 computer inspired by Grant Searle's design. I'm starting simple, with just a clock (clocked by an AVR pulsing at at 12.5 Hz for testing), a Z80, and a 8K EEPROM with a ...
24
votes
3answers
3k views

How do I Interface a PS/2 Keyboard without Modern Techniques?

I'm attempting to build a Z80 homebrew computer to teach myself the basis of electronic design. I planned to start from something simple, like a ROM, some SRAM, a video chip and a Z80-PIO. I'd like to ...
6
votes
3answers
629 views

Comparing Signed Numbers on Z80 (8080) in Assembly

How do you compare two signed numbers in Z80 assembly? According to this site, To compare stuff, simply do a CP, and if the zero flag is set [then] the argument[s] were equal, else if the carry ...
8
votes
2answers
1k views

What is the meaning of M in the Z80 statement ADD A,M

Recently I have been trying to compile CP/M 2.2 from source. When I try to assemble, everything works except for the instructions ADD A,M and SBC A,M, which the assembler returns a syntax error. I ...
7
votes
2answers
618 views

How costly is it to put things on the stack with the Z80?

Programming languages like C, where any function has the potential to be called recursively, are effectively designed on the assumption that it's okay for all local variables to go on the stack. On ...
14
votes
2answers
4k views

Why was the 6809 so expensive?

The 6809 was released in 1978, but looking at the usual source for price quotes for old computer components, Byte magazine, I cannot find any quotes for 1979. December 1980 lists it at $38, compared ...
6
votes
2answers
406 views

Can anyone help provide more information regarding an operating system called I/OS by Infosoft in the early 1980's?

The title pretty much says it all. I'm looking for information about an operating system called I/OS by a company called Infosoft in the early 1980's. I think it might have been a CP/M variant and ...
28
votes
11answers
8k views

Did anyone ever use the extra set of registers on the Z80?

The Z80 has the surprising feature of a second set of registers. I suppose these were intended to be used for rapid task switching or interrupt handling, though I think if I were programming a Z80 ...
3
votes
3answers
1k views

Z80 16-bit I/O port addresses

The Z80 indirect I/O instructions are a little quirky: the instructions with the standard mnemonic in r, (c) (where r is a stand-in for any of the normal registers) actually puts the register pair bc ...
7
votes
3answers
1k views

Role of the Z80 co-processor in GBA games

The Nintendo Game Boy Advance had a Z80-like processor which was typically used for backwards compatibility with GB and GBC games. According to its Wikipedia page, an uncited comment claims that the ...
7
votes
5answers
464 views

What stops an IO device from driving the databus longer than the CPU expects?

For example, consider the case of handling an INT interrupt signal in the Z80. When the CPU makes the IORQ signal active, it expects the requesting IO device to place a vector onto on the databus. And ...
6
votes
2answers
507 views

Hardware multipliers on classic CPUs

Can anyone offer some back-of-envelope sort of estimates of what sort of gate count was needed to add a multiplier to 8-bit CPUs? I ask because I find it a bit odd that the 6809 had one, but none of ...
9
votes
7answers
2k views

What Video Chips/Video generation techniques are usable for the Z80?

I'm building a Z80 home computer and I need color graphics for it similar to other home computers such as the C64. I thought that, like Motorola or MOS, Zilog would have a peripheral chip dedicated ...
2
votes
3answers
346 views

TI-86 sound capabilities

Is TI-86 calculator capable of producing sounds? In what ways the sound is produced (like timers, beeper bits or alike) if yes? If no, are there any mods that add this capability?
5
votes
3answers
2k views

How can a Z80/8080/6502 use VGA?

I've come across a couple of projects that manage to get VGA working with the Z80 and similar CPUs: Veronica (6502 CPU, VGA signal generation by AVR) ZC160 (Z80 CPU, VGA signal generation by GAL) c-...
1
vote
2answers
1k 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 calculators. For example, while it can do addition, multiplication must be ...
20
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 ...
28
votes
3answers
3k 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 ...
26
votes
4answers
11k 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 ...
21
votes
4answers
3k 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
511 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
521 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
430 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 ...
65
votes
8answers
19k 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
383 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
572 views

Z80 ctc gold ICs speed

Does anyone have any information on what is the maximum speed for the gold ceramic z80 CTC?
13
votes
3answers
2k 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 ...
8
votes
2answers
599 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 ...
17
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 ...
5
votes
4answers
1k 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, ...
19
votes
4answers
6k 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
658 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 ...
7
votes
1answer
457 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 ...