Live data from Hacker News

Assembly Language Programming: Still Relevant Today (2015)

wilsonminesco.com

1–10 of 100 posts

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

#6
There's food for thought there. As part of my current project I wrote an assembler for 8-bit Avr. (on github https://github.com/Lerc/AvrAsm/ )

Part of my motivation for this was to have an assembler that ran in the browser (for my fantasy console that also runs in the browser), but another big part of it was to write an assembler designed to be more friendly to people writing assembly directly.

When I wrote 6502 asm I mostly did it from Supermon which is a no frills experience. It's nice to see the features that assemblers have now, I think I'll be implementing quite a few of those macros from this link in my own assembler.

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

#7
"...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 the programmer as full access to the machine as possible. But naive assembler from the 8086 - 80486 eras is going to be rearranged in a lot of ways in a modern Pentium processor and counting on in-order execution may be a mistake.

Edit: at the same time, the modern processor doesn't really allow a lower level than assembler normally and the default approach is assuming flat memory but being aware of the pitfalls of multiple caches being involved.

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

#8
As recently as a year ago I used built in assembler in Delphi to perform some low level timing. It was not for just super-duper performance though. Surprisingly it was the most straightforward and simple way. Meanwhile my firmware for 3-Phase AC motor torque and speed control for really low power micro controller was doing fine with plain C without any assembly.

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

#9

"...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.

Dangerous in what way?

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

#10

"...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.

Post reply on HN