Message board for the users of flat assembler.
> Main > Recommended Assembly Books
estrang 16 Nov 2005, 13:42
Im thinking of buying an Assembly book. Do you guys have any recommendations?
Do you guys have your own Assembly Book at home or Work? Or did you learned just by looking at Internet tutorials and looking at codes?
|16 Nov 2005, 13:42||
polygon7 16 Nov 2005, 15:55
I'm learning assembly from both sources - form books, for example "The Waite Group (r) Turbo Assembler (r) Bible" by Gary Syck, and from internet tutorials.
My favourite sources of knowledge:
Intel or/and AMD Architecture Software Developer manuals,
Iczelion tutorials, Elicz tutorials,
"Hacker's Delight" - Henry S. Warren, Jr.; Addison Wesley ("Uczta programistów" (Helion) in Polish)
|16 Nov 2005, 15:55||
tom tobias 16 Nov 2005, 17:19
Im thinking of buying an Assembly book. Do you guys have any recommendations?
Yes, Yes, Yes and Yes.
Here is my work in progress, i.e. NOT YET COMPLETED. Just to show you what I am doing. Main point: I seek a book, (if none exists, then, I will need to write one, but since I know nothing, such a book is unlikely to be very useful!) which explains THE HARDWARE, i.e. assembly language programming, from a computer science perspective, directed towards accessing the hardware, NOT USING BIOS.
Here's what I have found thus far:
criteria: (seeking information NOT found in the Intel Programmer's manual)
I. DETAILED programming examples, rather than a collection of unsolved problems--> these examples must be properly documented--i.e. NOT JUST THE OUTPUT FROM A C COMPILER.
10 A. data structure implemented by two of these three: (1) linked list, (2) stack, (3) queue;
10 B. binary search tree, depth-first search, hash table; (two of these three)
5 C. sorting (quicksort, bucket sort, heap sort, insertion sort, bubble sort); any one
5 D. recursion or parsing; either one
10 E. numerical manipulation using the FPU, and/or SSE, SSE2, or SSE3 instructions:
(1) square root or (2) logarithm, AND (3) transcendental;
10 F. protected mode programming (any two of the following three topics)
(1) setup to enter PM on boot from hard disk;
(2) examples explaining how to access hardware via protected mode;
(3) operating system design considerations with FLAT rather than segmented memory organization.
II. accessing hardware (examples with instructions DOCUMENTED, and timing considerations explained)
50 (any 5 of the following:)
A. cmos (aka BIOS, i.e. eeprom) (reading bios data or code, not issuing bios commands);
B. APIC (not old fashioned 8259 or 8255);
C. DMA controller;
D. PCI bus;
G. ide/sata (n.b. accessing the controller, NOT manipulating FAT/FAT32, nor Linux file types);
H. keyboard; (NOT BIOS services)
I. sound card or other analogue digital converter;
J. video controller (NOT BIOS);
TOTAL = 50/50, i.e. 100 points maximum
Points are not awarded for:
1. describing the Intel architecture, including past models, or contrasting it with other architectures;
2. providing illustrations using REAL mode;
3. explaning the various Intel addressing modes;
4. elaborating the entire Intel Instruction set;
5. illustrating boolean arithmetic;
6. analyzing machine code, "DEBUG", or methods to examine memory;
7. distinctions between MASM, TASM, NASM, FASM, GAS, or any other assembler, linker, editor.
8. contrasting cache memory, mainboard memory, branch prediction, pipelined and non-pipelined bus signals;
9. counting the number of transistors on a Pentium.
10. programming 8259, 8255, i.e. OBSOLETE HARDWARE...
11. detailing interface to "high level" languages, or "inline assembly"...
12. ordinary integer arithmetic....
13. Towers of Hanoi, Fibonacci number computation, interesting though those problems are...
1. Dandamudi Introduction to Asssembly Language Programming 2005 Springer 0387206361
2. Brey The Intel microprocessors ... 2006 Pearson 0131195069
3. Triebel The 8088 and 8086 microprocessors... 2003 Pearson 0130417742
4. Detmer 80x86 Assembly Language..... 2001 Jones&Bart... 0763717738
5. DosReis Assembly Language..... 2004 Thompson 0534405274
6. Bartlett Programming from the ground up 2004 Bartlett 0975283847
7. Wyatt Using Assembly Language (3rd edition) 1992 Que
8. Wyatt Advanced Assembly Language 1992 Que
9. Maljugin Revolutionary Assembly Language 1993 WROX
10. Johnson Assembly Language for real programmers only 1993 SAMS
11. Miller An Assembly Language Introduction to Comp.Ar. 1999 Oxford
12. Swan Mastering Turbo Assembler 1995 Sams
13. Chebotko Master Class Assembly Language 1995 wrox
14. Irvine Asssembly Language for Intel computers 2003 Pearson
15. Jones Assembly Language Programming for IBM 2001 Scott/Jones
16. Mazidi 80x86 IBM PC Assembly language 2003 Pearson 013061775X
17. Abel IBM PC Assembly Language And Programming 2001 Prentice Hall 013030655x
book #: IA B C D
SECOND E F IIA B
THIRD C D E F
FOURTH G H I J
TOTAL: points from I/II
1. stack: 189, 5; insertion,173-6, 5; binary 177-80, 5; recursion 463-71,5;
SECOND 0; 0;
FOURTH keyboard: 452-7, 10;
comment: uses C to explain concepts, relies upon nasm-Linux; explains SELECTED Intel instructions, uses "PUTCH", "GETCH", with "include io.mac" instead of reading from the keyboard, but does have keyboard: pgs 450-452, and Interrupt driven I/O pages (also for keyboard) pages 452-457 (USEFUL, i.e. NOT BIOS), describes 8259 PIC, & 8255 Parallel port interface, working with it, i.e. OBSOLETE. MIPS focus, lots on SPIM simulator. WHere is io.mac defined? (first used on page 100). Nothing about SATA, modern I/O, firewire, USB or USB-2, booting from hard drive, cdrom, accessing dvd or streaming video. No data structure definitions by linked list or queue. some examples using stack, but nothing like TCP/IP implementation, or relationship to operating systems. Implements Fibonacci 152-155. Protected mode interrupt processing explains nothing, just uses Linux "int 80", whatever that is, page 410-418.
SECOND SSE v float: 567,10;
THIRD dma 472-488, 10; Timer 406-12, 10; usb 601-5, 10;
FOURTH keyboard: 447-8, 10;
comment: new edition has answers to even numbered problems, old edition had answers to odd numbered problems, but the problems are almost identical, a few more, and a few revisions in the newer edition. Many examples use C, RATHER than Assembly: page 279 "Although this program does not use assembly language, it does demonstrate how to obtain the date and time from the Windows API..." page 282: Sort program primarily written in C, with some "inline" assembly. Hardware descriptions, BUT NOT EXAMPLES showing how to access the hardware from assembly language in protected mode. Illustration of 8255 programming (page 380-406) has been expanded compared with the former text, from 1991, (pages 220-234) and now includes an illustration interfacing to a stepper motor, as well as the LED display from the earlier text. This is useful. It is good. Problem is, these programming examples do not reflect the numerous changes in hardware on the motherboard during these past fifteen years. The same old illustrations for programming the 8259 remain, nothing is found to describe the newer 82093 "advanced" interrupt controller, dating from 1996. Brey offers inline assembly code to accompany C programs for accessing the ISA bus, (obsolete for 15 years), but relies upon BIOS to access the PCI bus (pgs 585-592). The inner workings of ISA are thus explained, while PCI remains a mystery: "Note that the BIOS does not support data transfers between the computer and the PCI interface. Data transfers are handled by drivers that are provided with the interface. These drivers control the flow of data between the microprocessor and the component found on the PCI interface." page589. copy made of SSE versus float, page 567.
THIRD DMA 521-36,10; Timer 505-21, 10;
comment: very little changed from earlier editions
4. stack: 226, 5; recursion 223-7, 5;
SECOND square root 384, 5;
comment: very well written, well documented programs. Strong bias towards C and microsoft. Integer square root page 209-10. search for a string within a string pg 239-250. Thorough and detailed explanation of floating point arithmetic, pages 340-360.
5. stack: 541-7, 5; recursion: 353-9, 5;
comment: C basis and examples ("thunk"); uses proprietary, H1 code???, for example, cora,reba, bpbp; uses @ as a character, e.g. call @A@display_x$v (page 573), i.e. CODE, not a program. Comparing the "disadvantages" of call by name, versus call by reference, he writes: "Call by name has some significant disadvantages:
Programs that use call by name can be difficult to understand.
The mechanism involves a great deal of run-time overhead (more than call by reference).
Implementing call by name is a major task." page 576, yet, he offers no comparisons to show how much overhead is consumed by call by name. Call by name is EASIER to read and comprehend than call by reference, unless one is using names like @A@display_x$v, and thunk.
6. stack: 56, 5; recursion: 65-72, 5;
TOTAL: 10/0 comment: uses GAS, C/linux. Useless, but still superior to #5.
FOURTH keyboard:424-8,10; vid.contr: 377-408, 10;
TOTAL: 0/20 comment: strictly real mode, video controller access WITHOUT BIOS....
FOURTH kboard: 36-62, 10;
comment: very good description of writing interrupt driven program, real mode pages 82-94, LOTS OF DOS specific code. Mouse, 367-418, minor protected mode section 459-479
9. Bubblesort 165-70,5;
SECOND cmos mem 340, 10;
FOURTH kboard: 264-80, 10 vid.contr: 355-65,10;
comment: keyboard description at HARDWARE LEVEL, not just bios and dos, like most books. Output video DIRECTLY, page 355-6, display ascii table page 377, no low level disk access, but good description of bios services for disk, 8255 (sound, keyboard, system config.) pg 468, good for 8259 (now obsolete) pgs 471-4; low level printer access, pgs495-8;sound, pgs 504-6.
10. TOTAL: 0/0 comment: switching from real to protected mode and back again, pgs 536-545
11. 141-6,146-50, 10;
comment: SASM: Simple abstract language, compares to C. (made up of macros implemented with MASM) follows Intel convention of destination,source syntax. Very good description of relationship between asm and machine code; second half of book drops SASM, uses full Intel syntax, as if by magic, i.e. without explaining it. DMA is described, BUT NO CODE PROVIDED. Then asks students: ("problems" (page 244): 8. The processor sends commands to a DMA controller to set up a DMA transfer. How can this be accomplished?" How would the student know from reading her book, which has no information?
12. TOTAL: 0/0 comment:examples using bios to get video controller info. 8259 examples
THIRD DMA,247-262, 10; timer 262-281, 10;
FOURTH ide 334-343, 10; sound 284-326 , 10; video 395-449,10;
TOTAL: 0/50 comment: real - protected switch 604-612
14. linked list 373,10; binarysearch322,5; bubble sort 262,5;
comment: call writeString, call readchar, etc, i.e. Irvine defined procedures;
DOS/FAT, NOT low level IDE interface, lots of BIOS for graphics, 8259 interrupts.
15. TOTAL: 0/0 comment: a dos book, without utility
SECOND fp, 610-620, 10;
THIRD DMA,468-76, 10; timer 387-396, 10;
FOURTH keybd,545, 10;
comment: DOS book, lots of hardware, none new. Excellent description of DMA programming, HOWEVER, nothing about use of DMA with modern, i.e. Pentium and later cpu's (e.g. exploring penalty for DMA operating so slowly), VERY GOOD Q&A, but only about obsolete cpu's. Graphics controller strictly BIOS, not direct programming. keyboard mixed, some pure code, some bios. floppy with 5.25 detail. IDE with nothing about SATA, strictly FAT,DOS. Mentions PCI and USB, but NO PROGRAMMING illustrations. Clock cycles (appendix B) has detailed descriptions for 8086-80486. Nothing since, though the book was published in 2003, 15 years after 80486 appeared on the scene, and 10 years after it had become completely obsolete. Book has a nice description (pgs 375-382) of programming a/d converter via 8255. Would have been a terrific book 15 years ago.
17. TOTAL: 0/0
comment: good description of boot process. 100% BIOS, nothing about controllers or direct access
Conclusion: The two best books, (though none of the above are really satisfactory,) are written by Dandamudi, and Chebotko et al.
Both books have profound limitations. Neither book will explain in simple terms, how to create an operating system, written in assembly language, flat mode, without reliance upon BIOS. Maybe I am too fussy.
|16 Nov 2005, 17:19||
vid 16 Nov 2005, 19:14
I learned (quite well i hope) just from a very few internet sources, and mostly myself. get something complete, maybe "art of assembly", it's good and free. Don't believe those who state you have to pay to learn anything, not now when we have use great communist power of internet.
|16 Nov 2005, 19:14||
gunblade 16 Nov 2005, 20:45
Heh, funny thing is I can't really remember how I learned, I guess I'm still learning, but who isn't. I never really used any books for assembly itself, learned mostly from tutorials on the 'net.
The way i found easiest to learn anything was to mix tutorials with examples and source code. Read some tutorials explaining the basics, then get some source code and start reading through it, understanding it and even writing down what each section does. If you come accross something you dont understand, search for it on google or in one of the tutorials/intel docs you have. Then go back to the source and once youve done understanding it, try changing it, making it do different things.
Most of all, enjoy it
|16 Nov 2005, 20:45||
Matrix 16 Nov 2005, 21:21
i recommend you this tutorial:
Graphics Programming Black Book - huge (153 MB in 77 pdfs)
i have made it offline for example.
|16 Nov 2005, 21:21||
estrang 17 Nov 2005, 23:36
Thnks for all the recommendation guys. Especially the long one.
And thnks to matrix for that PDF. Ive been looking for that kind of tut evrywhere.
|17 Nov 2005, 23:36||
penang 27 Nov 2005, 11:50
Methinks this place can be a great service to many if people here can post the links they know that will be beneficial to others, like the one with the book on graphics.
|27 Nov 2005, 11:50||
JoeCoder1 04 Jul 2011, 08:27
Im thinking of buying an Assembly book. Do you guys have any recommendations?
I learned assembler from the processor manual and assembler manuals for my system but I haven't seen good doc for other systems and anyway that was a long time ago and I learned things as they grew. It's much harder now to take an Intel or AMD manual today with all the stuff they can do and learn from it. So I am having a hard time learning Intel like many of you. I got started with Duntemann's book but it's even outdated now after AMD64 being released and the first chapters are a total waste of time and stupid. There is a lot the book doesn't cover but it was enough to get me started writing bad code on Intel in Linux. The problem with learning assembly is that learning assembly itself doesn't get you anywhere at all. You have to learn assembly and the tools and your target OS all at the same time or you can't write code to do anything besides add 2 numbers. All the books now I have seen are so specialized you have to know at the beginning whether you want Windows or Linux, whether you want 32 bit or 64, whether you want Intel compatible syntax assemblers or ATT, which debuggers or debugger GUIs you will use, etc. So many variables, so little time! I'm too old for this shit! You young guys have a few decades to learn Intel. I will probably never be expert on it.
|04 Jul 2011, 08:27||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.