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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/07/08 04:46
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#156448 - Shortcut...NOT
Responding to: ???'s previous message
There is no free lunch. The method to send a byte out the serial port is to load it into SBUF and then wait till the UART status tells you it's OK to sent the next one. There is no other method.

You can of course create a low level set of "driver" or "interface" subroutines that take care of the lowest level duties of dealing with SBUF and then add a next higher level set of routines that do things such as:

- Send out a CR/LF pair
- Send out a Form Feed (FF)
- Send a constant string from CODE memory that ends at a zero byte.
- Send the value from ACC as two hex-ascii digits.
- Send the value from ACC as a 1, 2 or 3 digit decimal-ascii value.

From this you can see you can make up a whole toolbox of clever routines that make the printing task a whole lot more pleasant to code up.

Michael Karas




List of 32 messages in thread
TopicAuthorDate
loading the SBUF shortcut?            01/01/70 00:00      
   Printing a string            01/01/70 00:00      
   Shortcut...NOT            01/01/70 00:00      
   You have to enrich your library of Assembly Code            01/01/70 00:00      
      that is not a shortcut            01/01/70 00:00      
         Library of Assembly Code            01/01/70 00:00      
            the key word            01/01/70 00:00      
               polled serial            01/01/70 00:00      
                  "living with interrupts "            01/01/70 00:00      
                     what I got out of all of this            01/01/70 00:00      
                        DPTR .... Yes!!            01/01/70 00:00      
                        Check out DPTR            01/01/70 00:00      
                     I AGREE            01/01/70 00:00      
                        agree with WHAT?            01/01/70 00:00      
                            I AGREE with ...            01/01/70 00:00      
   C shortcut            01/01/70 00:00      
      'C' confusion            01/01/70 00:00      
         Confused            01/01/70 00:00      
            Maybe, maybe not            01/01/70 00:00      
               printf baggage            01/01/70 00:00      
                  This should come as no surprise            01/01/70 00:00      
               27K lots of memory            01/01/70 00:00      
                  "C baggage"            01/01/70 00:00      
                     Getting off-topic            01/01/70 00:00      
                        I wholehardely agree            01/01/70 00:00      
         Shortcuts are for wimps!            01/01/70 00:00      
            Disagree            01/01/70 00:00      
            Half a million Lines?            01/01/70 00:00      
               I didn't use 'C' or other HLL's on the old PC            01/01/70 00:00      
   Poor choice of terms!            01/01/70 00:00      
      A subroutine?            01/01/70 00:00      
         more code-efficient that macros            01/01/70 00:00      

Back to Subject List