John B. Matthews wrote:
In article <G6udnT6K3uy7S8TZRVn-iA@comcast.com>, "Michael J. Mahon" <mjmahon@aol.com> wrote:John B. Matthews wrote:In article <1herr66.1so9jr81ndbcbgN%bieling@terra.es>, bieling@terra.es (Jorge Chamorro Bieling) wrote:But I'd like to be able to know *exactly* how many cycles does a certain piece of code take to execute. You never know for sure when it's being cached. I would be better to count on fixed, known and fast memory cycles, this is the true Apple II style... isn't it ?I recently dusted off some EDASM documentation: http://www.wright.edu/~john.matthews/a2/rel.html#tblb1The directive "LST cyc" adds a cycle count to each line of the listing. I haven't checked it for accuracy (page crossing, etc), but it looks right.
In practice, I find it of limited usefulness because of conditional branches and page crossings, etc. You still need a pencil and paper, but the cycle listing annotations can save a little time.Too true. I used to use the feature to see if I was making progress. That way, I could waste time bumming code that wasn't critical:-)
I generally use it to get exact cycle counts for critical loops and paths, but it seldom saves more than 25% of the work. -michael Music synthesis for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/ "The wastebasket is our most important design tool--and it is seriously underused."