Slashdot Mirror


Trees Fall Prey to AoA

bluethundr writes "For all of the years that it has been available, the only way to read the classic instructional text known as the Art of Assembly by Randy Hyde, was to read it online or download a PDF'd copy and print it out for your own bad sef. It would seem that No Starch Press stands poised to release a pre-bound (aka BOOK) version of this most highly esteemed volumes on the arcane topic on highly convenient dead tree media. I for one am very glad about this development. While I recognize the value of hypertext for reference, when it comes to learning any complex topic at length dead tree media is the way to go, hands down IMHO! I emailed the company to get a bead on when to expect this development and this was the reply: 'No, you are not misinformed. The scheduled publication date for Art of Assembly is March, 2003. I will have something posted on the website very soon, perhaps in the next couple of days. Thanks for the interest!'"

30 comments

  1. This story is much funnier... by EvilJello · · Score: 3, Funny

    This submission is much funnier if you read it in the voice of Comic Book Guy

  2. i've been waiting for this by pizza_milkshake · · Score: 1

    i've been meaning to learn assembly; i've tried reading the AoA PDFs, but for some reason i find dead trees to be much more useful for long reading sessions

    1. Re:i've been waiting for this by KDan · · Score: 1, Flamebait

      I'd like to understand, cause I don't get this... what exactly is wrong with the word "paper", that everyone feels so compelled to use "dead trees" instead? Is it some sort of ecologically correct movement or something? In any case, it's disturbing and stupid.

      Daniel

      --
      Carpe Diem
    2. Re:i've been waiting for this by PD · · Score: 1

      "I say, I say, it's a joke son, a joke."
      -- Foghorn Leghorn

    3. Re:i've been waiting for this by parc · · Score: 2, Informative

      You're not alone. The problem is in resolution. Text printed at less than 150 dpi has a comprehension rate 50-75% less than test at above 150dpi. In general, the books you find in a bookstore are printed at 1200dpi.

      My significant other works at a publisher. When she told me about this, it helped explain a lot.

    4. Re:i've been waiting for this by Anonymous Coward · · Score: 0
      My significant other works as a hooker. When she told me about this, it helped explain a lot.

      that would explain everything...

    5. Re:i've been waiting for this by Anonymous Coward · · Score: 0

      In any case, it's disturbing and stupid.

      Why yes, destroying forests to make paper is disturbing and stupid. Especially since we've had superior quality fibers for a long time now (guess what the Constitution is printed on. Hint: not trees)

  3. So what is Assembly Language anyway? by Anonymous Coward · · Score: 0

    Is it in binary or something?

    1. Re:So what is Assembly Language anyway? by amigaluvr · · Score: 0, Flamebait

      Assembly is a bit pointless these days

      While many optimisations can be had with assembler, due to 'hitting the hardware' it causes more problems than it solves.

      There's nothing a higher language cannot do that assembler can. The only difference is in levels. And with current hardware speeds, higher level but typically 'slower' languages become 'fast'.

      It's curious that in 2003 assembler is still being practiced. I would put this down to a bit of historical interest, than real practical value.

    2. Re:So what is Assembly Language anyway? by BenjyD · · Score: 1

      Don't feed the troll. Please move along, nothing to see here.

    3. Re:So what is Assembly Language anyway? by Anonymous Coward · · Score: 0

      Assembly is a bit pointless these days

      While many optimisations can be had with assembler, due to 'hitting the hardware' it causes more problems than it solves.
      "There's nothing a higher language cannot do that assembler can. The only difference is in levels. And with current hardware speeds, higher level but typically 'slower' languages become 'fast'.

      It's curious that in 2003 assembler is still being practiced. I would put this down to a bit of historical interest, than real practical value. "

      That's a pretty naive view. I program in assembler for a living. I use Visual C++ in Windows. And it has a Great optimizer. I like turning various optimizations on and off to find the one that makes my code the fastest. And I love how fast it can make my code. But still 100% of the time I can write faster code if I convert it to assembler. That's one of my favorite things to do is go around the NET and download open source projects and speed them up using assembler. If you actually look at the assembler VC++ generates ( there is a command line option to generate the ASM it is creating and save it as a file), you will notice room for improvement. Some of that is stuff that you can do in assembler that you can't do in C. And some of that stuff is in the fact that you know intimately when you are coding what is supposed to be happening. So you can do stuff in the assembly code, based on knowledge you have of the code that the VC++ compiler does not know.

  4. Thanks for to the interest! by cpeterso · · Score: 0

    bluethundr it writes "for every year that there existed which only lira traditional text informing, like art the meeting is informed in a manner Randy Hyde, would have it in line lira or a PDF' D copies downloaden and him for your clean bad sef to print. It would seem that no place of state of press of being able exceeds to release poised, for (aka BOOK) the version of this one expenditure in a very marked way envisaged on that mystery topic on dead means of tree in a very marked way pleasant. I the morning very fortunately on this development. While I recognize the value hypertext like reference, if they learn in detail all the complicated dead means of tree from the topic come, the manner must have gone, transmits to the bottom IMHO! Me emailed the company, to receive a grain above, when this development is awaited and this one was the answer: ' No, misinformed him not. The publication envisaged temporally the date for the art of the meeting is March, 2003. I slightly announced very soon on that website, perhaps in the following couples of the days. Thanks for to the interest!' "

    1. Re:Thanks for to the interest! by Anonymous Coward · · Score: 0

      what the fuck you tryin to say, spanky?

  5. Someone had to say it by Anonymous Coward · · Score: 0

    So what's the point of your submission?

    Oh, yeah, and my local post office was out of special stamps with astronauts on them. I called them up, and they said they will have those in books of 20 stamps next week, but not Monday, since Monday is postal holiday, so on Tuesday, since they don't work on Monday.

    Can I get a Slashdot front page story?

    1. Re:Someone had to say it by Anonymous Coward · · Score: 0

      Cool. I may get some by friday. Thx for the info !

  6. What? by ntr0py · · Score: 1

    Is it just me, or is that one of the most unintelligible posts in a while?

    That's bad even for Slashdot.

    1. Re:What? by Anonymous Coward · · Score: 0

      It is just you!

    2. Re:What? by ErroneousBee · · Score: 1

      Makes perfect sense to me, but then Ive got a copy of the Cannatello book on my desk. Maybe ASM folks are 'Special' in some way.

      --
      **TODO** Steal someone elses sig.
  7. Perl Confusion by IpalindromeI · · Score: 1

    When I first read this headline I thought "Array of Arrays", for which "AoA" is a common abbreviation in Perl. "Trees Fall Prey to Array of Arrays" is pretty odd.

    --

    --
    Promoting critical thinking since 1994.
    1. Re:Perl Confusion by ethereal · · Score: 1

      ...But it's the Hash of Hashes that'll really kill you :)

      --

      Your right to not believe: Americans United for Separation of Church and

  8. Still relevant? by Permission+Denied · · Score: 3, Informative
    AoA, IIRC, deals almost exlusively with 16-bit real mode programming. Now I know that there are some esoteric embedded applications that still use real mode, but the only thing people really use real mode for nowadays is to get into protected mode. Your computer runs real mode for a total of a few cycles during boot.

    Now protected mode x86 isn't all that different, but there are significant differences. You never use BIOS or DOS (heh) calls but instead link to C libraries and (maybe) use system calls directly. You never have a chance to use "port" IO unless you're writing a device driver (and even there it's limited with modern devices). If you have a modern OS (anything except win9x), you don't have to deal with segments but have a flat memory model (by default, you can't even define your own segments (LDTs) in some OSes). The only time you really deal with "segmentation" is when you're setting up your GDTs and call gates in the OS boot sequence, and there it's not really the same thing as 16-bit segmented memory model at all.

    I read through AoA a couple of years ago. It was a real pain in the ass to actually set up a DOS environment where I could do any work (ended up using VMWare to run DOS, while actually writing all my real code on the Linux side using nasm and vi (hint: make a hard link to a VMWare virtual disk to bypass file locking semantics and you can mount it r/w while it's being used by your DOS session - very dangerous, but very convenient). Even then, I picked up a copy of 386intel.txt to figure out how to set up a protected mode environment and started writing a kernel right away - stayed away from that 16-bit crap as much as possible.

    The book would really be more useful if it didn't deal with all that 1989 DOS crap and dealt with some more interesting issues. People who still write x86 assembly write compilers, device drivers, low-level OS bits, and inner loops (especially for games/media players/encoders/etc). None of this happens in 16-bit mode, and things are very different in 16-bit mode compared to protected mode. Most optimizations I can think of that improved code on 386/486 running DOS actually ends up SLOWER on P4s and Athlons running protected mode. Optimizing modern x86 CPUs is a completely different beast.

    Some other improvements I'd like to see in this kind of book: cut out all the tables listing IO addresses and DOS/BIOS INT calls. Instead add a bit describing how different environments have different calling semantics for C functions and system calls. Maybe avoid the masm-specific stuff (I don't even think masm is available anymore unless you download the Windows DDKs, and even there, I don't know if it will produce 16-bit code - at one point, some old 16-bit version of masm was available for free on Microsoft ftp, but I doubt it's still there). It's pretty hard to use this book as-is because you have to set up some kind of DOS environment.

    But anyway, this book still rocks. It's where I learned x86 assembly which then launched me into the low-level kernel stuff. If you know SPARC, PPC or MIPS, do not assume that x86 is more of the same. You think SPARC register windows are nasty? You ain't seen nothing yet. x86 assembly (especially the low-level stuff in Intel's volume 3 CPU reference, the systems programming stuff) is so immensely nasty that you get an unnatural sadistic joy out of writing some tight code - it's kind of like writing a sendmail.cf from scratch.

    Glad to see this in dead-tree form - I might pick up a copy for my library. If it has a nice lay-flat binding, it'll be much more convenient than the PDFs.

    If you want to learn this stuff, you'll also need these. The modern ones are kind of verbose since there's so much that's been tacked on to modern x86 CPUs...you may prefer an older version. Try one of these.

    1. Re:Still relevant? by L3WKW4RM · · Score: 4, Informative

      You havn't checked back in awhile...AoA is available in the old 16 bit/DOS version, as well as an updated 32 bit/Win32 and (finally) a 32 bit /Linux version!

    2. Re:Still relevant? by Anonymous Coward · · Score: 1, Informative

      AoA, IIRC, deals almost exlusively with 16-bit real mode programming. Now I know that there are some esoteric embedded applications that still use real mode, but the only thing people really use real mode for nowadays is to get into protected mode. Your computer runs real mode for a total of a few cycles during boot.


      The published version of AoA deals with 32-bit flat model programming. Other than as a historical reference, it doesn't even mention real mode.


      Now protected mode x86 isn't all that different, but there are significant differences. You never use BIOS or DOS (heh) calls but instead link to C libraries and (maybe) use system calls directly. You never have a chance to use "port" IO unless you're writing a device driver (and even there it's limited with modern devices). If you have a modern OS (anything except win9x), you don't have to deal with segments but have a flat memory model (by default, you can't even define your own segments (LDTs) in some OSes). The only time you really deal with "segmentation" is when you're setting up your GDTs and call gates in the OS boot sequence, and there it's not really the same thing as 16-bit segmented memory model at all.


      I decided DOS was dead back in 1996. That's when I began developing the High Level Assembler and the 32-bit edition of AoA. Note that AoA/32 does not teach "linking to a few C routines." As the 16-bit edition did, it uses a "standard library" written specifically for 80x86 assembly language programmers. The concept, however, is the same.

      Also note (to some people's dissatisfaction), the 32-bit edition doesn't cover hardware like the 16-bit edition did (i.e., it doesn't list out port addresses or tell you how to program the serial and parallel ports). Modern OSes obviate the need for this (and, as you point out, for the most part prevent such access anyway). AoA is really intended for beginning assembly programmers, not die-hard embedded assembly programmers. In an attempt to save a few trees, much of the hardware stuff was moved to a different book (that will probably be coming out next year).


      Some other improvements I'd like to see in this kind of book: cut out all the tables listing IO addresses and DOS/BIOS INT calls. Instead add a bit describing how different environments have different calling semantics for C functions and system calls. Maybe avoid the masm-specific stuff (I don't even think masm is available anymore unless you download the Windows DDKs, and even there, I don't know if it will produce 16-bit code - at one point, some old 16-bit version of masm was available for free on Microsoft ftp, but I doubt it's still there). It's pretty hard to use this book as-is because you have to set up some kind of DOS environment.


      1. All the tables listing DOS/BIOS interrupts are gone :-)
      2. The book uses the High Level Assembler (probably a bit more controversial than using MASM, but it's a far better pedagogical tool that MASM).
      3. Some people claim it's hard to set up a Windows or Linux programming environment :-) Guess you can't win no matter what :-(


      The book would really be more useful if it didn't deal with all that 1989 DOS crap and dealt with some more interesting issues. People who still write x86 assembly write compilers, device drivers, low-level OS bits, and inner loops (especially for games/media players/encoders/etc). None of this happens in 16-bit mode, and things are very different in 16-bit mode compared to protected mode. Most optimizations I can think of that improved code on 386/486 running DOS actually ends up SLOWER on P4s and Athlons running protected mode. Optimizing modern x86 CPUs is a completely different beast.


      I couldn't agree more. That's why the published edition of AoA was specifically written for Windows and Linux :-)
      2. There is a chapter on mixed language programming that covers Pascal/Delphi/Kylix, C/C++, and stdcall function invocations.
      3. Like the 16-bit edition, AoA/32 does *not* cover writing optimal code in assembly language. You have to learn to walk before you can run! AoA is about bringing people from point zero to the point where they are competent enough to start learning about all the optimization stuff. Keep in mind, AoA was originally written as a college textbook; something to teach students assembly language programming who'd had *one* quarter of C/C++ programming as a prerequisite.
      The published version of AoA has been streamlined to help achieve that goal even better. While AoA has generally been recognized as one of the most comprehensive texts on assembly language programming around, even in the PDF forms (1,500 pages!) it's nowhere near big enough to teach everything about assembly language programming. However, once someone finishes AoA, they're in a good position to read the Intel documentation or Abner's optimization guides, etc.

      AoA/32 published edition features:

      1. Common language for Windows and Linux users
      (Portable assembly language! Almost all the example programs in the book compile and run under either Windows or Linux, unchanged!)

      2. Much of the arcane hardware information that I've discovered has gotten in the way of learning *programming* has been moved to a different book. AoA has been streamlined to emphasize assembly language *programming* (e.g., discussions of gates, I/O ports, and the like are gone).

      3. The book has been reorganized to get people programming much more quickly (e.g., during the first week of an assembly language programming class). The original versions (both 16 and 32 bits) required considerable study before you started writing "real" programs.

      4. The published edition (obviously) has been proof-read and cleaned up quite a bit, making it easier to read. Obviously, a lot of mistakes have been corrected, too.

      Note that the PDF and HTML versions will continue to be available on-line (as well as appearing on the CD-ROM accompanying the text). So all that extra information that got cut will still continue to be available.

      I'm currently in the proof-reading phase of a second book I've entitled "The Things You Need to Know to Write Great Code" that deals with the hardware issues (ne: machine organization) that got cut from AoA. One of the main reasons given for learning assembly language programming today is that it helps HLL programmers understand the underlying machine organization, enabling them to write better HLL code. The purpose of W.G.C. is to teach the machine organization aspect without having to learn all the assembly language stuff.
      Alas, W.G.C is quite long and the proof-reading process is going to take a while (AoA had the benefit of over 10 years of student and reader feedback, so proofreading was a whole lot easier than your normal technical book).

      Cheers,
      Randy Hyde

    3. Re:Still relevant? by Permission+Denied · · Score: 1
      Hey, this sounds very cool. I haven't checked back in a few years. I'll definitely pick up the book.

      I didn't mean to sound harsh - that's just sort of how I usually write. Like I said, AoA rocked, even when it was just 16-bit stuff - it's just that the programming environment (DOS) left something to be desired. My university didn't offer anything in the way of assembly programming (just some architecture courses, and a compiler course that generated SPARC v8, but it had plenty of theoretical CS stuff, so I'm not complaining too much). AoA was how I really got into assembly programming. There's a certain rush you get from programming directly to the machine. I wouldn't be doing the stuff I'm doing now if I hadn't read AoA.

      Thanks very much for AoA. I'm looking forward to your next book as well.

    4. Re:Still relevant? by Permission+Denied · · Score: 1
      Yeah, the author actually replied to my original post mentioning the same things.

      Very cool. I'm buying it.

  9. ASM can do things HLL can not. by AHumbleOpinion · · Score: 2, Insightful

    There's nothing a higher language cannot do that assembler can

    As the AoA author would probably say, you are "severely misinformed". Example, an efficient fixed point multiply, say 16.16. For those unfamiliar with x86 assembly we have two 32-bit operands and the x86 cpu kindly generates a 64-bit result. The assembly language programmer can shift this 64-bit result to obtain a properly scaled fixed point result. It takes one extra instruction over a normal multiply. Doing it all in a HLL is troublesome, using 32-bit types imposes severe restrictions on inputs to avoid overflowing 32-bits, using 64-bit types usually results in grossly inefficient code, often library calls for 64-bit operations. Just one example off of the top of my head. There are many others.

    Also, the whole notion that compilers can do as well as humans is naive. Currently compilers are only good when you have novice assembly language programmers. Experienced assembly language programmers often get significant improvements of compilers.

    None of this should be interpreted to mean that people should use assembly language more often. They should not:

    1. Optimizing algorithms and data access is likely to be far more fruitful. Assembly should only be used after these areas are thoroughly exhausted.

    2. They would be assembly programmer is probably not experienced enough and will generate poor code.

    1. Re:ASM can do things HLL can not. by jrumney · · Score: 1
      As the AoA author would probably say, you are "severely misinformed".

      I agree with you up to that point, but the example you provided does not demonstrate anything that cannot be done in a HLL. It only demonstrates that some (most even) things can be done faster. But as the "severely misinformed" correctly said, doing something in a few less clock cycles is no longer important enough in most applications to justify it.

      Apart from the odd loop that needed tuning, the only places I have had cause to use assembler since moving up to 32 bit processors has been interfacing to hardware in device drivers, and initializing interrupt vectors etc in startup code.

    2. Re:ASM can do things HLL can not. by AHumbleOpinion · · Score: 1

      I acknowledged that the fixed point example could be done using 64-bit types, assuming the 32-bit compiler offered them. However the performance difference is ridiculously huge, not a few clock cycles, more like orders of magnitude. It is so bad that Microsoft added a function to the Win32API to do this type of operation, MulDiv(). Arguing that CPUs are so fast today that it doesn't matter is a red herring. It's been tried for decades and falls short every time. What really matters is your competitiveness, ex. a competing imaging processing app would blow you away, or your potential market, ex. the system requirements for your game could be reduced from 1 GHz to 800 MHz.

      If you prefer a different example try branch-less calculations, for example branch-less min() and max().

      SSE? I'm not sure how well compilers expose SSE registers and instructions so this may be another example.

  10. Fabulously crappy article title by Anonymous Coward · · Score: 0
    Yeah, I know if I wanted to search /. to see if AOA had been mentioned, I'd start with a title search on "Trees".

    And on a pseudo-related note, was I supposed to start weeping and mourning the poor little TREES? Oh the madness! My wife happens to own a 400 acre tree farm. We cut it to the ground every six years and sell it for a little income on the side. She's been doing this 10 years, and her dad did it for 20 years before her. Don't believe your neighborhood hippie, trees aren't THAT scarce, and they're not hard to replace.