View Single Post
Old 08 September 2020, 10:48   #1
Registered User

Join Date: Feb 2020
Location: Germany
Posts: 92
div and mul of BCD or Hex?

Hello coder,

I am currently working on the display and calculation of scores. I have already read the thread "BCD Arithmetic - howto^". The simple adding and subtracting is no problem. But I have to divide the score by 50. Also the points can be increased by graduation 3*90 or 5*240 etc.
Now to my problem. For dividing and multiplying with BCD there are no 1:1 commands. Multiplying can be avoided by using LookUp tables and adding. But for x:50 there is no alternative.
Of course I can calculate everything in hex and convert the hex values to decimal for the display. But this eats a lot of cycles.
How can I solve the problem without overloading the computer.

Thanks in advance

@Admins: please move to right section, sorry

Last edited by JoeJoe; 08 September 2020 at 11:44. Reason: wrong section
JoeJoe is offline  
Page generated in 0.04574 seconds with 11 queries