??? 04/23/07 14:04 Read: times Msg Score: -1 -1 Answer is Wrong |
#137804 - you missed the POINT Responding to: ???'s previous message |
No, this is wrong! The 8051 does not use a segmented mempry system like this! I'm trying to compare an 8051 to an x86. Sorry, if you didn't like the comparison. I know in reality that an 8051 doesn't use a segment:offset routine, but the reason why I explained it like that is because I was explaining what DPTR is and how it works. How do people that use x86 processors be able to use MMIO on x51 processors if I didn't put that explanation? they would think that MMIO is very different on an x51. there are lots of similarities between processors. DPH refers to the segment, DPL refers to the offset, .... They are simple the high and low bytes of the 16-bit address. again, I want to make someone that can program in x86 assembler understand hoe easy it is to program in xn x51. and for you x86 users, high byte and low byte is like the "segment and offset". I should have used the "is like" keywords more often. The first three lines of code sends the byte representing hex code 40 to address 1234h. The segment is 12 hex and the offset is 34 hex. No it's just a 16-bit number - not Segment and Offset And its XDATA address - not CCODE address I know that. Ok, fine, so I get -1 for trying to compare an x51 to an x86. I understand that what I posted is incorrect according to x51 documentation out there, but the reason why I mentioned segments and offsets is because I want a user who can program an x86 be able to program an x51. so for the newbies, Andy has done translations for you (and for me). In an x86, we have segment:offset memory addressing. In an x51, we have DPTR as addressing. Now the best way to use it if you are good with programming an x86 is to think of DPH as segment and DPL as offset. Some people might take the whole DPTR as offset and the segment doesn't exist. Some of the guys on the forum here are so into the 8051, they don't even bother with segments:offsets because they treat DPH and DPL as high and low bits of the memory address DPTR. So those that tried to give me -1 for my last post, I'm sorry for trying to help someone out. |