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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/15/07 06:41
Read: times


 
#140819 - It does not and it cannot.
Responding to: ???'s previous message
How does the MCU distinguish whether the stored byte is data or instruction opcode.

Simple answer: It cannot distinguish between the two, so it does not even try.

If you put "data" in your ROM that consists of opcodes that make up a meaningful code sequence, you can make the MCU execute it just as if you had written it in actual assembly.

Of course, if the program counter ever gets set to an address that does not containg meaningful code (because it contains some sort of data), the MCU will still attempt to execute the data as if it was code and produce the most wonderful garbage.

List of 53 messages in thread
TopicAuthorDate
Data or Instruction            01/01/70 00:00      
   Context            01/01/70 00:00      
   It does not and it cannot.            01/01/70 00:00      
      Solution            01/01/70 00:00      
         disassembler            01/01/70 00:00      
         have fun            01/01/70 00:00      
            Erase error            01/01/70 00:00      
               yes            01/01/70 00:00      
                  Certain Error            01/01/70 00:00      
                     Why?            01/01/70 00:00      
                     why?            01/01/70 00:00      
                        Why!            01/01/70 00:00      
                        Because            01/01/70 00:00      
                           what I meant by garbage...            01/01/70 00:00      
                           A single byte isn't garbage.            01/01/70 00:00      
                           D52 is open-source, isn\'t it?            01/01/70 00:00      
                              Concept of Pocket Programmer            01/01/70 00:00      
                                 well, if not            01/01/70 00:00      
                                 hummmmm....            01/01/70 00:00      
               Strictly speaking...            01/01/70 00:00      
                  @Erik            01/01/70 00:00      
                     that, in my opinion, is crazy            01/01/70 00:00      
                        It is crazy            01/01/70 00:00      
                           Eh??            01/01/70 00:00      
                              Computer here is PC (personal computer)            01/01/70 00:00      
                                 So what is the microcontroller?            01/01/70 00:00      
                        this depends on definition of "computer"...            01/01/70 00:00      
                        Here we go again ...            01/01/70 00:00      
                           beginner\'s guide to D52            01/01/70 00:00      
                           There you go again!            01/01/70 00:00      
                              Andy            01/01/70 00:00      
                                 There's always tomorrow...            01/01/70 00:00      
                                    Different application            01/01/70 00:00      
                                       Code re-use            01/01/70 00:00      
                                          the no-tool approach            01/01/70 00:00      
                                             Cell phone ?            01/01/70 00:00      
                                                PDA cellphone            01/01/70 00:00      
                                                I don't think that would be necessary...            01/01/70 00:00      
                                          Near to Cell phone            01/01/70 00:00      
                                       There are multiple ways in which to use the code            01/01/70 00:00      
                                       Still primitive            01/01/70 00:00      
                                          Good for you!            01/01/70 00:00      
                                             for displaying just 2 lines of 16 characters...            01/01/70 00:00      
                              What I mean is ...            01/01/70 00:00      
                                 Nobody did that?            01/01/70 00:00      
                                    Where you sit determines what you see            01/01/70 00:00      
                           more appropriate solutions?            01/01/70 00:00      
                              sometimes it's necessary to point out the obvious            01/01/70 00:00      
                              Another one:            01/01/70 00:00      
   It worked            01/01/70 00:00      
      Oooooh....            01/01/70 00:00      
         Sure            01/01/70 00:00      
            have a look at this!            01/01/70 00:00      

Back to Subject List