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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/24/07 09:42
Read: times


 
#143587 - RTFM!
Responding to: ???'s previous message
Henry Aliwarga said:
the look up table is a character...

Is it?

As far as the 8051 is concerned, it's just byte values - how you choose to interpret those values is entirely up to you!

if I want to get 32h,
I have to know what character is represent 32h

Why?
If you want 32 as a hex value, just write it using the appropriate syntax for your assembler

For example, in 'C', the following are all entirely equivalent:
   unsigned char byte_value;

   byte_value = 0x32; // Hexadecimal
   byte_value =   50; // Decimal
   byte_value =  062; // Octal
   byte_value =  '2'; // Character

Again, you haven't stated what assembler you're using, so nobody can tell you what the appropriate syntax is - you will have to read the manual to find out!

am I right??

I think you are over complicating it!

but I have some new problem....
If I want to get 0dH....

Again, if you want 0D as a hex value, just write it using the appropriate syntax for your assembler


List of 11 messages in thread
TopicAuthorDate
look up tabe            01/01/70 00:00      
   Structure ok, program doesn't make sense            01/01/70 00:00      
   Wrong tags!            01/01/70 00:00      
      look up tabel            01/01/70 00:00      
         Table            01/01/70 00:00      
      get 8 bit from look up table..            01/01/70 00:00      
         Check you assembler syntax!            01/01/70 00:00      
            I know...            01/01/70 00:00      
               RTFM!            01/01/70 00:00      
               Characters - surely not?!            01/01/70 00:00      
                  Thanks guys....            01/01/70 00:00      

Back to Subject List