AnsweredAssumed Answered

Calculating an Average in HCS08 Assembly

Question asked by Bob Sheldon on Apr 8, 2010
Latest reply on Apr 9, 2010 by Bob Sheldon



I am wondering the simplest and best way is to calculate an average of 3 8-bit numbers using HCS08 Assembly code.  I'm getting stuck on what happens when adding the first two numbers results in an overflow and how to proceed on getting the final sum before dividing by 3 (which I was planning on doing using the DIV instruction, but that depends on your suggestions).