Jump to content

Photo

cycle count & batari Basic


3 replies to this topic

#1 jeffry OFFLINE  

jeffry

    Space Invader

  • 10 posts

Posted Tue Jun 12, 2018 9:57 PM

Can Batari Basic read the cycle counts?

 

What I would like is to run 2 subroutines then display a 1 or 2 depending on which one is faster and also display the differnce in the score.

 

Then I could paste code into the 2 subroutines and compare them.

 

So is something like this possible?  and if so how do I read the cycles? 

 



#2 ZackAttack OFFLINE  

ZackAttack

    Dragonstomper

  • 688 posts
  • Location:Orlando, FL US

Posted Wed Jun 13, 2018 8:05 PM

You don't need to write any code for this. Just use the stella debugger. Set a break point before and after the section of code you want to profile and take note of the "F. Cycle" value at each breakpoint.

 

Of course, this will only tell you how many cycles a routine takes for whichever code path is executed. It may not necessarily reflect the worst case scenario or the average. You'd really need to analyze the generated assembly listing to determine that.



#3 jeffry OFFLINE  

jeffry

    Space Invader

  • Topic Starter
  • 10 posts

Posted Thu Jun 14, 2018 7:25 PM

Thanks ! 

 

Now, how do I go about setting the breakpoint? 



#4 ZackAttack OFFLINE  

ZackAttack

    Dragonstomper

  • 688 posts
  • Location:Orlando, FL US

Posted Thu Jun 14, 2018 10:22 PM

Now, how do I go about setting the breakpoint? 

 

This post should help.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users