Subversion Repositories Kolibri OS

Rev

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

Rev 3688 Rev 3690
Line 219... Line 219...
219
        set     'p', pointer
219
        set     'p', pointer
220
        set     's', string
220
        set     's', string
221
        set     'u', unsigned
221
        set     'u', unsigned
222
purge set
222
purge set
223
align 4
223
align 4
-
 
224
con.charjump:
224
con.charjump    dd      con_printf.normal
225
        dd      con_printf.normal
225
        dd      con_printf.percent
226
        dd      con_printf.percent
226
        dd      con_printf.dot
227
        dd      con_printf.dot
227
        dd      con_printf.asterisk
228
        dd      con_printf.asterisk
228
        dd      con_printf.zero
229
        dd      con_printf.zero
229
        dd      con_printf.digit
230
        dd      con_printf.digit
Line 292... Line 293...
292
        cmp     al, ' '
293
        cmp     al, ' '
293
        jb      .normal
294
        jb      .normal
294
        cmp     al, 'x'
295
        cmp     al, 'x'
295
        ja      .normal
296
        ja      .normal
296
        movzx   ecx, byte [con.charcodes + eax - ' ']
297
        movzx   ecx, byte [con.charcodes + eax - ' ']
297
        jmp     [con.charjump + ecx*4]
298
        jmp     dword[con.charjump + ecx*4]
Line 298... Line 299...
298
 
299
 
299
.sharp:
300
.sharp:
300
        test    bl, bl
301
        test    bl, bl
301
        jnz     .errspec
302
        jnz     .errspec
Line 699... Line 700...
699
        test    byte [con_flags+1], 1
700
        test    byte [con_flags+1], 1
700
        jz      con.write_special_char
701
        jz      con.write_special_char
Line 701... Line 702...
701
 
702
 
702
con.write_char:
703
con.write_char:
703
        push    eax
-
 
704
        stosb
-
 
705
        mov     al, byte [con_flags]
704
        push    eax
706
        stosb
705
 
707
        mov     eax, [con.cur_x]
-
 
708
        inc     eax
-
 
709
        mov     [con.cur_x], eax
706
        mov     eax, [con.cur_x]
710
        cmp     eax, [con.scr_width]
707
        cmp     eax, [con.scr_width]
711
        jb      @f
708
        jb      @f
712
        and     [con.cur_x], 0
709
        and     [con.cur_x], 0
713
        call    con.newline
710
        call    con.newline
-
 
711
@@:
-
 
712
        mov     eax, [esp]
-
 
713
        stosb
-
 
714
        mov     al, byte [con_flags]
-
 
715
        stosb
-
 
716
 
-
 
717
        mov     eax, [con.cur_x]
-
 
718
        inc     eax
-
 
719
        mov     [con.cur_x], eax
714
@@:
720
 
715
        pop     eax
721
        pop     eax
Line 716... Line 722...
716
        ret
722
        ret
717
 
723
 
Line 917... Line 923...
917
        jz      .attr_bold
923
        jz      .attr_bold
918
        cmp     al, 5
924
        cmp     al, 5
919
        jz      .attr_bgr_bold
925
        jz      .attr_bgr_bold
920
        cmp     al, 7
926
        cmp     al, 7
921
        jz      .attr_reversed
927
        jz      .attr_reversed
-
 
928
 
922
        xor     edx, edx
929
        xor     edx, edx
923
        cmp     al, 30
930
        cmp     al, 30
924
        jz      .attr_color
931
        jz      .attr_color
925
        mov     dl, 4
932
        mov     dl, 4
926
        cmp     al, 31
933
        cmp     al, 31
Line 941... Line 948...
941
        cmp     al, 36
948
        cmp     al, 36
942
        jz      .attr_color
949
        jz      .attr_color
943
        mov     dl, 7
950
        mov     dl, 7
944
        cmp     al, 37
951
        cmp     al, 37
945
        jz      .attr_color
952
        jz      .attr_color
-
 
953
 
946
        xor     edx, edx
954
        xor     edx, edx
947
        cmp     al, 40
955
        cmp     al, 40
948
        jz      .attr_bgr_color
956
        jz      .attr_bgr_color
949
        mov     dl, 0x40
957
        mov     dl, 0x40
950
        cmp     al, 41
958
        cmp     al, 41
Line 964... Line 972...
964
        mov     dl, 0x30
972
        mov     dl, 0x30
965
        cmp     al, 46
973
        cmp     al, 46
966
        jz      .attr_bgr_color
974
        jz      .attr_bgr_color
967
        mov     dl, 0x70
975
        mov     dl, 0x70
968
        cmp     al, 47
976
        cmp     al, 47
-
 
977
        jz      .attr_bgr_color
-
 
978
 
-
 
979
        mov     dl, 0x08
-
 
980
        cmp     al, 100
-
 
981
        jz      .attr_color
-
 
982
        mov     dl, 4 + 8
-
 
983
        cmp     al, 101
-
 
984
        jz      .attr_color
-
 
985
        mov     dl, 2 + 8
-
 
986
        cmp     al, 102
-
 
987
        jz      .attr_color
-
 
988
        mov     dl, 6 + 8
-
 
989
        cmp     al, 103
-
 
990
        jz      .attr_color
-
 
991
        mov     dl, 1 + 8
-
 
992
        cmp     al, 104
-
 
993
        jz      .attr_color
-
 
994
        mov     dl, 5 + 8
-
 
995
        cmp     al, 105
-
 
996
        jz      .attr_color
-
 
997
        mov     dl, 3 + 8
-
 
998
        cmp     al, 106
-
 
999
        jz      .attr_color
-
 
1000
        mov     dl, 7 + 8
-
 
1001
        cmp     al, 107
-
 
1002
        jz      .attr_color
-
 
1003
 
-
 
1004
        mov     dl, 0x80
-
 
1005
        cmp     al, 100
-
 
1006
        jz      .attr_bgr_color
-
 
1007
        mov     dl, 0x80 + 0x40
-
 
1008
        cmp     al, 101
-
 
1009
        jz      .attr_bgr_color
-
 
1010
        mov     dl, 0x80 + 0x20
-
 
1011
        cmp     al, 102
-
 
1012
        jz      .attr_bgr_color
-
 
1013
        mov     dl, 0x80 + 0x60
-
 
1014
        cmp     al, 103
-
 
1015
        jz      .attr_bgr_color
-
 
1016
        mov     dl, 0x80 + 0x10
-
 
1017
        cmp     al, 104
-
 
1018
        jz      .attr_bgr_color
-
 
1019
        mov     dl, 0x80 + 0x50
-
 
1020
        cmp     al, 105
-
 
1021
        jz      .attr_bgr_color
-
 
1022
        mov     dl, 0x80 + 0x30
-
 
1023
        cmp     al, 106
-
 
1024
        jz      .attr_bgr_color
-
 
1025
        mov     dl, 0x80 + 0x70
-
 
1026
        cmp     al, 107
969
        jnz     .attr_continue
1027
        jnz     .attr_continue
-
 
1028
 
970
.attr_bgr_color:
1029
.attr_bgr_color:
971
        mov     eax, [con_flags]
1030
        mov     eax, [con_flags]
972
        and     al, 0x8F
1031
        and     al, 0x0F
973
        or      al, dl
1032
        or      al, dl
974
        mov     [con_flags], eax
1033
        mov     [con_flags], eax
975
        jmp     .attr_continue
1034
        jmp     .attr_continue
976
.attr_color:
1035
.attr_color:
977
        mov     eax, [con_flags]
1036
        mov     eax, [con_flags]
978
        and     al, 0xF8
1037
        and     al, 0xF0
979
        or      al, dl
1038
        or      al, dl
980
        mov     [con_flags], eax
1039
        mov     [con_flags], eax
981
        jmp     .attr_continue
1040
        jmp     .attr_continue
982
.attr_normal:
1041
.attr_normal:
983
        mov     byte [con_flags], 7
1042
        mov     byte [con_flags], 7