I'm learning Arduino by programming in assembler, it is something new for me. I wrote my successfully first program to blink a led.
Now I'm looking at instruction set manual and I was wondering whether there is a logical instruction to negate a register or a single bit. I would like to rewrote the branchless blinking version.
Now I'm using the sbi and cbi, I'm searching for something similar but to negate a bit.
Note: The "Exclusive OR" instruction is named "EOR", not "XOR". It works on two registers: Destination,Source
Further note: The "CLR" instruction is just the EOR instruction with both registers the same.
There is a "Load and Toggle" (LAT) instruction. It fetches a byte through the pointer register 'Z', XOR's it with the named register, and stores it back through Z.
I'm learning Arduino by programming in assembler, it is something new for me. I wrote my successfully first program to blink a led.
From a technical / pedantic perspective this does not make sense.
"Arduino" can refer to many things, from h/w to s/w.
Arduino does not really refer to any specific board although many often refer to AVR based boards like the UNO as simply "Arduino".
But from a s/w perspective, Arduino is about creating an easy to use environment that provides a core library (in C) that hides all the raw h/w from the user using abstraction APIs and then provides C++ libraries on top of that for additional functionality.
If you are directly accessing the h/w - which you would be when using assembler, you are stepping outside the Arduino programming environment.
When programming in assembler, using the assembler from gcc toolset is a bit messy since the gcc tools (which is what comes with the Arduino IDE) don't use the official/Atmel assembler mnemonics/language.
There are other tools like Atmel Studio (if using Windows) that, IMO, would better if wanting to program directly to the h/w in assembler.