Jump to content
IGNORED

using variables as part of another variable


atari2600land

Recommended Posts

This seems familiar. There is a possibility that SeaGtGruff or RevEng talked about this subject before.

It might have been SeaGtGruff or batari... I don't think it was me.

 

The reason a variable doesn't work in a bit position check is that bB creates different assembly code lines depending on which bit position you've selected, in order to use the most efficient approach.

 

As a work-around you need to write your own more-flexible/less-efficient code to check the bits.

 

atari2600land, here's your original example with a flexible check...

 

 p=(player0x-57)/4
 temp1=bits[p]&a
 if o{1} && k>9 && temp1<>0 then k=0 : l=0 : m=0 : n=0

 data bits
 %00000001, %00000010, %00000100, %00001000
 %00010000, %00100000, %01000000, %10000000
end

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...