[LinuxBIOS] Convert hex to dec

Peter Stuge peter at stuge.se
Mon Jul 9 14:32:16 CEST 2007

inline void print_info_dec(unsigned long value,unsigned long res) {

On Mon, Jul 09, 2007 at 09:43:49AM +0300, Indrek Kruusa wrote:
>         print_info("CPU ");


>         print_info(" MHz\r\n");

Note this only prints the modulus while Indrek's code indicates that
the value does not fit in 3 positions by printing a non-digit
hundreds character.

Multiply the resoluton by 10 to get more digits. 1000=4, 10000=5 etc.

Omitting leading 0:s would need some state to be kept and cost one
more register.


More information about the coreboot mailing list