Jump to content
IGNORED

Cycle Counting..


yuppicide

Recommended Posts

I saw THIS THREAD about Cycle Counting.

 

Is it impossible to make some kind of chart for bB?

That's a good idea, but it could vary depending on how the commands are used and other issues. For example,

 

   a = 1

will normally compile as

 

   LDA #1
  STA a

which takes 4 bytes of ROM and 5 cycles of CPU time. Therefore the following will normally take 8 bytes and 10 cycles:

 

   a = 1
  b = 1

Normally compiles as

 

   LDA #1
  STA a
  LDA #1
  STA b

But if you put those two commands one after the other on the same line, they will compile more efficiently and take only 6 bytes and 8 cycles:

 

   a = 1 : b = 1

Will compile as

 

   LDA #1
  STA a
  STA b

The best way to be sure about the number of bytes and cycles used is to look at the assembly listing and then add cycle counting to the assembly listing. But it should be possible to create a table for most of the commands.

 

Michael

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...