Modify the sketch of a kta-223 (Uno) to accept another set of instructions

Hello, I'm new to this forum and to the arduino environment so thank you for welcoming me and for any help you can provide.
I recently bought a serial i/o module with 8 relays (kta-223 / arduino uno)
I'd like to use it with a software meant to be used with an older module with similar features (kit108).
The "language" to communicate with a PC and to trigger the relays is somehow different from one to another.
Can you give me any leads to modify kta-223 sketch to accept the instructions meant for kit108?
How can I integer the following language into my sketch to have my serial i/o module to communicate an react?
Here is the link to the sketch:
http://oceancontrols.com.au/datasheet/ocean/kta223_OCRelayDuinoASCIISlaveSKETCH.zip
and the instructions for the older module as described in the manual:

• Inputs are numbered 1 to 4. Input number ‘0’ (zero) indicates ALL inputs.
• Where a hex byte is used, each bit within the byte indicates its corresponding relay or input. Bit 0 indicates relay or input 1, bit 1 indicates relay or input 2, etc.
Nx – Turn a relay ON (where x = relay number)
Eg. “N3” – turn on relay 3
“N0” – turn on ALL relays
Fx – Turn a relay OFF (where x = relay number)
Eg. “F3” – turn off relay 3 “F0” – turn off ALL relays
Tx – TOGGLE a relay on/off (where x = relay number)
Changes the state of a relay (ON to OFF, OFF to ON)
Eg. “T3” – toggle relay 3 “T0” – toggle ALL relays
Rhh – Set ALL relays directly
“hh” is a hexadecimal byte. Each bit within the byte indicates whether the corresponding relay is operated or not. If the bit is ‘1’ then the relay is operated, if the bit is ‘0’ then the relay is released.
Eg. “R55” – relays 1,3,5,7 ON, all others OFF “R0F” – relays 1-4 ON, all others OFF
Sx – relay STATUS (where x = relay number)
A ‘0’ (zero) is returned if the relay is released, ‘1’ if
operated.
The command “S0” returns the status of ALL relays. In this case a hex byte is returned. Each bit within the byte indicates the status of the corresponding relay.
Eg. “S3” – returns the status of relay 3 “S0” – returns the status of ALL relays
Ix – INPUT status (where x = input number)
A ‘1’ is returned if the input is active or enabled, ‘0’
otherwise.
The command “I0” returns the status of ALL inputs. As with the ‘S’ command, a hex byte is returned. Bits 0-3 indicate the status of inputs 1-4. Bits 4-7 are unused and are set to ‘0’.
Eg. “I1” – returns the status of input 1 “I0” – returns the status of ALL inputs
Note the output is in ASCII hex, not ASCII decimal.
A special command, ‘?’, will print the software revision date