I have a port 0x80 BIOS post debug card installed in a PCI slot. I want to use it purposefully after booting by having the CPU temperature displayed on the card. The address takes one byte and is displayed in HEX. How do I convert the two digit decimal Celsius temperature values into a single byte for writing to the card? Remember, the display is HEX, so the byte output needs to be converted as such into something that is readable in base 10, although just getting the byte would be helpful at this point. Googling is driving me nuts.
echo d | dd of=/dev/port bs=1 count=1 seek=128
gives a display of 64, the ASCII byte for the letter d.
cat /sys/class/hwmon/hwmon0/temp2_input | cut -c1-2
gives the CPU temperature in °C in two bytes of ASCII: 58
A bash command string would be preferable as it could be called with a cron job or systemd timers.