Help Wanted!! - Memmory management in hla!!
From: encryption_x (spamtrap_at_crayne.org)
Date: 09/27/04
- Next message: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Previous message: Charles A. Crayne: "Re: Kind of new: function implementation questions, MASM"
- Next in thread: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Reply: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Maybe reply: Steve : "Re: Help Wanted!! - Memmory management in hla!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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"
- Next message: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Previous message: Charles A. Crayne: "Re: Kind of new: function implementation questions, MASM"
- Next in thread: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Reply: Charles A. Crayne: "Re: Help Wanted!! - Memmory management in hla!!"
- Maybe reply: Steve : "Re: Help Wanted!! - Memmory management in hla!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|