;Begin
R0L EQU 0xC
R0H EQU 0xD
R1L EQU 0xE
R1H EQU 0xF
R2L EQU 0x10
R2H EQU 0x11
R3L EQU 0x12
R3H EQU 0x13
R4L EQU 0x14
R4H EQU 0x15
R5L EQU 0x16
R5H EQU 0x17
TRISA = 16
TRISB = 192
Dim a(7) As Byte
Dim b As Byte
Dim n As Byte
Dim x As Byte
Dim y As Byte
RA = 0
RB = 0
a(5) = 2
a(6) = 1
start:
b = b + 1
If b = 2 Then
a(1) = a(1) + 1
b = 0
Endif
If a(1) = 10 Then
a(2) = a(2) + 1
(1) = 0
Endif
If a(2) = 6 Then
a(3) = a(3) + 1
a(2) = 0
Endif
If a(3) = 10 Then
a(4) = a(4) + 1
a(3) = 0
Endif
If a(4) = 6 Then
a(5) = a(5) + 1
a(4) = 0
Endif
If a(5) = 10 Then
a(6) = 1
a(5) = 0
Endif
If a(6) = 1 Then
If a(5) = 3 Then
a(6) = 0
a(5) = 1
Endif
Endif
For x = 1 To 6
RA = a(x)
RB = x
If x = 3 Then
RB = 4
Endif
If x = 4 Then
RB = 8
Endif
If x = 5 Then
RB = 16
Endif
If x = 6 Then
RB = 32
Endif
WaitMs 30
Next x
If RA.4 = 0 Then
j1:
If RA.4 = 1 Then
Goto select_time
Else
Goto j1
Endif
Endif
Goto start
End
compare:
If a(1) = 10 Then
a(1) = 0
Endif
If a(2) = 6 Then
a(2) = 0
Endif
If a(3) = 10 Then
a(3) = 0
Endif
If a(4) = 6 Then
a(4) = 0
Endif
If a(5) = 10 Then
a(5) = 0
Endif
If a(6) = 1 Then
If a(5) = 3 Then
a(5) = 1
Endif
Endif
If a(6) > 1 Then
a(6) = 0
Endif
Return
ok:
If RA.4 = 0 Then
j4:
If RA.4 = 1 Then
Goto start
Else
Goto j4
Endif
Endif
Return
select_time:
If RB.6 = 0 Then
j2:
If RB.6 = 1 Then
x = x + 1
If x > 6 Then
x = 1
Endif
n = x
If x = 3 Then
n = 4
Endif
If x = 4 Then
n = 8
Endif
If x = 5 Then
n = 16
Endif
If x = 6 Then
n = 32
Endif
RA = a(x)
RB = n
Else
Goto j2
Endif
Endif
If RB.7 = 0 Then
Goto change
Endif
Gosub ok
Goto select_time
Return
change:
If RB.7 = 0 Then
j3:
If RB.7 = 1 Then
a(x) = a(x) + 1
Gosub compare
RA = a(x)
Else
Goto j3
Endif
Endif
If RB.6 = 0 Then
Gosub select_time
Endif
Gosub ok
Goto change
;End of program
END
I'm convinced it's not source code that the OP has written, nor a schematic of their creation.
It's a clock project they found on the Internet, and now they want us to decipher the poorly written and abysmally documented source code, and convert it into a timer for them.
I don't see how they will learn anything with such an approach.