i have another question, how do i had dec values into a single array. My program is having a user press a button and have dec value stored into an array. Everything I try is not working. Here is the code
Unlock:
lcdout $FE, 1, "Please enter 5# Code"
LOOP:
if pos > 5 then
goto Compare
endif
if portb.7 = 0 then
pause 300
lcdout $FE, 1, "Not Valid Number"
goto unlock
endif
if portb.6 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 7
pos = pos + 1
x = x + 1
endif
if portb.5 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 4
pos = pos + 1
x = x + 1
endif
if portb.4 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 1
pos = pos + 1
x = x + 1
endif
if portb.3 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 0
pos = pos + 1
x = x + 1
endif
if portb.2 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 8
pos = pos + 1
x = x + 1
endif
if portb.1 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 5
pos = pos + 1
x = x + 1
endif
if portb.0 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 2
pos = pos + 1
x = x + 1
endif
if portc.0 = 0 then
pause 300
pause 300
lcdout $FE, 1, "Not Valid Number"
goto unlock
endif
if portc.1 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 9
pos = pos + 1
x = x + 1
endif
if portc.2 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 6
pos = pos + 1
x = x + 1
endif
if portc.3 = 0 then
pause 300
lcdout $FE, $C0 + pos, "*"
UserCode[x] = 3
pos = pos + 1
x = x + 1
endif
goto loop
Compare:
PLEASE HELP
Bookmarks