\relax \@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{W0-3}} \@writefile{toc}{\contentsline {section}{\numberline {2}I/O ports and the 68230 parallel interface/timer chip}{W0-3}} \newlabel{sec:ioports}{{2}{W0-3}} \newlabel{1@xvr}{{}{W0-4}} \newlabel{1@vr}{{}{W0-4}} \newlabel{2@xvr}{{}{W0-4}} \newlabel{2@vr}{{}{W0-4}} \newlabel{3@xvr}{{}{W0-4}} \newlabel{3@vr}{{}{W0-4}} \newlabel{4@xvr}{{}{W0-4}} \newlabel{4@vr}{{}{W0-4}} \newlabel{5@xvr}{{}{W0-4}} \newlabel{5@vr}{{}{W0-4}} \newlabel{6@xvr}{{}{W0-4}} \newlabel{6@vr}{{}{W0-4}} \@writefile{toc}{\contentsline {subsection}{\numberline {2.1}The interface card}{W0-4}} \@writefile{toc}{\contentsline {subsection}{\numberline {2.2}The 68230 parallel interface/timer chip}{W0-4}} \newlabel{sec:68230}{{2.2}{W0-4}} \@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces The port addresses in the 68230 PI/T and their names}}{W0-5}} \newlabel{tab:portAddr}{{1}{W0-5}} \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces The two settings for the jumper on the interface board}}{W0-5}} \newlabel{fig:jump}{{1}{W0-5}} \newlabel{7@xvr}{{}{W0-5}} \newlabel{7@vr}{{}{W0-5}} \newlabel{8@xvr}{{}{W0-5}} \newlabel{8@vr}{{}{W0-5}} \@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Register addresses in the 68230 PI/T on the Flight-68k}{W0-5}} \newlabel{9@xvr}{{}{W0-5}} \newlabel{9@vr}{{}{W0-5}} \@writefile{toc}{\contentsline {subsection}{\numberline {2.4}How the interface card is connected to the parallel chip}{W0-5}} \@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces The addresses of registers in the 68230 PI/T on the Flight-68k}}{W0-6}} \newlabel{tab:registerAddr}{{2}{W0-6}} \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces The connection of the keypad to the 68230 parallel interface/timer chip}}{W0-7}} \newlabel{fig:keypad}{{2}{W0-7}} \@writefile{toc}{\contentsline {section}{\numberline {3}The keypad}{W0-7}} \newlabel{10@xvr}{{}{W0-7}} \newlabel{10@vr}{{}{W0-7}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Scanning the keypad}{W0-7}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {3.1.1}The method}{W0-8}} \newlabel{sec:readKeyExplain}{{3.1.1}{W0-8}} \newlabel{11@xvr}{{}{W0-8}} \newlabel{11@vr}{{}{W0-8}} \newlabel{12@xvr}{{}{W0-8}} \newlabel{12@vr}{{}{W0-8}} \newlabel{13@xvr}{{}{W0-9}} \newlabel{13@vr}{{}{W0-9}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Debouncing the keys}{W0-9}} \newlabel{sec:debouncing}{{3.2}{W0-9}} \newlabel{14@xvr}{{}{W0-10}} \newlabel{14@vr}{{}{W0-10}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3}How to detect if any key has been pressed}{W0-10}} \newlabel{sec:keyPressed}{{3.3}{W0-10}} \newlabel{15@xvr}{{}{W0-10}} \newlabel{15@vr}{{}{W0-10}} \newlabel{qes:rowtest}{{3.3}{W0-10}} \@writefile{toc}{\contentsline {section}{\numberline {4}68000 Assembly language}{W0-11}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.1}labels, opcodes, operands and comments}{W0-11}} \newlabel{sec:suffix}{{4.1}{W0-11}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Comments in programs}{W0-11}} \newlabel{sec:comments}{{4.2}{W0-11}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Integer numbers in programs}{W0-12}} \newlabel{sec:constants}{{4.3}{W0-12}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Registers in the 68000}{W0-12}} \newlabel{sec:registers}{{4.4}{W0-12}} \newlabel{16@xvr}{{}{W0-12}} \newlabel{16@vr}{{}{W0-12}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {4.4.1}Flags in the status registers}{W0-12}} \newlabel{sec:statusReg}{{4.4.1}{W0-12}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Addressing modes}{W0-13}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {4.5.1}Direct addressing mode}{W0-14}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {4.5.2}Immediate addressing mode}{W0-14}} \newlabel{sec:immediate}{{4.5.2}{W0-14}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {4.5.3}Address register indirect with displacement addressing mode}{W0-14}} \newlabel{sec:ariWDisp}{{4.5.3}{W0-14}} \newlabel{17@xvr}{{}{W0-15}} \newlabel{17@vr}{{}{W0-15}} \newlabel{18@xvr}{{}{W0-15}} \newlabel{18@vr}{{}{W0-15}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {4.5.4}Address register indirect with index addressing mode}{W0-15}} \newlabel{sec:ariWithIndex}{{4.5.4}{W0-15}} \newlabel{19@xvr}{{}{W0-15}} \newlabel{19@vr}{{}{W0-15}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.6}Tables in MC68000 assembly language}{W0-16}} \newlabel{sec:table}{{4.6}{W0-16}} \newlabel{20@xvr}{{}{W0-16}} \newlabel{20@vr}{{}{W0-16}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.7}Loops: the \texttt {dbf} instruction}{W0-16}} \newlabel{sec:dbf}{{4.7}{W0-16}} \newlabel{21@xvr}{{}{W0-16}} \newlabel{21@vr}{{}{W0-16}} \newlabel{22@xvr}{{}{W0-17}} \newlabel{22@vr}{{}{W0-17}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.8}The \texttt {cmp} instruction}{W0-17}} \newlabel{sec:cmp}{{4.8}{W0-17}} \newlabel{23@xvr}{{}{W0-17}} \newlabel{23@vr}{{}{W0-17}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.9}What if you find an instruction you do not know?}{W0-17}} \@writefile{toc}{\contentsline {section}{\numberline {5}Subroutines}{W0-17}} \newlabel{sec:subroutines}{{5}{W0-17}} \newlabel{24@xvr}{{}{W0-17}} \newlabel{24@vr}{{}{W0-17}} \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Executing a subroutine}}{W0-18}} \newlabel{fig:coathanger}{{3}{W0-18}} \@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Executing nested subroutines}}{W0-18}} \newlabel{fig:nested}{{4}{W0-18}} \newlabel{25@xvr}{{}{W0-18}} \newlabel{25@vr}{{}{W0-18}} \newlabel{26@xvr}{{}{W0-18}} \newlabel{26@vr}{{}{W0-18}} \@writefile{toc}{\contentsline {section}{\numberline {6}The stack}{W0-19}} \newlabel{sec:stack}{{6}{W0-19}} \@writefile{toc}{\contentsline {subsection}{\numberline {6.1}The push operation}{W0-19}} \newlabel{sec:push}{{6.1}{W0-19}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.1}An example of a push operation}{W0-19}} \newlabel{27@xvr}{{}{W0-20}} \newlabel{27@vr}{{}{W0-20}} \@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The pop operation}{W0-20}} \newlabel{sec:pop}{{6.2}{W0-20}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {6.2.1}An example of a pop operation}{W0-20}} \@writefile{toc}{\contentsline {section}{\numberline {7}Preserving registers: transparency}{W0-21}} \newlabel{sec:transparency}{{7}{W0-21}} \newlabel{28@xvr}{{}{W0-21}} \newlabel{28@vr}{{}{W0-21}} \@writefile{toc}{\contentsline {section}{\numberline {8}Subroutine calls, parameters and return values}{W0-21}} \newlabel{sec:parameters}{{8}{W0-21}} \newlabel{29@xvr}{{}{W0-21}} \newlabel{29@vr}{{}{W0-21}} \newlabel{30@xvr}{{}{W0-21}} \newlabel{30@vr}{{}{W0-21}} \@writefile{toc}{\contentsline {section}{\numberline {9}Subroutine calls and the stack}{W0-22}} \newlabel{sec:subStack}{{9}{W0-22}} \newlabel{31@xvr}{{}{W0-22}} \newlabel{31@vr}{{}{W0-22}} \@writefile{toc}{\contentsline {subsection}{\numberline {9.1}The \texttt {bsr} and \texttt {jsr} instructions}{W0-22}} \@writefile{toc}{\contentsline {subsection}{\numberline {9.2}The \texttt {rts} instruction}{W0-22}} \@writefile{toc}{\contentsline {subsection}{\numberline {9.3}The subroutine must leave the stack as it found it}{W0-23}} \@writefile{toc}{\contentsline {section}{\numberline {10}An example showing a subroutine call}{W0-23}} \newlabel{sec:subCall}{{10}{W0-23}} \@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces The stack before and after the call to subroutine \texttt {sub1}.}}{W0-23}} \newlabel{fig:stackCall}{{5}{W0-23}} \newlabel{32@xvr}{{}{W0-23}} \newlabel{32@vr}{{}{W0-23}} \@writefile{toc}{\contentsline {section}{\numberline {11}The include file, \texttt {flight.i} and the macros}{W0-24}} \newlabel{sec:macros}{{11}{W0-24}} \newlabel{33@xvr}{{}{W0-24}} \newlabel{33@vr}{{}{W0-24}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.1}The \texttt {Init} macro}{W0-25}} \newlabel{sec:initMacro}{{11.1}{W0-25}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.2}The \texttt {Delay} macro}{W0-25}} \newlabel{sec:delayMacro}{{11.2}{W0-25}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.3}The \texttt {WriteSs} macro}{W0-25}} \newlabel{sec:writeSsMacro}{{11.3}{W0-25}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.4}The \texttt {Transl} macro}{W0-25}} \newlabel{sec:translMacro}{{11.4}{W0-25}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.5}The \texttt {ShowNum} macro}{W0-26}} \newlabel{sec:showNumMacro}{{11.5}{W0-26}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.6}The \texttt {WNKeyPr} macro}{W0-26}} \newlabel{sec:wNKeyPrMacro}{{11.6}{W0-26}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.7}The \texttt {WKeyPr} macro}{W0-26}} \newlabel{sec:wKeyPrMacro}{{11.7}{W0-26}} \newlabel{34@xvr}{{}{W0-26}} \newlabel{34@vr}{{}{W0-26}} \newlabel{35@xvr}{{}{W0-26}} \newlabel{35@vr}{{}{W0-26}} \@writefile{toc}{\contentsline {subsection}{\numberline {11.8}Equates}{W0-26}} \newlabel{sec:equates}{{11.8}{W0-26}} \newlabel{36@xvr}{{}{W0-26}} \newlabel{36@vr}{{}{W0-26}} \@writefile{toc}{\contentsline {section}{\numberline {12}The \texttt {trap} instruction and monitor routines}{W0-27}} \newlabel{sec:trap}{{12}{W0-27}} \newlabel{37@xvr}{{}{W0-27}} \newlabel{37@vr}{{}{W0-27}} \@writefile{toc}{\contentsline {section}{\numberline {13}The general procedure for editing, assembling, downloading and running an assembly language program}{W0-27}} \newlabel{sec:genProc}{{13}{W0-27}} \newlabel{38@xvr}{{}{W0-27}} \newlabel{38@vr}{{}{W0-27}} \@writefile{toc}{\contentsline {subsection}{\numberline {13.1}Editing the program}{W0-28}} \newlabel{sec:editing}{{13.1}{W0-28}} \newlabel{39@xvr}{{}{W0-28}} \newlabel{39@vr}{{}{W0-28}} \@writefile{toc}{\contentsline {subsection}{\numberline {13.2}Assembling the program}{W0-28}} \@writefile{toc}{\contentsline {subsection}{\numberline {13.3}Downloading your program}{W0-29}} \newlabel{pag:monitor}{{3}{W0-29}} \newlabel{40@xvr}{{}{W0-29}} \newlabel{40@vr}{{}{W0-29}} \@writefile{toc}{\contentsline {subsection}{\numberline {13.4}Running the program}{W0-29}}