write a decimal to binary conversion routine and transform the resultant binary to hexadecimal.
you have not specified it for which controller . remember assembly code differs for each controller
In Pic Assembler you simply tell it what the value is Decimal, Hex, Binary. example :-
movlw d '255'
movlw 0xFF
movlw b'11111111'
If when writing your code you want to use nearly all decimal values , in MPlab for instance ,you can set the default Radix to Decimal so all the complier assumes all values are decimal unless otherwise prefixed.
Its when you come to output the values to say an lcd that you then need some code to convert it to Ascii etc.
I've done it using a table... It was quite long time ago, I cannot remember exactly how I did, but I think I setup a ROM in assembly which has decimal input and hex output.
write a decimal to binary conversion routine and transform the resultant binary to hexadecimal.
you have not specified it for which controller . remember assembly code differs for each controller