Live data from Hacker News

Assembly Language Programming: Still Relevant Today (2015)

wilsonminesco.com

11–20 of 100 posts

Re: Assembly Language Programming: Still Relevant Today (2015)

#11

> Assembly language yields maximum control and execution speed. It yields the only control and execution. Almost programs are generated through an assembler and assembly language. How could it possibly not be relevant?

There are a huge number of software engineers today, dare I say most, who cannot read or write assembly and are isolated from it by multiple layers of abstractions.

Re: Assembly Language Programming: Still Relevant Today (2015)

#12

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

When I was young I imagined that when I'll be an advanced programming/CS student I would learn advanced stuff like self-modifying code. Too bad real life is not that exciting...

Re: Assembly Language Programming: Still Relevant Today (2015)

#13

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

> I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. Why's that? I'm not aware of any issues specific to x86.

x86 is actually one of the easier platforms to have self-modifying code on, because you don’t have to flush the instruction cache.

Re: Assembly Language Programming: Still Relevant Today (2015)

#15
post #12

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

When I was young I imagined that when I'll be an advanced programming/CS student I would learn advanced stuff like self-modifying code. Too bad real life is not that exciting...

If you’re interested, JIT compilers or malware reversing is a “real” place where this knowledge is useful.

Re: Assembly Language Programming: Still Relevant Today (2015)

#16
post #12

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

When I was young I imagined that when I'll be an advanced programming/CS student I would learn advanced stuff like self-modifying code. Too bad real life is not that exciting...

You can get a job in compilers if you want. Message me via my profile if you don't know where to start.

Re: Assembly Language Programming: Still Relevant Today (2015)

#17

> Assembly language yields maximum control and execution speed. It yields the only control and execution. Almost programs are generated through an assembler and assembly language. How could it possibly not be relevant?

There are a huge number of software engineers today, dare I say most, who cannot read or write assembly and are isolated from it by multiple layers of abstractions.

I know it's abstracted away, but it's still relevant to how the programs run because almost all programs go through an assembly language phase.

Re: Assembly Language Programming: Still Relevant Today (2015)

#18

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

It's quite widely used for dynamic library jump tables. When calling a function in a dynamically linked library, it calls a stub, which is initially a call to the lazy linker, but gets replaced with a call to the resolved function.

You may be remembering early x86 chips that didn't properly invalidate the instruction cache after a write. Modern chips are fully cache-coherent.

Re: Assembly Language Programming: Still Relevant Today (2015)

#19

Earlier quoted context omitted.

There are a huge number of software engineers today, dare I say most, who cannot read or write assembly and are isolated from it by multiple layers of abstractions.

I know it's abstracted away, but it's still relevant to how the programs run because almost all programs go through an assembly language phase.

What languages don’t? All of them execute on the processor in some way.

Re: Assembly Language Programming: Still Relevant Today (2015)

#20
post #18

"...self-modifying code, [is] sometimes appropriate to solve certain problems that have no other solution, or for improving efficiency, as in double-indirect addressing." I have read that self-modifying code on the x86 architecture is pretty dangerous at the assembly level. More broadly, this kind of comes back to all the issues in the "C is not a low level language" thread. Some level of assembler certainly gives th…

It's quite widely used for dynamic library jump tables. When calling a function in a dynamically linked library, it calls a stub, which is initially a call to the lazy linker, but gets replaced with a call to the resolved function. You may be remembering early x86 chips that didn't properly invalidate the instruction cache after a write. Modern chips are fully cache-coherent.

That’s not self modifying code, though; it’s just an indirect jump through a pointer.
Post reply on HN