Modbus switch write 2 registers

i’m configuring a modbus device and i need to write a number to a holding register with address 772 and at the same time i need to write the compliment of that number in the next register.

how can i write two register with a switch entity?