Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.tandy    |    Life is dandy cuz you're gettin a Tandy!    |    5,684 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,369 of 5,684    |
|    Knut Roll-Lund to A936@hotmail.com    |
|    Re: question about z80/8088 machines    |
|    22 Nov 06 17:06:25    |
      XPost: comp.sys.sinclair       From: kr-lund@nogarbage.online.no              A936@hotmail.com wrote:       > Robert Newson wrote:       >       >>>identifying a specific device and the top 8-bits to select registers on       >>>the device. The z80's instruction set also "prefers" 8-bit i/o ports.       >>       >>AFICR, the Z80 when using the C reg to define which port to use (on the       >>lower 8 address lines, as in IN A,(C) or OUT A,(C) ) also puts out the B reg       >>on the top 8 address lines - the zx81 uses this to scan the keyboard with       >>the B reg activating the "current row".       >>       >>When the immediate mode version is used (as in IN A,80 or OUT A,80) I'm not       >>sure, but somewhere lurking round my memory suggests, that the current       >>contents of the A reg is used for the top 8 bits - can anyone confirm/deny       this?       >       >       > Yes the A register is placed in the top 8 bits. This is compatible       > with       > the 8080 and is the reason I said the z80 "prefers" 8-bit i/o ports.       >       > The other reason is that the block i/o instructions use the B register       > as a counter and also place the count in the top 8 bits for each i/o       > step.       > This may or may not be useful for 16-bit i/o depending on whether       > this is appropriate for the device in question and on whether the       > designer had the wherewithall to make use of this feature.       >       >       >>None of my (rather scant) Z80 programming books describe the ports as       >>"16-bit" addressed, only 8-bit with the port number either as immediate data       >>or in the C reg.       >       >       > Despite many references on the internet that this is undocumented,       > it is not. It is very much documented in every data book I've ever       > seen       > including the earliest one I have -- a 1979 data book from Mostek.       > The confusion, I assume, comes from early books (ie not data books)       > written by authors familiar with the 8080 who failed to do their       > homework       > and therefore didn't realize that the i/o space was 16-bit on the z80       > :-)       >              Z80              Note that 16bit I/O is not very useful on the TRS-80 I/III/4 machines       and clones as only the lower 8 bit are decoded. But one could use it for       special self-made hardware on those 8bit I/O addresses that were free.              I think this is not mentioned yet. The actual cycle that Z80's I/O       creates is slower than that for memory access. This makes it easier to       interface.              --       Knut       (delete 'nogarbage.' for email)              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca