Help Wanted!! - Memmory management in hla!!

From: encryption_x (spamtrap_at_crayne.org)
Date: 09/27/04


Date: Mon, 27 Sep 2004 02:12:15 +0000 (UTC)

in Art of Assembly vol 2. Chp.1 sec.2, I read that a 16-bit based
address bus cannot put an odd numbered address on the address lines,
it goes on to say (I hate quoting but its easier this way):

"So what happens when the CPU accesses a word at an odd address, like
the example given earlier? Well, the CPU cannot place the address 125
onto the address bus and read the 16 bits from memory. There are no
odd addresses coming out of a 16 bit 80x86 CPU. The addresses are
always even. So if you try to put 125 on the address bus, this will
put 124 on to the address bus. Were you to read the 16 bits at this
address, you would get the word at addresses 124 (L.O. byte) and 125
(H.O. byte) - not what you'd expect. Accessing a word at an odd
address requires two memory operations. First the CPU must read the
byte at address 125, then it needs to read the byte at address 126.
Finally, it needs to swap the positions of these bytes internally
since both entered the CPU on the wrong half of the data bus."

Im not sure if it was implied in the passage above but, if the
processor were to need to access say address number 125, then it would
put 126 instead (would this also mean a control line would be used to
tell the processor that the beginning address is actually [address -
1] if the beginning address is odd numbered ?)but actually read
address 125 first which would be written to DL8-DL15 and address 126
written to DL0-DL7, but the processor would know to switch those two
addresses around by default (im assuming) without any user
intervention.

This also compels me to ask what would naturally follow the above
question (at least for me anyway): when a 16-bit processor requires to
read a word whos beginning address is even numbered-what is written on
the address bus if odd
addresses are not allowed but it reads a whole word in one pass
anyway, that of course requires two addresses?

Any help would be greatly appreciated. Thanx in advance.

--------------------------------------------------------

"There is more judgment required, for the proper conduct of our
virtues, than for avoiding their opposite vices"



Relevant Pages

  • Re: Help Wanted!! - Memmory management in hla!!
    ... I think we must be reading different things into the original qustion. ... The original question was "I read that a 16-bit based address bus cannot ... the bus and fetch an 8-bit result. ... an 8086 can put out an odd address on its address lines ...
    (comp.lang.asm.x86)
  • Re: More Labour stupidity....
    ... They spank the motorist because he's an easy target yet offer no ... That's odd. ... I could take the bus in to town but frequently ... Lincoln City 0-2 Southend United ...
    (uk.tech.digital-tv)
  • Re: [w1] Allow master IO commands.
    ... Evgeniy Polyakov wrote: ... but against the bus itself, which can be used for example to probe device. ... The use of PAGE_SIZE is odd. ...
    (Linux-Kernel)
  • Re: Speed problems with ARM7, more detailed post..
    ... the ARM doesn't handle it at all. ... The bus interface does. ... a byte write to an odd address is which of the two byte-write ... > equivalent of loading the full 16-bit word from memory, ...
    (comp.arch.embedded)
  • FreeBSD 8.0-BETA2/amd64 and DELL Poweredge 1930: USB oddities
    ... CPU 0 has ACPI ID 1 ... <ACPI PCI bus> on pcib0 ... MSI supports 2 messages ...
    (freebsd-current)