Hello!
it's easy in C but i wanna leard it in assembly
One thing you might have to get right before starting: there
us NOTHING that you can do in assembler and that you cannot do in C.
C is extremely close to ASM. C is portable & reusable, assembly is not.
What you tell us is simply a matter of dividing your input value into
digits, and write each digit to the proper location.
Another thing: on small micro controllers, you should forget about
floating point. An example: you want to measure a voltage. You can
always use tricks, left and right rotations combined with comparisons
iinstead of multiplications or divisions.
For instance, on the micro controllers I use most (MSP430), a 16 bit
integer multiplication can be done in 3 clocks or so. As for a floating
point multiplication, it is about 300 cycles. So as a rule, if you don't
have a floating point unit, don't use float numbers.
Another thing: don't use divisions in real time. You can use one division
at setup time because it will be performed once only. But in real-time,
you shouldn't use divisions.
Dora.