Skip to main content

Questions tagged [z80]

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

11 votes
3 answers
1k views

16-bit comparisons setting both zero and carry flag on 8080/Z80

I have a routine cpBCHL that compares the contents of BC and HL and returns the carry set appropriately: ; ---------------------------------------------------------------------- ; ♠BCHL ♣A ♡* ...
cjs's user avatar
  • 29.4k
20 votes
4 answers
3k views

What was the last commercial Z80-based computer sold?

Obviously, with the rise of retro in computing, today there are lots of Z80-based machines in the retro market. Thus, I would exclude anything later than maybe 2005 or obviously targeted at the "...
tofro's user avatar
  • 39k
9 votes
2 answers
2k views

Space Invaders ships remaining not initialized

I'm referencing this Space Invaders code. (I'm porting this to another processor and I'm trying to understand it.) The p1ShipsRem variable doesn't seem to be initialized, but it is tested early in the ...
Mike's user avatar
  • 943
8 votes
1 answer
476 views

Original Space Invaders message routine with delay

I'm referencing this Space Invaders code. Could someone explain why the PrintMessageDel routine checks for a delay value of one instead of zero? The interrupt service routine decrements the isrDelay ...
Mike's user avatar
  • 943
4 votes
0 answers
213 views

CF Card Issues - DIY Z80 COMPUTER from scratch - CP/M frozen after boot

has anyone here ever had a similar problem? I'm basically trying to use my CF card interface board that used to work with another memory card, which unfortunately got damaged (my fault). Now I only ...
Matheus Yan's user avatar
11 votes
0 answers
332 views

What was and where can I find OS-1 for the Z80?

On page 269 of the June 1980 issue of BYTE there is an advertisement from Electrolabs (in Stamford, CT) for an operating system called OS-1, a "new Unix-like operating system for Z-80." Did ...
cjs's user avatar
  • 29.4k
4 votes
1 answer
215 views

What's the max output current for Z80 PIO output pins - (Z84C2010VE6)?

I'm working with a Zeal 8bit board and I want to connect the pins from Z80 PIO Port A to external components, let says LEDs. With a 2.2k resistor and a 5V power supply the calculated current is 1.5 mA....
Candid Moe's user avatar
4 votes
1 answer
329 views

In a 48K Spectrum why are there 5 successive contended cycles in JR?

In a 48K Spectrum, the contention pattern for the JR instruction (see e.g. https://sinclair.wiki.zxnet.co.uk/wiki/Contended_memory) is: pc:4, pc+1:3, pc+1:1, pc+1:1, pc+1:1, pc+1:1, pc+1:1 There is ...
Pedro Gimeno's user avatar
18 votes
1 answer
2k views

Why does the ZX Spectrum ROM set I register, then wait 24 T-states?

I’m doing some low-level, interrupt-based Z80 Spectrum programming, and, investigating the ROM, found this oddity (clipped from The Complete Spectrum ROM Disassembly), in the ROM initialisation/...
andrewf's user avatar
  • 283
9 votes
1 answer
609 views

Is there a mistake in the code sample in “Programming the Z80” performing 16-bit by 8-bit division?

Programming the Z80 (3rd edition) has the following code sample (section 3 p.135) for division of a 16-bit dividend by an 8-bit divisor returning an 8-bit quotient in L and an 8 bit remainder in H: ...
Dexter CD's user avatar
  • 193
7 votes
1 answer
448 views

How does the Z80 NMI edge detection work?

The Z80 user manual (um0080.pdf) is basically useless for finding out many details about NMI. The diagram is broken and there's no mention that it's edge-triggered rather than level-triggered like INT ...
Pedro Gimeno's user avatar
10 votes
3 answers
1k views

How was MP/M’s time sharing implemented?

MP/M, the multi-user sibling of Digital Research ubiquitous CP/M, implemented time-sharing in a way that appears to be very efficient. Processes don’t appear to see each other’s memory and performance ...
rbanffy's user avatar
  • 869
9 votes
1 answer
265 views

Triggering Amstrad BASIC/System errors from machine code

I'm writing some machine code that's intended to be executed from BASIC with a CALL and I'd like to trigger genuine errors just like running ERROR 5 (Improper argument) from BASIC. I have the book The ...
CJ Dennis's user avatar
  • 2,649
5 votes
2 answers
407 views

Are a Z80 address pins tristate?

I been looking at the Z80 CPU recently and am wondering how difficult it would be to wire one up. The thing I'm interested in is how to connect it to some RAM. In particular, I'd like to know if the ...
Stormcloud's user avatar
7 votes
1 answer
687 views

How to best use IX as a return stack

I'm new to Z80 assembler and am porting a Forth interpreter from a J1 stack machine to a Z80 based board. The Z80 port uses SP for the data stack, and IX for the return stack. The port uses a normal ...
Look Alterno's user avatar

15 30 50 per page
1
2 3 4 5
15