lockjawz
- 14th April 2011, 14:06
I dont have much time to do this project and i tried to program my chip the easy way(but very long). I cant do it this way because i my code size is to big. If there is any way of doing this a easier smaller way please let me know.
I have a main loop for hours mins and seconds for chaning my time and then sub loops like 1s digits and 10s for the hour this takes way too much space.
loopa is the counting loop
loophour:
if num0=0 then
hour=0
for i=0 to 20
pause 1
next i
goto loophour1s
endif
if num1=0 then
hour=1
for i=0 to 20
pause 1
next i
goto loophour10s
endif
if numstar=0 then
for i=0 to 20
pause 1
next i
goto loopa
else
goto loophour10s
endif
loophours10s:
if num0=0 then
hour=10
for i=0 to 20
pause 1
next i
goto loopmins
endif
if num1=0 then
hour=11
for i=0 to 20
pause 1
next i
goto loopmins
endif
if numstar=0 then
for i=0 to 20
pause 1
next i
goto loopa
else
goto loophour10s
endif
I have a main loop for hours mins and seconds for chaning my time and then sub loops like 1s digits and 10s for the hour this takes way too much space.
loopa is the counting loop
loophour:
if num0=0 then
hour=0
for i=0 to 20
pause 1
next i
goto loophour1s
endif
if num1=0 then
hour=1
for i=0 to 20
pause 1
next i
goto loophour10s
endif
if numstar=0 then
for i=0 to 20
pause 1
next i
goto loopa
else
goto loophour10s
endif
loophours10s:
if num0=0 then
hour=10
for i=0 to 20
pause 1
next i
goto loopmins
endif
if num1=0 then
hour=11
for i=0 to 20
pause 1
next i
goto loopmins
endif
if numstar=0 then
for i=0 to 20
pause 1
next i
goto loopa
else
goto loophour10s
endif