Hallo,

Ich habe neues zu berichten und zwar habe ich die Asurolib PrintInt etwas verbesert.
Ich denke das Ergebnis läßt sich sehen:

Ein Minimalprogramm mit der originalen PrintInt kompiliert
Code:
#include <asuro.h>

int main(void)
{   
Init();
while(1)
      {  
      
	 //PrintChar(x);
	 PrintInt(-1000);
      }   
	return 0;
}
Ergebnis
section size addr
.text 1160 0
.bss 18 8388704
Dann die geänderte PrintInt, die ich zwar noch PrintChar nenne, sie schluckt aber locker int
Code:
#include <asuro.h>

void PrintChar(int x)
   {
   int b=0;
   if (x < 0) {
	SerWrite('-',1);
	x = -x;
   }
   if (x >= 10) {
	while (x >= 10) {
	b++;
	x -=10;
	}
	PrintChar(b);

	}
   SerWrite(x + '0',1);
   }
	
   
int main(void)
{   
Init();
while(1)
      {  
      
	PrintChar(-1000);
      }   
	return 0;
}
Ergebnis
section size addr
.text 864 0
.bss 18 8388704
Ersparnis von 296 Bytes !
Meine Funktion benutzt zwar Rekursion, was den Stack etwas belastet, aber ich denke, es ist nicht so schlimm oder ?

Gruß Sebastian