
MOV A, SBUF         ; Get the received byte
MOV C, RB8          ; Get the received parity
CPL C               ; Complement the carry to get odd parity
JC  TST_PAR1        ; If the Carry is set, check if the Parity flag is also set
JNB P, PARITY_OK    ; Else check if Parity flag is clear. If so, jump to PARITY_OK
JMP PARITY_NOK      ; If not, jump to PARITY_NOK

TST_PAR1:
JB  P, PARITY_OK
JMP PARITY_NOK
