apoo-2.2/ 0000750 0000766 0000024 00000000000 10745416720 011347 5 ustar rvr dialout apoo-2.2/apoo 0000750 0000766 0000024 00000000175 10745416725 012243 0 ustar rvr dialout #!/bin/bash
#change this line to current directory of Apoo files
DIR=/usr/lib/apoo
/usr/bin/python $DIR/interface.py $*
apoo-2.2/apoo.master 0000640 0000766 0000024 00000000166 10745416725 013533 0 ustar rvr dialout #!/bin/bash
#change this line to current directory of Apoo files
DIR=/usr/lib/apoo
%python% $DIR/interface.py $*
apoo-2.2/constants.py 0000640 0000766 0000024 00000007075 10745416725 013754 0 ustar rvr dialout #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
contants for Apoo
Copyright (C) 1998-2003 Rogério Reis & Nelma Moreira {rvr,nam}@ncc.up.pt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@author: Rogério Reis & Nelma Moreira {rvr,nam}@ncc.up.pt
"""
import exceptions
__version = "$Id: constants.py,v 1.27 2006-04-15 22:10:24 rvr Exp $"
False = 0
True = 1
class vpuError(Exception):
pass
class EndOfProgram(vpuError):
def __init__(self):
self.message = 'End Of Program'
self.colour = 'green'
class OutOfMemory(vpuError):
def __init__(self,add):
self.message = 'Out of Memory'
self.add = add
self.colour = 'red'
class OutOfProgram(vpuError):
def __init__(self):
self.message = 'Out of Program'
self.colour = 'red'
class LabelError(vpuError):
def __init__(self,line = 0):
self.message = 'Label Error'
self.line = line
self.colour = 'red'
class LabelNameError(vpuError):
def __init__(self,line = 0):
self.message = 'Label Name Error'
self.line = line
self.colour = 'red'
class TooManySteps(vpuError):
def __init__(self, num):
self.message = 'Probably an infinite loop'
self.num = num
self.colour = 'red'
class vpuLoadError(vpuError):
def __init__(self, line):
self.line = line
class BadArgs(vpuLoadError):
def __init__(self,line):
self.message = 'Wrong number of arguments'
vpuLoadError.__init__(self,line)
class WrongArg(vpuLoadError):
def __init__(self,line):
self.message = 'Wrong argument'
vpuLoadError.__init__(self,line)
class NotInt(vpuLoadError):
def __init__(self,line):
self.message = 'Integer expected'
vpuLoadError.__init__(self,line)
class IllInst(vpuLoadError):
def __init__(self,line):
self.message = 'Illegal Instruction'
vpuLoadError.__init__(self,line)
class IllOperand(vpuLoadError):
def __init__(self,line):
self.message = 'Illegal Operand'
vpuLoadError.__init__(self,line)
class IllReg(vpuLoadError):
def __init__(self,line):
self.message = 'Illegal Register'
vpuLoadError.__init__(self,line)
class FileError(vpuError):
def __init__(self,line=0):
self.message = 'File Error'
class MemoryUnderflow(vpuError):
def __init__(self,add):
self.message = 'Memory Underflow'
self.add = add
self.colour = 'red'
# zero arg, nonreg, reg, reg reg, nonreg reg, reg nonreg, specials
inst = (['rtn','halt','nop'], # zero arg
['jsr','jump'], # nonreg
['inc','dec','zero','not','jumpi','push','pop'], #reg
['storei','loadi','storer','add','sub','mul','div','mod',
'and','or','xor'], # reg reg
['load','loadn','loado'], # nonreg reg
['store','jzero','jnzero','jpos','jneg','storeo'], # reg nonreg
['mem','const','string','equ']) #specials
apoo-2.2/docs/ 0000750 0000766 0000024 00000000000 10745416720 012277 5 ustar rvr dialout apoo-2.2/docs/help_apoo.txt 0000640 0000766 0000024 00000005310 10745416725 015013 0 ustar rvr dialout
-------------------------------------------------------------------
Apoo Workbench
Copyright (C) 1998-2002 Rogério Reis & Nelma Moreira {rvr,nam}@ncc.up.pt
-------------------------------------------------------------------
The Apoo Workbench is an environment to monitoring the execution of a
Virtual Processor Unit. During the execution of a program, it shows
the contents of the program counter, registers and memory data. 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.
The Apoo Workbench allows also the editing/saving of the text program,
providing an easy way to write/edit/debug/execute Apoo assembly programs.
Execution:
---------
To execute a program in the Apoo Virtual Processor Unit you must first or:
- enter in Edit Mode and write its instructions
- open a text file with its code
After that, you can Load it; if a "parsing error" occurs, enter edit mode
and correct it; the interface will show the text line in which the error
occurred.
When the program is loaded (in memory) you can execute it in three ways:
- Run: will execute all the instructions
- Step: 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
- Cont: will execute instructions until the next breakpoint
In an instruction line, you can set/clear a breakpoint:
- to set a breakpoint: Press -Button1 in that line (the
foreground will become green)
- to clear breakpoint: Press -Button2 (the foreground will
become black)
The button labeled Clear can be used to clear all breakpoints
Edit Mode:
---------
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.
The following emacs-like commands are implemented:
kill-line
yank
kill-region
w copy-region-as-kill
set-mark-command
beginning-of-line
end-of-line
beginning-of-buffer
end-of-buffer
deletes the character to the right of the
insertion cursor.
----------------------------- The End ---------------------------------
apoo-2.2/docs/help_assembly.txt 0000640 0000766 0000024 00000023155 10745416725 015703 0 ustar rvr dialout
--------------------------------------------------------------------------
Apoo Assembly Language
---------------------------------------------------------------------------
All memory cells and registers have 32 bits.
Registers: R0,R1,R2,R3,R4,R5,R6,R7
---------
Memory Data:
-----------
The size of the RAM is predefined (e.g. 1K) and divided into two
areas: static memory and system stack. The static memory, begins at
address 0 and it is allocated when a Apoo program is loaded. Static
memory cells can be reserved in in two ways, using the following
pseudo-instructions:
Pseudo-instructions:
-------------------
Meaning
-------------------------------------------------
mem n reserves n memory addresses
-------------------------------------------------
Label: const n2 contents of memory address
const n1 Label is n1, of Label+1 is n2
.
.
. ni can be a character 'c'
------------------------------------------------------------------
Label: equ n Allows a symbolic name for a number
-------------------------------------------------------------------
Label: string "seqNWSCharacteres" Allocates memory addresses
and set them to the
correspondent characters
ASCII codes. The
characters cannot be
whitespaces: use \s for space
\t for tab and \n for newline
----------------------------------------------------------------------
Label is any string begining with a letter and containing only letters
and digits with the exception of legal register names. If exists, must
begin in the first column of a line
NOTE: Every memory address refered, must have been reserved by
one of the previous pseudo-instructions.
E.g. the instruction "load 3 R2", will cause an "Out of Memory" error, if
at least "mem 3" or three "const" pseudo-instructions were not given...
If a "equ" value is used as a memory address, that address must
be already reserved or be a known memory-mapped instruction. The
"string" argument must be quoted and is converted to a sequence of ascii
codes ending with 0.
-----------------------------------------------------------------------
System Stack:
------------
The system stack occupies the rest
of the RAM (growing for higher addresses). Since Apoo version 3.0 it can be used in an
advanced way to implement activation records.
However in can be used in a simpler way to implement subroutines. We can only push
a value to the Stack and pop a value from it (the one in the
top of the Stack). It
is used by the instructions jsr and rtn.
It can be manipulated by means of the push and pop instructions.
-----------------------------------------------------------------------
Memory mapped:
-------------
It is possible to associate to special memory positions a special
effect. Currently this is used for input/output:
store R0 50000 # writes character with ascii code R0%256
load 50000 R0 # loads R0 with 0 (do nothing)
store R0 50001 # writes the contents of R0 as integer
load 50001 R0 # reads an integer and stores it in R0
store R0 50010 # writes a CR
load 50010 R0 # loads R0 with 0 (do nothing)
Instruction form:
----------------
Operation
Label is any string of letters or digits; if exists, must begin in the
first column of a line
Comments:
--------
A line beginnig with # will be ignored by the parser; so it can be
used to write comments of the program
Basic Instruction Set:
---------------------
--------------------------------------------------------------------------
Operation Operand1 Operand2 Meanning
--------------------------------------------------------------------------
load Mem Ri loads contents of memory
address Mem into register Ri;
Mem can be a label
--------------------------------------------------------------------------
loadn Num Ri loads number Num into register
Ri; Num can be a label
--------------------------------------------------------------------------
loadi Ri Rj loads contents of memory
which address is the contents
of Ri into Rj (indirect load)
--------------------------------------------------------------------------
store Ri Mem stores contents of Ri at memory
address Mem; Mem can be a label
--------------------------------------------------------------------------
storer Ri Rj stores contents of Ri into Rj
--------------------------------------------------------------------------
storei Ri Rj stores contents of Ri
into at memory address, which is the
contents of Rj
--------------------------------------------------------------------------
add Ri Rj add contents of register Ri to
contents of register Rj, and
stores into Rj (Rj=Ri+Rj)
--------------------------------------------------------------------------
sub Ri Rj subtracts contents of register
Rj from contents of register Rj
and stores into Rj (Rj=Ri-Rj)
--------------------------------------------------------------------------
mul Ri Rj multiplies contents of register
Ri and contents of register
Rj, and stores into Rj (Rj=Ri*Rj)
--------------------------------------------------------------------------
div Ri Rj stores into Rj the quotient of integer
division of contents register
Ri by the contents of register
Rj, and stores into Rj (Rj=Ri/Rj)
--------------------------------------------------------------------------
mod Ri Rj stores into Rj the rest of integer
division of contents of register
Ri by the contents of register
Rj, and stores into Rj (Rj=Ri%Rj)
--------------------------------------------------------------------------
zero Ri the contents of Ri becomes 0 (Ri=0)
--------------------------------------------------------------------------
inc Ri increments by 1 the contents of Ri
--------------------------------------------------------------------------
dec Ri decrements by 1 the contents of Ri
--------------------------------------------------------------------------
jump Addr jumps to instruction address Addr;
Addr can be a Label
--------------------------------------------------------------------------
jzero Ri Addr jumps to instruction address Addr,
if contents of Ri is zero;
Addr can be a Label
--------------------------------------------------------------------------
jpos Ri Addr jumps to instruction address Addr,
if contents of Ri is positiv;
Addr can be a Label
--------------------------------------------------------------------------
jneg Ri Addr jumps to instruction address Addr,
if contents of Ri is negativ
--------------------------------------------------------------------------
jnzero Ri Addr jumps to instruction address Addr,
if contents of Ri is different
from zero
---------------------------------------------------------------------------
jsr Addr pushes the PC into the stack and
jumps to instruction address Addr
--------------------------------------------------------------------------
rtn pops an address from the stack
into the PC
--------------------------------------------------------------------------
push Ri pushes the contents of Ri into the
system stack
--------------------------------------------------------------------------
pop Ri pops at element from the system stack
into Ri
--------------------------------------------------------------------------
halt stops execution; Every program
must have this instruction in order
to end properly; otherwise an
'Out of Program' error will occur
--------------------------------------------------------------------------
Activation Records Management
----------------------------
There are two programmable
registers to address the system stack: stack register and frame
register. They correspond to the last two registers of a Apoo vpu
configuration, Rn-1 and Rn-2, but are aliased to rs
and rf, respectively. The stack register rs
contains the address of the last stack memory cell (or -1 if no static
memory is allocated). The instructions jsr, rtn,
push and pop manipulates the stack in the usual way.
Besides that, the contents of the stack register can be manipulated as
any other register.
The frame register can be
used for the implementation of local information (on the system stack).
It contents should be the first stack address of the current activation
record. Like the stack register it can be manipulated as any other
register, but it is also used in two special instructions:
storeo and loado.
- storeo Ri Num: stores the contents of register
Ri at memory address (rf) + Num, where Num is an integer.
- loadeo Num Ri: loads the contents of memory
address (rf) + Num into register Ri, where Num is an integer.
In both instructions, if Num is non negative it should correspond
to local memory and if it is negative, possibly corresponds to arguments of a
subroutine call.
------------------------- The End ---------------------------------------
apoo-2.2/docs/help_tester.txt 0000750 0000766 0000024 00000003266 10745416725 015375 0 ustar rvr dialout -------------------------------------------------------------------
Apoo Tester
-------------------------------------------------------------------
The Apoo Tester is an environment to monitoring the execution of a
Virtual Processor Unit. During the execution of a program, it shows
the contents of the program counter, registers and memory data. 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.
Execution:
---------
When the Tester is called with a program file it tries to load and run
it. If it fails it will display the error in the message line. If a
"parsing error" occurs, during "Load" the interface will show the text
line in which the error occurred.
When the program is loaded (in memory) you can execute it in three ways:
- Run: will execute all the instructions
- Step: 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
- Cont: will execute instructions until the next break point
You may set or clear a breakpoint in an instruction by double-clicking
(with the mouse) on its line address number.
The button labeled Clear can be used to clear all breakpoints.
Exit
----
The Apoo Tester will not terminate until the caller terminates.
-------------------------------------------------------------------
(C) 1998 Rogerio Reis, Nelma Moreira {rvr,nam}@ncc.up.pt
apoo-2.2/examples/ 0000750 0000766 0000024 00000000000 10745416720 013165 5 ustar rvr dialout apoo-2.2/examples/abs.apoo 0000640 0000766 0000024 00000000227 10745416725 014621 0 ustar rvr dialout #
# Implements f(x)=|x|
#
x: const -11
fx: mem 1
load x r1
jpos r1 fim
jzero r1 fim
loadn -1 r2
mul r2 r1
fim: store r1 fx
halt
apoo-2.2/examples/fact.apoo 0000640 0000766 0000024 00000000321 10745416725 014764 0 ustar rvr dialout #
# fact(n) if n==0 then 1 else fact(n-1)*n
#
n: const 5
fn: mem 1
load n r1
jsr fact
store r1 fn
halt
fact: jzero r1 fim
push r1
dec r1
jsr fact
pop r2
mul r2 r1
rtn
fim: loadn 1 r1
rtn
apoo-2.2/examples/fact2.apoo 0000640 0000766 0000024 00000001124 10745416725 015050 0 ustar rvr dialout jsr main
halt
factorial: push rf
storer rs rf
loado -2 r3
loadn 0 r2
sub r3 r2
jnzero r2 L0
loadn 1 r2
storer r2 r0
pop rf
rtn
L0: loado -2 r4
loadn 1 r3
sub r4 r3
push r3
jsr factorial
loadn 1 r3
sub rs r3
storer r3 rs
storer r0 r3
loado -2 r2
mul r3 r2
storer r2 r0
pop rf
rtn
pop rf
rtn
main: push rf
storer rs rf
loadn 2 r2
add r2 rs
load 50001 r1
storeo r1 2
loado 2 r2
push r2
jsr factorial
loadn 1 r2
sub rs r2
storer r2 rs
storeo r0 1
loado 1 r2
store r2 50001
loadn 10 r2
store r2 50000
loadn 2 r2
sub rs r2
storer r2 rs
pop rf
rtn
apoo-2.2/examples/fib.apoo 0000640 0000766 0000024 00000000520 10745416725 014610 0 ustar rvr dialout #
# fib(n)=if(n==0) or (n==1) n else fib(n-1)+fib(n-2)
#
n: const 6
fn: mem 1
load n r1
jsr fib
store r2 fn
halt
# r1=n,r2=fib(n),r3=auxiliar
fib: jzero r1 fim
storer r1 r3
dec r3
jzero r3 fim
storer r3 r1
push r1
jsr fib
pop r1
dec r1
push r2
jsr fib
pop r1
add r1 r2
rtn
fim: storer r1 r2
rtn
apoo-2.2/examples/fun.apoo 0000640 0000766 0000024 00000000470 10745416725 014644 0 ustar rvr dialout m8: mem 1
loadn 1 R31
store R31 m8
loadn 2 R31
load m8 R30
push R30
push R31
jsr F0
pop R31
pop R30
store R30 m8
store R31 m8
halt
F0:
pop R31
m0: mem 1
pop R30
store R30 m0
push R31
m4: mem 1
loadn 3 R31
store R31 m4
load m4 R31
load m0 R30
add R30 R31
pop R30
push R31
push R30
rtn
apoo-2.2/examples/funcx2y.apoo 0000640 0000766 0000024 00000000304 10745416725 015446 0 ustar rvr dialout x: const -6
y: const -5
func: mem 1
load x R0
load y R1
storer R1 R2
sub R0 R2
jneg R2 cont
mul R0 R0
mul R1 R0
store R0 func
halt
cont: loadn 5 R3
sub R3 R1
store R1 func
halt
apoo-2.2/examples/ifx1.apoo 0000640 0000766 0000024 00000000243 10745416725 014721 0 ustar rvr dialout #
# Conditional test
# if(x==1) y=0;else x=2
#R1=x; R2=y
#R4 auxiliar
loadn 1 R4
sub R1 R4
jzero R4 y0
x2: loadn 2 R1
jump fim
y0: zero R2
fim: halt
apoo-2.2/examples/ln.apoo 0000640 0000766 0000024 00000000130 10745416725 014456 0 ustar rvr dialout # Example: adds 3+4+5
#
loadn 3 R1
loadn 4 R2
loadn 5 R3
add R1 R2
add R2 R3
apoo-2.2/examples/ln2.apoo 0000640 0000766 0000024 00000000616 10745416725 014551 0 ustar rvr dialout #
# Example: adds 3,4 and 5 using indirect loading
# R5 points to the first value
#
ini: const 3
const 4
const 5
res: mem 3
loadn ini R5
loadi R5 R1
inc R5
loadi R5 R2
inc R5
loadi R5 R3
add R1 R2
add R2 R3
store R3 res
halt
apoo-2.2/examples/max.apoo 0000640 0000766 0000024 00000001006 10745416725 014635 0 ustar rvr dialout # maximum of a sequence of N values
N: const 10
val: const 7
const 8
const 20
const 43
const 15
const 70
const 18
const 71
const 52
const 83
const 1
MAX: mem 1
#R4=maximum; R2=index
load N R1
loadn val R2
loadi R2 R4
loop: inc R2
dec R1
jzero R1 cont
#puts the next value in R3
loadi R2 R3
# copy before comparing with max
storer R3 R5
sub R4 R5
# if R4-R5 > 0 continue
jpos R5 loop
#max gets a new value
storer R3 R4
jump loop
cont: store R4 MAX
halt
apoo-2.2/examples/mems.apoo 0000640 0000766 0000024 00000000073 10745416725 015014 0 ustar rvr dialout a: mem 3
b: mem 4
c: mem 5
d: const 5
loadn 7 R1
halt
apoo-2.2/examples/push.apoo 0000640 0000766 0000024 00000000053 10745416725 015030 0 ustar rvr dialout loadn 111111 r1
push r1
pop r2
halt
apoo-2.2/examples/sti.apoo 0000640 0000766 0000024 00000000130 10745416725 014644 0 ustar rvr dialout #
# Indirect store
#
data: const 3
loadn data R2
loadn 6 R1
storei R1 R2
halt
apoo-2.2/examples/submax.apoo 0000640 0000766 0000024 00000001053 10745416725 015351 0 ustar rvr dialout #
# Subroutine for Maximum
#
N: const 10
val: const 7
const 8
const 20
const 43
const 15
const 70
const 18
const 71
const 52
const 83
const 1
MAX: mem 1
#R4=maximum; R2=index
load N R1
loadn val R2
#R1=number of elements
#R2=first element
jsr max
store R4 MAX
halt
max: loadi R2 R4
loop: inc R2
dec R1
jzero R1 cont
#puts the next value in R3
loadi R2 R3
#copy for test with maximum
storer R3 R5
sub R4 R5
# if R4-R5 > 0 continue
jpos R5 loop
#max gets a new value
storer R3 R4
jump loop
cont: rtn
apoo-2.2/examples/subsoma.apoo 0000640 0000766 0000024 00000000334 10745416725 015524 0 ustar rvr dialout values: const 3
const 4
const 5
n: const 3
res: mem 1
jsr ini
halt
ini: zero R4
loadn values R1
load n R2
rtn
loop: jzero R2 end
loadi R1 R4
add R4 R3
dec R2
inc R1
jump loop
end: store R3 res
apoo-2.2/examples/t1.apoo 0000640 0000766 0000024 00000000236 10745416725 014400 0 ustar rvr dialout x: const -1
fx: mem 1
load x R0
jpos R0 dois
storer R0 R1
mul R0 R1
store R1 fx
jump fim
dois: loadn 5 R1
add R0 R1
store R1 fx
fim: halt
apoo-2.2/examples/t1.tutor 0000640 0000766 0000024 00000000413 10745416725 014614 0 ustar rvr dialout # <- comments
load
value 20
# constants labels
# memory labels
#mem [label:num[,num]*]* [label;size]*
initial x:-1 fx;1
value 20
#
exec
value 30
#
final fx:1
value 30
end
#
#init x:-3
#value 5
#exec
#value 10
#final fx:2
#value 15
#end apoo-2.2/examples/test-mm.apoo 0000640 0000766 0000024 00000000204 10745416725 015435 0 ustar rvr dialout loadn 97 R0
store R0 50000
store R0 50010
store R0 50001
store R0 50010
load 50001 R0
store R0 50001
store R0 50010
halt
apoo-2.2/examples/test-rfrs.apoo 0000640 0000766 0000024 00000001015 10745416725 016001 0 ustar rvr dialout n: const 5
loadn 4 r1
# argument
push r1
zero r1
jsr test
pop r1
halt
test: push rf
#saves the current frame pointer
#current frame pointer
storer rs rf
loadn 6 r2
# reserves some local space
add r2 rs
# gets the argument
loado -2 r1
# only testing the rs
push r1
pop r1
#stores contents of r1 at rf+1
storeo r1 1
#loads the same value into r3
loado 1 r3
# restores stack before return
sub rs r2
storer r2 rs
# restores frame before return
pop rf
rtn
apoo-2.2/examples/test1.apoo 0000640 0000766 0000024 00000000247 10745416725 015116 0 ustar rvr dialout a: const 1
b: const 2
c: const 3
m: mem 2
n: mem 1
load a R1
load b R2
load c R3
loadn m R4
storei R1 R4
inc R4
storei R2 R4
store R3 n
halt
apoo-2.2/examples/test1.tutor 0000640 0000766 0000024 00000000334 10745416725 015332 0 ustar rvr dialout #
load
value 20
# constants labels
# memory labels
#mem [label:num[,num]*]* [label;size]*
initial a:1 b:2 c:3 m;2 n;1
value 20
#
exec
value 30
#
final R1:1 R2:2 R3:3 m:1,2 n:3
value 30
end
apoo-2.2/examples/test2.apoo 0000640 0000766 0000024 00000000244 10745416725 015114 0 ustar rvr dialout a: const 1
const -3
const 40
const 0
b: mem 1
loadn a R1
zero R3
ciclo: loadi R1 R2
jzero R2 fim
add R2 R3
inc R1
jump ciclo
fim: store R3 b
halt
apoo-2.2/examples/test2.tutor 0000640 0000766 0000024 00000000320 10745416725 015326 0 ustar rvr dialout #
load
value 20
# [label:num[,num]*]* [label;size]*
initial a:1,-3,40,0 b;1
value 10
#
exec
value 20
#
final a:1,-3,40,0 b:38 R3:38
value 20
init a:9,10,10,0
exec
value 10
final b:29 R3:29
value 20
end
apoo-2.2/examples/teste2.apoo 0000640 0000766 0000024 00000000111 10745416725 015252 0 ustar rvr dialout mem 200
loadn 50 R4
loadn 56666 R3
add R4 R3
storer R3 R5
apoo-2.2/examples/while.apoo 0000640 0000766 0000024 00000000216 10745416725 015162 0 ustar rvr dialout #
# while(x>o) x=x-2
#R1=x; R2=y
#
# suppose x=10
loadn 10 R1
loop: jneg R1 cont
jzero R1 cont
dec R1
dec R1
jump loop
cont: halt
apoo-2.2/examples/while1.apoo 0000640 0000766 0000024 00000000211 10745416725 015236 0 ustar rvr dialout #
# while(x>o) x=x-2
#R1=x; R2=y
#
# suppose x=10
loadn 10 R1
loadn -2 R2
loop: jpos R1 cont
add R2 R1
jump loop
cont: halt
apoo-2.2/exec-apoo.master 0000640 0000766 0000024 00000000571 10745416725 014455 0 ustar rvr dialout #!%python%
import sys
sys.path.append('/usr/lib/apoo')
from vpu import *
v = Vpu(32,{50000:("pass","print '%c'%(val%256),"),
50001:("val = raw_input()","print val,"),
50010:('print ','print ')})
if len(sys.argv) != 2:
print "execapoo apoo_program"
sys.exit(0)
a = ReadProgram(sys.argv[1])
v.load(a)
try: v.run()
except EndOfProgram:
pass
apoo-2.2/html/ 0000750 0000766 0000024 00000000000 10745416720 012313 5 ustar rvr dialout apoo-2.2/html/apoo.css 0000640 0000766 0000024 00000001776 10745416725 014004 0 ustar rvr dialout /* Century Schoolbook font is very similar to Computer Modern Math: cmmi */
.MATH { font-family: "Century Schoolbook", serif; }
.MATH I { font-family: "Century Schoolbook", serif; font-style: italic }
.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold }
/* implement both fixed-size and relative sizes */
SMALL.XTINY { font-size : xx-small }
SMALL.TINY { font-size : x-small }
SMALL.SCRIPTSIZE { font-size : smaller }
SMALL.FOOTNOTESIZE { font-size : small }
SMALL.SMALL { }
BIG.LARGE { }
BIG.XLARGE { font-size : large }
BIG.XXLARGE { font-size : x-large }
BIG.HUGE { font-size : larger }
BIG.XHUGE { font-size : xx-large }
/* heading styles */
H1 { }
H2 { }
H3 { }
H4 { }
H5 { }
/* mathematics styles */
DIV.displaymath { } /* math displays */
TD.eqno { } /* equation-number cells */
/* document-specific styles come next */
DIV.navigation { }
DIV.small { }
DIV.center { }
PRE.preform { }
SPAN.arabic { }
SPAN.textbf { font-weight: bold }
apoo-2.2/html/apoo.html 0000640 0000766 0000024 00000015373 10745416725 014156 0 ustar rvr dialout
Apoo
An environment for a first course in assembly language programming
Apoo
An environment for a first course in assembly
language programming
Comments/Suggestions
Rogrio Reis ,Nelma Moreira 2008-01-22
apoo-2.2/html/help_apoo.html 0000750 0000766 0000024 00000004437 10745416726 015170 0 ustar rvr dialout
Apoo Workbench Interface
Apoo Workbench
The Apoo Workbench is an environment to monitoring the execution of a
Virtual Processor Unit. During the execution of a program, it shows
the contents of the program counter, registers and memory data. 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.
The Apoo Workbench allows also the editing/saving of the text program,
providing an easy way to write/edit/debug/execute Apoo assembly programs.
Execution
To execute a program in the Apoo Virtual Processor Unit you must first or:
enter in Edit Mode and write its instructions
open a text file with its code
After that, you can Load it; if a "parsing error" occurs, enter edit mode
and correct it; the interface will show the text line in which the error
occurred.
When the program is loaded (in memory) you can execute it in three ways:
Run: will execute all the instructions
Step: 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
Continue: will execute instructions until the next breakpoint
You may set or clear a breakpoint in an instruction by double-clicking (with the mouse)
on its line address number.
The button labeled Clear can be used to clear all breakpoints.
Edit Mode
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.
Emacs key shortcuts are provided. They can be enabled on the Preferences dialog
and they get listed on the Edit menu.
© 1998-2006 Rogerio Reis, Nelma Moreira {rvr,nam}@ncc.up.pt
apoo-2.2/html/help_assembly.html 0000750 0000766 0000024 00000031150 10745416726 016041 0 ustar rvr dialout
Apoo assembly language
Apoo assembly language
Apoo has a set of general purpose
registers (32 by default), a data memory area, a program memory
area, a system stack and a program counter register.
All memory cells and registers have 32 bits.
Registers are named R0,R1,R2,R3,R4,R5,R6,R7,...
Memory Data
Memory cells are created as needed. We can reserve memory cells
in two ways, using the following pseudo-instructions:
Pseudo-instructions
Meaning
<Label:>
mem
n
reserves n memory addresses
Label:
const
n1
contents of memory address
const
n2
Label is n1 , of Label+1 is n2
....
ni can be a character 'c' .
<Label:>
equ
n
Allows a symbolic
name for a number
<Label:>
string
"seqNWSCharacteres"
Allocates memory
addresses and set them to the correspondent characters ASCII
codes. The characters cannot be whitespaces: use \s
for
space , \t
for tab and \n
for newline .
Label is any string beginning with a letter and containing only letters
and digits with the exception of legal register names. If exists, must
begin in the first column of a line
NOTE: Every memory address refered, must have been reserved by
one of the previous pseudo-instructions.
E.g. the instruction load 3 R2 , will cause an Out of
Memory error, if at least mem 3 or three const
pseudo-instructions were not given...
If a equ value is used as a memory address, that address must
be already reserved or be a known memory-mapped instruction. The
string argument must be quoted and is converted to a sequence of ascii
codes ending with 0 .
System Stack
A special memory area used to implement subroutines. We can only push
a value to the Stack and pop a value from it (the one in the
top of the Stack).
It is used by the instructions jsr and rtn.
It can be manipulated by means of the push and pop instructions.
Instruction Form
<Label:> Operation <Operand1> <Operand2>
Label is any string of letters or digits; if exists, must begin in the
first column of a line
Comments
A line beginning with # will be ignored by the parser; so it can be
used to write comments of the program
Instruction Set
Operation
Operand1
Operand2
Meanning
load
Mem
Ri
loads contents of memory
address Mem into register Ri;
Mem can be a label
loadn
Num
Ri
loads number Num into register
Ri; Num can be a label
loadi
Ri
Rj
loads contents of memory
which address is the contents
of Ri into Rj (indirect load)
store
Ri
Mem
stores contents of Ri at memory
address Mem; Mem can be a label
storer
Ri
Rj
stores contents of Ri into Rj
storei
Ri
Rj
stores contents of Ri
into at memory address, which is the
contents of Rj
add
Ri
Rj
add contents of register Ri to
contents of register Rj, and
stores into Rj (Rj=Ri+Rj)
sub
Ri
Rj
subtracts contents of register
Rj from contents of register Rj
and stores into Rj (Rj=Ri-Rj)
mul
Ri
Rj
multiplies contents of register
Ri and contents of register
Rj, and stores into Rj (Rj=Ri*Rj)
div
Ri
Rj
stores into Rj the quotient of integer
division of contents register
Ri by the contents of register
Rj, and stores into Rj (Rj=Ri/Rj)
mod
Ri
Rj
stores into Rj the rest of integer
division of contents of register
Ri by the contents of register
Rj, and stores into Rj (Rj=Ri%Rj)
zero
Ri
the contents of Ri becomes 0 (Ri=0)
inc
Ri
increments by 1 the contents of Ri
dec
Ri
decrements by 1 the contents of Ri
jump
Addr
jumps to instruction address Addr;
Addr can be a Label
jzero
Ri
Addr
jumps to instruction address Addr,
if contents of Ri is zero;
Addr can be a Label
jnzero
Ri
Addr
jumps to instruction address Addr,
if contents of Ri is different
from zero;
jpos
Ri
Addr
jumps to instruction address Addr,
if contents of Ri is positiv;
Addr can be a Label
jneg
Ri
Addr
jumps to instruction address Addr,
if contents of Ri is
negativ
jnzero
Ri
Addr
jumps to instruction address Addr,
if contents of Ri is different
from zero;
Addr can be a Label
jsr
Addr
pushes the PC into the stack and
jumps to instruction address Addr
rtn
pops an address from the stack
into the PC
push
Ri
pushes the contents of Ri into the
system stack
pop
Ri
pops at element from the system stack
into Ri
halt
stops execution; Every program
must have this instruction in order
to end properly; otherwise an
'Out of Program' error will occur
Memory-Mapped Instructions
Apoo allows the configuration of a set of memory positions for
special purposes. The memory values and its functionality are given as
a parameter of the Apoo virtual machine.
The default values allow the simulation of input/output:
Memory Position
Load
Store
50000
load 50000 Ri
loads 0 in Ri
store Ri 50000
writes the character which ascii code is
Ri%256 in the Output Window (in graphical interface) or in stdout,
in text mode.
50001
load 50001 Ri
reads an integer and stores it in Ri
store Ri 50001
writes the contents of Ri as an integer
50010
load 50010 Ri
loads 0 in Ri
store Ri 50010
writes a CR in the Output Window (in graphical interface) or in stdout,
in text mode.
Here is an example:
loadn 97 R0 store R0 50000 store R0 50010 store R0 50001 store R0 50010 load 50001 R0 loadn 5 R1 add R0 R1 store R0 50001 store R0 50010 halt
© 1998-2006 Rogerio Reis, Nelma Moreira {rvr,nam}@ncc.up.pt
apoo-2.2/html/help_tester.html 0000750 0000766 0000024 00000003305 10745416726 015531 0 ustar rvr dialout
Apoo Tester Interface
Apoo Tester
The Apoo Tester is an environment to monitoring the execution of a
Virtual Processor Unit. During the execution of a program, it shows
the contents of the program counter, registers and memory data. 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.
Execution
When the Tester is called with a program file it tries to load and run
it. If it fails it will display the error in the message line. If a
"parsing error" occurs, during "Load" the interface will show the text
line in which the error occurred.
When the program is loaded (in memory) you can execute it in three ways:
Run: will execute all the instructions
Step: 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
Cont: will execute instructions until the next breakpoint
You may set or clear a breakpoint in an instruction by double-clicking (with the mouse)
on its line address number.
The button labeled Clear can be used to clear all breakpoints.
Exit
The Apoo Tester will not terminate until the caller terminates.
© 1998-2002 Rogerio Reis, Nelma Moreira {rvr,nam}@ncc.up.pt
apoo-2.2/html/images.aux 0000640 0000766 0000024 00000000010 10745416725 014274 0 ustar rvr dialout \relax
apoo-2.2/html/images.log 0000640 0000766 0000024 00000013761 10745416725 014301 0 ustar rvr dialout This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=latex 2007.12.31) 22 JAN 2008 13:53
entering extended mode
%&-line parsing enabled.
**./images.tex
(./images.tex
LaTeX2e <2005/12/01>
Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, farsi, croatian, ukrainian, russian, bulgarian, czech, slov
ak, danish, dutch, finnish, basque, french, german, ngerman, ibycus, greek, mon
ogreek, ancientgreek, hungarian, italian, latin, mongolian, norsk, icelandic, i
nterlingua, turkish, coptic, romanian, welsh, serbian, slovenian, estonian, esp
eranto, uppersorbian, indonesian, polish, portuguese, spanish, catalan, galicia
n, swedish, ukenglish, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo
File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/share/texmf-texlive/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
) (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
Package: inputenc 2006/05/05 v1.1b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/share/texmf-texlive/tex/latex/base/latin1.def
File: latin1.def 2006/05/05 v1.1b Input encoding file
)) (/usr/share/texmf-texlive/tex/latex/tools/longtable.sty
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
\LTleft=\skip43
\LTright=\skip44
\LTpre=\skip45
\LTpost=\skip46
\LTchunksize=\count87
\LTcapwidth=\dimen103
\LT@head=\box26
\LT@firsthead=\box27
\LT@foot=\box28
\LT@lastfoot=\box29
\LT@cols=\count88
\LT@rows=\count89
\c@LT@tables=\count90
\c@LT@chunks=\count91
\LT@p@ftn=\toks16
) (/usr/share/texmf-texlive/tex/latex/ltxmisc/a4wide.sty
Package: a4wide 1994/08/30
(/usr/share/texmf-texlive/tex/latex/ntgclass/a4.sty
Package: a4 2004/04/15 v1.2g A4 based page layout
)) (/usr/share/texmf-texlive/tex/latex/graphics/epsfig.sty
Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks17
) (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
) (/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: dvips.def on input line 90.
(/usr/share/texmf-texlive/tex/latex/graphics/dvips.def
File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
))
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
)
\epsfxsize=\dimen106
\epsfysize=\dimen107
) (/usr/share/texmf/tex/latex/html/html.sty
Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm)
\c@lpart=\count92
\c@lchapter=\count93
\c@chapter=\count94
\c@lsection=\count95
\c@lsubsection=\count96
\c@lsubsubsection=\count97
\c@lparagraph=\count98
\c@lsubparagraph=\count99
\c@lsubsubparagraph=\count100
\ptrfile=\write3
) (/usr/share/texmf/tex/latex/html/htmllist.sty) (/usr/share/texmf-texlive/tex/
latex/graphics/color.sty
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
(/etc/texmf/tex/latex/config/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: dvips.def on input line 130.
(/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def
File: dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
))
\sizebox=\box30
\lthtmlwrite=\write4
(./images.aux)
\openout1 = `images.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 168.
LaTeX Font Info: ... okay on input line 168.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 168.
LaTeX Font Info: ... okay on input line 168.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 168.
LaTeX Font Info: ... okay on input line 168.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 168.
LaTeX Font Info: ... okay on input line 168.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 168.
LaTeX Font Info: ... okay on input line 168.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 168.
LaTeX Font Info: ... okay on input line 168.
latex2htmlLength hsize=349.0pt
latex2htmlLength vsize=713.0pt
latex2htmlLength hoffset=0.0pt
latex2htmlLength voffset=0.0pt
latex2htmlLength topmargin=0.0pt
latex2htmlLength topskip=0.00003pt
latex2htmlLength headheight=0.0pt
latex2htmlLength headsep=0.0pt
latex2htmlLength parskip=0.0pt plus 1.0pt
latex2htmlLength oddsidemargin=18.06749pt
latex2htmlLength evensidemargin=18.06749pt
File: Apoo1.ps Graphic file (type eps)
Overfull \hbox (1.0pt too wide) in paragraph at lines 194--196
[][]
[]
Underfull \hbox (badness 10000) in paragraph at lines 194--196
[]
l2hSize :figure42:362.04498pt::0.0pt::349.0pt.
[1
]
File: apoo_gtk_interface.eps Graphic file (type eps)
Overfull \hbox (51.0pt too wide) in paragraph at lines 221--222
[][]
[]
l2hSize :figure215:492.59534pt::0.0pt::349.0pt.
[2
] (./images.aux) )
Here is how much of TeX's memory you used:
1283 strings out of 94075
16367 string characters out of 1165175
62548 words of memory out of 1500000
4594 multiletter control sequences out of 10000+50000
3640 words of font info for 14 fonts, out of 1200000 for 2000
645 hyphenation exceptions out of 8191
32i,5n,21p,217b,282s stack positions out of 5000i,500n,6000p,200000b,5000s
Output written on images.dvi (2 pages, 648 bytes).
apoo-2.2/html/images.pl 0000640 0000766 0000024 00000001332 10745416725 014122 0 ustar rvr dialout # LaTeX2HTML 2002-2-1 (1.71)
# Associate images original text with physical files.
$key = q/{figure}htmlimage{thumbnail=0.5}{centering{{epsfxsize{=400pt{epsfbox{apoo_gtk_interface.eps}{{par{{{{par{{figure};FSF=1.6;AAT/;
$cached_env_img{$key} = q| |;
$key = q/{figure}{epsfxsize{=350pt{epsfbox{Apoo1.ps}{htmlimage{scale=0.5}{figure};FSF=1.6;AAT/;
$cached_env_img{$key} = q| |;
1;
apoo-2.2/html/images.tex 0000640 0000766 0000024 00000021444 10745416725 014315 0 ustar rvr dialout \batchmode
\documentclass{article}
\RequirePackage{ifthen}
\usepackage[latin1]{inputenc}
\usepackage{longtable}
\usepackage{a4wide}
\usepackage{epsfig}
\usepackage{html}
\usepackage{htmllist}
%
\providecommand{\wwwrvr}{\htmlurl{http://www.ncc.up.pt/~rvr}}%
\providecommand{\wwwnam}{\htmlurl{http://www.ncc.up.pt/~nam}}%
\providecommand{\apooreport}{\htmlurl{http://www.ncc.up.pt/apoo/apoo-docs/apoo_report}}%
\providecommand{\apooreportps}{\htmlurl{http://www.ncc.up.pt/apoo/apoo-docs/apoo_report.ps.gz}}%
\providecommand{\apooreportpdf}{\htmlurl{http://www.ncc.up.pt/apoo/apoo-docs/apoo_report.pdf}}
%
\providecommand{\inroads}{\htmlurl{http://www.ncc.up.pt/apoo/apoo-docs/apoo_inroads.pdf}}
%
\providecommand{\Apoo}{\texttt{Apoo}}%
\providecommand{\Apooi}{\texttt{Apoo Interface}}%
\providecommand{\Apoot}{\texttt{Apoo Tutor}}%
\providecommand{\Apoovm}{\texttt{Apoo32: a virtual machine for Apoo}}%
\providecommand{\Apooar}{\texttt{Manipulation of activation records in Apoo}}
\title{\texttt{Apoo}\\
\normalsize {An environment for a first course in assembly
language programming}}
\author{\htmladdnormallink{Rogrio Reis}{\htmlurl{http://www.ncc.up.pt/~rvr}}, \htmladdnormallink{Nelma Moreira}{\htmlurl{http://www.ncc.up.pt/~nam}}\\{\small DCC-FC \& LIACC, Universidade do Porto}}
\date{1998-2007}
\bodytext{BGCOLOR="#FFFFF0" TEXT="DARKBLUE" LINK="RED" VLINK="DARKRED"
ALINK="#FF0000" ALINK="YELLOW"}
\usepackage[dvips]{color}
\pagecolor[gray]{.7}
\usepackage[latin1]{inputenc}
\makeatletter
\makeatletter
\count@=\the\catcode`\_ \catcode`\_=8
\newenvironment{tex2html_wrap}{}{}%
\catcode`\<=12\catcode`\_=\count@
\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}%
\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}%
\expandafter\renewcommand\csname #1\endcsname}%
\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}%
\let\newedcommand\renewedcommand
\let\renewedenvironment\newedenvironment
\makeatother
\let\mathon=$
\let\mathoff=$
\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi
\newbox\sizebox
\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt}
\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt}
\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt}
\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt}
\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt}
\setlength{\textwidth}{349pt}
\newwrite\lthtmlwrite
\makeatletter
\let\realnormalsize=\normalsize
\global\topskip=2sp
\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float
\def\@float{\let\@savefreelist\@freelist\real@float}
\def\liih@math{\ifmmode$\else\bad@math\fi}
\def\end@float{\realend@float\global\let\@freelist\@savefreelist}
\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float
\let\@largefloatcheck=\relax
\let\if@boxedmulticols=\iftrue
\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt}
\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize
\parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}%
\def\phantompar{\csname par\endcsname}\normalsize}%
\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}%
\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }%
\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }%
\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup %
\let\ifinner=\iffalse \let\)\liih@math }%
\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}%
\expandafter\box\next\egroup}%
\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}%
\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox
\ifdim\dimen0>.95\vsize
\lthtmltypeout{%
*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}%
\ht\sizebox.95\vsize \dp\sizebox\z@ \fi
\lthtmltypeout{l2hSize %
:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}%
\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist
\lthtmlmathtype{#1}\lthtmlvboxmathA}%
\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}%
\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup
\let\@savefreelist\@freelist \lthtmlhboxmathB}%
\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}%
\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox
\global\let\@freelist\@savefreelist}%
\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}%
\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}%
\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}%
\lthtmldisplayA{#1}\let\@eqnnum\relax}%
\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}%
\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB}
\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA
\vrule height1.5ex width0pt }%
\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}%
\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}%
\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt %
\expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline}
\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt %
\expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath}
\newcommand\lthtmlindisplaymathZ{\egroup %
\centerinlinemath\lthtmllogmath\lthtmlsetmath}
\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{%
\kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi
\ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}}
\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{%
\kern.1em\kern0.75 pt\hbox{\hglue.17em\copy\sizebox\hglue0.75 pt}}\kern.3pt%
\ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.75 pt%
\ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}}
\def\centerinlinemath{%
\dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi
\advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1
\dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax}
\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize
\ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill
\else\expandafter\vss\fi}%
\providecommand{\selectlanguage}[1]{}%
\makeatletter \tracingstats = 1
\providecommand{\Beta}{\textrm{B}}
\providecommand{\Mu}{\textrm{M}}
\providecommand{\Kappa}{\textrm{K}}
\providecommand{\Rho}{\textrm{R}}
\providecommand{\Epsilon}{\textrm{E}}
\providecommand{\Chi}{\textrm{X}}
\providecommand{\Iota}{\textrm{J}}
\providecommand{\omicron}{\textrm{o}}
\providecommand{\Zeta}{\textrm{Z}}
\providecommand{\Eta}{\textrm{H}}
\providecommand{\Nu}{\textrm{N}}
\providecommand{\Omicron}{\textrm{O}}
\providecommand{\Tau}{\textrm{T}}
\providecommand{\Alpha}{\textrm{A}}
\begin{document}
\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}%
\makeatletter
\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}%
\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi%
\lthtmltypeout{}%
\makeatother
\setcounter{page}{1}
\onecolumn
% !!! IMAGES START HERE !!!
{\newpage\clearpage
\lthtmlfigureA{figure42}%
\begin{figure}
\epsfxsize =350pt
\epsfbox{Apoo1.ps}
\htmlimage{scale=0.5}
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}
\stepcounter{section}
\stepcounter{section}
\stepcounter{section}
\stepcounter{subsection}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{subsubsection}
\stepcounter{paragraph}
\stepcounter{subsection}
\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{figure215}%
\begin{figure} \htmlimage{thumbnail=0.5}
\centering
\epsfxsize =400pt
\epsfbox{apoo_gtk_interface.eps}
\par
\par
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}
\stepcounter{subsubsection}
\stepcounter{subsubsection}
\stepcounter{subsubsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{section}
\stepcounter{subsection}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{paragraph}
\stepcounter{section}
\stepcounter{section}
\end{document}
apoo-2.2/html/img1.png 0000640 0000766 0000024 00000054031 10745416725 013667 0 ustar rvr dialout PNG
IHDR Ð tRNS ىH IDATx4鯥u|Ν[UU]=Il$%Kd2"Ѷ,ǎ) %ȇ$v`'ȇ@B1DDC"5%d7kus|iO+
gm3!냈$a?WLǢsrgxKD\ޠʏt(~poay2NZTR\꥟}ݮ^}"qSs=?:PY`AP?/}m;
S/kp|;xBi'&'WR֗^_[HOy^>2ƥSrzfW,b`p⧟'Q`ouxJs}Pi|Y~ʣ
T*^G.^Jh\U{i`2Ըlw>Gq{k-QUk qAXH{1xP!KvoYI_ g-1;²Nu2c (+>/HHbY}܄wA
oz|hn}^RƧ_nOfjMU!/
ioQ/sY__{X{[/i