I'm trying to learn Arduino programming in assembler, using an Arduino UNO R3 as a board and basing myself on the examples in this tutorial: https://www.cypherpunk.at/2014/09/native-assembler-programming-on-arduino/
I have managed to assemble and record the blink of the first example, which turns on a led connected to pin 13 of the board.
But I would be interested in being able to change the output pin, so that instead of using pin 13, it uses another pin, such as 3.
how could i change that?
I finally found it, in these two lines
The first line tells the pin to use, which is defined by setting its position to 1. Position 5 would be 100000, which in hexadecimal is 20, hence the first instruction. If I wanted to put position 3 I would put 1000, 8 in hexadecimal.
And the port is defined with the DDR*, putting DDRB, DDRD, or the one that corresponds.
Finally, the correspondence between the pins of the board and those of the microcontroller is here: https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
So, with these two data, I have already been able to define the pins that I want to use