I'm sorry for asking this without any code to show you, but my teacher assigned us to make something like this as a surprise quiz, and me and my classmates don't have any experience in assembly. But how do we do this type of program in assembly? Could you input more than 3 digits? What about non-whole numbers such as "0.07"?
Asked
Active
Viewed 18 times
-1
-
[emu8086 doesn't support an 8087 floating-point](https://stackoverflow.com/questions/8289777/assembly-8086-floating-point-numbers-add-subtract) unit, so `fld` / `fmul` and so on isn't an option for handling fractional numbers. Software floating-point would be possible, but converting string float is hard in either direction for the general case of numbers like `1230000000000` or `0.000000000000000000123` (or the base-2 equivalents where the significant digits are all far from the decimal point). Anyway you might want fixed-point. – Peter Cordes May 14 '22 at 11:51
-
Or use a different emulator, one with an FPU, for this. (For your other question [How to multiply three "big numbers" and then divide them by 100 in emu8086?](https://stackoverflow.com/q/72237898) , extended precision integer is easier.) – Peter Cordes May 14 '22 at 11:52