frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Let's Learn x86-64 Assembly (2020)

https://gpfault.net/posts/asm-tut-0.txt.html
165•90s_dev•6h ago

Comments

90s_dev•6h ago
I came to the party way to late. A month ago, I found out asmjit was a thing, and now it's happily embedded in my app. But I don't know assembly! I tried to learn a few times since the early 2000s but the timing was never right. But hand written asm as a feature fits perfectly into my upcoming app, so now I am on a roll learning assembly! Here are some more resources I found so far:

https://news.ycombinator.com/item?id=22279051

https://sonictk.github.io/asm_tutorial/#introduction/setting...

https://cs.brown.edu/courses/cs033/docs/guides/x64_cheatshee...

https://people.freebsd.org/~lstewart/articles/cpumemory.pdf

https://learn.microsoft.com/en-us/cpp/build/x64-calling-conv...

enjoytheview•3h ago
Here's a really good free one:

OpenSecurityTraining2 Architecture 1001: x86-64 Assembly

https://p.ost2.fyi/courses/course-v1:OpenSecurityTraining2+A...

They also have RISC-V and many other for debuggers and reverse engineering tools (ida/ghidra for example)

Razengan•6h ago
I wish there were more articles and resources about modern ARM assembly. Not that I ever will or have programmed in Asm, but I like learning about it and imagining I will, and Intelisms feel so archaic and crusty in comparison.
90s_dev•6h ago
The first HN link in my comment addresses that. The short version: learn the earliest asms first, then progressively learn the newer ones until you get to today, and none of the knowledge will be wasted. Kind of like fast-forwarding.
mjevans•5h ago
I wouldn't say you are wrong, but I would also postulate.

The smallest, simplest, 'useful' (in terms of useful enough that lots of devs did good work with it and thus it might also be 'popular') ASM sets are probably also sufficient to start with. Provided you've got a good guide to using them, and also ideally a good sheet for why given instructions are packed the way they are in binary.

I do agree you're more likely to find pointers to such resources in more classic architectures. They're also more likely to be easy to find free copies of useful literature.

throwaway31131•4h ago
I'm not sure how "useful" or "good" the work is. But some one instruction computers have a considerable amount of tooling already in place.

i.e. https://esolangs.org/wiki/FlipJump

Flip Jump is amazing. I understand the theory and how it works but it still amazes me that it does. Things like this is why I love the science in computer science.

And subleq even has a c-compiler and operating system, just wow. https://en.wikipedia.org/wiki/One-instruction_set_computer#S...

spauldo•5h ago
Any reason for ARM specifically? There are a lot of microcontrollers out there that fairly simple but without Intel's crustiness. Atmel, for instance. And if you decide to actually try experimenting with them you can get yourself set up for it for less than $100.
throwaway31131•5h ago
https://shop.elsevier.com/books/computer-organization-and-de...

It's currently 50% off and not only will you learn ARM, and some history about ISAs in general, but you'll learn more about how the computer itself works.

And if ARM isn't a hard requirement, an older edition that uses RISCV as the core ISA is a free download.

https://www.cs.sfu.ca/~ashriram/Courses/CS295/assets/books/H...

Highly recommended.

pmxi•1h ago
The first link was the textbook I used for my computer architecture course last semester and I concur. This was the first time our professor taught ARM instead of x86_64 because he believes ARM is the future.
slashtom•1h ago
I learned on the MIPS processor, computer organization / architecture one of the most challenging CS courses for me. I don't remember much but I definitely remember the mips pipeline...
lauriewired•3h ago
This is my own channel, but I made a 10+ part series on modern ARM assembly you may find interesting. I used CPUlator for the demonstrations, which is a nice way to inspect the memory as well as the individual registers as you are running a program.

All runs in the browser:

https://youtube.com/playlist?list=PLn_It163He32Ujm-l_czgEBhb...

WalterBright•1h ago
I'm learning AArch64 assembly in the process of writing a code generator for it. godbolt.org is a great resource for "how do I do this?" Write a short function, run it through godbolt.org, see the instructions generated, lookup the instructions in the spec:

https://www.scs.stanford.edu/~zyedidia/arm64/encodingindex.h...

It'll be my keynote presentation at the D conference next month.

Asm2D•6h ago
I think AsmGrid has a great overview of X86 and AArch64 instructions:

  - https://asmjit.com/asmgrid/
electroglyph•6h ago
wow, that's great. thanks for sharing!
__alexander•5h ago
I haven’t seen this site before. Thanks for sharing it.
rfl890•5h ago
Felix Cloutier's page has always been my go-to
mananaysiempre•4h ago
For x86 encodings, there’s also http://ref.x86asm.net/index.html and of course the venerable https://sandpile.org/.
gnabgib•5h ago
(2020) Discussion at the time (180 points, 38 comments) https://news.ycombinator.com/item?id=24195627
nice_byte•4h ago
Author here. The final part of this series is still sitting in my drafts.

It was nominally supposed to be about flow control instructions, but as it goes with those things, it spiralled and ended up touching on relocations, position-independent code, aslr... One on these days I'll clean it up and post it

90s_dev•3h ago
Please do!
pm2222•2h ago
>> Additionally, the higher 8 bits of rax, rbx, rcx and rdx can be referred to as ah, bh, ch and dh.

Did you mean “ax, bx, cx, dx”?

anamexis•2h ago
Those would be the lower 8 bits, no?
pm2222•2h ago
ax=ah:al eax=?:ax rax=?:eax
grg0•2h ago
It's neither. al is the lower 8 bits of ax (ah the higher 8 bits). ax is the lower 16 bits of eax. eax the lower 32 bits of rax.

Here's the AMD manual: https://docs.amd.com/v/u/en-US/40332-PUB_4.08

wunused•2h ago
In a 64 bit register, e.g., RAX, AL refers to the lowest 8 bits [0-7] and AH refers to the next 8 bits [8-15].

Together, AX refers to bits [0-15]. EAX refers to [0-31].

It's counterintuitive (or at least, inconsistent) that we have a name for bits [8-15] but not for [16-31] or [32-63]. My fuzzy understanding is that this came about from legacy decisions.

This page has a helpful visualization at the top: https://www.cs.uaf.edu/2017/fall/cs301/lecture/09_11_registe...

ordu•1h ago
ax, bx, cx, dx are 16 bit registers referring to the lower 16 bits of rax, rbx, rcx, and rdx respectively. Bits 0..8 can be referred as al/bl/cl/dl, bits 8..16 as ah/bh/ch/dh.
wunused•1h ago
It's ambiguous, but I believe the comment you are replying to suggests that the sentence should read:

>> Additionally, the higher 8 bits of ax, bx, cx and dx can be referred to as ah, bh, ch and dh.

mixmastamyk•1h ago
Let's learn RISC-V assembly!

- https://en.wikipedia.org/wiki/RISC-V_assembly_language

- https://asm-docs.microagi.org/risc-v/riscv-asm.html

- https://riscv-programming.org/

- https://github.com/riscv-non-isa/riscv-asm-manual

dapperdrake•1h ago
AArch64/Arm64 assembly:

https://mariokartwii.com/armv8/ch11.html

urda•1h ago
It's always a great way to get a better understanding of things but at least just poking around assembly a bit once. You do not have to make a project or anything big, but do not be afraid to check it out.
pjmlp•1h ago
Thankfully Intel syntax.
Cockbrand•7m ago
Now I'm curious - what other syntaxes are there?
vivzkestrel•59m ago
Spectacular post, are you planning to add sections on reverse engineering executables because this definitely looks pretty close
nice_byte•55m ago
(i am the author) not to this series, but the very first post on the blog is an example of a simple reverse-engineering exercise: https://gpfault.net/posts/ripping-sprites-from-super-cyborg....

Show HN: Refine – A Local Alternative to Grammarly

https://refine.sh
1•runjuu•2m ago•0 comments

An Impossible Blueprint for a Symbiotic Truth Engine

1•TheSeaGoose•15m ago•0 comments

-

https://www.thetimes.com/uk/transport
1•petethomas•15m ago•0 comments

Meta Acquires Voice AI Startup PlayAI, Continuing to Add Talent

https://www.bloomberg.com/news/articles/2025-07-11/meta-acquires-voice-ai-startup-playai-continuing-to-add-talent
1•mandeepj•19m ago•0 comments

Open Architecture designs conical Sun Tower as "giant sundial"

https://www.dezeen.com/2024/11/04/open-architecture-sun-tower-giant-sundial/
2•tzury•22m ago•0 comments

Bill Dilworth, Caretaker of 'The New York Earth Room,' Is Dead

https://www.nytimes.com/2025/07/12/arts/bill-dilworth-dead.html
1•salynchnew•24m ago•2 comments

Claude Neptune – AI-Powered Development Platform

https://claudeneptune.online
1•yszhu•26m ago•0 comments

Hards Things First

https://www.subbu.org/articles/2025/hard-things-first/
1•gpi•31m ago•0 comments

Still copy-pasting from Notepad every time?

2•slashitapp•34m ago•0 comments

Silicon Valley is racing to build the first $1T unicorn

https://www.economist.com/business/2025/07/10/silicon-valley-is-racing-to-build-the-first-1trn-unicorn
3•petethomas•34m ago•1 comments

Filesystems and the problems of exposing their internal features

https://utcc.utoronto.ca/~cks/space/blog/tech/FilesystemsNotExposingFeatures
2•colinprince•35m ago•0 comments

WHDLoad, the AmigaOS friendly Harddisk-Install package

https://whdload.de/
1•vardump•36m ago•0 comments

Nia: MCP that provides more context to coding agents

https://trynia.ai
2•jellyotsiro•37m ago•0 comments

Show HN: Urban Dictionary for Alignment Science Terms

https://www.alignmentdictionary.com/
1•nicetomeetyu•40m ago•0 comments

How the Cold War Culture of Anti-Communism Shaped Protest in the Sixties

https://www.jofreeman.com/sixtiesprotest/berkeleytalk.htm
1•akkartik•41m ago•0 comments

Ralph Wiggum as a "Software Engineer"

https://ghuntley.com/ralph/
1•ghuntley•46m ago•0 comments

Create custom Manuals uxing Tuxcards and Base64

http://erstaunlichdesign.blogspot.com/2025/07/create-custom-manuals-uxing-tuxcards.html
1•lihaciudaniel•49m ago•0 comments

PseudoSeer: Pseudocode Search Engine

https://pseudoseer.ist.psu.edu
1•0x54MUR41•51m ago•0 comments

Understanding Assembly Part I: RISC-V

https://mcyoung.xyz/2021/11/29/assembly-1/
1•tamnd•54m ago•0 comments

Myanmar's proliferating scam centers. These 'prisons' have three features

https://asia.nikkei.com/static/vdata/infographics/myanmar-scam-centers/
15•WaitWaitWha•58m ago•1 comments

In Air India's wake, revisiting the case for cockpit video recorders

https://theaircurrent.com/aviation-safety/air-india-171-cockpit-video-recorders/
1•caned•1h ago•0 comments

Jack Dorsey says his 'secure' new Bitchat app has not been tested for security

https://techcrunch.com/2025/07/09/jack-dorsey-says-his-secure-new-bitchat-app-has-not-been-tested-for-security/
1•dmitrygr•1h ago•1 comments

Security vulnerability on U.S. trains – known for 13 years

https://www.tomshardware.com/tech-industry/cyber-security/security-vulnerability-on-u-s-trains-that-let-anyone-activate-the-brakes-on-the-rear-car-was-known-for-13-years-operators-refused-to-fix-the-issue-until-now
1•ta988•1h ago•1 comments

Robot performs first realistic surgery without human help

https://techxplore.com/news/2025-07-autonomous-gallbladder-robot-realistic-surgery.html
1•JumpCrisscross•1h ago•0 comments

OpenAI's "Archive" Button in ChatGPT Still Eats Conversations No Way to Recover

2•contentist•1h ago•0 comments

The ongoing story of seconds on the taskbar

https://devblogs.microsoft.com/oldnewthing/20250421-00/?p=111095
1•thunderbong•1h ago•0 comments

Finding a Job: Build Something Real

https://blog.stuartspence.ca/2025-07-finding-a-job-build-something-real.html
1•zulban•1h ago•2 comments

3 Men Battle the FBI over Buried Civil War Gold. 'Stuff Just Doesn't Add Up.'

https://www.wsj.com/politics/national-security/civil-war-gold-treasure-hunters-fbi-7533544e
2•cwwc•1h ago•1 comments

Show HN: PlutoFilter- A single-header, zero-allocation image filter library in C

https://github.com/sammycage/plutofilter
2•sammycage•1h ago•0 comments

Errors on Fsync Are Unrecovarable

https://danluu.com/fsyncgate/
2•thunderbong•1h ago•1 comments