\relax 
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax 
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\newlabel{preface}{{}{xiii}{Preface}{chapter*.2}{}}
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Information Representation and Storage}{1}{chapter.1}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:datarep}{{1}{1}{Information Representation and Storage}{chapter.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {1.1}Introduction}{1}{section.1.1}}
\@writefile{toc}{\contentsline {section}{\numberline {1.2}Bits and Bytes}{1}{section.1.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}``Binary Digits''}{1}{subsection.1.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.2}Hex Notation}{2}{subsection.1.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.3}There Is No Such Thing As ``Hex'' Storage at the Machine Level!}{4}{subsection.1.2.3}}
\@writefile{toc}{\contentsline {section}{\numberline {1.3}Main Memory Organization}{4}{section.1.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3.1}Bytes, Words and Addresses}{4}{subsection.1.3.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1.1}The Basics}{4}{subsubsection.1.3.1.1}}
\newlabel{basics}{{1.3.1.1}{4}{The Basics}{subsubsection.1.3.1.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1.2}Most Examples Here Will Be for 32-bit Machines}{5}{subsubsection.1.3.1.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1.3}Word Addresses}{5}{subsubsection.1.3.1.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1.4}{}``Endian-ness{}''}{5}{subsubsection.1.3.1.4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1.5}Other Issues}{7}{subsubsection.1.3.1.5}}
\@writefile{toc}{\contentsline {section}{\numberline {1.4}Representing Information as Bit Strings}{9}{section.1.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.1}Representing Integer Data}{9}{subsection.1.4.1}}
\newlabel{repint}{{1.4.1}{9}{Representing Integer Data}{subsection.1.4.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.2}Representing Real Number Data}{13}{subsection.1.4.2}}
\newlabel{float}{{1.4.2}{13}{Representing Real Number Data}{subsection.1.4.2}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2.1}``Toy'' Example}{13}{subsubsection.1.4.2.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2.2}IEEE Standard}{13}{subsubsection.1.4.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.3}Representing Character Data}{16}{subsection.1.4.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.4}Representing Machine Instructions}{17}{subsection.1.4.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.5}What Type of Information is Stored Here?}{17}{subsection.1.4.5}}
\newlabel{whattype}{{1.4.5}{17}{What Type of Information is Stored Here?}{subsection.1.4.5}{}}
\@writefile{toc}{\contentsline {section}{\numberline {1.5}Examples of the Theme, ``There Are No Types at the Hardware Level''}{18}{section.1.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.1}Example}{18}{subsection.1.5.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.2}Example}{19}{subsection.1.5.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.3}Example}{20}{subsection.1.5.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.4}Example}{21}{subsection.1.5.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.5}Example}{21}{subsection.1.5.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.6}Example}{22}{subsection.1.5.6}}
\@writefile{toc}{\contentsline {section}{\numberline {1.6}Visual Display}{23}{section.1.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.1}The Basics}{23}{subsection.1.6.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.2}Non-English Text}{24}{subsection.1.6.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.3}It's the Software, Not the Hardware}{24}{subsection.1.6.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.4}Text Cursor Movement}{24}{subsection.1.6.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.5}Mouse Actions}{25}{subsection.1.6.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.6}Display of Images}{26}{subsection.1.6.6}}
\@writefile{toc}{\contentsline {section}{\numberline {1.7}There's Really No Such Thing As ``Type'' for Disk Files Either}{26}{section.1.7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.1}Disk Geometry}{26}{subsection.1.7.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.2}Definitions of ``Text File'' and ``Binary File''}{26}{subsection.1.7.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.3}Programs That Access of Text Files}{27}{subsection.1.7.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.4}Programs That Access ``Binary'' Files}{28}{subsection.1.7.4}}
\@writefile{toc}{\contentsline {section}{\numberline {1.8}Storage of Variables in HLL Programs}{29}{section.1.8}}
\newlabel{store}{{1.8}{29}{Storage of Variables in HLL Programs}{section.1.8}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.1}What Are HLL Variables, Anyway?}{29}{subsection.1.8.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.2}Order of Storage}{29}{subsection.1.8.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.8.2.1}Scalar Types}{30}{subsubsection.1.8.2.1}}
\newlabel{scalar}{{1.8.2.1}{30}{Scalar Types}{subsubsection.1.8.2.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.8.2.2}Arrays}{31}{subsubsection.1.8.2.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.8.2.3}Structs and C++ Class Objects}{31}{subsubsection.1.8.2.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.8.2.4}Pointer Variables}{32}{subsubsection.1.8.2.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.3}Local Variables}{34}{subsection.1.8.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.4}Variable Names and Types Are Imaginary}{34}{subsection.1.8.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.5}Segmentation Faults and Bus Errors}{36}{subsection.1.8.5}}
\@writefile{toc}{\contentsline {section}{\numberline {1.9}ASCII Table}{37}{section.1.9}}
\@writefile{toc}{\contentsline {section}{\numberline {1.10}An Example of How One Can Exploit Big-Endian Machines for Fast Character String Sorting}{39}{section.1.10}}
\newlabel{bigendsort}{{1.10}{39}{An Example of How One Can Exploit Big-Endian Machines for Fast Character String Sorting}{section.1.10}{}}
\@writefile{toc}{\contentsline {chapter}{\numberline {2}Major Components of Computer {}``Engines{}''}{41}{chapter.2}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {2.1}Introduction}{41}{section.2.1}}
\@writefile{lof}{\contentsline {figure}{\numberline {2.1}{\ignorespaces system structure}}{42}{figure.2.1}}
\newlabel{system}{{2.1}{42}{system structure}{figure.2.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {2.2}Major Hardware Components of the Engine}{42}{section.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}System Components}{42}{subsection.2.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.2}CPU Components}{45}{subsection.2.2.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2.1}Intel/Generic Components}{45}{subsubsection.2.2.2.1}}
\@writefile{lof}{\contentsline {figure}{\numberline {2.2}{\ignorespaces CPU internals}}{46}{figure.2.2}}
\newlabel{internal}{{2.2}{46}{CPU internals}{figure.2.2}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2.2}History of Intel CPU Structure}{48}{subsubsection.2.2.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.3}The CPU Fetch/Execute Cycle}{49}{subsection.2.2.3}}
\@writefile{toc}{\contentsline {section}{\numberline {2.3}Software Components of the Computer {}``Engine{}''}{50}{section.2.3}}
\@writefile{toc}{\contentsline {section}{\numberline {2.4}Speed of a Computer {}``Engine{}''}{51}{section.2.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.1}CPU Architecture}{52}{subsection.2.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.2}Parallel Operations}{52}{subsection.2.4.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.3}Clock Rate}{53}{subsection.2.4.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.4}Memory Caches}{54}{subsection.2.4.4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.1}Need for Caching}{54}{subsubsection.2.4.4.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.2}Basic Idea of a Cache}{54}{subsubsection.2.4.4.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.3}Blocks and Lines}{55}{subsubsection.2.4.4.3}}
\newlabel{class}{{15}{55}{}{Hfootnote.43}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.4}Direct-Mapped Policy}{56}{subsubsection.2.4.4.4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.5}What About Writes?}{57}{subsubsection.2.4.4.5}}
\newlabel{write}{{2.4.4.5}{57}{What About Writes?}{subsubsection.2.4.4.5}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.6}Programmability}{57}{subsubsection.2.4.4.6}}
\newlabel{able}{{2.4.4.6}{57}{Programmability}{subsubsection.2.4.4.6}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.7}Details on the Tag and Misc. Line Information}{58}{subsubsection.2.4.4.7}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.4.8}Why Caches Usually Work So Well}{58}{subsubsection.2.4.4.8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.5}Disk Caches}{58}{subsection.2.4.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.6}Web Caches}{59}{subsection.2.4.6}}
\@writefile{toc}{\contentsline {chapter}{\numberline {3}Introduction to Linux Intel Assembly Language}{61}{chapter.3}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:asm}{{3}{61}{Introduction to Linux Intel Assembly Language}{chapter.3}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.1}Overview of Intel CPUs}{61}{section.3.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.1}Computer Organization}{61}{subsection.3.1.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.2}CPU Architecture}{62}{subsection.3.1.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.3}The Intel Architecture}{62}{subsection.3.1.3}}
\newlabel{intelarch}{{3.1.3}{62}{The Intel Architecture}{subsection.3.1.3}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.2}What Is Assembly Language?}{63}{section.3.2}}
\@writefile{toc}{\contentsline {section}{\numberline {3.3}Different Assemblers}{64}{section.3.3}}
\@writefile{toc}{\contentsline {section}{\numberline {3.4}Sample Program}{64}{section.3.4}}
\newlabel{sample1}{{3.4}{64}{Sample Program}{section.3.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.1}Analysis}{65}{subsection.3.4.1}}
\newlabel{analysis}{{3.4.1}{65}{Analysis}{subsection.3.4.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.2}Source and Destination Operands}{70}{subsection.3.4.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.3}Remember: No Names, No Types at the Machine Level}{70}{subsection.3.4.3}}
\newlabel{notypes}{{3.4.3}{70}{Remember: No Names, No Types at the Machine Level}{subsection.3.4.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.4}Dynamic Memory Is Just an Illusion}{71}{subsection.3.4.4}}
\@writefile{toc}{\contentsline {section}{\numberline {3.5}Use of Registers Versus Memory}{72}{section.3.5}}
\@writefile{toc}{\contentsline {section}{\numberline {3.6}Another Example}{72}{section.3.6}}
\newlabel{anotherexample}{{3.6}{72}{Another Example}{section.3.6}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.7}Addressing Modes}{76}{section.3.7}}
\@writefile{toc}{\contentsline {section}{\numberline {3.8}Assembling and Linking into an Executable File}{77}{section.3.8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8.1}Assembler Command-Line Syntax}{77}{subsection.3.8.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8.2}Linking}{78}{subsection.3.8.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8.3}Makefiles}{78}{subsection.3.8.3}}
\@writefile{toc}{\contentsline {section}{\numberline {3.9}How to Execute Those Sample Programs}{79}{section.3.9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9.1}{}``Normal{}'' Execution Won't Work}{79}{subsection.3.9.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9.2}Running Our Assembly Programs Using GDB/DDD}{80}{subsection.3.9.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.9.2.1}Using DDD for Executing Our Assembly Programs}{80}{subsubsection.3.9.2.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.9.2.2}Using GDB for Executing Our Assembly Programs}{81}{subsubsection.3.9.2.2}}
\@writefile{toc}{\contentsline {section}{\numberline {3.10}How to Debug Assembly Language Programs}{82}{section.3.10}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10.1}Use a Debugging Tool for ALL of Your Programming, in EVERY Class}{82}{subsection.3.10.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10.2}General Principles}{83}{subsection.3.10.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.2.1}The Principle of Confirmation}{83}{subsubsection.3.10.2.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.2.2}Don't Just \relax $\@@underline {\hbox {Write}}\mathsurround \z@ $\relax  Top-Down, But \relax $\@@underline {\hbox {Debug}}\mathsurround \z@ $\relax  That Way Too}{83}{subsubsection.3.10.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10.3}Assembly Language-Specific Tips}{83}{subsection.3.10.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.3.1}Know Where Your Data Is}{83}{subsubsection.3.10.3.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.3.2}Seg Faults}{84}{subsubsection.3.10.3.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10.4}Use of DDD for Debugging Assembly Programs}{85}{subsection.3.10.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10.5}Use of GDB for Debugging Assembly Programs}{85}{subsection.3.10.5}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.5.1}Assembly-Language Commands}{85}{subsubsection.3.10.5.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.5.2}TUI Mode}{87}{subsubsection.3.10.5.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.10.5.3}CGDB}{87}{subsubsection.3.10.5.3}}
\@writefile{toc}{\contentsline {section}{\numberline {3.11}Some More Operand Sizes}{88}{section.3.11}}
\newlabel{smalloperands}{{3.11}{88}{Some More Operand Sizes}{section.3.11}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.12}Some More Addressing Modes}{89}{section.3.12}}
\newlabel{moreaddr}{{3.12}{89}{Some More Addressing Modes}{section.3.12}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.13}Inline Assembly Code for C++}{92}{section.3.13}}
\@writefile{toc}{\contentsline {section}{\numberline {3.14}Example: Counting Lower-Case letters}{93}{section.3.14}}
\@writefile{toc}{\contentsline {section}{\numberline {3.15}``Linux Intel Assembly Language'': Why ``Intel''? Why ``Linux''?}{94}{section.3.15}}
\@writefile{toc}{\contentsline {section}{\numberline {3.16}Viewing the Assembly Language Version of the Compiled Code}{94}{section.3.16}}
\@writefile{toc}{\contentsline {section}{\numberline {3.17}String Operations}{95}{section.3.17}}
\newlabel{stringops}{{3.17}{95}{String Operations}{section.3.17}{}}
\@writefile{toc}{\contentsline {section}{\numberline {3.18}Useful Web Links}{97}{section.3.18}}
\@writefile{toc}{\contentsline {section}{\numberline {3.19}Top-Down Programming}{97}{section.3.19}}
\newlabel{topdown}{{3.19}{97}{Top-Down Programming}{section.3.19}{}}
\@writefile{toc}{\contentsline {chapter}{\numberline {4}More on Intel Arithmetic and Logic Operations}{99}{chapter.4}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:arithlog}{{4}{99}{More on Intel Arithmetic and Logic Operations}{chapter.4}{}}
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Instructions for Multiplication and Division}{99}{section.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Multiplication}{99}{subsection.4.1.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.1.1.1}The IMUL Instruction}{99}{subsubsection.4.1.1.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.1.1.2}Issues of Sign}{100}{subsubsection.4.1.1.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.2}Division}{100}{subsection.4.1.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.1.2.1}The IDIV Instruction}{100}{subsubsection.4.1.2.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.1.2.2}Issues of Sign}{100}{subsubsection.4.1.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.3}Example}{101}{subsection.4.1.3}}
\@writefile{toc}{\contentsline {section}{\numberline {4.2}More on Carry and Overflow, and More Jump Instructions}{102}{section.4.2}}
\@writefile{toc}{\contentsline {section}{\numberline {4.3}Logical Instructions}{104}{section.4.3}}
\@writefile{toc}{\contentsline {section}{\numberline {4.4}Floating-Point}{108}{section.4.4}}
\@writefile{toc}{\contentsline {chapter}{\numberline {5}Introduction to Intel Machine Language}{111}{chapter.5}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:machlang}{{5}{111}{Introduction to Intel Machine Language}{chapter.5}{}}
\@writefile{toc}{\contentsline {section}{\numberline {5.1}Overview}{111}{section.5.1}}
\@writefile{toc}{\contentsline {section}{\numberline {5.2}Relation of Assembly Language to Machine Language}{111}{section.5.2}}
\@writefile{toc}{\contentsline {section}{\numberline {5.3}Example Program}{112}{section.5.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.1}The Code}{112}{subsection.5.3.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.2}Feedback from the Assembler}{114}{subsection.5.3.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.3}A Few Instruction Formats}{114}{subsection.5.3.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.4}Format and Operation of Jump Instructions}{115}{subsection.5.3.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.5}Other Issues}{116}{subsection.5.3.5}}
\@writefile{toc}{\contentsline {section}{\numberline {5.4}It Really Is Just a Mechanical Process}{117}{section.5.4}}
\@writefile{toc}{\contentsline {section}{\numberline {5.5}You Could Write an Assembler!}{118}{section.5.5}}
\@writefile{toc}{\contentsline {chapter}{\numberline {6}Compilation and Linking Process}{119}{chapter.6}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:compillink}{{6}{119}{Compilation and Linking Process}{chapter.6}{}}
\@writefile{toc}{\contentsline {section}{\numberline {6.1}GCC Operations}{119}{section.6.1}}
\newlabel{obj}{{6.1}{119}{GCC Operations}{section.6.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1.1}The C Preprocessor}{119}{subsection.6.1.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1.2}The Actual Compiler, CC1, and the Assembler, AS}{120}{subsection.6.1.2}}
\@writefile{toc}{\contentsline {section}{\numberline {6.2}The Linker: What Is Linked?}{121}{section.6.2}}
\newlabel{linking}{{6.2}{121}{The Linker: What Is Linked?}{section.6.2}{}}
\@writefile{toc}{\contentsline {section}{\numberline {6.3}Headers in Executable Files}{121}{section.6.3}}
\@writefile{toc}{\contentsline {section}{\numberline {6.4}Libraries}{122}{section.6.4}}
\newlabel{libraries}{{6.4}{122}{Libraries}{section.6.4}{}}
\@writefile{toc}{\contentsline {section}{\numberline {6.5}A Look at the Final Product}{124}{section.6.5}}
\@writefile{toc}{\contentsline {chapter}{\numberline {7}Subroutines on Intel CPUs}{127}{chapter.7}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:sub}{{7}{127}{Subroutines on Intel CPUs}{chapter.7}{}}
\@writefile{toc}{\contentsline {section}{\numberline {7.1}Overview}{127}{section.7.1}}
\@writefile{toc}{\contentsline {section}{\numberline {7.2}Stacks}{127}{section.7.2}}
\@writefile{toc}{\contentsline {section}{\numberline {7.3}CALL, RET Instructions}{128}{section.7.3}}
\@writefile{toc}{\contentsline {section}{\numberline {7.4}Arguments}{129}{section.7.4}}
\@writefile{toc}{\contentsline {section}{\numberline {7.5}Ensuring Correct Access to the Stack}{130}{section.7.5}}
\@writefile{toc}{\contentsline {section}{\numberline {7.6}Cleaning Up the Stack}{131}{section.7.6}}
\@writefile{toc}{\contentsline {section}{\numberline {7.7}Full Examples}{131}{section.7.7}}
\newlabel{full}{{7.7}{131}{Full Examples}{section.7.7}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.1}First Example}{131}{subsection.7.7.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.2}If the PC Points to Garbage, the Machine Will Happily ``Execute'' the Garbage}{134}{subsection.7.7.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.3}Second Example}{135}{subsection.7.7.3}}
\@writefile{toc}{\contentsline {section}{\numberline {7.8}Interfacing C/C++ to Assembly Language}{136}{section.7.8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.1}Example}{137}{subsection.7.8.1}}
\newlabel{ex1}{{7.8.1}{137}{Example}{subsection.7.8.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.2}Cleaning Up the Stack?}{140}{subsection.7.8.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.3}More Sections}{140}{subsection.7.8.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.4}Multiple Arguments}{141}{subsection.7.8.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.5}Nonvoid Return Values}{141}{subsection.7.8.5}}
\newlabel{nonvoid}{{7.8.5}{141}{Nonvoid Return Values}{subsection.7.8.5}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.6}Calling C and the C Library from Assembly Language}{142}{subsection.7.8.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.7}Local Variables}{143}{subsection.7.8.7}}
\newlabel{locals}{{7.8.7}{143}{Local Variables}{subsection.7.8.7}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.8}Use of EBP}{144}{subsection.7.8.8}}
\newlabel{ebpuse}{{7.8.8}{144}{Use of EBP}{subsection.7.8.8}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {7.8.8.1}GCC Calling Convention}{144}{subsubsection.7.8.8.1}}
\newlabel{calling}{{7.8.8.1}{144}{GCC Calling Convention}{subsubsection.7.8.8.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {7.8.8.2}The Stack Frame for a Given Call}{145}{subsubsection.7.8.8.2}}
\newlabel{stackframe}{{7.8.8.2}{145}{The Stack Frame for a Given Call}{subsubsection.7.8.8.2}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {7.8.8.3}How the Prologue Achieves All This}{146}{subsubsection.7.8.8.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {7.8.8.4}The Stack Frames Are Chained}{147}{subsubsection.7.8.8.4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {7.8.8.5}ENTER and LEAVE Instructions}{148}{subsubsection.7.8.8.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.9}The LEA Instruction Family}{149}{subsection.7.8.9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.10}The Function main() IS a Function, So It Too Has a Stack Frame}{149}{subsection.7.8.10}}
\newlabel{mainisafunction}{{7.8.10}{149}{The Function main() IS a Function, So It Too Has a Stack Frame}{subsection.7.8.10}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.11}Once Again, There Are No Types at the Hardware Level!}{151}{subsection.7.8.11}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.12}What About C++?}{153}{subsection.7.8.12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.13}Putting It All Together}{153}{subsection.7.8.13}}
\@writefile{toc}{\contentsline {section}{\numberline {7.9}Subroutine Calls/Returns Are ``Expensive''}{156}{section.7.9}}
\@writefile{toc}{\contentsline {section}{\numberline {7.10}Debugging Assembly Language Subroutines}{157}{section.7.10}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.10.1}Focus on the Stack}{157}{subsection.7.10.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.10.2}A Special Consideration When Interfacing C/C++ with Assembly Language}{158}{subsection.7.10.2}}
\@writefile{toc}{\contentsline {section}{\numberline {7.11}Inline Assembly Code for C++}{158}{section.7.11}}
\@writefile{toc}{\contentsline {chapter}{\numberline {8}Overview of Input/Output Mechanisms}{161}{chapter.8}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:io}{{8}{161}{Overview of Input/Output Mechanisms}{chapter.8}{}}
\@writefile{toc}{\contentsline {section}{\numberline {8.1}Introduction}{161}{section.8.1}}
\@writefile{toc}{\contentsline {section}{\numberline {8.2}I/O Ports and Device Structure}{162}{section.8.2}}
\@writefile{toc}{\contentsline {section}{\numberline {8.3}Program Access to I/O Ports}{162}{section.8.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.1}I/O Address Space Approach}{162}{subsection.8.3.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Memory-Mapped I/O Approach}{163}{subsection.8.3.2}}
\@writefile{toc}{\contentsline {section}{\numberline {8.4}Wait-Loop I/O}{164}{section.8.4}}
\@writefile{toc}{\contentsline {section}{\numberline {8.5}PC Keyboards}{165}{section.8.5}}
\@writefile{toc}{\contentsline {section}{\numberline {8.6}Interrupt-Driven I/O}{165}{section.8.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.1}Telephone Analogy}{165}{subsection.8.6.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.2}What Happens When an Interrupt Occurs?}{166}{subsection.8.6.2}}
\newlabel{whenintoccurs}{{8.6.2}{166}{What Happens When an Interrupt Occurs?}{subsection.8.6.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.3}Game Example}{167}{subsection.8.6.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.4}Alternative Designs}{168}{subsection.8.6.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.5}Glimpse of an ISR}{168}{subsection.8.6.5}}
\newlabel{isr}{{8.6.5}{168}{Glimpse of an ISR}{subsection.8.6.5}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.6}I/O Protection}{169}{subsection.8.6.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.7}``Application'': Keystroke Logger}{169}{subsection.8.6.7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.8}Distinguishing Among Devices}{169}{subsection.8.6.8}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {8.6.8.1}How Does the CPU Know Which I/O Device Requested the Interrupt?}{169}{subsubsection.8.6.8.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {8.6.8.2}How Does the CPU Know Where the ISR Is?}{170}{subsubsection.8.6.8.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {8.6.8.3}Revised Interrupt Sequence}{170}{subsubsection.8.6.8.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.9}How Do PCs Prioritize Interrupts from Different Devices?}{171}{subsection.8.6.9}}
\@writefile{toc}{\contentsline {section}{\numberline {8.7}Direct Memory Access (DMA)}{171}{section.8.7}}
\@writefile{toc}{\contentsline {section}{\numberline {8.8}Disk Structure}{172}{section.8.8}}
\@writefile{toc}{\contentsline {section}{\numberline {8.9}USB Devices}{173}{section.8.9}}
\@writefile{toc}{\contentsline {chapter}{\numberline {9}Overview of Functions of an Operating System: Processes}{175}{chapter.9}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:osprocs}{{9}{175}{Overview of Functions of an Operating System: Processes}{chapter.9}{}}
\@writefile{toc}{\contentsline {section}{\numberline {9.1}Introduction}{175}{section.9.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.1.1}It's Just a Program!}{175}{subsection.9.1.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.1.2}What Is an OS for, Anyway?}{177}{subsection.9.1.2}}
\@writefile{toc}{\contentsline {section}{\numberline {9.2}Application Program Loading}{178}{section.9.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.1}Basic Operations}{178}{subsection.9.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.2}Chains of Programs Calling Programs}{179}{subsection.9.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.3}Static Versus Dynaming Linking}{180}{subsection.9.2.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.4}Making These Concepts Concrete: Commands You Can Try Yourself}{180}{subsection.9.2.4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.2.4.1}Mini-Example}{180}{subsubsection.9.2.4.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.2.4.2}The strace Command}{181}{subsubsection.9.2.4.2}}
\@writefile{toc}{\contentsline {section}{\numberline {9.3}OS Bootup}{181}{section.9.3}}
\@writefile{toc}{\contentsline {section}{\numberline {9.4}Timesharing}{183}{section.9.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.1}Many Processes, Taking Turns}{183}{subsection.9.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.2}Example of OS Code: Linux for Intel CPUs}{184}{subsection.9.4.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.3}Process States}{185}{subsection.9.4.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.4}Roles of the Hardware and Software}{187}{subsection.9.4.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.5}What About Background Jobs?}{187}{subsection.9.4.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.6}Threads: ``Lightweight Processes''}{188}{subsection.9.4.6}}
\newlabel{threadsintro}{{9.4.6}{188}{Threads: ``Lightweight Processes''}{subsection.9.4.6}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.4.6.1}The Mechanics}{188}{subsubsection.9.4.6.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.4.6.2}Threads Example}{189}{subsubsection.9.4.6.2}}
\newlabel{pthreadsexample}{{9.4.6.2}{189}{Threads Example}{subsubsection.9.4.6.2}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.4.6.3}Debugging Threads Programs}{192}{subsubsection.9.4.6.3}}
\newlabel{debugthreads}{{9.4.6.3}{192}{Debugging Threads Programs}{subsubsection.9.4.6.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.7}Making These Concepts Concrete: Commands You Can Try Yourself}{192}{subsection.9.4.7}}
\@writefile{toc}{\contentsline {chapter}{\numberline {10}Multicore Systems}{195}{chapter.10}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:multcore}{{10}{195}{Multicore Systems}{chapter.10}{}}
\@writefile{toc}{\contentsline {section}{\numberline {10.1}Classic Multiprocessor Structure}{195}{section.10.1}}
\@writefile{toc}{\contentsline {section}{\numberline {10.2}GPUs}{196}{section.10.2}}
\@writefile{toc}{\contentsline {section}{\numberline {10.3}Message-Passing Systems}{197}{section.10.3}}
\@writefile{toc}{\contentsline {section}{\numberline {10.4}Threads}{197}{section.10.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.4.1}What Is Shared and What Is Not}{197}{subsection.10.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.4.2}Really? It's OK to Use Global Variables?}{197}{subsection.10.4.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.4.3}Sample Pthreads Program}{198}{subsection.10.4.3}}
\newlabel{primes}{{10.4.3}{198}{Sample Pthreads Program}{subsection.10.4.3}{}}
\newlabel{count2s}{{10.4.3}{202}{Sample Pthreads Program}{lstnumber.-9.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.4.4}Debugging Threaded Programs}{205}{subsection.10.4.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.4.5}Higher-Level Threads Programming}{205}{subsection.10.4.5}}
\@writefile{toc}{\contentsline {section}{\numberline {10.5}``Embarrassingly Parallel'' Applications}{205}{section.10.5}}
\@writefile{toc}{\contentsline {section}{\numberline {10.6}Hardware Support for Critical Section Access}{206}{section.10.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.1}Test-and-Set Instructions}{206}{subsection.10.6.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {10.6.1.1}LOCK Prefix on Intel Processors}{207}{subsubsection.10.6.1.1}}
\newlabel{lockprefix}{{10.6.1.1}{207}{LOCK Prefix on Intel Processors}{subsubsection.10.6.1.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {10.6.1.2}Synchronization Operations on the GPU}{208}{subsubsection.10.6.1.2}}
\@writefile{toc}{\contentsline {section}{\numberline {10.7}Memory Issues}{208}{section.10.7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.1}Overview of the Problems}{208}{subsection.10.7.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.2}Memory Interleaving}{209}{subsection.10.7.2}}
\newlabel{interleaving1}{{10.7.2}{209}{Memory Interleaving}{subsection.10.7.2}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {10.7.2.1}Implications for the Number of Threads to Run}{210}{subsubsection.10.7.2.1}}
\@writefile{toc}{\contentsline {section}{\numberline {10.8}To Learn More}{211}{section.10.8}}
\@writefile{toc}{\contentsline {chapter}{\numberline {11}Overview of Functions of an Operating System: Memory and I/O}{213}{chapter.11}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:osmemio}{{11}{213}{Overview of Functions of an Operating System: Memory and I/O}{chapter.11}{}}
\@writefile{toc}{\contentsline {section}{\numberline {11.1}Virtual Memory}{213}{section.11.1}}
\newlabel{goals}{{11.1.1}{213}{Make Sure You Understand the Goals}{subsection.11.1.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.1}Make Sure You Understand the Goals}{213}{subsection.11.1.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.1.1}Overcome Limitations on Memory Size}{213}{subsubsection.11.1.1.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.1.2}Relieve the Compiler and Linker of Having to Deal with Real Addresses}{213}{subsubsection.11.1.1.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.1.3}Enable Security}{214}{subsubsection.11.1.1.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.2}The Virtual Nature of Addresses}{214}{subsection.11.1.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.3}Overview of How the Goals Are Achieved}{215}{subsection.11.1.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.3.1}Overcoming Limitations on Memory Size}{215}{subsubsection.11.1.3.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.3.2}Relieving the Compiler and Linker of Having to Deal with Real Addresses}{216}{subsubsection.11.1.3.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.3.3}Enabling Security}{216}{subsubsection.11.1.3.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.3.4}Is the Hardware Support Needed?}{217}{subsubsection.11.1.3.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.4}Who Does What When?}{218}{subsection.11.1.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.5}Details on Usage of the Page Table}{218}{subsection.11.1.5}}
\newlabel{trans}{{11.1.5.1}{218}{Virtual-to-Physical Address Translation, Page Table Lookup}{subsubsection.11.1.5.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.5.1}Virtual-to-Physical Address Translation, Page Table Lookup}{218}{subsubsection.11.1.5.1}}
\newlabel{ex8195}{{11.1}{218}{Virtual-to-Physical Address Translation, Page Table Lookup}{equation.11.1.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.5.2}Layout of the Page Table}{220}{subsubsection.11.1.5.2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.5.3}Page Faults}{221}{subsubsection.11.1.5.3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.5.4}Access Violations}{222}{subsubsection.11.1.5.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.6}VM and Context Switches}{224}{subsection.11.1.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.7}Improving Performance---TLBs}{224}{subsection.11.1.7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.8}The Role of Caches in VM Systems}{225}{subsection.11.1.8}}
\newlabel{cacherole}{{11.1.8}{225}{The Role of Caches in VM Systems}{subsection.11.1.8}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.8.1}Addressing}{225}{subsubsection.11.1.8.1}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.1.8.2}Hardware Vs. Software}{225}{subsubsection.11.1.8.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1.9}Making These Concepts Concrete: Commands You Can Try Yourself}{226}{subsection.11.1.9}}
\@writefile{toc}{\contentsline {section}{\numberline {11.2}A Bit More on System Calls}{226}{section.11.2}}
\@writefile{toc}{\contentsline {section}{\numberline {11.3}OS File Management}{229}{section.11.3}}
\@writefile{toc}{\contentsline {section}{\numberline {11.4}To Learn More}{229}{section.11.4}}
\@writefile{toc}{\contentsline {section}{\numberline {11.5}Intel Pentium Architecture}{229}{section.11.5}}
\newlabel{pentium}{{11.5}{229}{Intel Pentium Architecture}{section.11.5}{}}
