Essentially, the uppercase letter of an operand is a combination of the operand type (immediate, register, memory) along with how that is encoded (as ModR/M bytes have a register and a register/memory field), while the lowercase letter is the size of the operand (largely 8-bit/16-bit/32-bit/64-bit for the 1-byte opcodes).
mras0•5h ago
Not sure why you're being downvoted. You need a to know quite a bit of esoteric knowledge to parse this beyond knowing x86 opcodes (even x86 assembly).
It's more or less the same information you get from the intel manuals (specifically appendix 2A of https://www.intel.com/content/www/us/en/developer/articles/t...). There you can also see what e.g. "Jb" means (a byte sized immediate following the instruction that specifies a sign-extended relative offset to the instruction).
One-byte opcodes here differs from 2 byte opcodes (386+ IIRC) prefixed by a 0F byte and even more convoluted stuff added later.
charcircuit•4h ago
>Not sure why you're being downvoted.
I downvote people when they say they don't know what something is when they could have used a LLM to explain it to them.
Rietty•4h ago
What if the LLM gives them bad information and they don't know it? I personally would also just ask in a thread than risk the LLM info.
jrockway•4h ago
I never punish people for asking a question. It's how you learn!
mras0•4h ago
The link is to an opcode map with strange abbreviations with no apparent explanation. Asking "What am I looking at?" without doing any research (with a LLM or otherwise) is entirely reasonable.
charcircuit•4h ago
It is entirely reasonable, but these kind of comments are essentially wishing sites could cater to their knowledge level.
It's like complaining that the article is not written in French. It's noise in the comment section of an article. If someone wants such a thing, browsers have functionality to translate pages to French. Not every site needs to have their own French translation to suit such a person.
wewtyflakes•3h ago
They were not asking for the website to change; they were asking for context so that they can appreciate the website.
charcircuit•3h ago
In this case the person was not asking anything. The person was stating they didn't understand. The equivalent in my analogy is a French speaker commenting that they don't understand English without further translation into French.
mras0•3h ago
I understand what you're getting at, but in this case even I (who know what most things on that page means) struggle to understand why it was submitted. Are we looking for the 0E opcode? New optimization opportunities?
Genuinely asking, for this post did you click on the link and say "yeah, I got the point" or did you involve an LLM? If you did, what did you ask it? I'm asking because I want to get better at LLM use (Another example post (and prompt) where you've used this, that's also fine)!
charcircuit•3m ago
I didn't initially use an LLM, but when drafting my original post I did double check that Grok was able to explain it to ensure I want demanding the impossible.
So you would rather people ask a machine that is known to be unreliable and have no idea what it's talking about, than ask a forum of technically skilled people who will give them a good answer. That doesn't seem very reasonable to me.
sparkie•3h ago
You realize that LLMs are trained on human discussions right?
If everyone stops asking questions and asks the LLM instead, there is no new training data for future LLMs to learn from. They will stagnate, or consume their own slop, and regress.
Sharlin•5h ago
Need a couple of instructions for accessing memory (and possibly loading immediates) but otherwise seems like a perfectly adequate general-purpose instruction set. Might be fun (for some values of "fun") to write a compiler backend for it.
jeffbee•5h ago
Tons of these have immediate operands. The question becomes is ADD with an implicit register destination and an immediate value in the next byte a "1-byte opcode"?
Sharlin•5h ago
Yes, indeed. I'd allow only mov to have a memory or immediate parameter as the only exception to one-byte encoding.
themafia•4h ago
You've always got the stack segment (SS) to play with and there's also:
They're one byte opcodes, but not one byte ops. Most of them have operands which are encoded in a ModRM byte which follows the opcode. The ModRM may be followed by a SIB byte, and that may be followed by a a variable size immediate|displacement. There are also optional prefixes to the opcode.
benlivengood•28m ago
Push, pop, inc, and dec with a 16-bit register argument are one byte, so is ret. That technically gives you enough to do anything, but you can include jz/jnz (which do take immediate bytes, maybe cheating?), stosw, lodsw, clc, and stc to implement Brainfuck (a little harder to perform input/output with single byte instructions, but maybe pretend the OS uses int1 or int3 for calls).
You could call it a sub-scene of the demoscene, I suppose.
mras0•3h ago
Size optimizing assembly code finds use in a variety of places. Demoscene for size constrained things is one of them, but also "hacking"/exploits and of course "whitehat" stuff (patches / compiler optimization etc).
0eh? It's for Canadian segment addresses; pushes that CS register all the way home past the 49th parallel.
ryanschneider•20m ago
A reverse engineer friend once taught me I could patch an x86 function with `0xEBFE` to get the CPU to spin forever. It wasn’t until much later that I understood that (IIRC) 0xEB is the “single byte” jump instruction and that of course 0xFE is -1 as a signed byte. Hence the spin.
GeorgeTirebiter•6h ago
jcranmer•6h ago
Essentially, the uppercase letter of an operand is a combination of the operand type (immediate, register, memory) along with how that is encoded (as ModR/M bytes have a register and a register/memory field), while the lowercase letter is the size of the operand (largely 8-bit/16-bit/32-bit/64-bit for the 1-byte opcodes).
mras0•5h ago
It's more or less the same information you get from the intel manuals (specifically appendix 2A of https://www.intel.com/content/www/us/en/developer/articles/t...). There you can also see what e.g. "Jb" means (a byte sized immediate following the instruction that specifies a sign-extended relative offset to the instruction).
One-byte opcodes here differs from 2 byte opcodes (386+ IIRC) prefixed by a 0F byte and even more convoluted stuff added later.
charcircuit•4h ago
I downvote people when they say they don't know what something is when they could have used a LLM to explain it to them.
Rietty•4h ago
jrockway•4h ago
mras0•4h ago
charcircuit•4h ago
It's like complaining that the article is not written in French. It's noise in the comment section of an article. If someone wants such a thing, browsers have functionality to translate pages to French. Not every site needs to have their own French translation to suit such a person.
wewtyflakes•3h ago
charcircuit•3h ago
mras0•3h ago
Genuinely asking, for this post did you click on the link and say "yeah, I got the point" or did you involve an LLM? If you did, what did you ask it? I'm asking because I want to get better at LLM use (Another example post (and prompt) where you've used this, that's also fine)!
charcircuit•3m ago
I asked it "Explain the syntax on the page https://www.sandpile.org/x86/opc_1.htm"
bigstrat2003•3h ago
sparkie•3h ago
If everyone stops asking questions and asks the LLM instead, there is no new training data for future LLMs to learn from. They will stagnate, or consume their own slop, and regress.