mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +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 parent
23e2f5a99e
commit
9bd2d446d7
2 files changed
+35
-24
No files matched your search
+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