Assembly writing, not so much. Assembly reading, a huge win. However, the thing is you can't read assembly very well unless you've written it at some point.
The key factor is that besides the actual instructions and their syntax in assembly language you will also need to internalize the conventions for register usage and subroutine calling for a platform. Or several platforms. That's what allows you to eyeball compiler generated assembly and make sense out of it. Otherwise you'll just see moves between registers and stack, and wonder what happens next whereas the code in fact pops the return address from stack to pc and continues from a whole another location.
I think that the best way to learn assembly these days would be to write an assembler and machine code interpreter for some known platform, such as ARM. You can write the assembler and interpreter even in Python but at the end you should be able to execute existing native binary code, though slowly. The mental investment is larger than toying around with existing toolchains but gives you much more bang for the buck with regard to understanding cpus.
I agree, reading assembly is a great skill to have for some domains.
You'll almost never write assembly these days, except in the most niche of niches. A much more productive approach is to use intrinsics in a higher level language and examine the generated code. You don't even need to know every instruction. At this level you'll be looking out for sillyness such as register spills, hardware dependent badness (hello load-hit-stores)
The key factor is that besides the actual instructions and their syntax in assembly language you will also need to internalize the conventions for register usage and subroutine calling for a platform. Or several platforms. That's what allows you to eyeball compiler generated assembly and make sense out of it. Otherwise you'll just see moves between registers and stack, and wonder what happens next whereas the code in fact pops the return address from stack to pc and continues from a whole another location.
I think that the best way to learn assembly these days would be to write an assembler and machine code interpreter for some known platform, such as ARM. You can write the assembler and interpreter even in Python but at the end you should be able to execute existing native binary code, though slowly. The mental investment is larger than toying around with existing toolchains but gives you much more bang for the buck with regard to understanding cpus.