1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Apoo Interface</TITLE>
<META NAME="description" CONTENT="Apoo Interface">
<META NAME="keywords" CONTENT="apoo">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="apoo.css">
<LINK REL="next" HREF="node6.html">
<LINK REL="previous" HREF="node4.html">
<LINK REL="up" HREF="node3.html">
<LINK REL="next" HREF="node6.html">
</HEAD>
<BODY BGCOLOR="#FFFFF0" TEXT="DARKBLUE" LINK="RED" VLINK="DARKRED"
ALINK="#FF0000" ALINK="YELLOW">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html128"
HREF="node6.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html126"
HREF="node3.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html120"
HREF="node4.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html129"
HREF="node6.html">Apoo Tutor</A>
<B> Up:</B> <A NAME="tex2html127"
HREF="node3.html">How to use</A>
<B> Previous:</B> <A NAME="tex2html121"
HREF="node4.html">Apoo assembly language</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html130"
HREF="node5.html#SECTION00032100000000000000">How to execute a program</A>
<LI><A NAME="tex2html131"
HREF="node5.html#SECTION00032200000000000000">Edit Mode</A>
<LI><A NAME="tex2html132"
HREF="node5.html#SECTION00032300000000000000">Implementation</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H2><A NAME="SECTION00032000000000000000"></A>
<A NAME="sec:apoointerface"></A>
<BR>
<TT>Apoo Interface</TT>
</H2>
<P>
This module is launched by the <TT>apoo</TT> command.
<P>
The <TT>Apoo Interface</TT> is an environment to monitoring the execution of a
Virtual Processor Unit.
<DIV ALIGN="CENTER"><A NAME="178"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
Apoo Interface</CAPTION>
<TR><TD><A NAME="figure175"
HREF="img2.png"><IMG
WIDTH="200" HEIGHT="201"
SRC="Timg2.png"
ALT="\begin{figure}\centering
\epsfxsize =400pt
\epsfbox{apoo_interface.ps}
\par\par
\end{figure}"></A></TD></TR>
</TABLE>
</DIV>
<P>
During the execution of a program, it shows
the contents of the program counter, register, memory data and output
window. The
program in memory is displayed in an Assembly language (not in a
machine language). As is usual with processor units emulators, Apoo
has two memory segments: the program-segment and the data-segment. In
this way, both addresses for program instructions and data will begin
in 0.
<P>
It has two modes:
<P>
<DL>
<DT><STRONG>The Apoo Workbench</STRONG></DT>
<DD><A NAME="aw"></A> allows also the editing/saving of the text program,
providing an easy way to write/edit/debug/execute Apoo assembly
programs. It is launched when <TT>apoo</TT> is called without options
(optionally with a filename).
</DD>
<DT><STRONG>The Apoo Tester</STRONG></DT>
<DD><A NAME="at"></A> allows only to execute a program. It is
launched with option <TT>-t</TT> (or <TT>-tester</TT>), and a
filename is mandatory. This module is can be used during examinations.
</DD>
</DL>
<P>
<H3><A NAME="SECTION00032100000000000000">
How to execute a program</A>
</H3>
<P>
To execute a program in the Apoo Virtual Processor Unit you must first or:
<P>
<UL>
<LI>enter in Edit Mode and write its instructions
</LI>
<LI>open a text file with its code
</LI>
</UL>
<P>
After that, you can <TT>Load</TT> it; if a "parsing error" occurs,
enter edit mode and correct it; the interface will show the text line
in which the error occurred.
<P>
When the program is loaded (in memory) you can execute it in three ways:
<P>
<DL>
<DT><STRONG><TT>Run</TT></STRONG></DT>
<DD>will execute all the instructions
</DD>
<DT><STRONG><TT>Step</TT></STRONG></DT>
<DD>will execute the next instruction and the values of the
program counter, registers and memory data will be updated; the
next instruction line, if exists, will have the background
white
</DD>
<DT><STRONG><TT>Continue</TT></STRONG></DT>
<DD>will execute instructions until the next breakpoint
</DD>
</DL>
<P>
In an instruction line, you can set/clear a breakpoint:
<P>
<DL>
<DT><STRONG>to set a breakpoint:</STRONG></DT>
<DD>Press <TT><Double>-Button1</TT> in that
line
<P>
</DD>
<DT><STRONG>to clear breakpoint:</STRONG></DT>
<DD>Press <TT><Double>-Button1</TT> (or
<TT><Double>-Button2</TT>)
</DD>
</DL>
<P>
The button labelled <TT>Clear</TT> can be used to clear all breakpoints
<P>
<H3><A NAME="SECTION00032200000000000000">
Edit Mode</A>
</H3>
<P>
In edit mode you can change the text code of a program or create a new
one. To enter Edit Mode press the Edit button or New button.
After editing you can Save or SaveAs the current edited text.
You leave Edit Mode by loading the program (Load button) or opening a
new file.
<P>
The following <SPAN CLASS="textbf">Emacs</SPAN>-like commands are implemented:
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT"><TT><Control-k></TT></TD>
<TD ALIGN="LEFT">kill-line</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-y></TT></TD>
<TD ALIGN="LEFT">yank</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-w></TT></TD>
<TD ALIGN="LEFT">kill-region</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Escape>w</TT>(or <TT><Alt-Space></TT>)</TD>
<TD ALIGN="LEFT">copy-region-as-kill</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-at></TT>(or <TT><Control-Space></TT>)</TD>
<TD ALIGN="LEFT">set-mark-command</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-a></TT></TD>
<TD ALIGN="LEFT">beginning-of-line</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-e></TT></TD>
<TD ALIGN="LEFT">end-of-line</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-Home></TT></TD>
<TD ALIGN="LEFT">beginning-of-buffer</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-End></TT></TD>
<TD ALIGN="LEFT">end-of-buffer</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT><Control-d></TT></TD>
<TD ALIGN="LEFT">deletes the character to the right of the
insertion cursor.
<P></TD>
</TR>
</TABLE>
<P>
<H3><A NAME="SECTION00032300000000000000">
Implementation</A>
</H3>
<P>
Until version 1.4, apoo interface was based in <TT>TkInter</TT>. Newer
versions are based in <TT>pygtk</TT>.
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html128"
HREF="node6.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html126"
HREF="node3.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html120"
HREF="node4.html">
<IMG WIDTH="30" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html129"
HREF="node6.html">Apoo Tutor</A>
<B> Up:</B> <A NAME="tex2html127"
HREF="node3.html">How to use</A>
<B> Previous:</B> <A NAME="tex2html121"
HREF="node4.html">Apoo assembly language</A></DIV>
<!--End of Navigation Panel-->
<ADDRESS>
<a href="http://www.ncc.up.pt/~rvr">Rogrio Reis</a>,<a href="http://www.ncc.up.pt/~nam">Nelma Moreira</a> <I>2006-10-31</I>
</ADDRESS>
</BODY>
</HTML>
|