comparison code_part1/OSTC_code_asm_part1/menu.asm @ 35:d4f0c097a7fa

preparations for new gaslist
author heinrichsweikamp
date Tue, 25 May 2010 21:42:23 +0200
parents 73014f788032
children 3ab1188651af
comparison
equal deleted inserted replaced
34:5dbdc08e5460 35:d4f0c097a7fa
22 ; last updated: 05/15/80 22 ; last updated: 05/15/80
23 ; known bugs: 23 ; known bugs:
24 ; ToDo: 24 ; ToDo:
25 25
26 wait_switches: 26 wait_switches:
27 ; bsf LEDg
28 movlw d'40'
29 btfss button_delay_done ; Start counting?
30 movlw d'200'
31 movwf switch_timeout
32
33 wait_switches1:
34 WAITMS d'5'
35 btfsc SWITCH2
36 bra wait_switches2 ; Check other switch
37
38 decfsz switch_timeout,F
39 bra wait_switches1
40
41 btfsc SWITCH2
42 bra wait_switches3
43
44 bsf button_delay_done ; Start counting
45 bsf switch_left ; Set button flag
46 bcf switch_right ; only for the other button
47 ; bcf LEDg
48 return
49
50 wait_switches2:
51 btfss SWITCH1
52 bra wait_switches1 ; Wait
53
54 ; Yes, both switches released before timeout...
55 wait_switches3:
56 bcf switch_left 27 bcf switch_left
57 bcf switch_right 28 bcf switch_right
58 bcf button_delay_done 29 return
59 bcf LED_red 30
60 return 31 ; movlw d'40'
61 32 ; btfss button_delay_done ; Start counting?
33 ; movlw d'200'
34 ; movwf switch_timeout
35 ;
36 ;wait_switches1:
37 ; WAITMS d'5'
38 ; btfsc SWITCH2
39 ; bra wait_switches2 ; Check other switch
40 ;
41 ; decfsz switch_timeout,F
42 ; bra wait_switches1
43 ;
44 ; btfsc SWITCH2
45 ; bra wait_switches3
46 ;
47 ; bsf button_delay_done ; Start counting
48 ; bsf switch_left ; Set button flag
49 ; bcf switch_right ; only for the other button
50 ;; bcf LEDg
51 ; return
52 ;
53 ;wait_switches2:
54 ; btfss SWITCH1
55 ; bra wait_switches1 ; Wait
56 ;
57 ; ; Yes, both switches released before timeout...
58 ;wait_switches3:
59 ; bcf switch_left
60 ; bcf switch_right
61 ; bcf button_delay_done
62 ; bcf LED_red
63 ; return
64 ;
62 menu: 65 menu:
63 bcf deco_mode_changed ; Clear flag (Description is only showed once) 66 bcf deco_mode_changed ; Clear flag (Description is only showed once)
64 movlw d'1' 67 movlw d'1'
65 movwf menupos 68 movwf menupos
66 menu2: 69 menu2: