Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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.

List of 36 messages in thread
TopicAuthorDate
MMIO            01/01/70 00:00      
   MMIO            01/01/70 00:00      
      The only way? I know, at least, 5 more            01/01/70 00:00      
         careful now ...            01/01/70 00:00      
            well            01/01/70 00:00      
               true enough!            01/01/70 00:00      
      Answer is incorrectlystated!            01/01/70 00:00      
      8051 offers more connection points            01/01/70 00:00      
         true, but he didn't ask about that            01/01/70 00:00      
            But Lynn said it, and it's wrong            01/01/70 00:00      
               I\'m forced to agree ... it is wrong ... but ...            01/01/70 00:00      
         That\\\'s already been thoroughly established!            01/01/70 00:00      
            Regret on the word "only"            01/01/70 00:00      
               n ow I have to TOTALLY disagree            01/01/70 00:00      
               Lynn, I KNEW Erik would jump you on this one!            01/01/70 00:00      
                  you missed the biggie            01/01/70 00:00      
                     He didn't ask for ancient or modern, just answers            01/01/70 00:00      
                        as I said            01/01/70 00:00      
   What are you trying to connect?            01/01/70 00:00      
   Ambiguity?            01/01/70 00:00      
      oh my            01/01/70 00:00      
         error?            01/01/70 00:00      
            8051 addressing is not segmented            01/01/70 00:00      
         Oh dear!            01/01/70 00:00      
            you missed the POINT            01/01/70 00:00      
               no, YOU did            01/01/70 00:00      
               try not to confuse beginners...            01/01/70 00:00      
               You failed to make that point!            01/01/70 00:00      
         useful? I'd say confusing            01/01/70 00:00      
         Mike, you didn't read the 8086 datasheet either            01/01/70 00:00      
   Hardware conections            01/01/70 00:00      
      Hardware conections...            01/01/70 00:00      
      an example...            01/01/70 00:00      
      trying to 'relanguage'            01/01/70 00:00      
   MMIO meaning            01/01/70 00:00      

Back to Subject List