5 ms·
Am I seriously the only person on HN who doesn't know x86 backwards and forwards? Because it seems from the comments like I'm the only one here that didn't know
by qwertyuiop924 10y ago
Am I seriously the only person on HN who doesn't know x86 backwards and forwards? Because it seems from the comments like I'm the only one here that didn't know this.
This was a good article, though.
- brianwawok 10y agoI would be surprised if more than 5% of programmers in the world knew more assemble then 10 instructions. Maybe only 10% know even 1.
- mgr86 10y agoThis reminds me of a (not so interesting) story. In about 1997 I was really into hanging out in yahoo chat rooms and making websites. I was 11. I asked for a book on computer programming. I wanted to do something more than hack away at the perl scripts that ran my guest book. Neither my father or I really knew what I was asking. I received a nice book on PowerPC programming [0]. If I recall it read like assembly. I still have the book on my bookshelf at home. I may have gotten 10% way through that book. It was quickly replaced with Sam's teach yourself perl in 24 hours. [0]: https://www.amazon.com/PowerPC-Programming-Intel-Programmers-McClanahan/dp/1568843062 https://www.amazon.com/PowerPC-Programming-Intel-Programmers...
- qwertyuiop924 10y agoOuch. I tried to learn C as a first language. The language isn't so bad... but the compiler errors are. Thanfully, I settled on Python.
- javier2 10y agoYeah, I didn't understand much of the gcc compile errors until I took a course in compilers...
- qwertyuiop924 10y agoGCC: Great compiler, terrible feedback.
- brianwawok 10y agoI lost the lotto with teach yourself Java in 24 hours. I did not learn anything in 24 hours. Notepad is a terrible IDE.
- qwertyuiop924 10y agoAnybody who actually recommends Notpad as a programming tool in a serious conversations deserves unbearable agony for the subsequent week. Because that's what they just set up somebody else for. I'm not even kidding: Notepad should die in a fire.
- logfromblammo 10y agoYou only need to know one: subtract and branch if <= 0.
- mi100hael 10y agohttps://twitter.com/FredericJacobs/status/770027539284758528 https://twitter.com/FredericJacobs/status/770027539284758528
- hyperpape 10y agoYou're not the only one. I know a tiny bit of x86, enough to read some short snippets, but my eyes glaze over at something as long as this. One problem is that I haven't found any handy tool that lets me just write and execute assembly without jumping through hoops.
- qwertyuiop924 10y agoWell, you don't need to know all of asm to write it. You don't need to know this strcmp instruction. As for convenient writing and execution of assembly, it depends on how low-level you want to go. You can write x86 asm on top of your unix or windows system relatively simply: Just write asm, and compile it with GAS/MASM/NASM/TASM/YASM. You'll need to know instructions, assembler syntax, and your OS's system call mechanism, as well as the calling conventions for any static or dynamic libraries you plan to use (except on systems where syscalls are not a formally exposed stable interface, like Solaris, where you only need learn the calling conventions for libraries). If you're utterly lost, and running Linux, I would recommend the excellent "Programming From The Ground Up," which is freely available online. If you want to write atop the bare metal, with no OS, an emulator is your best bet. Virtualbox or QEMU both work, but whatever you pick, it'll be a bit of a pain to work with.
- 2bitencryption 10y agorule #1 about Hacker News: ALWAYS make sure you comment to let people know how smart you are. This is IMPERATIVE. ...even if you have to Google it a bit to brush up, always come back to let people know that you are knowledgeable.
- qwertyuiop924 10y ago...you know, that explains a lot...
- jdc 10y agoYou might say this facetiously, but this is would lead to some very informative comments, right?
- qwertyuiop924 10y agoI disagree. If you never reveal a lack of knowledge, than you'll never learn anything from the conversation: some of my best experiences on HN were times I was totally wrong.
- serge2k 10y agoProbably people don't bother posting if they don't already know. Harder to show off if it's something you don't know about.
- joseraul 10y agoCPUs have gotten so complex that mastering their language (and behavior) is a skill on its own. Most people can get on with compiled/interpreted languages.
- newscracker 10y agoI agree with the "most people" part. On a tangential note, While it's true that nobody can be expected to master and write a large and well performing application in assembly language anymore (or better than a compiler could optimize it), there's something to be said for learning the deepest and most basic building blocks (ok, if we have to go even deeper, then learning the actual opcodes for assembly language instructions). IMO, it makes it easier to understand many higher level concepts as well as different kinds of technologies (the latter to some extent). This in turn helps with different kinds of thinking when designing and debugging a program written in a high level language. Something similar could be said for "closer to the machine" languages like C. Additionally, for those interested in the area of software security, this is a very useful layer to know well about, even if one has learned assembly language in another (popular) processor family. Knowing what features processors provide (like the support for virtual memory, among other things), and how they work, are also quite useful.
- gaius 10y agoThis is a fundamental distinction between true geeks who grew up hacking 6502, Z80, 68000 etc etc, and wannabes who jumped on the bandwagon later and think Javascript is "low level"...
- qwertyuiop924 10y agoNo, it's not. It's a fundamental distinction between those who have learned to operate at that level, and those who haven't. That is it. People who started out on HLLs can gain those skills, because it's ultimately just another paradigm. Saying those of us who didn't grow up on asm aren't true geeks rings of No True Scotsman to me. In addition, just because we weren't born a decade earlier doesn't mean we think JS is low level. That's just a flat-out mischaracterization.
- specialist 10y agoDon't sweat it. If you were maintaining a VM you'd also know this stuff.
- qwertyuiop924 10y agoWhat VM are you maintaining? Just curious...
- specialist 10y agoSorry, didn't mean to imply I was. I just didn't want you to judge yourself too harshly. The OP works on OpenJDK, deep diving into the JIT, JNI, etc. If you did similar work, you'd also likely know x86 much better.