Live data from Hacker News

Some Assembly Required: An approachable introduction to assembly

github.com

51–60 of 131 posts

Re: Some Assembly Required: An approachable introduction to assembly

#51
post #26

My favorite part is the heavily commented code examples. Those are much more useful for increasing my understanding than most other resources. To me, that level of information density just works better for my brain than articles or sites that try to explain things. Something about being _in the code_ while stepping through lines one by one with explanations is just so much easier to follow. I wish more learning resou…

> Something about being _in the code_ while stepping through lines one by one with explanations is just so much easier to follow.

I just go straight to the code. Same with SO - I'm not reading words, I'm reading code. Even with zero familiarity I find code is easier to read with inline docs vs. digging through someone's word salad. Truth is most of us aren't great technical writers.

That being said I did skim the content for this resource and found it to be pretty to the point and clear-cut. Even the metaphors and extra information were applicable to providing a good primer. I wish more devs would write with the same succinct technical clarity as this and maybe I wouldn't skip the word salad as much ha

Re: Some Assembly Required: An approachable introduction to assembly

#52
post #14

Assembly language is actually simple stuff. You just need to read the datasheet. No difficult type systems to deal with. In the old days programming assembly language was nasty because one mistake could mean your computer had to be rebooted and you lost your work. Not anymore.

Assembly is simple if all one does is printing hello world (even that is actually not trivial, because one needs to know/read the syscall and the ABI).

Anything beyond that gets complex quickly, in one way or another. On simple architectures, like the 6502, even doing a simple division is complex (heck, even additions are verbose, since 8 bits are too few for a lot of operations). On more complex architectures, like x64, there is a monstrous ISA full of inconsistencies.

Learning assembly as in learning an instruction set also doesn't include a lot of details of computer architecture, although at least some modern assembly books mix both domains.

Re: Some Assembly Required: An approachable introduction to assembly

#53
post #12

Earlier quoted context omitted.

Quoted post unavailable.

What do you mean by "pronoun-hedonism"?

There is a style of hedonistic lifestyle/culture that usually comes with an anime profile picture and pronouns in the twitter bio. If that is someone's true "form" then go for it, but when its fake yuck.

Re: Some Assembly Required: An approachable introduction to assembly

#54
post #14

Assembly language is actually simple stuff. You just need to read the datasheet. No difficult type systems to deal with. In the old days programming assembly language was nasty because one mistake could mean your computer had to be rebooted and you lost your work. Not anymore.

I taught myself x86 assembly from a book as a pre-internet teenager. My first .COM printed exactly what it was supposed to on the screen. Then it printed a bunch of random junk and my computer rebooted. This happened every single time I ran the executable. Eventually I actually read the first chapter properly and added MOV AH,4CH / MOV AL,0 / INT 21H. When my executable returned to the DOS prompt this time after runn…

Or? MOV DX, 200 / INT 27H

Re: Some Assembly Required: An approachable introduction to assembly

#55

Love this! Must admit, my favourite part of doing a CS degree was creating a CPU core from scratch (a cut down ARM, running on a FPGA), then writing asm to run on it. So satisfying knowing I made the actual CPU (at gate level) and ran my own code on it. I’d be happy to do a YouTube series covering how to do this if anyone is interested.

Yes please

Re: Some Assembly Required: An approachable introduction to assembly

#56

Love this! Must admit, my favourite part of doing a CS degree was creating a CPU core from scratch (a cut down ARM, running on a FPGA), then writing asm to run on it. So satisfying knowing I made the actual CPU (at gate level) and ran my own code on it. I’d be happy to do a YouTube series covering how to do this if anyone is interested.

The article links to a cool project I never heard of that does a similar thing - From Nand to Tetris[0].

[0] https://www.nand2tetris.org/

Re: Some Assembly Required: An approachable introduction to assembly

#58
post #53

Earlier quoted context omitted.

What do you mean by "pronoun-hedonism"?

There is a style of hedonistic lifestyle/culture that usually comes with an anime profile picture and pronouns in the twitter bio. If that is someone's true "form" then go for it, but when its fake yuck.

Gratuitous anime pictures are also common in 4chan tech culture, where folks just don't pay much attention to Twitter or to the pronouns fad. So you can see that either way, it just suggests a kind of non-serious/poser hedonism all around. BBS/early web culture was a lot more focused than that.

Re: Some Assembly Required: An approachable introduction to assembly

#59
So probably a really dumb question, but given that assembly has a limited number of operations and a limited number of registers, what are processors doing with the ever growing number of transistors added to them? What is processed with billions of transistors that can't be done with thousands?

Re: Some Assembly Required: An approachable introduction to assembly

#60
post #14

Assembly language is actually simple stuff. You just need to read the datasheet. No difficult type systems to deal with. In the old days programming assembly language was nasty because one mistake could mean your computer had to be rebooted and you lost your work. Not anymore.

It's simple in the same way C is simple. Sure it's a very small language with pretty straight forward commands, but once you try doing anything of significance it becomes extremely complicated and it's easy to do nasty things with it.
Post reply on HN