Hi Mylim,
to make math in assembler, usually in a fixed point you must change your mind.
First of all I assume you have to do simple calculations like those BigMac suggests to you, i.e. operations on 8 or 16 bit numbers which means an integer number ranging 0 to 2^16-1, i.e 0 to 65535. When you use a fixed point calculation you already know if this bigger number is an integer or represent a value in decimal or centesimal or millesimal format: I mean, if this represents a voltage, it may represent a value as large as 65535V or lower as 6.5535V if a single bit represents 1V o 100uV or any else in the middle or even higher or lower!.
If you have to multiply it for a fractional value B, where B= 0.14 in your example, you must multiply your 16 bit number for another 16 bit constant, taking the higher 2 MsB of your 4 Byte result, i.e. 16 out of 32 bit.
You must take in mind that in this case 2^16 (65536 dec or $10000) represents 1.0 (the unity). In your example 0.14 would be represented by a binary number in 16bit format equal to (65536*0.14)dec = 9175dec or $23D7
Expanding your example C= A*B, where A=128, B=0.14, in 16*16 bit multiplication this would give:
A=$0080, B=$23D7, C=$(0080*23D7)= $0011.EB80
where $0011 represents the integer result, in fact $0011= 17dec or INT(128*0.14) and $EB80 the fractional part you may use or discard depending on your needs. In this case the fractional part is very near 1, in fact it means 0.92 and represent quite a large error compared to the integer part: 0.92/17= 0.054 or 5.4%. For a good precision your multiplicand "A" must be as high as possible to have a result with good precision where the discarded bits in the multiplication would be little meaningful. You could have done this by adding 2 dummy lsB (00) on the multiplicand to do $8000*$23D7. Your result would have been $11EB8000 or $11.EB8000 which is higher in precision than before: this is specially useful if you have needed to use this result as an intermediate 16 bit operand ($11EB) for another calculation.
With a little care you may achieve a precision in the order of 0.05 to 0.01% at the end of all your calculations which is more than enough for any voltmeter based on a mCU embedded ADC.
Than you will finally need a routine which transforms your binary/hexadecimal result in a 3 to 5 digit decimal number, which is “CONVERT3” or “CONVERT4” from BigMac code snippet