Hi guys, I need to write the following code as inline assembly :
if (digitalRead(btnChange) == HIGH) {
variable++;
if (variable > 4) {
variable = 0;
}
How can I even compare a variable with another value?
I'm thinking of somehow loading the value of the variable in a register, compare it with the register with the value of 4, then set the register which contains the variable to 0, but I have no idea how to do that
It's for a uni project that I have to finish soon and one of the requirements is to write a part of the code as inline assembly, I tried to do a blinking LED that starts blinking when an rtc alarm in my project goes off but I cant get the LED to blink, it just stays turned on and my LCD doesn't display anything anymore
You could compile it and hand in the compiler's work? Don't say I told you though... also be ready for a drossing if you're asked to explain how it works...
...and at exam time
...and when you get a job
...
So i modified my code to this and I don't get any errors, but on my LCD where the change of the variable should be displayed nothing happens and my LCD freezes