Linux Assembly Language Programming

Bob Neveln · International Linear Collider · 2000

1. Introduction. The Fetch-Execute Cycle. The Linux Operating System. The Gnu C Compiler. The Edlinas Assembler. NASM. Other Assemblers. 2. Placeholding Numeration. The Decimal and Pentimal Systems. Pentimal Arithmetic. Conversion to Pentimal. The Binary System. Memory as a Rectangle of Bits. The Hexadecimal System. Base Distinguishing Notations. Fractions in Other Bases. Converting Fractions. 3. Logic Circuits and Computation. The NOT Gate. Boolean Operators. Logic Gates. Addition Circuits. Sequential Circuits. Negative Number Representation. Subtraction Using Negation. Placeholding Two's Complement. Memory Circuits. x86 General Registers and their Ancestry. The MOV Command. Addition and Subtraction Commands. Multiplication and Division Commands. 4. Assembly Language. The Four Field Format. Computers from the CPU Standpoint. Simple Assembly Language Programs. Assembler Programs with Jumps. Assembler Programs with Loops. Signed Comparisons. Unsigned Comparisons. Linux .s files. 5. Machine Language. Assembling Simple Programs. Opcode Space. The ModRM Byte. 386 Space (0F + ...). 32-Bit vs 16-Bit Code. The 8-Bit Registers. Linux .o Files. 6. Memory. 4-Byte Data Width. Addresses in Brackets. Operand Size Ambiguity. Labels. Immediate Storage. 7. The Stack. Push and Pop Operations. Subprograms. Parameter Passing. Recursion. 8. Linux User Programs. Multitasking. Paging. Address Translation. Program Segments. Other Data Segments. Protection. Executable Files in ELF Format. Object Files in ELF Format. 9. Interrupts. Polling. External Interrupts. ISA Architecture. Internal and Software Interrupts. System Calls. Privilege Levels. Control Transfer. Scheduling. 10. Bit Manipulations. Bitwise Logic Operations. The AND, OR, NOT, and XOR Commands. Bit Setting and Testing. Shift Instructions. 11. Device Drivers. Device-Independent Files. Devices as Files. Morse Code Speaker Driver. Serial Port Digitizer Driver. 12. DOS Programs. Real Mode Segmentation. Edlinas Environment Variables. Fixed Memory Areas. Real Mode Interrupts. Checking DOS Memory. 13. Linux Boot Time Programs. Changing to Protected Mode. Protected Mode Segmentation. Setting Up the Global Descriptor Table. Closing. Index.

Read the paper · More papers on PaperTik