Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Assembly Language for Intel-Based Computers, 4th edition

Posted by timothy on Wed Sep 04, 2002 10:30 AM
from the heavy-reading-about-weightless-components dept.
Alexander Moskalyuk writes "Most of the people I know have a love-hate relationship with Kip Irvine's Assembly Language for Intel-based Computers. Ask any student who used this textbook and you will either get a cheerful 'I've used it, it's great, I learned Assembly, and it has lots of useful examples' or resentful 'The book is horrible, hard to follow and full of code that is irrelevant to the contents of a specific chapter.'" Alexander's review of the book (below) concentrates on its role as an instructional aid, and on the differences between the third and fourth editions.
Assembly Language for Intel-Based Computers, 4th edition
author Kip R. Irvine
pages 676
publisher Prentice Hall
rating 8/10
reviewer Alexander Moskalyuk
ISBN 0130910139
summary Authoritative source on Intel assembly programming and Assembly language fundamentals

Popularity Contest of One

A quick search on Amazon, however, reveals that for the keyword 'Assembly' Irvine's book is still the bestseller. The fourth edition of the text tops the list and the same was the case with the third edition. The university where I teach uses Irvine's textbook for its introductory Assembly courses. We've used third edition throughout last year, and decided to stick to the third edition (with fourth recommended) during this academic year as well, just to avoid having students cash out for a newer version of the same text. Since this is a Prentice Hall textbook targeted mostly towards Computer Science and Engineering programs, welcome to the world of academic pricing -- the list price of fourth edition is $76.

Third vs. Fourth

The first natural thing to do is to see whether the fourth edition of the text is superior to 1999's third edition. Just looking at the table of contents, you can see that a lot of new material has been added, even in the introductory chapters. Furthermore, fourth edition has a new version of the first Assembly program introduced to the reader. Instead of the notorious 'Hello, World' example, it's now adding three numbers. Hello, World would usually be the thing to introduce first in classes with C++ or Perl being primary languages. However, in Intel Assembly the example just confused students more, since printing the phrase "Hello, World" to the screen involved dealing with interrupts, and that topic would not be covered until later in the course.

Irvine also got rid of his "Using the Assembler" chapter, which might be a nuisance for some of the readers and relief for others. The book comes with Microsoft ASM and thus all examples assume using MASM for their compilation needs. In my class, however, NASM has always been the compiler of choice, partly because it's easier to introduce to novice programmers who have not been exposed to Assembly before, and partly because of the tradition -- NASM was the compiler that previous instructors used, and thus was available on university servers and familiar to tutors in the labs. Vaguely named "Advanced Topics" chapters are almost gone and now changed into much more informative "16-bit MS-DOS programming," "Expert MS-DOS programming," "BIOS level programming," "32-bit Windows programming" and "High-level language interface." The last chapter of the book is now the only one bearing the name "Advanced Topics" and discusses things like "Hardware control with I/O ports," "Intel instruction encoding" and "Floating-Point arithmetic."

Some appendices are gone as well. The third edition included such topics as "Binary and Hexadecimal tutorial" (now moved to be a part of the introductory chapters), "Using debug" (tutorial on using debug.exe on Microsoft platforms to trace the Assembly code -- it's a shame the appendix is pulled out of the book, since now either students have to learn the commands for debug.exe themselves or additional class time needs to be spent on that), "Microsoft CodeView" and "Borland TurboDebugger" (both gone for good) as well as "Guide to the sample programs" (in this new edition, that successfully migrated into "Installing and using the assembler").

Except for the shocking absence of debug.exe tutorial appendices, the fourth edition looks much more straightforward and useful. Speaking of appendices, there are four of them now - "Installing and using the assembler," which few people ever bother to read when in class, "Intel instruction set," which is the mother of all useful appendices (in fact, I've seen good students get by on nothing else but this appendix), "BIOS and MS-DOS interrupts" and "MASM reference." The CD by the way, includes MASM, source code and macros for the book, as well as evaluation version of TextPad.

Academic value

Kip Irvine is usually accused of bringing up examples that confuse novice readers and trying to show off with his knowledge of IA-32 Assembly. Read the Amazon reviews to find out more. Personally I have never had problems with his style of writing. There were, though, some mistakes in the third edition of the book that would make an instructor pull his hair to pieces. Typos, grammatical errors and words that did not get picked up by the spellchecker were acceptable, but when the sequence of operations during code execution was described incorrectly, you can hardly be accused of being too picky, since you get students relying on the book for knowledge and being mad at you for flagging their code wrong on the test.

If you have the third edition handy, pages 234 and 235 describe the RCL and RCR operations, providing the incorrect order of operations and thus forcing students who use this textbook to learn these instructions to arrive at incorrect results when given a snippet of code to trace. Page 232 in the fourth edition now has the correct sequence of operations.

I would lie to you if I told you that I've read the whole book. Very few people would actually need to go through seven hundred pages, and some of the things discussed might never be useful even if you spent the rest of your life programming Intel Assembly 40 hours a week. But from the information that I got after reading the chapters that interested me (mostly introductory material and all chapters that cover instruction set and interrupts), the text seemed to present material in a clear and straightforward manner, with abundant examples.

A nice addition to Chapter 1 was an explanation of how virtual machines work, since the university uses Java as its core programming language. The second chapter goes on smoothly with careful introduction into the architecture principles and then switches into overdrive, presenting students with information on "Multi-stage pipelining" followed by reasonably simple material on "How programs run."

The book jumps into IA-32 architecture, although I wish that for introductory class the text would stick to 8086 architecture, and then have the 32-bit registers introduced. But generally it's a thorough and informative text for anyone deciding to learn programming Assembly language on Intel platforms, or just beginning Computer Science majors deciding to find out how the stuff really works as opposed to playing with high-level APIs.

The table of contents can be found at publisher's Web site. There's also a Web page for the book, where the author has posted some chapters in PDF format. The chapters published for free include Chapter 1 - Basic Concepts, Chapter 2 - IA-32 Processor Architecture, Chapter 6 - Conditional Processing, Chapter 11 - 32-bit Windows Programming, Chapter 15 - BIOS-level programming as well as Preface and Table of contents.


You can purchase Assembly Language for Intel-Based Computers, 4th edition from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Assembler is hard to follow? (Score:2, Funny)

    by EvilBudMan (588716) on Wednesday September 04 2002, @10:34AM (#4195292) Journal
    Maybe that's why the book is hard to follow too. I quit at 6502. I gave up after that.
  • Ahh...memories (Score:4, Insightful)

    by NPE (595798) on Wednesday September 04 2002, @10:40AM (#4195316)
    I used this book (3rd ed I think) two years ago in my Organization and Architecture class, and I liked it. The book was an easy, quick read, which is a major deciding factor when you have 3 reading assignments a day. The author uses examples that actually show in code the concepts he's writing about, and the examples are short, to the point, and easy to understand. Assembly language is a rough language when you first pick it up, but I think this book helped me along rather nicely.
    • 1 reply beneath your current threshold.
  • PPC Assembly (Score:1)

    by beswicks (584636) on Wednesday September 04 2002, @10:40AM (#4195317)
    Can anyone recommend a good book for learning 32bit PPC assember?
    • Re:PPC Assembly by mekkab (Score:2) Wednesday September 04 2002, @11:01AM
      • Re:PPC Assembly by Da VinMan (Score:2) Wednesday September 04 2002, @11:24AM
      • Re:PPC Assembly by mekkab (Score:2) Thursday September 05 2002, @09:17AM
      • 1 reply beneath your current threshold.
    • Re:PPC Assembly by Tomy (Score:2) Wednesday September 04 2002, @11:06AM
    • Re:PPC Assembly by YeahIThoughtSo (Score:2) Wednesday September 04 2002, @12:45PM
  • ebay half.com has it for lots less $ (Score:2, Informative)

    by Dang1ingPtr (604247) on Wednesday September 04 2002, @10:41AM (#4195324)
    http://half.ebay.com/search/search.jsp?nthTime=2&p roduct=books&query=Assembly+Language
    • Academic Pricing sham (Score:5, Interesting)

      by mstrcat (517519) on Wednesday September 04 2002, @12:52PM (#4195993)
      Using one of my favorite shopping bots to price this book,

      http://www.bestbookdeal.com/cgi-bin/prices.cgi?i sb n=0130910139

      I noticed once again that the UK price is about 2/3 the US cost. So it's cheaper to buy the book in the UK, and have it air-mailed across the pond than it is to buy the new book here in the states. This is not an isolated incident, but a systematic one. As a Masters student, I regularly find that UK textbooks are frequently about 1/2 the US price.

      This smacks of price fixing by the publishing industry, akin to what we see the movie industry doing with movies.
      Can anyone comment on how prices for US books are set and how much business they lose to people using the Internet to shop internationally?
      [ Parent ]
  • by ehiris (214677) on Wednesday September 04 2002, @10:41AM (#4195326) Homepage Journal
    I don't see any mention of IA-64 or Unix/Linux ...

    If you are looking for a assembly book that is fun to read and goes into Linux details try: "Assembly Language Step by Step" [duntemann.com]
  • advanced topics? (Score:2, Interesting)

    by oliverthered (187439) <.oliverthered. .at. .hotmail.com.> on Wednesday September 04 2002, @10:42AM (#4195327)
    Unless you doing task switching MMX etc... then there's nothing that advanced in FP specificly.

    Things like real-mode and protected mode programming would have been far nicer to see,
    Advanced topics should be Ring(0-4), Virtual Memory and paging, PCI address space mapping and APIC.
  • by qurob (543434) on Wednesday September 04 2002, @10:42AM (#4195329) Homepage

    The old texts and demo tutes.

    And 'tute' isn't something you do with your horn.
  • Description of the FAT (Score:2, Interesting)

    by FreshMeat-BWG (541411) <.bengoodwyn+slashdot. .at. .gmail.com.> on Wednesday September 04 2002, @10:43AM (#4195333) Homepage
    I used this book in college for learning assembly. Still have it on the shelf. I was doing some work on FAT and partition tables recently and was able to quickly get the information I needed from this book. It wasn't in depth, but I didn't read more than two pages before I was on my way. Wish it was that easy back in the college days!
  • by jsonmez (544764) on Wednesday September 04 2002, @10:57AM (#4195375)
    I would lie to you if I told you that I've read the whole book.


    Hmm...
  • hmmm (Score:1)

    by alexander m (567750) on Wednesday September 04 2002, @10:58AM (#4195382) Homepage

    from my own, brief, experience with assembly language, i was under the impression that its role as an instructional aid largely consisted of the following:
    "don't do that again , or i'll hit you with this book a
    second time...!"
  • by fishlet (93611) on Wednesday September 04 2002, @10:59AM (#4195384)
    Ah... I loved programming my Commodore 128. Assembly was the only way to go. I don't see the point though learning on a x86, at least for application programmers.

    -History shows again and again... how nature points out the folly of man- GODZILLA!
  • A lost art, alas (Score:5, Insightful)

    Z80 assembly language was the second language I learned (after BASIC, of course). I'm convinced that learning assembly language was key to making me the (humbly) great programmer I am today.

    I've ranted about this before, but I have to say it again: Programming is taught ass-backwards in college. Assembly language should be the FIRST thing taught, and then gradually building up to higher and higher levels of abstraction. All algorithm theory should be taught in assembly. When you've implemented algorithms in assembly, then there's no question that you know them far better than when they're surrounded by 7 layers of syntactical fluff.

    Look at the way EE's are taught: You start with the basics of transisters, resisters, capicitors, etc and work your way up. If EEs were taught the same way as programmers, they would start with plugging cards into PCs with component theory being taught as an afterthought!

    In my experience, I've often found that EEs converted into programmers are better programmers than people with CS degrees, and I think this is the reason. EEs are taught how to think early on at the component level.

    I should also say that it's a total myth that assembly language is "hard". It's not. It's simply "more". More detail, more instructions, more attention to what you're doing. Assembly itself is extremely simple. Get an instruction; execute it; move to next.

    Bottom line: TWO years of assembly before a student even sniffs high-level languages.

    I keep ranting about this, but I doubt that CS programs are going to change. I can always dream, though.

    • Re:A lost art, alas by Your_Mom (Score:3) Wednesday September 04 2002, @11:09AM
    • Re:A lost art, alas by Winterblink (Score:1) Wednesday September 04 2002, @11:10AM
      • Re:A lost art, alas by vsync64 (Score:1) Wednesday September 04 2002, @11:32AM
      • Re:A lost art, alas by Mr Z (Score:1) Wednesday September 04 2002, @11:39AM
      • Re:A lost art, alas (Score:5, Interesting)

        by jandrese (485) <kensama@vt.edu> on Wednesday September 04 2002, @11:55AM (#4195665) Homepage Journal
        Opinon on this is going to vary wildly, but I've seen two major schools of thought on this topic:
        • Computer Scientist standpoint: This says that you should never need to know about the hardware. You should be programming in sufficently high level languages like Lisp that keep you from knowing anything about the underlying architecture. Knowing about the architecture leads you to programming FOR that architecture, which is the first step towards unportable code. Also, most pure computer scientists are more interested in proving that their solution is correct that actaully solving the problem. These people often give lip service to the importance of knowing the architecture while simultaniously designing languages that no computer will ever be able to run and that nobody would ever ever want to program in (anybody have a spare Turing machine handy? Mine ran out of infinate paper tape.)
        • C Programmers point of view: This places the high level language as more of a glue between the programmer and the machine. You try to do things in ways that are optimal for the machine so your programs run fast, while still trying to be at least somewhat portable. (and hey, if you get it wrong, there's always #IFDEF right?). Most professional programmers seem to fall in this category, as it involves getting much more work done with fewer inductive proofs.
        I know I'm going to be flamed about the Lisp crack, but you have to admit, Lisp programs are portable.
        [ Parent ]
        • 1 reply beneath your current threshold.
      • strings by oliverthered (Score:1) Wednesday September 04 2002, @11:59AM
        • Re:strings by larry bagina (Score:1) Wednesday September 04 2002, @11:35PM
      • Re:A lost art, alas by grahammm (Score:1) Wednesday September 04 2002, @12:57PM
    • Re:A lost art, alas by Hard_Code (Score:3) Wednesday September 04 2002, @11:14AM
      • 1 reply beneath your current threshold.
    • Re:A lost art, alas by jpt.d (Score:2) Wednesday September 04 2002, @11:24AM
      • Re:A lost art, alas by hardburn (Score:1) Wednesday September 04 2002, @12:05PM
      • CPA program by sirinek (Score:2) Wednesday September 04 2002, @12:51PM
        • Re:CPA program by nels_tomlinson (Score:2) Wednesday September 04 2002, @09:02PM
    • Re:A lost art, alas by Anonymous Coward (Score:1) Wednesday September 04 2002, @11:35AM
    • Re:A lost art, alas by sydb (Score:3) Wednesday September 04 2002, @11:40AM
      • 1 reply beneath your current threshold.
    • Re:A lost art, alas by Anonymous Coward (Score:1) Wednesday September 04 2002, @11:41AM
    • Re:A lost art, alas by Anonymous Canard (Score:3) Wednesday September 04 2002, @11:45AM
      • Re:A lost art, alas by larry bagina (Score:1) Wednesday September 04 2002, @11:40PM
      • Re:A lost art, alas by Neon Spiral Injector (Score:2) Thursday September 05 2002, @09:03AM
      • Re:HTML by Anonymous Canard (Score:1) Wednesday September 04 2002, @03:46PM
        • Re:HTML by Anonymous Canard (Score:1) Thursday September 05 2002, @01:32PM
        • 1 reply beneath your current threshold.
      • 1 reply beneath your current threshold.
    • Re:A lost art, alas by BluedemonX (Score:2) Wednesday September 04 2002, @12:19PM
    • Re:A lost art, alas by Ian Bicking (Score:2) Wednesday September 04 2002, @12:27PM
    • Re:A lost art, alas by kaisyain (Score:2) Wednesday September 04 2002, @12:39PM
    • Re:A lost art, alas by jhines0042 (Score:2) Wednesday September 04 2002, @12:45PM
    • Re:A lost art, alas by TummyX (Score:1) Wednesday September 04 2002, @12:52PM
    • Re:A lost art, alas by The Rev (Score:2) Wednesday September 04 2002, @02:50PM
    • Re:A lost art, alas by cpeterso (Score:1) Wednesday September 04 2002, @04:09PM
    • Re:A lost art, alas by ralphbecket (Score:1) Wednesday September 04 2002, @08:25PM
    • Re:A lost art, alas by scrytch (Score:2) Wednesday September 04 2002, @08:26PM
    • Re:A lost art, alas by ewen (Score:1) Thursday September 05 2002, @03:58AM
    • Re:A lost art, alas by Troed (Score:1) Friday September 06 2002, @06:06AM
    • Re:Oh dear by Reality Master 101 (Score:1) Wednesday September 04 2002, @06:59PM
    • 3 replies beneath your current threshold.
  • Love/Hate relationship (Score:1, Offtopic)

    by Plutor (2994) on Wednesday September 04 2002, @11:00AM (#4195392) Homepage
    "Most of the people I know have a love-hate relationship with Kip Irvine's Assembly Language for Intel-based Computers. Ask any student who used this textbook and you will either get a cheerful 'I've used it, it's great, I learned Assembly, and it has lots of useful examples' or resentful 'The book is horrible, hard to follow and full of code that is irrelevant to the contents of a specific chapter.'"

    That's not a love/hate relationship. A love/hate relationship would be "I used it, it was hard to follow, but I learned Assembly once I finished wading through it. I'm glad I read it, but if I have to do it again, I'm going to commit Hari-Kari"
  • I'm in a course using this book at my college and the instructor says that there are like four removed appendices between third and fourth editions. This is lame.

    Incidentally we're not doing hello world at all, or any other examples from the book. At this point the only reason we even have the book is for the list of registers; We haven't been working out of it at all, and I don't feel the loss. When I go to look at the book it doesn't seem to follow any kind of reasonable pattern -- By which I mean "this is some code, this is what it does, this is why it does it". Then after giving that basic introduction it should expand on why each thing works as it does in various chapters. This is the kind of layout that makes sense for a textbook.

    • 1 reply beneath your current threshold.
  • by The Moving Shadow (603653) on Wednesday September 04 2002, @11:09AM (#4195442)
    I've got the third edition as a reference work, and decided not to buy the fourth as it's rather expensive for a replacement edition. (nothing bad happened to IA32 asm in the meanwhile ;) ) But i'll have to say it's not really a good book to learn IA32 from if you start more or less from scratch. I learned asm with the 6502 and Z80 (long after they were hip btw, i was a bit of late bloomer asm-wise) instruction sets. But if you more or less master those simpler (yet still complicated for a starter) to program processors you will have gained insights in the elementary asm procedures that will make learning from or reading a book like the one Irvine wrote. So let's hope somebody really writes a good coursebook which starts teaching on a simple 6502 virtual machine and then moves on to the stuff you really want to learn about the IA32. But that's a task some good tech writer (like Irvine is btw, kudos to him) has to take up.
  • Embedded Kits..... (Score:1)

    by JumboMessiah (316083) on Wednesday September 04 2002, @11:13AM (#4195464)
    Before everyone goes on a rampage about how old assembler is and how they could care less of its existence. Keep in mind the embedded developers. My first cut was on an 80188 and I couldn't of lived without it for some of my projects...
    • 1 reply beneath your current threshold.
  • by PissingInTheWind (573929) on Wednesday September 04 2002, @11:54AM (#4195659)
    Some people seems to think that programming is only about algorithms, and fast execution of those. But programs are ``algorithms + data''. Programming in assembly lose you all your flexibility when dealing with data.

    I'd really love to see a complex distributed network application written in pure Assembly. Then I'd change the spec just a little, just to show the total lack of robustness and flexibility that app would have.

    Hardware people tend to think that the fact that you execute your program on hardware matters. I think not. Software lives on its own, you need to be able to abstract the fact that you are running on hardware if you want to be able to manage the complexity.

  • Used this book (Score:1)

    by cpex (601202) <jvivona@@@ucsd...edu> on Wednesday September 04 2002, @11:59AM (#4195695)
    I used the 3rd edition for my assembly class a year or so ago. Didn't reference the book that much. The instructor provided decent notes online and I mainly used them. Used the book to find similar examples to homework problems. I have since tried reading the book but have gotten bored each time and forgotten about it. I wish the book didnt focus so much on the microsoft world but what can you expect. I wish it focused more on direct hardware access which is what i see assembly being more usefull for.
  • by Mr Z (6791) on Wednesday September 04 2002, @12:00PM (#4195707) Homepage Journal

    One thing I've noticed in the comments attached to this article is the repeated question: "Is assembly still relevant?" As someone who codes assembly on a regular basis, I must shout an unequivocal YES.

    It's relevant on many levels. First, as another posted has pointed out, learning assembly is very similar to an EE learning circuit theory: To really understand the aggregate effects, you sometimes need to understand the details. Now, one could counter "But Physics isn't taught that way!" You're right, but then Physics 1 (kinematics) and to a large extent, Physics 2 (electricity and magnetism) is much more concrete than anything you'll ever learn programming-wise. Also, the "approximations" provided by Newtonian mechanics fairly accurately describe nearly all of what most of us will ever interact with. The rest of us take one or more Modern Physics courses that cover quantum mechanics and all the other nitty-gritty.

    On another level, it truly does allow you to get away from the noise of the language and concentrate on what the machine really does. I've seen so many people that are so out-of-touch with their code, it's unreal. Even in C, it's easy to write code with way-too-much hidden complexity. If you understand assembler, though, you're more likely to think about the true cost of each action. At the very least, you're much more likely to be able to compile to assembly output and actually understand what you're looking at.

    I work in embedded systems, and in that space, assembly language hasn't died. I program DSPs for a living. While high-level languages are continuing to absorb ever larger chunks of code in this space, it seems as though assembly will still always rule the tight loop. If nothing else, it's an invaluable measuring stick for knowing just how close or how far from ideal you really are.

    So in summary, assembly language is still relevant. It's the only way to truly be demystified about how your code actually gets executed. And it's a great way to get programmers thinking about all the levels of abstraction when the time comes.

    --Joe
  • Tossing my hat into the lot... (Score:3, Interesting)

    by Cutriss (262920) on Wednesday September 04 2002, @12:06PM (#4195732) Homepage
    I think Irvine's text was a good middle-of-the-road read. Duntemann's "Assembly Step By Step" was very informative and helped me learn some more varied aspects of assembly which Irvine's text was a bit short-sighted with...but otherwise, for a college textbook, it's head and shoulders above many others I've read. Uffenbeck, anyone?

    The first time I took Microprocessors, my instructor actually recommended that we use Uffenbeck's text to learn x86 ASM. Thankfully, when I retook the course, we had Irvine's text to accompany it. Don't get me wrong...Uffenbeck's book is good for comparative architecture analysis and the hardware side of things, but it's useless for learning ASM programming.
  • by Kedanoth (591243) on Wednesday September 04 2002, @12:11PM (#4195746)
    During my introductory Assembly class, we used the Third edition of Kip Irvine's book. It was actually the only required textbook in said class. (the course, named Introduction to Computer Engineering, encompassed both Intel-based Assembly (on the first half of the semester) and introductory C (on the remainder of the term).)

    The book was well done with lots of examples, but I didn't quite catch on. Not by fault of the teaching materials, but for the topic. I personally found Intel Assembly pretty confusing.

    I corroborated this by taking another class next term, which was based on Motorola 68HC11A8 Assembly, and it was a lot easier to understand.

    Just a quick peek into X college student's mind...

  • Compiler? (Score:1)

    by Garen (246649) on Wednesday September 04 2002, @12:54PM (#4196010)

    • The book comes with Microsoft ASM and thus all examples assume using MASM for their compilation needs. In my class, however, NASM has always been the compiler of choice, ...

      I would lie to you if I told you that I've read the whole book.

    It would also seem you would be lying if you said you made it to Chapter 1 -- Basic Concepts, deep into the text on page 3 where it says:

    " What is an assembler? "

    Hint: Not a compiler.

    • Re:Compiler? by Kenbo (Score:1) Wednesday September 04 2002, @01:40PM
      • Re:Compiler? by Garen (Score:1) Wednesday September 04 2002, @02:12PM
        • Re:Compiler? by Kenbo (Score:1) Wednesday September 04 2002, @11:03PM
    • 1 reply beneath your current threshold.
  • asmutils - assembly on Linux (Score:2, Informative)

    by opk (149665) on Wednesday September 04 2002, @12:59PM (#4196032) Journal
    There is a project at http://linuxassembly.org/asmutils.html [linuxassembly.org] where they're writing some of the standard UNIX utilities in x86 assembly. It's used for things like floppy distributions such as tomsrtbt.

    I used to do some assembly back in the DOS days and keep meaning to have a look again sometime.
  • by Laven (102436) on Wednesday September 04 2002, @01:20PM (#4196148)
    I'm currently taking ICS312 at the University of Hawaii where we are required to use Microsoft Assembler (MASM) and this exact book for our coding projects. This book comes with MASM 6.15 for Windows, and MASM 6.14 for DOS.

    I am wondering if anybody has any experience with MASM, especially attempting to run it on any DOS running within a virtual machine. I am trying to create an easy platform for Linux and Mac students in my class in order to learn ASM without the need for Windows (grader will only test our project assignments in MASM).

    http://videl.ics.hawaii.edu/bb/viewtopic.php?t=2 [hawaii.edu]
    I had attempted to run MASM on FreeDOS running on the Bochs Pentium Emulator in Linux, but it crashed. You can read about these problems at this address.

    I am not fully understanding about the capabilities of MASM in FreeDOS, especially within a Bochs environment. I suspect that Bochs or FreeDOS cannot support some features that MASM needs, or some of the coding requirements needed for my class this semester. I realize this question is a bit vague, though I would appreciate any insight into these problems.

    Alternatively, would there be any other 99.9%+ MASM compatible assembler that is free or Linux based? What problems may I run into with the other assemblers?

    Somebody else had mentioned trying DRDOS because that has become free (beer or speech?). Does anyone have any experience with DRDOS and MASM instead? Where can I get this?

    Thanks,
    Warren Togami
    warren@togami.com
    Mid-Pacific Linux Users Group
    http://www.mplug.org

    p.s.
    http://www.mplug.org/archive/2002/bochs_win98_inst all.php [mplug.org]
    Here's one cool though unrelated screenshot of Bochs running the Win98 Installer in Linux. Bochs isn't nearly as fast or stable as VMWare, but it is free and Open Source, and runs on other platforms like PowerPC.

  • V2OS (Score:2)

    by Lxy (80823) on Wednesday September 04 2002, @02:08PM (#4196445) Journal
    If you like assembly, and think small, fast code is cool, check out V2OS [v2os.cx] (or better yet, contribute code!).

    I haven't played with it in a long time, but it looks like it's come along by leaps and bounds. The first demo used somewhere around 50 K of floppy space and encompassed a kernel, filesystem, networking, and some basic tools. It appears that there's a stronger application base now, and it probably still sits on a floppy.
    • MenuetOS by X-Nc (Score:1) Wednesday September 04 2002, @09:53PM
  • helpful (Score:1)

    by Greenisus (262784) <.michael. .at. .mayotech.com.> on Wednesday September 04 2002, @02:11PM (#4196462) Homepage
    i have the third edition at my desk. i found it useful in college to learn assembly, and i find it useful today because it makes the other people with intro java and mcse books think i'm really smart!
  • Books To Learn Assembly? (Score:2, Funny)

    by linuxislandsucks (461335) on Wednesday September 04 2002, @02:44PM (#4196648) Homepage Journal
    Heck when I was your age we used brains and thinking to reverse engineer what the asembly instructions did..

    No wonder our education system is going down the tubes!
  • WHOA! (Score:1)

    by Greenisus (262784) <.michael. .at. .mayotech.com.> on Wednesday September 04 2002, @02:45PM (#4196651) Homepage
    i'm going straight to the bookstore! everybody better MOV outta my way!
  • by LizardKing (5245) on Wednesday September 04 2002, @02:50PM (#4196674) Homepage
    For those without access to an x86 machine, but who do have access to a Sun box, I can wholeheartedly recommend "SPARC Architecture, Assembly Programming, and C" by Paul. I learnt assembly programming from it, then x86 assembly with NASM and a PDF I found on the web. The SPARC architecture seems much more coherent, and Paul's book was actually an enjoyable read - not what I ever expected to say about a book on assembly language programming.

    Chris
    • 1 reply beneath your current threshold.
  • by CCRancor (314979) on Wednesday September 04 2002, @03:46PM (#4196999)
    I'm just gonna stick my neck out and say: Java rocks.
    Assembly might be fast etc. but it simply to dated and machine specific to be useful.

    One thing that surprises me with open-source is the fact that there is very little support in the community for java. This is after all the language that could make Windows apps work on Linux without any extra work.

    And to be honest what's best: spending an extra 200$ on a faster computer (to make up for the slowness in java) and being able to run Photoshop etc, or sitting around with a dopey P200 and running those cute-but-fast Linux programs.

    - Waiting for Xandros
    • 1 reply beneath your current threshold.
  • by clintp (5169) on Wednesday September 04 2002, @08:24PM (#4197999)
    And you want a quick fix, stop by the Parrot [parrotcode.org] project. This is the runtime engine for Perl 6.

    If you want you can code directly in PASM [parrotcode.org] (Parrot Assembler) or help write some of the tools that parse real languages and emit PASM. It's not a particularly small assembler like 6502 (but it can be if you really want!) but still has that small-system feel.

    I got my Assembler fix this past spring with Parrot BASIC [theperlreview.com] (link is PDF).

  • by TimMann (98520) on Wednesday September 04 2002, @09:32PM (#4198262) Homepage
    ...but not for x86? Is there a good book to bone up on the details of the x86 that doesn't start with "this is a 0, this is a 1"?

    I've done extensive assembly language programming for Z-80, and small to moderate amounts for 68000, PDP-10, PDP-11, VAX, and Alpha, but managed to avoid the x86 until I took my current job. Here most of what I do is well above the assembly level, but it would occasionally help to be fluent in x86 assembler.

    I suppose the answer is to just read over code with the Intel manuals in hand to look things up, until I get to where I don't have to look up so much anymore. But I was hoping for something less tedious.
    • 1 reply beneath your current threshold.
  • I'd really like to be able to read the output of gcc, but most assembly language books deal with Intel syntax, while gcc outputs AT&T syntax. Are there any decent books for someone interested in reading gcc output ?
  • by timbong (311303) on Wednesday September 04 2002, @10:32PM (#4198454) Homepage
    look at this program, a 3d raytraced tube, written in assembly in 32 bytes here [pouet.net].
  • by khuber (5664) on Thursday September 05 2002, @04:19AM (#4199096)
    I'd done a small amount of 6510 (gradeschool) and x86 (high school) programming before I took assembly language and computer architecture in college.

    Our assembly class was based on some invention of the professor's. It used a virtual machine and its own language. It probably would have been better to use something like z80, but it was okay. For me the class was rather pointless except for the project to write an assembler.

    We used the Hennessy book for architecture which is of course MIPS based. I thought that was a great assembly language for learning RISC and stuff like pipelining.

    After college I taught myself Motorola 68k assembly. Wow! That is the most elegant assembly language I've ever used. x86 assembly in contrast is very odd and clunky. I'm curious what PPC is like, but I haven't studied it.

    For Computer Science I think it is better to learn the general concepts such as memory hierarchies, superscalar design and pipelining, etc., and focus on generic 32 bit RISC architecture. I think that will serve students far better than learning x86.

    If you're not motivated enough to learn any specific language, assembly or otherwise, on your own anyway, I think you're in the wrong field!

    -Kevin

  • by dolmen.fr (583400) on Thursday September 05 2002, @08:50AM (#4199688) Homepage
    Try to implement the two following code snipnet in assembly:
    ---8<---8<---
    int n=50;
    for(int i=0; i<n; n++)
    print "OK";
    ---8<---8<---
    int n=50;
    for(int i=n; i>0; i--)
    print "OK";
    ---8<---8<---
    If you use the instruction set appropriately you'll understand that the second loop is more efficient because "loop if i>0" because there is a special opcode that can do that in just one instruction, whereas "loop if i>n" may require more.
  • Free alternative (Score:2)

    by Angst Badger (8636) on Thursday September 05 2002, @12:22PM (#4200933)
    Those wishing to dig into Intel assembly language without shelling out seventy-some-odd bucks can download the PDF version of The Art of Assembly Language [ucr.edu]. IMHO, it's pretty good, and weighs in at about 1200 pages -- there's more there than you'll probably ever use. I no longer recall if there's a complete guide to the Intel instruction set in the book, but you can, unsurprisingly, get that from Intel's site.
  • Re:Windows (Score:1)

    by stratjakt (596332) on Wednesday September 04 2002, @10:44AM (#4195344) Journal
    Pathetic linux troll.

    the x86 command set doesn't magically change just because you installed linux. There's no such thing as 'OS specific' assembler.

    It's just that DOS/Windows makes good use of assembly, and being an x86 platform, is of much more use.

    Linux isn't solely an x86 platform, so assembly is of much less use (if any at all) when you want your code to compile on a mac/ARM/MIPS etc;

    Bah, why bother
    [ Parent ]
    • Re:Windows by sqlrob (Score:2) Wednesday September 04 2002, @10:58AM
      • Re:Windows by Dr Caleb (Score:2) Wednesday September 04 2002, @11:08AM
        • Re:Windows by ceswiedler (Score:2) Wednesday September 04 2002, @11:24AM
          • Re:Windows by ComaVN (Score:2) Wednesday September 04 2002, @12:11PM
            • Re:Windows by ceswiedler (Score:2) Wednesday September 04 2002, @01:21PM
              • Re:Windows by scot4875 (Score:1) Wednesday September 04 2002, @01:36PM
              • Re:Windows by ComaVN (Score:1) Wednesday September 04 2002, @02:16PM
            • The $ idea by xiox (Score:1) Wednesday September 04 2002, @03:09PM
        • Re:WTF? by sqlrob (Score:2) Wednesday September 04 2002, @11:48AM
          • Re:WTF? by sir99 (Score:1) Wednesday September 04 2002, @12:52PM
          • 1 reply beneath your current threshold.
        • Re:WTF? by ComaVN (Score:1) Wednesday September 04 2002, @03:58PM
        • 1 reply beneath your current threshold.
      • Re:Windows by stratjakt (Score:1) Wednesday September 04 2002, @11:12AM
        • Re:Windows by OrangeSpyderMan (Score:1) Wednesday September 04 2002, @11:16AM
      • Re:Windows by AlgUSF (Score:1) Wednesday September 04 2002, @02:44PM
    • Re:Windows by oliverthered (Score:1) Wednesday September 04 2002, @11:00AM
      • Re:Windows by sir99 (Score:1) Wednesday September 04 2002, @12:57PM
        • Re:Windows by oliverthered (Score:1) Wednesday September 04 2002, @09:36PM
    • Re:Windows by OrangeSpyderMan (Score:1) Wednesday September 04 2002, @11:01AM
  • by drxenos (573895) on Wednesday September 04 2002, @03:43PM (#4196987)
    First of all C/C++ haven't been replaced by C#. Second, C++ is NOT compile into any kind of "bytecode" or run on a virtul machine. Third, you can talk directly to the hardware. Fourth, assembly is not spoken by the hardware, and is not machine code. It is a nmeumonic representation of the machine code. You should get your facts straight.
    [ Parent ]
  • 23 replies beneath your current threshold.