If then else register depended

Hi All

I tried to search in th ARDUIO website about basing a IF statement on the value of some register example

IF register xyz is equal to 6 then do this and that.

How I access the value of any regster during the code execution.

I did not find what I need in the search option.

Thnanks

Eico

register  xyz;      // what do you think a "register" is?
if( xyz == 6 ) {    // IF register xyz is equal to 6
     // then do this and that.
}

Thanks

How I access the value of any register during the code execution.

By the word register, are you referring to the physical register (s) of the ATmega328P Microcontroller? If so, the following are the few of the registers that you can access using programming codes.

PORTD = 0x5B; //data byte 0x5B (0101 1011) is being written into Port-D register of the MCU. Here, Port-D register is being used as output port. If we want to use Port-D register as input port, then the name is PIND.

TCNT1 : 16-bit Timer/Counter-1 Register TWCR : TWI Bus Control Register ..................