Page 1 of 1

ARM32 hexadecimal string to numeric conversion

Posted: Tue Jan 30, 2024 3:37 pm
by rhyde
I've been working on "The Art of ARM Assembly, Volume 2 (32 bit)" for a while now. I just finished the chapter on hexadecimal string to/from numeric conversions. Previously, I'd posted the solution for converting numeric values to hexadecimal strings. Here's the converse version that converts hexadecimal strings to numeric values. The code in the attachment was written for a Raspberry Pi, though the code itself will compile on a Cortex-M3 or greater. Cortex-M0+ requires a few modifications due to the limited instruction set and addressing modes. Fairly easy to convert this code if you need it (or just holler and I will upload that code as well).
Cheers,
Randy Hyde