As long as there have been personal computers, people have been arguing over which 8 bit CPU is fastest. A few days ago someone on facebook asked if the 6803 was any good so I give an honest comparison to other cpus, but a fan of another processor didn't seen to like my answer. So I thought I'd make a post here.
Over the next few messages, I'm going to present source code for the same task performed on multiple processors. The code is not exactly what I'm using because it has been adapted to use a hi-res graphics screen screen like is on the C64 or Plus/4. I was working on the Plus/4 code anyway so it seemed like a reasonable choice. The C64 and Plus/4 order the graphics screen into rows made up of stacked bytes rather than a simple bitmap. It presents slightly more of a challenge than a regular bitmap for the address calculation.
Code will be presented for the 6800, 6502, 6803, 6303, 6809, 6309, Z80, and HD64180/Z80. A placeholder for the 8080/8085 will be added so a version for them may be added later. I'll have to reacquaint myself with the syntax first. 8080 code is similar to the Z80, but the missing features make it larger and more difficult than the Z80 version.
Since the source code was thrown together over a matter of hours just for this blog and it has not been tested, there are likely to be a few bugs or syntax errors. It is based on running code so it should be close enough to give you a quick look at how the code differs from one CPU to the next.
The examples are based on my graphics text code I've mentioned before. It involves the section that writes two characters to the screen at a time. The code calculates the screen address to write to, the address of the font data for each character, and then writes the bytes to the screen. In some cases the code is very different from what I'm using, so it may not be fully optimized. The 6800 code was created just for this, so it is very likely that it can be improved.
Cycle counts have only been added in a couple places, so expect some editing in the future when I have more time.
Over the next few messages, I'm going to present source code for the same task performed on multiple processors. The code is not exactly what I'm using because it has been adapted to use a hi-res graphics screen screen like is on the C64 or Plus/4. I was working on the Plus/4 code anyway so it seemed like a reasonable choice. The C64 and Plus/4 order the graphics screen into rows made up of stacked bytes rather than a simple bitmap. It presents slightly more of a challenge than a regular bitmap for the address calculation.
Code will be presented for the 6800, 6502, 6803, 6303, 6809, 6309, Z80, and HD64180/Z80. A placeholder for the 8080/8085 will be added so a version for them may be added later. I'll have to reacquaint myself with the syntax first. 8080 code is similar to the Z80, but the missing features make it larger and more difficult than the Z80 version.
Since the source code was thrown together over a matter of hours just for this blog and it has not been tested, there are likely to be a few bugs or syntax errors. It is based on running code so it should be close enough to give you a quick look at how the code differs from one CPU to the next.
The examples are based on my graphics text code I've mentioned before. It involves the section that writes two characters to the screen at a time. The code calculates the screen address to write to, the address of the font data for each character, and then writes the bytes to the screen. In some cases the code is very different from what I'm using, so it may not be fully optimized. The 6800 code was created just for this, so it is very likely that it can be improved.
Cycle counts have only been added in a couple places, so expect some editing in the future when I have more time.
No comments:
Post a Comment