I recently took a class on ARM assembly, and yet I don't even know half of these x86 instructions.
Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
Just yesterday I ran into some chucklehead here on Lemmy that had convinced themselves that the average person would interpret "crypto" to mean SSL rather than cryptocurrency.
Now I want to know what int3 does.
https://en.wikipedia.org/wiki/INT_(x86_instruction) (scroll down to INT3)
https://stackoverflow.com/a/61946177
The TL;DR is that it's used by debuggers to set a breakpoint in code.
For example, if you're familiar with gdb, one of the simplest ways to make code stop executing at a particular point in the code is to add a breakpoint there.
Gdb replaces the instruction at the breakpoint with 0xCC, which happens to be the opcode for INT 3
generate interrupt 3. When the CPU encounters the instruction, it generates interrupt 3, following which the kernel's interrupt handler sends a signal (SIGTRAP) to the debugger. Thus, the debugger will know it's meant to start a debugging loop there.
I’m pretty sure I’ve had this exact conversation. Took me a minute to understand what the point was.
NOP is $EA, of course, and... um...
...sorry, I'm just a Commodore 64 scrub, I don't know nothing about this high and mighty Intel 8086 nonsense.
[looking up]
...it's 0x90 on IA-32? WHAT? Someone told me every processor used 0xEA because that was commonly agreed and readily apparent. ...guess I was wrong
My daughter told me the other day, "I bet I could figure out a Commodore 64 if I had one."
Good luck figuring out LOAD "*",8,1 by yourself, kid.
Someone told me every processor used 0xEA
Not sure if this is a riff on the joke or not.
Back in the day I dabbled in 6510 code, and up until today hadn't even bothered to look at a chart of opcodes for any of its contemporaries. Today I learned that Z80 uses $00 for NOP.
Loth as I am to admit it, that actually makes sense. Maybe more sense than 65xx which acts more like a divide-by-zero has happened.
The rest of the opcode table was full of alien looking mnemonics though, and no undocumented single byte opcodes? Freaky, man.
But the point is that not even Z80 used $EA. If the someone was real they probably meant every 65xx processor.
there is an additional layer to this joke for those who understand turing completeness. And it elevates it to a whole other level of snark.
I'm missing the joke... would anyone be so kind to help me understand?
The people in the picture are so used to working with assembly language, that even though they know the average person doesn’t know much about assembly, they assume the average person knows a little, which is already way more than the average person actually knows.
I speak fluent x86, I've been writing xor eax, eax
before rax
was a thing and you had to wonder whether you shouldn't be using xor rax, rax
(you shouldn't), I figured out how to write linux binaries in pure assembly before arch was a thing, just don't throw sse or something arcane like aaa
at me. But damned if I know a single opcode.
Reverse engineers are a whole different kind of breed. And apparently they hate rust.
One of the most useful concepts ever:
the Curse of Knowledge.
Explaining something to someone? Zoom out. Back up. What if that person were an alien, how much more context would you need to explain?
The curse of knowledge is a cognitive bias that occurs when an individual, who is communicating with others, assumes that others have information that is only available to themselves, assuming they all share a background and understanding. This bias is also called by some authors the curse of expertise.
what's it called when you try to be aware of this and inadvertently say stuff that comes off as condescending, umm, asking for a friend
ooooof
I know for men who are equal opportunity overexplainers it can still be seen as “mansplaining” when overexplaining to women.
But in general, if your tone of voice is right and it’s still happening, perhaps communicating your intention and a safeguard would work, at least sometimes?
May I try to explain this? If I start too basic, and overexplain so it feels condescending, please stop me so I can dig into it more technically.
My friend really needs to learn about this. He works for Intel and does some really involved stuff, I on the other hand am a moronic jackass factory worker.
No friend, I haven't the slightest idea what you're trying to tell me you did if you keep using technical terms.
If you said something like “if I were a marketing intern…” or “if I were a college freshman majoring in English, how would you explain it?”
…would he not know how to clearly communicate still? :)
Maybe get him with the “is this a curse of knowledge situation?” (along with a link to Wikipedia) heh
"oh you laughed at that joke despite the fact that the bridge followed the falling action instead of preceding the punch word? Amateurs shouldn't be allowed to watch comedy."
I mean I'm only missing int3
I think it is 0xCC, or in long form 0xCD03
I didn't even know they released int2
You guys have int?
I rolled a 14, so I have a +2 modifier.
I've got intelligible but that's about it
I mean who hasnt watched "Assembly Language in 100 seconds" by Fireship
Just looked this up and subscribed to the channel.
I feel attacked.
I feel like I skipped right over this comment.
JMPed
I'm more in a JNZ mood.
of course nods along
NOP sled gang rise up
0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^
IDS will catch that. You need a logical sled that does effectively nothing but isn’t actually composed of NOPs.
Isn't there a version about mineralogy?
"So this here is a rock"
"Uhh, in english please?"
"Oy! Guv! This here's a rock, innit?"
All the code I know is stackoverflow search results.
Things said by Github copilot.