Questions tagged [z80]
The Zilog Z80 microprocessor. Prefer [game-boy] instead for questions about the Game Boy CPU nicknamed the ‘GBZ80’.
190
questions
4
votes
2
answers
2k
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 ...
15
votes
3
answers
3k
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
2
answers
396
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
3
answers
5k
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 ...
39
votes
1
answer
4k
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
1
answer
376
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
4
answers
3k
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?
11
votes
3
answers
890
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 ...
15
votes
2
answers
6k
views
Is the Game Boy Sharp LR35902 object-compatible with the 8080/Z-80?
(Note: by "object-compatible" I mean that the opcodes and their following operands are the same—the assembler produces the same output for equivalant assembler mnemonics. This of course ...
11
votes
2
answers
1k
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
2
answers
500
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 ...
4
votes
5
answers
1k
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 :
...
5
votes
1
answer
904
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 ...
29
votes
1
answer
2k
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 ...
15
votes
2
answers
854
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 ...
3
votes
2
answers
819
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 ...
6
votes
4
answers
3k
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 ...
26
votes
1
answer
5k
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 ...
0
votes
1
answer
1k
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
3
answers
661
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 ...
39
votes
4
answers
8k
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 ...
10
votes
3
answers
4k
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
2
answers
2k
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 ...
9
votes
2
answers
2k
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 ...
17
votes
2
answers
5k
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 ...
11
votes
3
answers
604
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 ...
41
votes
16
answers
11k
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 ...
7
votes
3
answers
4k
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 ...
15
votes
3
answers
5k
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 this ...
7
votes
5
answers
1k
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
2
answers
806
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 ...
11
votes
7
answers
7k
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
3
answers
491
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?
8
votes
4
answers
6k
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-...
7
votes
2
answers
3k
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
4
answers
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 ...
34
votes
3
answers
5k
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 ...
27
votes
4
answers
17k
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 ...
26
votes
5
answers
5k
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 ...
7
votes
3
answers
848
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 ...
10
votes
2
answers
3k
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
1
answer
690
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
1
answer
556
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 ...
108
votes
10
answers
42k
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
1
answer
998
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
1
answer
658
views
Z80 ctc gold ICs speed
Does anyone have any information on what is the maximum speed for the gold ceramic z80 CTC?
17
votes
3
answers
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
2
answers
1k
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
5
answers
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
4
answers
3k
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, ...