\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Deathtitan77 (Deathtitan77)} \pdfinfo{ /Title (asm-8086.pdf) /Creator (Cheatography) /Author (Deathtitan77 (Deathtitan77)) /Subject (ASM 8086 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{5CD160} \definecolor{LightBackground}{HTML}{F4FCF5} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{ASM 8086 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Deathtitan77 (Deathtitan77)} via \textcolor{DarkBackground}{\uline{cheatography.com/122246/cs/22730/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Deathtitan77 (Deathtitan77) \\ \uline{cheatography.com/deathtitan77} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 10th May, 2020.\\ Updated 13th May, 2020.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Microprocessor 8086 Features}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{How many bits is the 8086 Microprocessor?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}16 bit} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{What and how many 16 bit general purpose registers are there?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}4, 16 bit general purpose registers. They are: AX, BX, CX, DX} \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{What and how many 8 bit general purpose registers are there?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}8, 8 bit general purpose registers. They are: AL, AH, BL, BH, CL, CH, DL, DH} \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{What is the maximum for an external memory of the 8086 microcontroller?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}1 MB} \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{How many bits is the data bus?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}16 bits} \tn % Row Count 15 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{How many bits is the address bus?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}20 bits} \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{How many bytes is the instruction queue?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}6 byte} \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{How many bits is the ALU (Arithmetic Logic Unit)} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}16 bits} \tn % Row Count 21 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{How many segmented memories are there and what's the maximum available space?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}CS (Code Segment), DS (Data Segment), SS (Stack Segment), EX (Extra Segment), all of which are 64 KB each in space} \tn % Row Count 26 (+ 5) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{What are the corresponding points for the segments?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}IP (Instruction Pointer), SP (Stack Pointer), BP (Base Pointer), SI (Source Index), DI (Destination Index)} \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Microprocessor 8086 Features (cont)}} \tn % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{What is the clock frequency of the microcontroller?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}5MHz frequency} \tn % Row Count 3 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{How many pins does the mirocontroller have?} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}40 pins} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{A microprocessor is the brain of the computer, it is: \newline \newline 1. Multipurpose \newline 2. Clock Driven \newline 3. Register Based \newline 4. Programmable \newline 5. Digital Integrated Circuit \newline \newline Notes: \newline \newline IP (Instruction Pointer) is responsible for storing the instruction of the next executable instruction} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Addressing Modes}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Direct addressing mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}The addressing mode in which the effective address of the memory location is written directly in the instruction.} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Register addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}It means that the register is the source of an operand for an instruction.} \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Immediate addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}The addressing mode in which the data operand is a part of the instruction itself is known as immediate addressing mode.} \tn % Row Count 11 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Register indirect addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This addressing mode allows data to be addressed at any memory location through an offset address held in any of the following registers: BP, BX, DI \& SI.} \tn % Row Count 16 (+ 5) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Base addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this addressing mode, the offset address of the operand is given by the sum of contents of the BX/BP registers and 8-bit/16-bit displacement.} \tn % Row Count 21 (+ 5) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Index addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this addressing mode, the operands offset address is found by adding the contents of SI or DI register and 8-bit/16-bit displacements.} \tn % Row Count 25 (+ 4) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Base-index addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this addressing mode, the offset address of the operand is computed by summing the base register to the contents of an Index register.} \tn % Row Count 29 (+ 4) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Relative addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this the effective address is calculated with reference to instruction pointer.} \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Addressing Modes (cont)}} \tn % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Addressing applied in string processing instructions} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This addressing mode is related to string instructions. In this the value of SI and DI are auto incremented and decremented depending upon the value of directional flag.} \tn % Row Count 6 (+ 6) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Stack addressing} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}The stack memory addressing mode is used whenever you perform a push or pop operation. Always a word will be entered or popped from the stack in this addressing mode, and the value of the Stack Pointer (SP) will be incremented or decremented accordingly.} \tn % Row Count 13 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Examples below \newline 1. \newline MOV AX, {[}1592H{]} \newline 2. \newline MOV CX, AX \newline ADD BX, AX \newline 3. \newline ADD AX, 2387H \newline 4. \newline MOV AX, {[}BX{]} \newline 5. \newline MOV DX, {[}BX+04{]} \newline 6. \newline MOV BX, {[}SI+16{]} \newline 7. \newline ADD CX, {[}AX+SI{]}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{General Purpose Registers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{AX} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the accumulator. It is of 16 bits and is divided into two 8-bit registers AH and AL to also perform 8-bit instructions. It is generally used for arithmetical and logical instructions but in 8086 microprocessor it is not mandatory to have accumulator as the destination operand.} \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{BX} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the base register. It is of 16 bits and is divided into two 8-bit registers BH and BL to also perform 8-bit instructions. It is used to store the value of the offset.} \tn % Row Count 13 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CX} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the counter register. It is of 16 bits and is divided into two 8-bit registers CH and CL to also perform 8-bit instructions. It is used in looping and rotation.} \tn % Row Count 18 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{DX} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the data register. It is of 16 bits and is divided into two 8-bit registers DH and DL to also perform 8-bit instructions. It is used in multiplication an input/output port addressing.} \tn % Row Count 24 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Every digit of hex corresponds to 4 bits \newline \newline Examples: \newline \newline MOV AX, 05H \newline MOV {[}500{]}, AX \newline \newline MOV BL, {[}500{]}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Addressing Modes}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Immediate Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this immediate data is the part of the instruction itself. Example: Mov AX, 0005H} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Direct Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In it, a 16-bit memory address (offset) or an input/output address is directly specified in the instruction as a part of it.} \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Register Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Here data is stored in a register and referred using the particular register.} \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Register Indirect Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In this offset address of data is in either Bx, SI, DI, (Base register, source index or Destination index) default segment is either DS or ES. Data is supposed to be available at the address pointed to by the content of any of the above registers in the default data segment.} \tn % Row Count 17 (+ 7) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Indexed Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Here offset of the operand is stored in one of the index registers. DS is the default segment for SI and DI in string instruction DS and ES default segment for register SI and DI.} \tn % Row Count 22 (+ 5) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Register Relative Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}In it, data is available at an effective address formed by adding an 8 bit or 16-bit displacement with content, any one of the registers Bx, Bp, SI, DI in the default (DS or ES) segment.} \tn % Row Count 27 (+ 5) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Based Indexed Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}The effective address of data is formed by adding content of base register Bx or Bp to the content of index register.} \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Addressing Modes (cont)}} \tn % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Relative Based Indexed Addressing Mode} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Here the effective address is formed by adding an 8 bit or 16-bit displacement with the sum of the content of any one of the index registers in the default segment.} \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Index Registers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SI} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the source index register. It is of 16 bits. It is used in the pointer addressing of data and as a source in some string related operations. It's offset is relative to data segment.} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{DI} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the destination index register. It is of 16 bits. It is used in the pointer addressing of data and as a destination in some string related operations. It's offset is relative to extra segment.} \tn % Row Count 12 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Segment Registers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CS} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Points to the segment containing the current program} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{DS} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Points to the segment where the variables are defined} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{ES} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}It is an extra segment register, and it is up to the coder for the usage} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{SS} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Points at the segment containing the stack} \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Note: \newline These registers each have an available space of 64 KB and 256 KB in total. The rest of the 1 MB total memory goes to the microcontroller. It can be assumed as an "Operating System".} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Pointer Registers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SP} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the stack pointer. It is of 16 bits. It points to the topmost item of the stack. If the stack is empty the stack pointer will be (FFFE)H. It's offset address relative to stack segment.} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{BP} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This is the base pointer. It is of 16 bits. It is primary used in accessing parameters passed by the stack. It's offset address relative to stack segment.} \tn % Row Count 11 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{IP} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}To access instruction the 8086 uses the register CS and IP. The CS register contains the segment number of the next instruction and IP contains the offset.} \tn % Row Count 16 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Control Flags}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Directional Flag (D)} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This flag is specifically used in string instructions. If directional flag is set (1), then access the string data from higher memory location towards lower memory location. If directional flag is reset (0), then access the string data from lower memory location towards higher memory location.} \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Interrupt Flag (I)} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This flag is for interrupts. If interrupt flag is set (1), the microprocessor will recognize interrupt requests from the peripherals. If interrupt flag is reset (0), the microprocessor will not recognize any interrupt requests and will ignore them.} \tn % Row Count 15 (+ 7) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Trap Flag (T)} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This flag is used for on-chip debugging. Setting trap flag puts the microprocessor into single step mode for debugging. In single stepping, the microprocessor executes a instruction and enters into single step ISR. If trap flag is set (1), the CPU automatically generates an internal interrupt after each instruction, allowing a program to be inspected as it executes instruction by instruction. If trap flag is reset (0), no function is performed.} \tn % Row Count 26 (+ 11) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Status Flags}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Overflow Flag (O)} \tn \mymulticolumn{1}{x{3.833cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}This flag will be set (1) if the result of a signed operation is too large to fit in the number of bits available to represent it, otherwise reset (0).} \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{There are also 5 other flags, but they are the same as the 8085.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}