The Retro Room

Hosted by CDP (PerraultC)

It's not old. It's a classic!

  • 97
    MEMBERS
  • 766
    MESSAGES
  • 2
    POSTS TODAY

Discussion

The Zilog Z80 Microprocessor   Home Computing

Started Feb-5 by CDP (PerraultC); 147 views.
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-5

If you owned a home computer back in the early 80s, there's a strong chance your machine was running on a Z80 microprocessor. The Z80/CPM pairing was THE duo to have before the Wintel combo took over. But it wasn't  originally built for home computers to start with. Zilog had more industrial markets in mind when they  first unleashed the chip  back in 1975.

My computer ran a 6809 microprocessor, the other big deal of that time, so I never had the chance to run a Z80 powered machine. Did you?

In reply toRe: msg 1
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-5

In reply toRe: msg 2
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-5

In reply toRe: msg 3
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-5

MikeHalloran

From: MikeHalloran

Feb-10

Never had a Z80.  Well, except for a C=128 at home, which was just slow.

At work, I had a 10MHz NEC V30 chip, which plugged into an 8086 socket, and ran both 8086 and 8080 code.  I got it to boot CP/M-86 from a ROM, then switch to CP/M-2.2 on command, using a sort of filter that I wrote.  It could switch personalities in a batch file.  It was kind of fun to step through CP/M-2.2 using DDT86.  CP/M-2.2 at 10MHz was still glacial by today's standards, but pretty zoomy at the time.

I tried writing another filter to make the V30 run Z80 code, but never got all of it working at once.  I was mesmerized by the beauty and symmetry of the 8080 instruction set.  If you listed mnemonics and opcodes in octal, and then sorted the list, you could almost see the circuitry needed to execute it pop right out.  Every opcode comprised {operation|source|destination} in a nice logical sequence, all internally consistent.  The Z80, just like the 8086, had no such beauty, i.e. its superset of opcodes bore no relation to what they did or to one another, they were just sort of tacked on.  The V30 had a "bad opcode" interrupt that I was trying to use, but it wasn't flexible enough to allow executing the entire Z80 instruction set, just any set that all started with the same prefix.

Our Intel rep asserted that they had made a V30 clone that also ran Z80 code, but he never was able to produce either the chip or evidence that it existed.

CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-11

One  of my biggest regrets was not learning assembly language as a kid. Back then I had the time, elastic brain, and the cpu to do it. My computer ran a 6809 which by all accounts I heard was great for assembly programmers.  Was the Z80 friendly  for assembly learners?

When you say filters, were these like emulators or were you basically switching to a different mode? This is the first I've heard of such a thing and sounds really neat!

This also reminds me to revisit the Commodore 128 at some point. i forget why, but it never caught on as successor to the 64.

In reply toRe: msg 6
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-11

For those of you with a Z80 lying around that you want to work with, here's the user's manual (in PDF form):

In reply toRe: msg 7
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-11

CPU Worlds resource page on the Z80:

http://www.cpu-world.com/CPUs/Z80/

In reply toRe: msg 8
CDP (PerraultC)
Host

From: CDP (PerraultC)

Feb-11

If you are looking for an Assembly Language programming book for the Z80, you can get Z80 Assembly Language Programming off Amazon (along with  a bunch of other Z80 books). 

This one in particular is part of a series of XXX Assembly Language Programming books for various processors. This one stuck out to me, because I have the same book for the 6809 (boxed up with my Coco  stuff). As I mentioned previously, I wish I spent more time with the book lol.

Z80 Assembly Language Programming

MikeHalloran

From: MikeHalloran

Feb-11

Maybe you could call it a pseudo-bios.

In order to avoid licensing issues, you had to harvest a  ccp and bdos from a legit CP/M-2.2 system, and save it as a binary file.

Then you edited a simple text file to include the name of that file, and a few important locations in ascii hex.

Both files were saved on a CP/M-86 diskette.

My program booted as a transient program under CP/M-86, looked for the configuration file, loaded the binary file at the appropriate place in 8080 space, then executed a special V30 instruction to become an 8080, and started executing the CP/M-2.2 code, presenting a prompt and waiting for a command to start a CP/M program.

When the '8080' made a bios call, the tiny bios in 8080 land executed a special V30 instruction, became an 8086, and translated the bios call and its parameters to CP/M-86 equivalents, executed a call to the CP/M-86 bios, and did the reverse when it returned.  The V30 ran at full speed in both 8080 and 8086 mode; so, my program  was not an emulator.  Of course, both CP/Ms used the same diskette format, and the bios calls were similar, so it wasn't really a big deal.

I sometimes used an old version of ZCPR on my old 2Mhz 8080 and on the 10MHz V30 that replaced it.  Newer versions required a Z80, so I was very interested in getting the V30 to run Z80 code.  As I mentioned, the 8080 instruction set was elegant and sort of well-organized.  The Z80 included those opcodes, but the ones that were unique to the Z80 were just sort of roached on, apparently by microcode just like in the 8086, and I just couldn't figure out a way to emulate all of them with the V30.

I mostly used a FORTH dialect called SL5 for high level stuff, and its built-in assembler for stuff that had to run fast.  I think most any FORTH provides a good way to ease into writing structured assembler a little at a time.

I used SL5 to write a disassembler that could spit out assembler, in FORTH syntax or in Intel syntax, and despite being a one-pass deal, could handle forward references that didn't go too far forward, by writing into a write buffer, sort of like BDS C did.

I used the disassembler to find bugs in one of our global products' ROMs, despite not having the (8080) source code, which was written in French, and stored in France.  The programmer and his boss were gobsmacked.

TOP