Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Assembly Language Step by Step Programming with DOS and Linux 2nd Ed 2000.pdf
Скачиваний:
156
Добавлен:
17.08.2013
Размер:
4.44 Mб
Скачать

List of Figures

Chapter 1: Another Pleasant Valley Saturday Understanding What Computers Really Do

Figure 1.1: The Game of Big Bux.

Figure 1.2: The Game of Assembly Language.

Chapter 2: Alien Bases Getting Your Arms around Binary and Hexadecimal

Figure 2.1: The anatomy of n= T=.

Figure 2.2: The anatomy of 76225 octal.

Figure 2.3: The anatomy of 3C0A9H.

Chapter 3: Lifting the Hood Discovering What Computers

Actually Are

Figure 3.1: Transistor switches and memory cells.

Figure 3.2: A RAM chip.

Figure 3.3: A 1-megabyte memory bank.

Figure 3.4: The CPU and memory.

Chapter 4: The Right to Assemble The Process of Making Assembly Language Programs

Figure 4.1: Rotating disk storage.

Figure 4.2: The structure of a DOS text file.

Figure 4.3: What the assembler does.

Figure 4.4: The assembler and linker.

Figure 4.5: The assembly language development process.

Figure 4.6: A hex dump of SAM.TXT.

Chapter 5: NASM-IDE: A Place to Stand Give me a lever long enough, and a place to stand, and I will move the Earth.

Figure 5.1: The NASM-IDE environment.

Figure 5.2: A NASM-IDE error message box.

Figure 5.3: When you exit without saving.

Figure 5.4: The error information window appears.

Figure 5.5: Running the executable program file.

Figure 5.6: The Open File dialog box.

Figure 5.7: The Find dialog box.

Figure 5.8: The Replace dialog box.

Figure 5.9: The Environment Options dialog box.

Chapter 6: An Uneasy Alliance The x86 CPU and Its Segmented Memory System

Figure 6.1: The 8080 memory model.

Figure 6.2: The 8080 memory model inside an 8086 memory system.

Figure 6.3: Seeing a megabyte through 64K blinders.

Figure 6.4: Memory addresses versus segment addresses.

Figure 6.5: Segments and offsets.

Figure 6.6: Extending the 16-bit general-purpose registers.

Figure 6.7: 8-bit, 16-bit, and 32-bit registers.

Figure 6.8: The real mode flat model.

Figure 6.9: The real mode segmented model.

Figure 6.10: The protected mode flat model.

Figure 6.11: The PC's video refresh buffer.

Chapter 7: Following Your Instructions Meeting Machine Instructions up Close and Personal

Figure 7.1: How memory data is addressed.

Chapter 8: Our Object All Sublime Creating Programs that Work

Figure 8.1: The big picture of the real mode stack.

Figure 8.2: How the stack works.

Figure 8.3: The interrupt vector table.

Figure 8.4: Riding the interrupt vector into DOS.

Figure 8.5: Returning home from an interrupt.

Chapter 9: Dividing and Conquering Using Procedures and Macros to Battle Complexity

Figure 9.1: Calling a procedure and returning.

Figure 9.2: Connecting globals and externals.

Figure 9.3: How macros work.

Chapter 10: Bits, Flags, Branches, and Tables Easing into Mainstream Assembly Programming

Figure 10.1: Bit numbering.

Figure 10.2: The anatomy of an AND instruction.

Figure 10.3: Using XOR to zero a register.

Figure 10.4: Using a lookup table.

Figure 10.5: Interrupt 11H configuration information.

Chapter 11: Stringing Them Up Those Amazing String

Instructions

Figure 11.1: Unpacked BCD digits.

Chapter 12: The Programmer's View of Linux Tools and Skills to Help You Write Assembly Code under a True 32-Bit OS

Figure 12.1: How gcc builds Linux executables.

Figure 12.2: The structure of a Linux assembly language program.

Chapter 13: Coding for Linux Applying What You've Learned to a True Protected Mode Operating System

Figure 13.1: A stack frame.

Figure 13.2: Protected mode memory addressing.

Figure 13.3: Linux command-line arguments.

List of Tables

Chapter 2: Alien Bases Getting Your Arms around Binary and Hexadecimal

Table 2.1: Counting in Martian, Base Fooby

Table 2.2: Powers of Fooby

Table 2.3: Counting in Octal, Base 8

Table 2.4: Octal Columns as Powers of Eight

Table 2.5: Counting in Hexadecimal, Base 16

Table 2.6: Hexadecimal Columns as Powers of 16

Table 2.7: Binary Columns as Powers of 2

Chapter 6: An Uneasy Alliance The x86 CPU and Its Segmented Memory System

Table 6.1: Collective Terms for Memory

Chapter 7: Following Your Instructions Meeting Machine Instructions up Close and Personal

Table 7.1: MOV and Its Operands

Table 7.2: Segment Override Prefixes

Table 7.3: Rogue MOV Instructions

Table 7.4: DEBUG's Flag State Symbols

Chapter 10: Bits, Flags, Branches, and Tables Easing into Mainstream Assembly Programming

Table 10.1: The AND Truth Table for Formal Logic

Table 10.2: The AND Truth Table for Assembly Language

Table 10.3: The OR Truth Table for Assembly Language

Table 10.4: The XOR Truth Table for Assembly Language

Table 10.5: The NOT Truth Table for Assembly Language

Table 10.6: Arithmetic Jump Mnemonics and Their Synonyms

Table 10.7: Arithmetic Tests Useful After a CMP Instruction

Table 10.8: Legal PC Display Adapter/Monitor Combinations

Chapter 12: The Programmer's View of Linux Tools and Skills to Help You Write Assembly Code under a True 32-Bit OS

Table 12.1: Format Codes for gdb's Print and x Commands

Table 12.2: Unit Size Codes for gdb's x Command

Chapter 13: Coding for Linux Applying What You've Learned to a

True Protected Mode Operating System

Table 13.1: Protected Mode Memory-Addressing Schemes

Table 13.2: Common printf Formatting Codes

Table 13.3: The Values Contained in the tm Structure

Table 13.4: File Access Codes for Use with fopen