
;Instead of
IF A>=0x03
 SETB GAIN_ERROR
 RET
ENDIF
;I have written
CJNE A, #0x03, INC_A_1
 SETB GAIN_ERROR
 RET
INC_A_1
; I just have to hope that there is no error above 4
;and for
IF A=#0x00
 SETB GAIN_ERROR
 RET
ENDIF
; I made a simple JZ opperation
JZ ERR

