
BEG: MOV A,COUNT1     ; Move LSD to A
    DEC  A            ; Decrement the LSD
    CJNE 0FFh, BEG2   ; Check for underflow
    MOV  COUNT1, #09h ; If underflow, reload with 09 and dec MSD
;
    MOV  A, COUNT2    ; Fetch MSD
    DEC  A            ; Decrement the MSD
    CJNE 0FFh, BEG1   ; Check for underflow
    MOV  A, #09h      ; Reload MSD with 9
BEG1: MOV COUNT2, A   ; Save the MSD
    JP   BEG3         ; Jump to end
BEG2: MOV COUNT1,A    ; Save LSD
BEG3:
