Hi there, I have a general question about the order of operations with Picaxe logical operators. I understand that Picaxe maths are executed left to right with no order of operations (correct me if I am wrong), but does this apply to Logical Operators as well? I have extracted a line of code from a book:
Assuming outbyte=$80 and rs=0, is the correct order of logical operations as follows:
1. Logical AND outbyte with $F0, resulting in pins=%10000000 | 2 | rs
2. Logical OR %10000000 with %00000010 resulting in pins=%100000010 | rs
3. Logical OR %100000010 resulting in pins=%100000010
Please let me know if I am correct in my understanding.
Also, another question regarding TABLES/EEPROM/LOOKUP:
What are the advantages/disadvantages in terms of speed and memory management between using TABLES vs EEPROM vs. LOOKUP to push commands/data to a parallel LCDs? Is one preferred over the other? Thanks for any advice you can provide.
Code:
pins=outbyte & $F0 | 2 | rs
1. Logical AND outbyte with $F0, resulting in pins=%10000000 | 2 | rs
2. Logical OR %10000000 with %00000010 resulting in pins=%100000010 | rs
3. Logical OR %100000010 resulting in pins=%100000010
Please let me know if I am correct in my understanding.
Also, another question regarding TABLES/EEPROM/LOOKUP:
What are the advantages/disadvantages in terms of speed and memory management between using TABLES vs EEPROM vs. LOOKUP to push commands/data to a parallel LCDs? Is one preferred over the other? Thanks for any advice you can provide.