News for hackers. Stuff that matters.
Re:The Art of Assembly Language (1996) by vram22 on Thursday March 29, 2018 @04:52PM (#16710931)
Just use a programmer's calculator or a software calculator (e.g. bc on Unix, RealCalc on Android) for the hex math (and for math in other number bases and conversions between bases too). Or even write one of your own as an exercise and then use it.
Re:The Art of Assembly Language (1996) by heavenlyblue on Thursday March 29, 2018 @06:12PM (#16711565)
Do you even do any of the hex math when writing actual code in assembly?

I understand when you use something along the lines of a disassembler that requires you to actually see the addresses of the values. But even these are sophisticated enough to give you symbolic values instead.

Re:The Art of Assembly Language (1996) by khedoros1 on Thursday March 29, 2018 @06:20PM (#16711633)
A lot of my hobby programs are emulators or parsers for old file formats (think DOS-era games). Bitfields become important, and they're more convenient to express in hex than in decimal.

There are times where it feels convenient to express things in decimal and times where it seems better to use hex.

Re:The Art of Assembly Language (1996) by vram22 on Thursday March 29, 2018 @06:51PM (#16711932)
>Do you even do any of the hex math when writing actual code in assembly?

There are multiple reasons why it is useful or convenient to deal with data (whether memory addresses, data values, colors, etc.) in hex (including doing math on such hex values).

As I said in another comment in this thread, I have not done a lot of work in assembly language; but have done enough and read enough about it to know that it is useful, and not just a cool or retro thing that developers do.

The fact that two hex digits compactly represent a byte, the fact that one hex digit can represent a nibble/nybble [1], the fact that machine registers on devices attached to computers (such as printers, scanners, any other electro-mechanical equipment with a computer interface) are used to programmatically read and write data to and from those devices, and thereby get their status and manipulate and control them, are some of the reasons why hex and hex math and bit-twiddling in hex and binary is useful and still done.

Depends on what kind of applications you write in assembly (or even C), I guess.

[1] https://en.wikipedia.org/wiki/Nibble

Also see comment by khedoros1.