Decimal Binary Conversion

Introduction

Inside the micro arithmetic functions use the binary format. But the human want read an input decimal numbers. To do so, all input and output values must be converted.
Here is a part of my arithmetic library for this tasks:

Program description

My arithmetic library works with a stack. All operands must be put onto this (LSB first). The operation works on the last one or both operands. The precision is only limited by the internal RAM (256Bytes).
For binary to decimal conversion load the value in the stack and point with APointer after the MSB. On every call of ADIVR10 the value was divided by 10 and the remainder is in the ACC register. The F0 flag was cleared, if the result is not 0. So you can detect the end of conversion.

For decimal input you must first clear the operand. The decimal number must be load to ACC before every call of AMULA10. The previous value was multiplied by 10 and then the new digit added.