The faker's guide to reading x86 assembly language
1–10 of 49 posts
Re: The faker's guide to reading x86 assembly language
#2Other than that, this piece looks good as far as it goes.
Re: The faker's guide to reading x86 assembly language
#3I imagine an Assembly reader sees these things. I wonder if there’s a guide like this for them.
Re: The faker's guide to reading x86 assembly language
#4This was a nice read, but I was hoping for something one step above this. When I was writing an emulator, I spent so much time looking at 8080(ish) code that I began to see constructs for bigger concepts. Like, “oh you’re setting up and running a loop over some subroutine X times.” “You’re checking if a certain math expression equals a certain value before continuing.” Etc. I imagine an Assembly reader sees these thi…
Other than that, I like "Assembly Language Step By Step" by Jeff Duntemann, which is currently in its third edition and is Linux-only, as opposed to previous editions which were MS-DOS and Linux. He has example assembly code (Intel syntax for NASM, another reason I like his book) for download on his website:
http://www.duntemann.com/assembly.html
My only annoyance is that apparently, even the most recent edition from 2009 is still 32-bit only.
Anyway, beyond that, you'd be looking for information on using assembly language to perform some specific task, like writing vectorized numerical code.
Re: The faker's guide to reading x86 assembly language
#5Yes, the simple opcodes are the most-used, and this was one of the ideas floating around that helped inspire RISC, but be careful how you figure out which opcodes are different. For example, mov in x86 is extremely polysemous: It can be move from register to register, load register with data from RAM, store register contents out to RAM, store a constant out to RAM, and even perform ALU operations and then use the res…
Re: The faker's guide to reading x86 assembly language
#6Yes, the simple opcodes are the most-used, and this was one of the ideas floating around that helped inspire RISC, but be careful how you figure out which opcodes are different. For example, mov in x86 is extremely polysemous: It can be move from register to register, load register with data from RAM, store register contents out to RAM, store a constant out to RAM, and even perform ALU operations and then use the res…
Furthermore, the ability to put a memory operand on, say, an ADD instruction is close in effect to having a compressed instruction encoding that encodes "LD to a temporary, unnamed register followed by ADD that register to the destination register" in fewer bytes than having both (also avoids clobbering a register, useful given the thin 8 registers 32-bit x86 has).
[1] Okay, several, to vary the operand size (8-bit, 16-bit, 32-bit, 64-bit).
Re: The faker's guide to reading x86 assembly language
#7This was a nice read, but I was hoping for something one step above this. When I was writing an emulator, I spent so much time looking at 8080(ish) code that I began to see constructs for bigger concepts. Like, “oh you’re setting up and running a loop over some subroutine X times.” “You’re checking if a certain math expression equals a certain value before continuing.” Etc. I imagine an Assembly reader sees these thi…
An easy way to learn to see those patterns is through exploring compiler output: https://godbolt.org/ Other than that, I like "Assembly Language Step By Step" by Jeff Duntemann, which is currently in its third edition and is Linux-only, as opposed to previous editions which were MS-DOS and Linux. He has example assembly code (Intel syntax for NASM, another reason I like his book) for download on his website: http://w…
Re: The faker's guide to reading x86 assembly language
#8This was a nice read, but I was hoping for something one step above this. When I was writing an emulator, I spent so much time looking at 8080(ish) code that I began to see constructs for bigger concepts. Like, “oh you’re setting up and running a loop over some subroutine X times.” “You’re checking if a certain math expression equals a certain value before continuing.” Etc. I imagine an Assembly reader sees these thi…
An easy way to learn to see those patterns is through exploring compiler output: https://godbolt.org/ Other than that, I like "Assembly Language Step By Step" by Jeff Duntemann, which is currently in its third edition and is Linux-only, as opposed to previous editions which were MS-DOS and Linux. He has example assembly code (Intel syntax for NASM, another reason I like his book) for download on his website: http://w…
Re: The faker's guide to reading x86 assembly language
#9 xxii
-----
vii
hmmm... now what do i do? how about uppercase/lowercase? XXII
----- = III i iv ii viii ...
VIIRe: The faker's guide to reading x86 assembly language
#10> or calculating pi in roman numerals xxii ----- vii hmmm... now what do i do? how about uppercase/lowercase? XXII ----- = III i iv ii viii ... VII