Live data from Hacker News

Assembly Language Programming: Still Relevant Today (2015)

wilsonminesco.com

81–90 of 100 posts

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

#81
post #74

Earlier quoted context omitted.

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.

It's assembly against a virtual machine, not a physical one. You're right it's not appropriate for an embedded system or some other RTS, but assembly doesn't stop being assembly when you target a virtual machine.

It kinda does in this case. Don’t kid yourself. In real assembly, the really interesting part is how to use a finite register file. WebAssembly has an infinite slab of variables available, in the sense that you get to say how big it is. That fundamentally changes the game.

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

#82

> It is common for the beginner to want all the fancy tools too soon Am I the only one who’s never felt that way? I get grief from people around me (especially “hurry up and get it done” management types) for spending too much time in the low levels, trying to really understand what I’m doing and what’s going on.

You should change what people are around you, if possible.

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

#83
post #62

I'm rarely keen on posting negatives on articles that clearly took a lot of time to make, but I think this requires a bit of correction. I think this article is very, very simplistic. All of it relates to a 8 bits CPU that is 40+ years old. I switched to HLL as soon as I could get my hand on a compiler, namely, UCSD Pascal at the time! Then the Pascal, then to C and then myriads of other languages. I covered 6502, Z8…

This article is specific to the 6502 where the commonly used CC65 C compiler the author references produces much, much worse code speed wise than what you can with pure assembly. In that regard, the article is not simplistic in the least. Coincidentally, I messaged the author just yesterday about the for loop example to point out that it was generated without optimization. Even with optimization enabled, the code is…

I used to do my production code exclusively in 6502 assembler, with some tools in P-system Pascal. As I would read in magazines about the C language I would try to imagine what the C compiler would generate for certain constructs, and I couldn't imagine it being efficient compared to other 8-bit processors. Then we decided to experiment (at the company) with C and got a compiler. I was right, the code was awful. It used exactly the idioms I thought I would use if I had to to it. I can picture a really top-notch compiler doing better (because I'm more familiar with optimization in compilers now), but sooner or later some of the quirks (like 8-bit index registers and only page 0 can be used for pointers) will catch you.

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

#84

To me, assembly is one of the things while self studying CS that I felt lacked good support in resources such as this, MOOCs, or just plain explaining it. Usually when I post a topic trying to Demystify the topic I am greeted with an extremely hard to digest read about said topic that is more meant for people Already knowledgeable in the subject. And I feel assembly should be more a core building skill in a programme…

https://azeria-labs.com/writing-arm-assembly-part-1/

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

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

An architect might in fact design something down to the brick-and-mortar level, such that someone else assembles it to the actual building. That architect is working with bricks and cement, effectively at the design level.

That's the same as using assembly language, rather than poking binary/hex values into memory.

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

#86
post #75
post #57

Earlier quoted context omitted.

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

It targets a virtual machine, not a physical one, but other than that it's "assembly-like" enough that learning some core ASM coding practices will help you.

Not sure why you are sticking to your guns here. First, it's highly unlikely anyone would ever write wasm by hand. Second, the article rambles a bit but the most compelling argument for assembly is writing fast code for constrained hardware. At a high level, that's not what wasm is solving.

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

#87

To me, assembly is one of the things while self studying CS that I felt lacked good support in resources such as this, MOOCs, or just plain explaining it. Usually when I post a topic trying to Demystify the topic I am greeted with an extremely hard to digest read about said topic that is more meant for people Already knowledgeable in the subject. And I feel assembly should be more a core building skill in a programme…

If you really want to dig into the concepts behind assembler, the assembler language part of TAOCP is available for free download: http://mmix.cs.hm.edu/doc/fasc1.pdf . It doesn’t talk about a “real” assembler language like 6502 or 8086, but a made-up one that was designed to present the concepts. It’s easy to move from Knuth’s academic introduction to an actual assembler.

I actually want to learn it to work on reverse engineering projects.

I just don’t know how to get started at all.

I don’t know how people can reverse engineer a device that you don’t access to the running program to. How do you monitor and track all the bits being passed around to break back firmware? Specifically video game mods and hacks I wanted to dabble in since I find their programming fascinating and know I’d be interested to contribute most in my spare time in that.

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

#88
post #74

Earlier quoted context omitted.

It's assembly against a virtual machine, not a physical one. You're right it's not appropriate for an embedded system or some other RTS, but assembly doesn't stop being assembly when you target a virtual machine.

It kinda does in this case. Don’t kid yourself. In real assembly, the really interesting part is how to use a finite register file. WebAssembly has an infinite slab of variables available, in the sense that you get to say how big it is. That fundamentally changes the game.

There are real CPUs that are just like that.

In fact, most mainframes have always made use of microcoded CPUs, with Assembly being referred as bytecode on the programming manuals.

You just need to dive into IBM and Xerox PARC manuals, for starters.

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

#89

Earlier quoted context omitted.

If you really want to dig into the concepts behind assembler, the assembler language part of TAOCP is available for free download: http://mmix.cs.hm.edu/doc/fasc1.pdf . It doesn’t talk about a “real” assembler language like 6502 or 8086, but a made-up one that was designed to present the concepts. It’s easy to move from Knuth’s academic introduction to an actual assembler.

I actually want to learn it to work on reverse engineering projects. I just don’t know how to get started at all. I don’t know how people can reverse engineer a device that you don’t access to the running program to. How do you monitor and track all the bits being passed around to break back firmware? Specifically video game mods and hacks I wanted to dabble in since I find their programming fascinating and know I’d…

> video game mods and hacks I wanted to dabble in

Not sure you need assembly for that.

If you want to modify 3D rendered output, you normally need to adjust shaders, textures and such. For extreme cases, you can hook the entire Direct3D API adjusting how it works for the game. The only assembly you might need for that is shader assembly https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/... but not always necessary as the HLSL decompilers are often OK.

If you want to modify game logic, it’s normally implemented as scripts. Game designers and level designers don’t often know C++, and they certainly don’t want to recompile the game because it’s slow, they adjust scripts and see the result in real time.

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

#90
post #73

To me, assembly is one of the things while self studying CS that I felt lacked good support in resources such as this, MOOCs, or just plain explaining it. Usually when I post a topic trying to Demystify the topic I am greeted with an extremely hard to digest read about said topic that is more meant for people Already knowledgeable in the subject. And I feel assembly should be more a core building skill in a programme…

Modern assembly is kind of...bad. I would recommend checking out an old book for an old mainframe's assembly language. They're usually much less mystic by virtue of being much less complex. IBM had some really nice manuals and books; no one ever got fired for buying IBM because an IBM machine could be programmed by a dog. Octal is where it's really at, though, if you get really into this. A fun weekend project is to…

> Octal is where it's really at

Why octal, not hex?

Post reply on HN