I'm trying to make a code that does the following

you type in an item hex, press a button, it searches the town for each occurrence of the item, then it displays how many of that item is in your town.

The only problem is, I can't figure how to make it add up normally, cause it adds up in hexadecimal. Can someone show me a routine (in ASM) that will add it up in decimal? (sorry, I sorta forgot a lot of ASM, so it hurts my head to try to think of a routine XD)