#269 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of Assembly Language Step-by-Step: Programming with Linux

Sentiment score: 9
Reddit mentions: 19

We found 19 Reddit mentions of Assembly Language Step-by-Step: Programming with Linux. Here are the top ones.

Assembly Language Step-by-Step: Programming with Linux
Buying options
View on Amazon.com
or
    Features:
  • John Wiley Sons
Specs:
Height8.901557 Inches
Length7.299198 Inches
Number of items1
Release dateOctober 2009
Weight2.58381771064 Pounds
Width1.598422 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 19 comments on Assembly Language Step-by-Step: Programming with Linux:

u/LiamMayfair · 31 pointsr/C_Programming

In short, the answer is virtual memory and the protected mode flat model that the past generations of CPU architecture and operating systems have been using.

As you may know, programs are never given full, direct access to the RAM banks; the operating system abstracts this layer away from them in the form of virtual memory. Virtual memory is basically a system whereby you can map physical memory addresses to non-physical ones the OS controls and can readily re-arrange. Thanks to virtual memory the OS can trick an application into thinking it has way more RAM than it actually has and this also enables swapping processes out to disk when the system is running out of memory because there are too many processes being run at the same time. As I pointed out before, since virtual memory is fully managed by the kernel, it can move out chunks of a program's address space to disk, a process known as "paging".

Now, back in the DOS era, virtual memory followed the real mode segmented model, which, in very simple terms meant that, even though processes could be shuffled back and forth between RAM and disk, there were no safeguards in place to prevent a process from messing up another process' memory space via a dodgy pointer pointing to a memory address beyond the scope of the faulty process.

One of the major goals of the successor to this virtual memory model, "protected mode flat model" was to allow the kernel to create a completely isolated address space for the processes it spawns and stopping a rogue program from altering other processes like before. Whenever such an attempt is made, a "segmentation fault" (SIGSEV) or "general protection fault" is raised by the kernel, which in the case of Linux, will prompt the kernel to swiftly kill the offending process.

In practical terms, this means your application won't be able to reach beyond the virtual memory address space it has been allocated (unless it's a kernel-space process, like a kernel subsystem or device driver) and can in no way communicate with other processes by reading or writing memory that belongs to them. In order to accomplish that, you'll need to make use of inter-process communication (IPC) techniques like Unix sockets, pipes, RPC, etc.

This is by no means an in-depth or 100% accurate explanation though. If you've got any follow-up questions I'm more than happy to answer them.

As for the literature, pretty much any textbook about operating system architecture will cover virtual memory to a great extent. I can recommend Operating Systems: Internals and Design Principles and Modern Operating Systems.

Here are a few more books that touch upon the topic of virtual memory:

Assembly Language Step-by-Step: Programming with Linux covers the topic of virtual memory and the different models that have evolved over time over its first few chapters.

The Linux Programming Interface: A Linux and UNIX System Programming Handbook covers this subject (and many, many more) from a Linux systems programmer perspective.

What Makes It Page?: The Windows 7 (x64) Virtual Memory Manager, in case you're interested in learning how Windows does it.

EDIT: added IPC info

u/michaeljsmalley · 17 pointsr/pics

I was there today and I bought two books:
http://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025
and
http://www.amazon.com/Programming-Python-Mark-Lutz/dp/0596158106/ref=sr_1_5?s=books&ie=UTF8&qid=1299370602&sr=1-5

I get to the counter..."There are no refunds or exchanges, just a heads up man". Yeah, so what? No problem.

Then he proceeds to take out a black indelible marker and scribble on the back of the brand new books I just purchased. I am standing there thinking, "Okay, these books are now my property, and the guy just basically defaced it."

Since I was happy I got these books for a very good price, I didn't put up much of a fight, and the guy working at the register was extremely nice through and through. It just appears the business prodigies who run Borders and have successfully managed to run it into the ground also instructed their front line employees to make like Banksy on all sales. What is the logic here? My wife thinks it was to prevent resale, but how does that hurt Borders?

u/EJMR-Plutono · 12 pointsr/programming

Anyone further interested in this subject should read “Assembly Language Step-by-Step” by Jeff Duntemann. Personally I consider it the best book on x86 assembly that I’ve ever read.

u/sanedave · 10 pointsr/learnprogramming

Three books I have been using:

The Definitive Guide to How Computers Do Math

Web page here: http://www.diycalculator.com/

Assembly Language Step-by-Step: Programming with Linux

Hacking: The Art of Exploitation, 2nd Edition

The first uses a virtual machine running on Windows, with 5 registers, 65K of virtual memory, a debugger, and will give you a good basic understanding of what is going on. The second book uses Intel X86 on Linux, and gives a solid foundation of the most used instructions. The third book is just good.

Other favorites of mine include "The Art of Debugging" by Norm Matloff (google for his excellent web page) and "Professional Assembly Language" by Richard Blum.

Have fun!

u/smo0shy · 8 pointsr/MrRobot

I actually already have a copy of Hacking: The Art of Exploitation. My personal library consists of around 45 books on a range of computing topics from PHP, MySQL, C++, Windows Internals, CCNA, MCSE/MCSA, Unix, Rootkits, AI, Data Structures and the list goes on.

Other relevant titles include Gray Hat Python, Reversing: Secrets of Reverse Engineering and Rootkits: Subverting the Windows Kernel.

I was going to buy the following: Assembly Language Step-by-step, SQL Injection Attacks and Defense and Metasploit: The Penetration Tester's Guide.

I agree that where one starts really depends on what they want to end up doing. "Hacking" is such a general term and SQL-Injections is completely different from finding 0-days. If I'm honest I'm not sure where to start but I'm open to suggestions.

​

u/CapitalistLetter · 4 pointsr/asm

I'd recommend this book. Its on linux, which IMHO I think has a simpler api than windows.

About compiler generated assembly - compilers are evil wizards. The assembly they generate will look weird, mainly because it is, and wthat won't realy help you learn assembly.

u/samoht9 · 2 pointsr/dcpu16

I'm using the following book to learn Assembly and really liking it so far.

http://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025

It goes into C at the end. I chose to learn Assembly because I wanted to learn how it all works behind the scenes a bit more. I think it's definitely worth the time to go through and will lead to your goal of learning C.

u/rbtEngrDude · 2 pointsr/programming

Pick up any book on x86 assembler. You cannot program assembler without understanding the underlying system architecture, and as such most books on assembly language will include a deep dive on x86 architecture from the programmers perspective.

Assembly Language Step by Step by Jeff Duntemann: https://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025

This is one of my favorites, the first assembly book I was able to make it all the way through. Once you do, I also highly recommend

Modern x86 Assembly Language Programming by Daniel Kusswurm: https://www.amazon.com/Modern-X86-Assembly-Language-Programming/dp/1484200659

A very thorough, yet surprisingly readable, dive into thw inner workings of thw advanced x86 feature sets, like MMX and AVX.

u/gott_modus · 2 pointsr/programmerchat

/u/The_frozen_one linked you to IDA, which is pretty deffacto in the reversing world. The free version is limited, though, so if it doesn't quite give you what you need and you want to save money, Visual Studio's debugger has a pretty decent disassembler.

Learning how to read assembly is kind of challenging at first. Something I'd recommend looking into to pair with your journey is Jeff Dunteman's Assembly Step-by-step.

It uses Linux as its teaching OS, so a few things on Windows will be different, such as syscalls or anything ABI specific.

That said, it uses Intel syntax which is what you want, and it has several hundred pages of reading before a hello world is even written. Even if you choose not to continue reading after that, those few hundred pages alone make the book worth buying.

u/ItsAConspiracy · 2 pointsr/programming

Duntemann's book uses Linux and flat address space in the third edition.

u/SeanRamey · 1 pointr/AskProgramming

Try reading http://www.plantation-productions.com/Webster/www.artofasm.com/index.html

Also, im assuming that you want to learn about the PC, as in, IBM PC & Compatibles which is every modern home computer including Apple computers. You will probably want to read the IBM PC Technical Reference manuals to learn some details.

If you want to learn about a different system then you just need to look up books and reference manuals for that system.

If you want more generic information, then you might want to look for electronics book that teach how a computer works or how to design your own.

EDIT: Also, try this book out: https://www.amazon.com/gp/product/0470497025/ref=dbs_a_def_rwt_bibl_vppi_i0
It teaches x86 assembly as your first language and it covers what you probably need.
There are 3 editions. I've linked the newest, but the 2 edition before it cover 16 bit real mode DOS as well, which might be easier in some ways.

u/nerd4code · 1 pointr/learnprogramming

I recommend you pick an architecture that you can work in and see somewhat immediate results from; x86 is a good idea because it's very well supported and just about every question about it has been answered somewhere. You'll probably be working on a simulator otherwise, in which case you can run into all sorts of other fun problems, and you'll likely end up learning stuff that doesn't apply too terribly well to how things are actually done in the wild.

Dialect-wise: If you're doing standalone assembly or something for use only on Windows/DOS platforms, then NASM or MASM is your best bet. If you want your assembly code to interface more closely with, or be embedded inline within C code in anything remotely resembly a GNU compiler (including GCC, ICC, and Clang, most notably), then GAS is your best bet.

As was mentioned, GAS uses a different syntax from Intel's standard one (different operand orderings, different mnemonics, pretty much everything's different for some fucked-up reason) so you'll see mostly NASM/Intel-like syntax in plaintext (tutorials and the like) on the Web and GAS in source code.

Can't recommend you towards any good resources, although when I was a wee bairn I learned 16-bit x86 assembly from Jeff Duntemann's book (16-bit DOS version, which you can use in DOSBOX or a run of DOS's DEBUG; 32-bit Linux version, which you can use in 32- or 64-bit Linux provided you use the -m32 flag to compile). NASM's manual may still have a decent instruction reference in it (check for older versions, because it was quit handy), and Intel's Software Developer's Manuals are the go-to reference for their backwards-compatible shitheap of an ISA once you're familiar with it.

u/LulzBaby · 1 pointr/OSUOnlineCS

You can try giving this book a shot. I took 271 on the Cascades campus and we used that book plus this book. The first is free and I thought was useful, a bit quirky but good info.

u/caisah · 1 pointr/learnprogramming

This is a vast topic and I don't think you will find something to cover all the subjects at once.

To understand how the processor works this video does a really good job in explaining most of the essential stuff.

I also suggest you try to get your hands dirty with some assembly language so you get the feel of it. I liked Assembly Language Step-by-Step book.

There is also The Hardware/Software Interface course. This will give you a great starting point in digging deeper into the subject.

u/polarbearurine · 1 pointr/learnprogramming

we're using this book in my assembly/c class. according to my professor the writer was a sci-fi novelist so the book is a story and it involves aliens. http://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025

edit: important to note that the author treats assembly as the first computer language you've ever learned so if you start from the beginning it will cover the absolute basics

u/PoetheProgrammer · 1 pointr/linux

If I were you, I'd go ahead and start with Assembly Language: Step by Step (Programming with Linux) it's not really what you are asking for but it will show you how to write assembly language (thus showing you how C really works), it will show you how the Linux API works at the lowest levels and interfacing with Linux/The Standard C Library.

Pick up K&R while you're at it despite your claim it's not recent; it's a good reference. Once you can write some simple assembly programs, rewrite them in C. Then do something that mixes the two (like write your own functions in assembly and then use C for program flow.)

After that, write a bootloader and boot Linux (they aren't as hard as you think if you aren't trying to rewrite grub). Once you can boot Linux, write your own (very simply) hello world multiboot kernel. Use that bootloader to jump to it. Add a keyboard and screen driver to it (again not as hard as you think just to do basic stuff.) Then play around with your hardware (hard disks is a good starting point) and learn how to interface with them at a bare-bones level (since your interested in audio how about trying to send out simple sounds to your onboard sound using your own kernel.)

At that point your problem with C will be gone and you will be comfortable writing kernel code. Some people might talk down on this answer but with what you want to do it's worth toughing it out if you want to quickly get comfortable with C and kernels (you might have a few days of doubt though friend, suck it up!)

At this point find a project (ALSA/Pulseaudio) and start fixing bugs for them (there is usually a ridiculously easy list of bugs on larger projects that will help get you used to the codebase.) At the same time get the Linux source and write some basic modules, while also attempting to fix some of the kernels super easy bugs. After a year or so of doing that you should not only be good with the programming aspect (and you'll know how to learn codebases as well) you will also learn a lot about how the FOSS community works (and the do's and don'ts of commiting to projects.)

Best of luck!

edit here's a link to the book

https://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025

u/Eggbotnik · 1 pointr/learnprogramming

If you really want to learn from the ground up, that is to say low level to high level, I'd recommend starting with Assembly Language Step-By-Step. It will get you introduced to binary computation, binary math, and x86 assembly. From there, I'd say move on to The C Programming Language, AKA K&R.

After that, if you've stuck with it and still enjoy it; the coding world is your oyster. Build something brilliant and reap the satisfaction of building your own programs.

Good luck!