Live data from Hacker News

Assembly Language Programming: Still Relevant Today (2015)

wilsonminesco.com

51–60 of 100 posts

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

#52
post #3

This is like being an architect and noticing that bricks and cement are still relevant... Of course they are!

It's more like being an architect and working with bricks and cement yourself. The author's argument is that sometimes an "architect" should do that. Agree or disagree, but it's certainly not a truism.

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

#53
post #47

Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure there are niches but I can see web developers getting away without writing assembly in their professional career.

Ok, we've put programming in the title above to make this distinction clearer. The author is not writing about computer-generated assembly language, such as compiler back ends.

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

#54

Excerpt: "Jeff Laughton (Dr Jefyll on the 6502.org forum) says, "I recall hanging out with a programmer pal o' mine and a younger fella who was in college. The young fella was complaining, 'We have to take assembly language,' and Len corrected him immediately, saying, 'You get to take assembly language!'"

What a great way to put it.

What's great is that learning assembly is like taking the first step to understanding the bridge between software and hardware.

I remember a taking class that started out as confusing as hell. The first few exercises seemed really mystical and just so brittle. You'd have to be a wizard to ever get this, one thinks. But by the end of the class, we made an asteroids-like game, complete with RNG based on input timing (the time between game execution and when the user clicked start). That was really an enlightening moment.

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

#55
post #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.

What do you do for a living?

I design and develop product for living. Universal guy. Mostly software but sometimes part of it is also firmware / elecronics / hardware. I happened to be a person who did everything from billing systems and other giant products for TELCOs and down to firmware for micro-controller.

Some products I own and some are made to order. Some I did on my own and for some I was a leader of big team

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

#56
post #49
post #47

Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure there are niches but I can see web developers getting away without writing assembly in their professional career.

Might see that flip in the coming years, if you consider web assembly (wasm) to be assembly. I do.

WebAssembly is not assembly in the ways that the article talks about. Like, writing it directly doesn’t give you any special control or guarantees over timing.

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

#57
post #49
post #47

Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure there are niches but I can see web developers getting away without writing assembly in their professional career.

Might see that flip in the coming years, if you consider web assembly (wasm) to be assembly. I do.

Wasm is different than assembly, so I don't think so.

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

#58

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

X86 is particularly friendly to self modifying code, going so far as to require fewer fences and hints when code is modified. It’s generally easier to implement self- and cross-modifying code on x86 than other ISAs, like say arm.

(I manage a team thag writes self modifying code for a living.)

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

#59

Earlier quoted context omitted.

I don't know much about x86, but on other cpus/architectures (PowerPC, MIPS, and possibly others) one might still need to fiddle with the instruction cache.

On modern IA32 and AMD64 architectures it involves the instruction cache in the cache protocol, so it's all done for you.

Yes but it still needs to: a) empty the write buffers into the cache, then b) flush the current instruction stream (in case the CPU has already fetched and decoded instructions from the modified memory)

Doing this on every write (especially considering multiple possible virtual to physical mappings) is very expensive in terms of hardware - it's why some architectures (RISC-V for example) have explicit instructions to trigger these things

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

#60
post #49
post #47

Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure there are niches but I can see web developers getting away without writing assembly in their professional career.

Might see that flip in the coming years, if you consider web assembly (wasm) to be assembly. I do.

WebAssembly is a bytecode format.
Post reply on HN