Live data from Hacker News

An Introduction to x86_64 Assembly Language

hackeradam17.com

11–20 of 56 posts

Re: An Introduction to x86_64 Assembly Language

#11

This is a great resource, and the following is not a criticism, but an observation. What I've found with most assembly language textbooks and online resources is that while the basics get covered well enough, the fundamental knowledge base is often skimmed over, as are the many assumptions and conventions that are made in how the CPU is supposed to work. I first learned 8086 assembler from Peter Norton's book ( http:…

That book was great. I made the mistake (perhaps) of using it to try to learn assembly language right after learning BASIC (Advanced BASIC that comes with MS-DOS/PC-DOS) and before learning Pascal or C. It had a program you were supposed to type in (a hex editor), and I was able to get it to work, but I was not able to get programs of my own design to work except very tiny programs or to modify existing executables using DEBUG. (Then again, shortly after, I could not get C programs of my own design to work very often either. I forget how hard C is to a beginner sometimes.) Then again, eventually I was able to throw together a decent hex editor, in C this time, in an afternoon, and I am certain it was from internalizing what I had learned from that assembly book, and when I started including assembly language graphics routines in my C programs, I'm sure that helped as well. When everything moved to 32-bit protected-mode code I was kind of lost again though. That book is 16-bit real mode.

Re: An Introduction to x86_64 Assembly Language

#12

i always thought the art of assembly is the de facto bible [1] personally i had all these books and never really cared too much about them in the end is was having a c compiler and a good disassembler - ida at that time - that made me learn it. here's the free copy of ida 5 [2]. i think it doesn't do 64 bit, but it's good enough, and works perfectly fine in wine on both osx and linux. you can always use biew/hiew/oll…

The first AoA book was good. The rest, with the HLA crap in it, is not.

Re: An Introduction to x86_64 Assembly Language

#13
This seems like a great start, but it's lacking something that every assembly programming resource that I've ever come across lacks too:

How can I experiment?

How do I go from instructions in a text file, to compiling, to getting input in some form? What programs do I use (on Linux)? What commands do I run? What are fun projects that are worthwhile doing with assembly?

Beyond that, what are good applications of assembly in general? Where should I use it in my day-to-day development projects? Where can I read about best practices? Where can I find good examples of x86_64 assembly programming?

It's really easy to merely describe the instructions, the registers, the mapping from compiled procedural languages - but I feel like that information is superficial so long as you don't tell us how to apply it.

Re: An Introduction to x86_64 Assembly Language

#14
post #5

I am trying to develop a JIT for array processing [1]. Here are some resources I found useful so far * Dr Paul Carter's tutorial [2] * Intel processor reference [3] * C ABI standard [4] [1] https://github.com/wedesoft/aiscm [2] http://www.drpaulcarter.com/pcasm/ [3] http://www.intel.com/content/www/us/en/processors/architectu... [4] http://www.sco.com/developers/devspecs/abi386-4.pdf

You might find these interesting.

https://code.google.com/p/vfuncs/

http://terralang.org/

https://github.com/halide/Halide

Re: An Introduction to x86_64 Assembly Language

#15
Learning Assembly language has been on my list of "want to do" for a long time now but as I have never had a need for it professionally I kept putting it off. I actually have time for myself now and outside of learning to cook properly and cycle a lot I would really like to finally tick this off my bucket list. The problem is I am not too sure where to actually start. I want something that starts from the bottom and teaches me about the CPU and goes on from there. I know what a register for example but I don't know what a register is if you understand?

So is there a book or web resources that is really a beginners guide to assembly? I understand x86 is not the nicest place to start but I have an x86 CPU in my laptop and not much else so it is a better place to start that anywhere else really. Anyone got any advice?

NB: My background is very high level languages such as JavaScript and Python and not much lower level. A bit of C++ back in the 90s but that knowledge is long gone.

Re: An Introduction to x86_64 Assembly Language

#16
post #13

This seems like a great start, but it's lacking something that every assembly programming resource that I've ever come across lacks too: How can I experiment? How do I go from instructions in a text file, to compiling, to getting input in some form? What programs do I use (on Linux)? What commands do I run? What are fun projects that are worthwhile doing with assembly? Beyond that, what are good applications of assem…

You might like the assembly tutorial I am writing: https://plus.google.com/111794994501300143213/posts/9gxSUZMJ...

It's focused on actually doing rather than how stuff works. In order to succinctly be able to present this, I had to choose a target platform, which unfortunately seems not to be the one that you prefer.

My tutorial targets OS X, and there is great similarity between coding assembly on OS X and Linux. The tutorial does not spend much time pointing out these similarities, and you unfortunately don't get sensible error messages if you make mistakes. Never the less, you might want to try :)

Re: An Introduction to x86_64 Assembly Language

#18

This is a great resource, and the following is not a criticism, but an observation. What I've found with most assembly language textbooks and online resources is that while the basics get covered well enough, the fundamental knowledge base is often skimmed over, as are the many assumptions and conventions that are made in how the CPU is supposed to work. I first learned 8086 assembler from Peter Norton's book ( http:…

Looks like the book is freely available - https://openlibrary.org/books/OL2197699M/Peter_Norton%27s_as...

Re: An Introduction to x86_64 Assembly Language

#20
Are there any books available that someone could recommend for me to go down this route, specifically for hand crafting assembly routines inside my C++ programs. (note I'm currently only compiling for 32 bit). It's something of interest to me, but I've never gotten around to it. I'm comfortable with ARM assembly, and have a solid enough understanding to proceed, but the references I've come across so far go as far as "here's how to embed a simple ASM snipped inside your code, now you know how to do it" and then skip to "copy and paste for specific routine". I'd like some exercises for in between stages, for stuff that might actually be worthwhile doing.
Post reply on HN