Zilog (re-)introduces the Z80
The Finn writes "Zilog has introduced an update to their now infamous Z80 line of processors. The new eZ80 ``[...]is one of the fastest 8-bit CPUs available today, executing code 4 times faster than a standard Z80 operating at the same clock speed.'' The last Z80-based computer I actually used for any length of time was a Xerox 820-II CP/M box, but the Z80 continues to live on in all kinds of embedded applications. "
Once you've seen ONE assembly, they are all the same, but you need to start humble, and the Z80 was just a great start for me.
:-)* However, it is really easy to program and I've seen absolute beginners to any type of programming eat into it *really* quickly.
Ever seen PIC assembly? Some things are the same, but some of it is way off the beaten track.
There's an unconditional jump called GOTO.
There's no real conditional jump...
BTFSC/BTFSS - Bit Test F, Skip if Clear/Skip if Set. It basically skips the next line if a specific bit is clear or set. Make the next line a GOTO and you essentially have a conditional jump.
SWAPF - Swap nybbles in F. Interesting.... especially for a RISC chip...
If you're used to other architectures, the PIC looks, well, wierd. The first thing most people notice is the lack of instructions that begin with 'J'
Of course, the Z80 is great for getting into more "traditional" architechtures. Now with TI explicitly enabling asm programming on their calculators (without having to use memory dumps) a lot of young ones are delving right into it.
And next year, intel will be releasing the 8088, renamed "Merced". . .
"The number of suckers born each minute doubles every 18 months."
These are my friends, See how they glisten. See this one shine, how he smiles in the light.
The all-knowing, all-seeing DonkPunch looks into his crystal ball and sees the responses to this story:
"Let's port Linux to it"
"Let's make a Beowulf cluster"
"I remember using a Z80...."
"My company is developing embedded software for Z80s...."
"Why? It's an 8-bit processor! Who uses that anymore?"
"First Post"
Save the whales. Feed the hungry. Free the mallocs.
Here's a bunch of Z80/CPM emulators for all major platforms, kindly grouped together in one elegantly uncluttered site.
Eat 'em up!
**>>BELCH
I remember the good 'ole days of Cromemco and the Cromix operating system. Some of the machines had a Z80 and a Motorola 6800 DPU. The Z80 ran backward comtability programs andthe 6800 ran the OS.
My dad and I hooked up an A-to-D board and controlled an RC car in the garage. Talk about your open standards. It schematics, replacement component #'s (not part #'s, component), journals about the hardware/software similar to the linux community or LJ ("TechTips" it was called).
It had the original Star Trek and Adventure, I blasted banner pages at all of my dads employees, and sat dumb-founded by the high-speed dot matrix printer with the gree-bar. It rattle back and forth until it walked accross the room. I can remember having to build a sound absorbing box because nobody could hear the phone over the top of it.
I guess my favorite thing about the system was being able to fry a serial port controller in the morning and have it repaired in an hour with off the shelf components.
On the other hand, the larger memory space and (seemingly built-in?) TCP/IP stack offers the opportunity to build a "RetroWeb Server." Note that ZSDOS, a ZCPR variant, is now available under the GPL.
The possibilities are immense, I mean, minscule. A complete web server could probably fit in a volume of 2 cubic inches...
If you're not part of the solution, you're part of the precipitate.
It was recently announced that Amiga would incorporate these chips into their new machine designs.
I couldn't agree more. It had several cool features. Bit testing instructions. Two complete sets of general purpose registers (EX and EXX instructions, remember?). More on-chip integration than most (the refresh register for dynamic memories). It had a vectored interrupt system. All of this and full instruction set compatibility with the much less capable 8080A (and its later incarnation, the 8085).
My Dad was an EE who worked for Control Data and I was a pimply-faced teenager who loved programming. We homebrewed an S-100 bus based Z80A computer between 1975 and 1978 (so it took us awhile!). I wrote the BIOS for our hardware for CP/M 1.2 (later 1.4 and 2.0 also) in Z80 assembler.
We also did a number of embedded projects with the chip. The z80 had features that were a dream for embedded programmers. In our case, we made a simulated event-driven machine by polling during a timer interrupt. We made use of the aforementioned dual register sets. Instead of the normal chaos of stack frame switching (and hoping you do it right) we just said the prime register set is for the interrupt service routine and the regular set is for the normal operation. On entry to the ISR, just do an EXX and on exit do another one. No disruption of the "application" whatsoever, plus interrupt latency is unbeliveably small (no external bus cycles at ALL!)
I did and do love this chip. I know it can't really cut it as a general purpose computer CPU anymore, but some of those apps that were built on and ran on this hardware (WordStar, etc.) did quite a bit. They're not that much weaker than Word and they would run in less than 64k on machines clocked at from 2 to 6 MHz. How well would Word do?
It is great to see this processor still alive and kicking.
The computer I had was a CPC 6128 and Gee, did I just love this computer? I even made myself an 8Kb memory extension to write my own boot code that you would call like |Eg0r and stuff from the basic prompt, brilliant!
Anyway, I still do think that in order to learn assembly properly, all you need is a processor you understand everything about, from registers to conditional jumps and so on... Man, x86s are just too complicated to program :-need all those instructions? I know it's cool to have instructions that would take you several op codes to get the same result, but when you learn, all you need is the bare minimum :-)
Anyway, what I learned about the Z80 around when I was a 14 year old teenage kid thinking 'Gee, 8K? I'll NEVER need that much space' :-) helped me with the motorola 68K (both at school and on my Amiga) and then with the TMS320C30, C50, C40 DSPs...
Once you've seen ONE assembly, they are all the same, but you need to start humble, and the Z80 was just a great start for me.
Of course, this is all redundant now, because VLIW is not something you code by hand, but having some knowledge being able to code a microcontroller is never lost!
See Imaging tutorials 1 and 2 to get some ideas of what can be done both in C, assembly and MMX!
So, what do you guys have learned assembly on?
---
"Hasta la victoria siempre!" El Comandante
I'm not sure about Legos, but the Z80 is used in industrial controllers and has proven very reliable. I see the Z80 pop up in various products over time. The Z80 may never die.
Here are some Z80 source code for projects done back in college, including GUI with mouse, etc.
What many of you don't realize is the importants of the statement "Synthesizable core". That means that I can get the VHDL description of the device, and drop it into an FPGA or ASIC (field programmable gate array and application specific integratted circuit) and make a single-chip solution to some embedded problem. Who would buy the actual silicon from Zilog? But give me a small, simple core in my ASIC and I'll be a happy man.
BTW, I too learned my assembly on a Z80. I learned real quick what happens when an ISR takes too long by writing code to blink the screen on a TRS-80 from interrupt, a lesson that I have carried forward into my years as a professional embedded software designer.
www.eFax.com are spammers