Mercurial > hg > ede
view docs/lyx/#emu.lyx# @ 37:db6b8c9552bb
couple of last minute bug fixes
author | james <jb302@eecs.qmul.ac.uk> |
---|---|
date | Fri, 18 Apr 2014 18:58:58 +0100 |
parents | |
children | 9ff51da22b9b |
line wrap: on
line source
#LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass article \begin_preamble \usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox % Resize figures that are too wide for the page. \let\oldincludegraphics\includegraphics \renewcommand\includegraphics[2][]{% \oldincludegraphics[#1,max width=\linewidth,max height=\textheight]{#2} } \end_preamble \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Part The Emulator \end_layout \begin_layout Section Emulator Design \end_layout \begin_layout Standard \begin_inset Graphics filename /home/jmz/qm/ede/docs/img/emu/ELB816_system.svg display false \end_inset \end_layout \begin_layout Standard Above is block diagram of a micro-controller taken from the original ELB816 specification. Implementing this system as a piece of software is the goal of this section of the project. \end_layout \begin_layout Subsection Memory and Registers \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Graphics filename /home/jmz/qm/ede/docs/img/emu/memory.svg display false \end_inset \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard The micro-controller is based on a Von Neumann architecture and has: \end_layout \begin_layout Itemize A single block of up to 64k byte addressable memory for storing both data and code. \end_layout \begin_layout Itemize Two banks of four 8-bit general purpose registers (R0 to R3). \end_layout \begin_layout Itemize Four 16 bit-content specific (PC, SP, DPTR and TMPA) \end_layout \begin_layout Itemize Three 8-bit content specific registers (A, flags and IR) \end_layout \begin_layout Standard The general purpose and 16-bit registers can exist as a single sixteen byte block of memory spaces with the following encoding: \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Tabular <lyxtabular version="3" rows="10" columns="5"> <features tabularvalignment="middle"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout MSB \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout MSB \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Description \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout LSB \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout User Accessible? \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 000 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R0 bank 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R0 bank 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout General Purpose \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 001 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R1 bank 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R1 bank 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout General Purpose \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 010 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R2 bank 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R2 bank 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout General Purpose \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 011 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R3 bank 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout R3 bank 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout General Purpose \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 100 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout DPH \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout DPL \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Data Pointer \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 101 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout SPH \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout SPL \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Stack Pointer \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Yes \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 110 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout PCH \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout PCL \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Program Counter \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout No \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 111 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout TPH \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout TPL \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Temp Address Register \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout No \end_layout \end_inset </cell> </row> </lyxtabular> \end_inset \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard The 8-bit flag register can exist as a single byte with the following format: \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Tabular <lyxtabular version="3" rows="9" columns="3"> <features tabularvalignment="middle"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="left" valignment="top" width="10cm"> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Bit \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Flag \end_layout \end_inset </cell> <cell multicolumn="1" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Description \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout BS \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout User Accessible: Select register bank \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout IE \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout User Accessible: Enable Interrupts when 1 \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout OV \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set to 1 when result of arithmetic operation has even parity \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout S \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set to 1 when result of arithmetic operation is negative \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout P \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set to 1 when result of arithmetic operation has even parity \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout AC \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set to 1 when result of arithmetic operation generates a carry or borrow from bit 3 \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 6 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Z \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set to 1 when result of arithmetic operation is Zero \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 7 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout C \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout User Accessible: Set to 1 when result of arithmetic operation generates a carry or borrow from bit 7. Used in rotate through carry operations \end_layout \end_inset </cell> </row> </lyxtabular> \end_inset \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard There is also an 8-bit accumulator register for storing the result of various operations and an 8-bit instruction register for the storing the instruction currently being executed. \end_layout \begin_layout Subsection Control and Execution \end_layout \begin_layout Standard The emulator needs to be controlled externally. This could be via a serial or a file buffer depending on the platform. \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Graphics filename /home/jmz/qm/ede/docs/img/emu/controller.svg display false \end_inset \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard Below is a control protocol which allows and control of the emulators memory and execution. \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash bigskip \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Tabular <lyxtabular version="3" rows="15" columns="5"> <features tabularvalignment="middle"> <column alignment="center" valignment="top" width="0"> <column alignment="left" valignment="top" width="2cm"> <column alignment="center" valignment="top" width="1cm"> <column alignment="center" valignment="top" width="1cm"> <column alignment="center" valignment="top" width="3cm"> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Function \end_layout \end_inset </cell> <cell multicolumn="1" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Arguments \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Command Byte \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Length \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Description \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout step \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x00 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Execute Instruction at PC \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout run \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x01 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Execute instructions from PC until a break point is reached \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout set register \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout register address, value \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x02 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set a register \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout get register \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout register address \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x03 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Get the value of a register \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout set flag \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout flag bit, 0 or 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x04 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Turn a flag bit on or off. LSB = 0, MSB =7 \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout get flag \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout flag bit \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x05 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Get the value of a flag bit \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout write memory block \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout address high, address low, length high, length low, [byte array] \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x06 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 6+ \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set a block of memory of arbitrary length with the bytes in the byte array \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout read memory block \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout address high, address low, length high, length low \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x07 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Read a block of memory of arbitrary length \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout get A \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x08 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Get value of A \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout get flags \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x09 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Get value of flags \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout get IR \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0xA \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Get Value of IR \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout run for length \end_layout \end_inset </cell> <cell multirow="3" alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout length high, length low \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x0B \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Run for length number of instruction \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout free run \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x0C \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Run forever - Bypass controller \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout set break point \end_layout \end_inset </cell> <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout break point index, address high, address low \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 0x0D \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Set 1 of 8 possible break points \end_layout \end_inset </cell> </row> </lyxtabular> \end_inset \end_layout \begin_layout Subsection Interrupt Controller \end_layout \begin_layout Subsection Timer \end_layout \begin_layout Section Emulator Implementation \end_layout \begin_layout Section Emulator Testing \end_layout \end_body \end_document