Home »
Digital Archaeology »
Computer Arcana »
Commodore »
Commodore Emulation »
Classifying Loops
Classifying Loops [message #139455] |
Sun, 26 June 2005 18:39 |
Christian Lott
Messages: 492 Registered: January 2012
Karma: 0
|
Senior Member |
|
|
I'm using the classification of loops given here (to start):
http://sofia.fhda.edu/gallery/java/unit06/lesson06-1.html
Loop Classification:
Type
=Iteration
=Selection
----------
=Iteration
-counted
-indefinite
--data
--sentinel
--limit
3Faces (bounds and goal)
*actions that occur before the loop is encountered.
*actions that occur inside the loop body.
*actions that occur after the loop is complete.
-bounds
-precondition
-advance
-goal
=Selection
--------------------------------
The goal is to classify 6502 assembly loops. Right now 64Copy classifies
loops as: goto, loop, and skip based on jump, branch back and branch
forward respectively.
Branching primitives are:
Branch forward
Branch back
Jump
Jump to subroutine
Jump indirect
--------------------------------
There are three different steps to classifying loops.
Where, when and why.
Where in the code.
When - on what conditions.
Why - based on context.
We can't get to the 'why' unless our code has been properly labeled.
Besides general classification we can analyze statistics:
# branches
frequency
recorder (compressing data sets)
The number of branches can be tallied along with their (iteration)
frequency and graphed accordingly. This will show us the hierarchy.
Individual ram bytes and registers can be monitored and recorded for
bounds checking if needed and that data compressed fairly easily in most
cases. Yet in most cases, the bounds of each loop will be more easily
determined from the code itself than monitoring individual bytes in a
running program.
Christian Lott
|
|
|
Goto Forum:
Current Time: Fri Mar 29 06:19:35 EDT 2024
Total time taken to generate the page: 0.03295 seconds