Hi there!
So, this is my first intervention here. What I offer does not qualify as a tutorial, that's for sure... I don't know any other way to convey it correctly, please correct me if I am wrong.
This Sheets file was created after I read Ersanio's massive tutorial book about SNES general assembler code. He was stating the bitwise logical operations were a bit harder to understand, but instead it gave me a feeling of nostalgy, because I used to work on this stuff in High School, using the software Crocodile Clips.
There are still some things I can't understand, for example the complex calculation that lets me operate logically on decimal numbers. Fortunately, the google sheets software already has the function definitions built-in. So, you can directly set the parameters in the plot tab and see how your values can output.
What this table does is an accurate list and visual output (plot) of any logical operation you'd like to inflict to a 8-bit byte loaded inside your accumulator, as follows:
The B and C parameters are set manually because I don't know how to do a 3-D or 4-D plot, but in my opinion it is visual enough.
Here's what you get :
- A AND B
- A OR B
- A XOR B
- (A AND B) AND C
- (A AND B) OR C
- (A AND B) XOR C
- (A OR B) AND C
- (A OR B) OR C
- (A OR B) XOR C
- (A XOR B) AND C
- (A XOR B) OR C
- (A XOR B) XOR C
In order to allow users to tweak the parameters, the file is given with full edit access, use it with caution. As I can't control the occurance of accidents, I keep a back-up handy. Please report to me if I need to use the back-up or to correct a mistake. Cheers!
This "tool" is found here.
Thank you so much for your attention and I hope it helps people figure out the potential of logical operators. Well if it doesn't, there's still a relative artistic value.
Cheers!
Edit: you may want to pay attention if someone is visiting the file at the same time as you. for more update comfort, feel free to duplicate the file to your own drive.
So, this is my first intervention here. What I offer does not qualify as a tutorial, that's for sure... I don't know any other way to convey it correctly, please correct me if I am wrong.
This Sheets file was created after I read Ersanio's massive tutorial book about SNES general assembler code. He was stating the bitwise logical operations were a bit harder to understand, but instead it gave me a feeling of nostalgy, because I used to work on this stuff in High School, using the software Crocodile Clips.
There are still some things I can't understand, for example the complex calculation that lets me operate logically on decimal numbers. Fortunately, the google sheets software already has the function definitions built-in. So, you can directly set the parameters in the plot tab and see how your values can output.
What this table does is an accurate list and visual output (plot) of any logical operation you'd like to inflict to a 8-bit byte loaded inside your accumulator, as follows:
Code
LDA #$01 ;A parameter, x axis from -128 ($80) to 127 ($7F) EOR #$03 ;B parameter ORA #$04 ;C parameter STA $01 ;output value in y axis
The B and C parameters are set manually because I don't know how to do a 3-D or 4-D plot, but in my opinion it is visual enough.
Here's what you get :
- A AND B
- A OR B
- A XOR B
- (A AND B) AND C
- (A AND B) OR C
- (A AND B) XOR C
- (A OR B) AND C
- (A OR B) OR C
- (A OR B) XOR C
- (A XOR B) AND C
- (A XOR B) OR C
- (A XOR B) XOR C
In order to allow users to tweak the parameters, the file is given with full edit access, use it with caution. As I can't control the occurance of accidents, I keep a back-up handy. Please report to me if I need to use the back-up or to correct a mistake. Cheers!
This "tool" is found here.
Thank you so much for your attention and I hope it helps people figure out the potential of logical operators. Well if it doesn't, there's still a relative artistic value.
Cheers!
Edit: you may want to pay attention if someone is visiting the file at the same time as you. for more update comfort, feel free to duplicate the file to your own drive.