+atari2600land Posted October 15, 2011 Share Posted October 15, 2011 why can't I do this: p=(player0x-57)/4 if o{1} && k>9 && a{p} then k=0 : l=0 : m=0 : n=0 and what is a workaround to it? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 15, 2011 Share Posted October 15, 2011 I thought curly brackets could only have 0 through 7 in them, representing the 8 bits? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted October 15, 2011 Author Share Posted October 15, 2011 But what if, in my example, I make it so p can't be higher than 7? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 15, 2011 Share Posted October 15, 2011 But what if, in my example, I make it so p can't be higher than 7? This seems familiar. There is a possibility that SeaGtGruff or RevEng talked about this subject before. Quote Link to comment Share on other sites More sharing options...
RevEng Posted October 15, 2011 Share Posted October 15, 2011 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.