mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Optimize printing functions
This saves 508 bytes in the HOME area by: - Getting rid of the expensive hex array indexing - Having print_short and print_long delegate to print_byte This is at the expense of increasing the stack depth a tiny bit. Stack usage isn't an issue so far since I see ~96 bytes of untouched stack memory.
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ extern __xdata struct uip_eth_addr uip_ethaddr;
|
||||
// Headers for calls in the common code area (HOME/BANK0)
|
||||
void print_string(__code char *p);
|
||||
void print_string_x(__xdata char *p);
|
||||
void print_long(__xdata uint32_t a);
|
||||
void print_long(uint32_t a);
|
||||
void print_short(uint16_t a);
|
||||
void print_byte(uint8_t a);
|
||||
void itoa(uint8_t v);
|
||||
|
||||
Reference in New Issue
Block a user