Subversion Repositories Kolibri OS

Rev

Rev 997 | Rev 9014 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 997 Rev 8984
Line 39... Line 39...
39
@@:
39
@@:
40
        pushad
40
        pushad
41
; message loop
41
; message loop
42
.event:
42
.event:
43
;        call    get_event
43
;        call    get_event
44
        push    10
44
        push    SF_WAIT_EVENT
45
        pop     eax
45
        pop     eax
46
        int     40h
46
        int     40h
47
        dec     eax
47
        dec     eax
48
        jz      .redraw
48
        jz      .redraw
49
        dec     eax
49
        dec     eax
50
        jz      .key
50
        jz      .key
-
 
51
        sub     eax,4
-
 
52
        jz      .event ;todo: mouse
51
        jmp     exit
53
        jmp     exit
52
.redraw:
54
.redraw:
53
        call    draw_window
55
        call    draw_window
54
        jmp     .event
56
        jmp     .event
55
.key:
57
.key:
56
        mov     al, 2
58
        mov     al, SF_GET_KEY
57
        int     40h
59
        int     40h
58
        shr     eax, 8
60
        shr     eax, 8
59
        cmp     al, 0xE0
61
        cmp     al, 0xE0
60
        jnz     @f
62
        jnz     @f
61
        mov     [bWasE0], 1
63
        mov     [bWasE0], 1
Line 942... Line 944...
942
        jnz     @f
944
        jnz     @f
943
        cmp     word [eax+9], 'cd'
945
        cmp     word [eax+9], 'cd'
944
        jnz     @f
946
        jnz     @f
945
        movzx   ecx, byte [eax+11]
947
        movzx   ecx, byte [eax+11]
946
        sub     ecx, '0'
948
        sub     ecx, '0'
947
        push    24
949
        push    SF_CD
948
        pop     eax
950
        pop     eax
949
        mov     ebx, edx
951
        mov     ebx, edx
950
        int     40h
952
        int     40h
951
@@:
953
@@:
952
        xor     eax, eax
954
        xor     eax, eax
Line 1089... Line 1091...
1089
        mov     al, [ctrlstate]
1091
        mov     al, [ctrlstate]
1090
        and     al, 3
1092
        and     al, 3
1091
        xor     ecx, ecx
1093
        xor     ecx, ecx
1092
        cmp     al, 1
1094
        cmp     al, 1
1093
        sbb     ecx, -2
1095
        sbb     ecx, -2
1094
        push    26
1096
        push    SF_SYSTEM_GET
1095
        pop     eax
1097
        pop     eax
1096
        push    2
1098
        push    SSF_KEYBOARD_LAYOUT
1097
        pop     ebx
1099
        pop     ebx
1098
        mov     edx, layout
1100
        mov     edx, layout
1099
        int     0x40
1101
        int     0x40
1100
        popad
1102
        popad
1101
; translate scancode to ASCII
1103
; translate scancode to ASCII