Comment

Comment by IshKebab

> ProTip: Hexadecimal literals are prefixed with 0x.

I love the idea that someone could get to this page and not already know that!

Also this nicely highlights my pet peeve with assembly:

    add  rd, rs1, rs2  # rd = rs1 + rs2
It's very difficult to remember which parameter is the destination etc. IMO it would be much nicer if assembly had just a little more syntax for that sort of thing. E.g.

    rd = add rs1, rs2
    t0 = li 5
Just so the destination register is obvious. Ah well, nobody's going to do that. Assembly parsing is a total mess; there's no official grammar or anything - it's just "what GCC/LLVM do".
parent IshKebab 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton