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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/23/11 12:35
Modified:
  06/23/11 13:02

Read: times


 
#182715 - Depends
Responding to: ???'s previous message
Oliver Sedlacek said:
Packed BCD is not a C type, so SDCC shouldn't support it. A library of BCD functions coded in assembler might use XCHD...

Note that the C language doesn't care about binary or BCD or trinary.

It has int, long int, short int, long long int, unsigned, unsigned int, ...

But the int data type could be implemented as BCD, maybe having an int with range -999999..999999 instead of something traditional like -32768..32767.

In the end, the compiler could have a compilation flag --bcd to select an alternative definition of int from the 2-byte or 4-byte binary variant.

List of 12 messages in thread
TopicAuthorDate
XCHD use            01/01/70 00:00      
   XCHG usage            01/01/70 00:00      
   Search...            01/01/70 00:00      
   Re: XCHD use            01/01/70 00:00      
   not generated            01/01/70 00:00      
      SDCC might add pBCD type of numbers            01/01/70 00:00      
         Not a good idea            01/01/70 00:00      
            Depends            01/01/70 00:00      
               You're right            01/01/70 00:00      
   another possibility ...            01/01/70 00:00      
      both: 8048 legacy + (packed) BCD            01/01/70 00:00      
         simple example            01/01/70 00:00      

Back to Subject List