I have an interesting problem in a program I'm working on. I have input strings from a file that I'm reading in one by one that are supposed to be used as a hex value later but I'm supposed to store the double digit into a single character byte. How do I do this?
Input:
ADD 3 18
ADDF 3 58
ADDR 2 90
AND 3 40
BASE 0 FF
BYTE 0 FF
CLEAR 2 B4
(third column is the hex values represented as a string)
How do i store the double digits into the single byte of ot_opcode?Code:char ot_opcode;