Questions tagged [z80]

For questions regarding the Zilog Z80 microprocessor

Filter by
Sorted by
Tagged with
0
votes
1answer
127 views

4MHz Z80 timing and PAL video generation

Im trying to get some nice colored lines on some old Z80 system synced to the PAL screen, but having some sort of a problem. First I just need to know if my facts are right. I know that on Commodore ...
7
votes
2answers
293 views

Floating control during bus sharing

I'm building a simple Z80 breadboard computer for my hobby. In this question I use Z80 as an example, but I think this may apply to many CPUs that allow for bus sharing. The problem is as follows. ...
15
votes
3answers
3k views

How did integer multiplication work in 8-bit BASIC without CPU support

I've recently been teaching my 11 year old binary multiplication, which is on the UK maths syllabus at secondary school. We have used long multiplication, eg shift and add. This has made me wonder ...
4
votes
2answers
174 views

ZX Spectrum scroll waiting for user input problem

I'm trying to compile a C program with z88dk for the ZX Spectrum. Using printf(), when the text hits the bottom line of the screen on line 24 the program stops executing until a key is pressed on the ...
4
votes
3answers
340 views

Z88DK ZX Spectrum “%f” printf not working

I'm attempting to compile a program in C for the ZX Spectrum using Z88DK. However, I'm facing an issue when trying to use printf to print out the value of a float. The code I'm trying to compile: #...
2
votes
1answer
186 views

When first CMOS versions of Z80 became available and were they ever used in (non-portable) home computers?

When Z80 first became available on the market in 1976 it was made using NMOS technology. It is the version that is likely to be most familiar to people interested in retro-computers. For example, to ...
14
votes
2answers
749 views

Does the Z80 allow interrupts after processing and ignoring a 0xdd prefix?

I read here that if the Z80 encounters e.g. multiple 0xdd prefixes in sequence, for each 0xxdd except the last it acts almost like a NOP, but does not allow interrupts to occur immediately after "...
16
votes
5answers
5k views

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

Looking at the development and architecture of the Z80, it appears to be a scaled-down, cost-reduced (in terms of total system cost), clone of the Intel 8080. It only used a 4-bit ALU. I assume this ...
10
votes
2answers
718 views

Zilog Z80 estimated time discrepancy

I am writing a basic Zilog Z80 assembly language interpreter and something I noticed as I went through the 8 bit load commands is that the estimated times for LD (IX+d), n and LD (IY+d), n are ...
14
votes
11answers
6k views

How can a Z80 assembly program find out its own memory address?

I'm wondering how to write a program in Z80 assembler that discovers its own memory location. I thought that maybe I could somehow load the program counter PC into, for example, BC. Is there a way ...
30
votes
2answers
5k views

Zilog Z80 freezes while binary counting up to 65 536 (2^16)

A few days ago, I got Z80A CPU from eBay. So I tried to run it with classic 555 timer as a clock signal generator. I connected the 8-bit data bus of the CPU to the ground to "simulate ROM" (00 for NOP)...
8
votes
2answers
271 views

Where to share/who may be interested in IEEE 16 bit half float library for Zilog Z80?

I have recently developed a half-float/16-bit float library (link to Github) for Zilog Z80. It was a part of my project to run some neural network and graphics POCs for ZX Spectrum. The library uses ...
9
votes
1answer
856 views

What are the “ports” used via IN/OUT, vs. the PEEK/POKE address space?

This is something of a followup to How much control of TRS-80 Model III disk drives was possible from its Cassette (ROM) BASIC? but on a more general topic: I know that PEEK and POKE enable direct ...
13
votes
4answers
2k views

Accelerators for Z80 micros?

I am familiar with the various accelerator products that were developed over the years to improve the performance of popular 6502 home micros. A short list of the particularly well known devices would ...
2
votes
1answer
385 views

How much did it cost to develop the Z80 CPU?

How much did it cost, in dollars at the time, to develop the Zilog Z80 CPU? According to Wikipedia, The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. ...
4
votes
2answers
870 views

Z80 Interrupt Mode 2 - How does the CPU know the device address of the interrupting device to execute IN A,(*)?

I've read about the Z80 interrupt priority daisy chain and it hasn't answered my question. When using interrupt mode 2, the Z80 needs to form a 16-bit address for an interrupt service routine. The ...
12
votes
3answers
2k views

Why does this ZX Spectrum machine code “Hello World” routine not produce the expected result?

This is probably an easy one, but I'm stumped. I want to run this ZX Spectrum Hello World routine on my Sinclair ZX Spectrum 48k. I'm going to describe all the steps I took so it's easier to see ...
6
votes
2answers
268 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
279 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
914 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
180 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 ...
10
votes
2answers
919 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
298 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
532 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
458 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 ...
18
votes
1answer
771 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
485 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
312 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
983 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 ...
24
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 ...
-1
votes
1answer
445 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
461 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 ...
26
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
852 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
773 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
413 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 ...
32
votes
13answers
9k 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 ...
10
votes
3answers
2k 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
534 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
550 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 ...
10
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
358 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?
6
votes
3answers
3k 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-...
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 ...
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 ...