Z80 memory addressing

Started by adric22, January 18, 2007, 03:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

adric22

I was just thinking about something.  When the 8502 CPU accesses memory, it has to do it in banks.  And we have the PLA and other things handling a lot of that stuff too, breaking things up into 16K or 4K chunks.. I've never written any program in machine language on the 128 that was bigger than around 4K.  So I have never had to mess with it.  I've heard people say, however, that one reason game progammmers stayed away from the 128 (besides economic reasons) was that the memory banking was very akward and frustrating.  

Well.. I was just thinking, in order to be compatible with CP/M code, surely the Z80 can see all of that RAM as contiguous, memory right?  And I'd imagine the Z80 can address up to 640K?  Am I right in thinking that it has a 24-bit address bus?  I mean, it is supposed to be almost identical to the Intel 8088, right?  So anyway, I am just wondering if the Z80 can see all the 128K available as a contiguous chunk.

nikoniko

Nope, the Z80 doesn't support more than 16-bit addressing and had no segmentation register, so bank switching was used to address more than 64K. A later Zilog processor called the eZ80 allowed up to 16MB directly by extended the addressing to 24 bits while remaining backwards compatible with the Z80. Maybe more C128 programmers would have done Z80 programming if it didn't have the same memory limitations as the 8502.

Christian Johansson

Quote from: adric22...
Am I right in thinking that it has a 24-bit address bus?  I mean, it is supposed to be almost identical to the Intel 8088, right?  So anyway, I am just wondering if the Z80 can see all the 128K available as a contiguous chunk.
No, the Z80 can only address 64 kB of memory just like the 8502. Z80 is an improved 8080 processor and also pretty similar to the 8085. I don't know how similar it is to the 8088 though.

Guest

8088 is pretty much backwards compatible to 8080/Z80.  But I think the 8088 has significantly improved instructions and registers.