Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6878 → Rev 7295

/programs/demos/gpio/gpio.asm
67,7 → 67,7
cmp ah, 'q'
jne @f
call read_gpio0
or al, 1 ; Set bit 0
or al, 1 shl 0 ; Set bit 0
call write_gpio0
jmp event_wait
@@:
74,7 → 74,7
cmp ah, 'w'
jne @f
call read_gpio0
and al, not 1 ; Clear bit 0
and al, not (1 shl 0) ; Clear bit 0
call write_gpio0
jmp event_wait
@@:
85,6 → 85,20
mcall 47, 0x00040100,,25 shl 16 + 25, 0x40000000, 0x00ffffff ; 4 digits hex number in ecx
jmp event_wait
@@:
cmp ah, 'a'
jne @f
call read_gpio0
or al, 1 shl 2 ; Set bit 2
call write_gpio0
jmp event_wait
@@:
cmp ah, 's'
jne @f
call read_gpio0
and al, not (1 shl 2) ; Clear bit 2
call write_gpio0
jmp event_wait
@@:
jmp event_wait ; Just read the key, ignore it and jump to event_wait.
button: ; Buttonpress event handler