Simple command line tool for hexadecimal (aslo hexadecimal and decimal mixed) calculations
Tool is very usefull when you are working with terminal, Some times, it's necessary to calculate address and set a breakpoint, I got crazy openning hex calculator, converting decimals to hexadecimals, calculating, and going back to terminal. Thats why I wrote this small tool.
gcc main.c -o bin/hexcalc
sudo cp bin/hexcalc /usr/bin
or if you're running under osx, see already compiled file (bin/hexcalc)
Conversions
$>> hexcalc 12345 evaling: 12345 result : 0x3039
Hexadecimal calculations
>> hexcalc 0xffffaaaa - 0xaaaa + 0xbbbb evaling: 0xffffaaaa-0xaaaa+0xbbbb result : 0xffffbbbb
Mixed calculations
>> hexcalc 0xffffaaaa + 1234 - 0xa - 234 evaling: 0xffffaaaa+1234-0xa-234 result : 0xffffae88