This should help you.


Quote Originally Posted by lerameur View Post
a menu selection SUB that will not exit until select button is pressed.
Code:
Selection var PortC.6

Next1 var PortC.7

'/////////////////////////////////////   
'///////  GetModeOfOperation  ////////
'/////////////////////////////////////
GetModeOfOperation:
     while Selection = 0           ' exit when selection becomes 1

	Lookup Op_Mode, [55,65],Operation_Mode
	
	Select Case Operation_Mode
	Case 55 								
		lcdout $FE,1,  " Charger Mode "
	Case 65 								
		lcdout $FE,1,  " Recycle Mode"
	End Select
	
		lcdout $FE,$C0, "Next or Select"
		pause 200
		
		if Next1=1 then Op_Mode = Op_Mode + 1
		if Op_Mode > 1 then Op_Mode = 0
     wend
     Return