8.2 Base Conversion

Change the division program to convert a number from binary (internal representation) to a printable format in base 10.

.lcomm stringbuf 20
       stringlen = . - stringbuf
.text
.global _start
_start:
    # initialize to spaces first

    # fill in from last byte to first byte
    # convert to base 10
    # using a loop of division


Copyright © 2009-04-16 by Tak Auyeung