Subversion Repositories Kolibri OS

Rev

Rev 6878 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6878 Rev 7295
Line 65... Line 65...
65
        mcall                           ; read and cleared from the system queue.
65
        mcall                           ; read and cleared from the system queue.
Line 66... Line 66...
66
 
66
 
67
        cmp     ah, 'q'
67
        cmp     ah, 'q'
68
        jne     @f
68
        jne     @f
69
        call    read_gpio0
69
        call    read_gpio0
70
        or      al, 1                   ; Set bit 0
70
        or      al, 1 shl 0             ; Set bit 0
71
        call    write_gpio0
71
        call    write_gpio0
72
        jmp     event_wait
72
        jmp     event_wait
73
  @@:
73
  @@:
74
        cmp     ah, 'w'
74
        cmp     ah, 'w'
75
        jne     @f
75
        jne     @f
76
        call    read_gpio0
76
        call    read_gpio0
77
        and     al, not 1               ; Clear bit 0
77
        and     al, not (1 shl 0)       ; Clear bit 0
78
        call    write_gpio0
78
        call    write_gpio0
79
        jmp     event_wait
79
        jmp     event_wait
80
  @@:
80
  @@:
81
        cmp     ah, 'e'
81
        cmp     ah, 'e'
82
        jne     @f
82
        jne     @f
83
        call    read_adc0
83
        call    read_adc0
84
        mov     ecx, eax
84
        mov     ecx, eax
85
        mcall   47, 0x00040100,,25 shl 16 + 25, 0x40000000, 0x00ffffff          ; 4 digits hex number in ecx
85
        mcall   47, 0x00040100,,25 shl 16 + 25, 0x40000000, 0x00ffffff          ; 4 digits hex number in ecx
86
        jmp     event_wait
86
        jmp     event_wait
-
 
87
  @@:
-
 
88
        cmp     ah, 'a'
-
 
89
        jne     @f
-
 
90
        call    read_gpio0
-
 
91
        or      al, 1 shl 2             ; Set bit 2
-
 
92
        call    write_gpio0
-
 
93
        jmp     event_wait
-
 
94
  @@:
-
 
95
        cmp     ah, 's'
-
 
96
        jne     @f
-
 
97
        call    read_gpio0
-
 
98
        and     al, not (1 shl 2)       ; Clear bit 2
-
 
99
        call    write_gpio0
-
 
100
        jmp     event_wait
87
  @@:
101
  @@:
Line 88... Line 102...
88
        jmp     event_wait              ; Just read the key, ignore it and jump to event_wait.
102
        jmp     event_wait              ; Just read the key, ignore it and jump to event_wait.
89
 
103
 
90
button:                                 ; Buttonpress event handler
104
button:                                 ; Buttonpress event handler