Quote Originally Posted by AvionicsMaster1 View Post
I'm a novice programmer but aren't you supposed to RETURN from a sub then GOTO a different subroutine? Most of your FNDx routines GOTO a sub for a RETURN. The first FND is empty. The blinking LED would tell you if the program is stuck somewhere.

In DIGITCALC won't the variable N always be a negative number? If so PicBasic will always report that as a zero.

Hope it helps and I don't get flamed too much?
His code is messy with no comments and lots of spaces so it does make it hard to follow, but there is a FND start and finish.

Code:
FND8:
IF DIGIT>8 THEN FND9
DG=$7F                       '%0111 1111      
GOTO FNDEND

FND9:
DG=$6F                       '%0110 1111      

FNDEND:
RETURN
Basically the program go's to the subroutine FND, which then contains a lot of IF DIGIT statements and if it is above a value then jump to the next FNDx label, but if it equals that value then set set value for DG and goto FNDEND, which is a simple RETURN and thus closes the subroutine.