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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/06/03 12:05
Read: times


 
#60041 - RE: How does a programmer write into a 8051
Responding to: ???'s previous message
mov 90h,#20 at address 001fh will translate to three consecutive bytes, one at 001fh, one at 0020h and one at 0021h (and the next instruction will start at address 0022h). So that's three times one single byte. It lists in the hex file as three separate, consecutive bytes. So there is no conflict with your so called limitation of only being able to write one byte at a time. Trust me, you are seeing problems where there are none!

Remember that the hex file, the programmer, the cable you are using etc do not care a hoot about which byte means what. To them a byte is just a byte is just a byte.
Only when your controller starts fetching from a location in memory will the bytes be interpreted as a program again (and even then only 1 at a time!).
So, but this means if mov 90h,#20 translates to three bytes in program memory, you could theoretically jump right in the middle of it, and the controller would interpret the byte saying #20 as an instruction, which would be jibberish, and which would probably mean a crash? Yes, This is totally possible. In the end, even the CPU does not know what significance any byte in memory has. To the CPU a byte is also just a byte is just a byte. It will interpret any byte as an instruction if you put it where it will be fetched as such.


List of 17 messages in thread
TopicAuthorDate
How does a programmer write into a 8051            01/01/70 00:00      
   -100 pts            01/01/70 00:00      
   RE: How does a programmer write into a 8051            01/01/70 00:00      
   RE: How does a programmer write into a 8051            01/01/70 00:00      
   Intel Hex format            01/01/70 00:00      
   RE: How does a programmer write into a 8051            01/01/70 00:00      
      RE: How does a programmer write into a 8051            01/01/70 00:00      
      RE: How does a programmer write into a 8051            01/01/70 00:00      
         RE: How does a programmer write into a 8051            01/01/70 00:00      
            RE: How does a programmer write into a 8051            01/01/70 00:00      
      RE: How does a programmer write into a 8051            01/01/70 00:00      
      RE: How does a programmer write into a 8051            01/01/70 00:00      
         RE: How does a programmer write into a 8051            01/01/70 00:00      
            RE: How does a programmer write into a 8051            01/01/70 00:00      
               RE: How does a programmer write into a 8051            01/01/70 00:00      
   RE: Is it possible....?            01/01/70 00:00      
      RE: Is it possible....?            01/01/70 00:00      

Back to Subject List