Subversion Repositories Kolibri OS

Rev

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

Rev 3908 Rev 4265
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 3908 $
74
$Revision: 4265 $
Line 142... Line 142...
142
                  org   0x0
142
                  org   0x0
143
        jmp     start_of_code
143
        jmp     start_of_code
Line 144... Line 144...
144
 
144
 
145
if lang eq sp
145
if lang eq sp
-
 
146
include "kernelsp.inc"  ; spanish kernel messages
-
 
147
else if lang eq et
146
include "kernelsp.inc"  ; spanish kernel messages
148
version db    'Kolibri OS  versioon 0.7.7.0+    ',13,10,13,10,0
147
else
149
else
148
version db    'Kolibri OS  version 0.7.7.0+     ',13,10,13,10,0
150
version db    'Kolibri OS  version 0.7.7.0+     ',13,10,13,10,0
Line 149... Line 151...
149
end if
151
end if
Line 694... Line 696...
694
        mov     [BgrDataWidth], eax
696
        mov     [BgrDataWidth], eax
695
        mov     [BgrDataHeight], eax
697
        mov     [BgrDataHeight], eax
696
        mov     [mem_BACKGROUND], 4
698
        mov     [mem_BACKGROUND], 4
697
        mov     [img_background], static_background_data
699
        mov     [img_background], static_background_data
Line -... Line 700...
-
 
700
 
-
 
701
; set clipboard
-
 
702
 
-
 
703
        xor     eax, eax
-
 
704
        mov     [clipboard_slots], eax
-
 
705
        mov     [clipboard_write_lock], eax
-
 
706
        stdcall kernel_alloc, 4096
-
 
707
        test    eax, eax
-
 
708
        jnz     @f
-
 
709
 
-
 
710
        dec     eax
-
 
711
@@:
-
 
712
        mov     [clipboard_main_list], eax
698
 
713
 
Line 699... Line 714...
699
; SET UP OS TASK
714
; SET UP OS TASK
700
 
715
 
Line 1091... Line 1106...
1091
        jnz     @F
1106
        jnz     @F
1092
        mov     al, 1                             ; at least one CPU
1107
        mov     al, 1                             ; at least one CPU
1093
@@:
1108
@@:
1094
        DEBUGF  1, "K : %d CPU detected\n", eax
1109
        DEBUGF  1, "K : %d CPU detected\n", eax
Line -... Line 1110...
-
 
1110
 
-
 
1111
include "detect/vortex86.inc"                     ; Vortex86 SoC detection code
1095
 
1112
 
1096
        DEBUGF  1, "K : BAR0 %x \n", [IDE_BAR0_val]:4
1113
        DEBUGF  1, "K : BAR0 %x \n", [IDE_BAR0_val]:4
1097
        DEBUGF  1, "K : BAR1 %x \n", [IDE_BAR1_val]:4
1114
        DEBUGF  1, "K : BAR1 %x \n", [IDE_BAR1_val]:4
1098
        DEBUGF  1, "K : BAR2 %x \n", [IDE_BAR2_val]:4
1115
        DEBUGF  1, "K : BAR2 %x \n", [IDE_BAR2_val]:4
1099
        DEBUGF  1, "K : BAR3 %x \n", [IDE_BAR3_val]:4
1116
        DEBUGF  1, "K : BAR3 %x \n", [IDE_BAR3_val]:4
1100
        DEBUGF  1, "K : BAR4 %x \n", [IDEContrRegsBaseAddr]:4
1117
        DEBUGF  1, "K : BAR4 %x \n", [IDEContrRegsBaseAddr]:4
1101
        DEBUGF  1, "K : IDEContrProgrammingInterface %x \n", [IDEContrProgrammingInterface]:4
1118
        DEBUGF  1, "K : IDEContrProgrammingInterface %x \n", [IDEContrProgrammingInterface]:4
-
 
1119
        DEBUGF  1, "K : IDE_Interrupt %x \n", [IDE_Interrupt]:4
1102
        DEBUGF  1, "K : IDE_Interrupt %x \n", [IDE_Interrupt]:4
1120
 
Line 1103... Line 1121...
1103
; START MULTITASKING
1121
; START MULTITASKING
1104
 
1122
 
1105
; A 'All set - press ESC to start' messages if need
1123
; A 'All set - press ESC to start' messages if need
Line 3246... Line 3264...
3246
 
3264
 
3247
    ; Event mask (+71)
3265
    ; Event mask (+71)
3248
        mov     EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
3266
        mov     EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
Line -... Line 3267...
-
 
3267
        stosd
-
 
3268
 
-
 
3269
    ; Keyboard mode (+75)
-
 
3270
        mov     al, byte [ecx*8 + SLOT_BASE + APPDATA.keyboard_mode]
3249
        stosd
3271
        stosb    
3250
 
3272
 
Line 3251... Line 3273...
3251
        pop     esi
3273
        pop     esi
3252
        pop     edi
3274
        pop     edi
Line 3788... Line 3810...
3788
        cmp     ecx, 1             ; limit for background
3810
        cmp     ecx, 1             ; limit for background
3789
        jz      bgli
3811
        jz      bgli
Line 3790... Line 3812...
3790
 
3812
 
3791
        mov     eax, [edi + WDATA.box.left]
3813
        mov     eax, [edi + WDATA.box.left]
3792
        mov     ebx, [edi + WDATA.box.top]
-
 
3793
        mov     ecx, [edi + WDATA.box.width]
-
 
3794
        mov     edx, [edi + WDATA.box.height]
-
 
3795
        add     ecx, eax
-
 
Line 3796... Line 3814...
3796
        add     edx, ebx
3814
        mov     ebx, [edi + WDATA.box.top]
3797
 
3815
 
3798
        mov     ecx, [draw_limits.bottom] ; ecx = area y end     ebx = window y start
3816
        mov     ecx, [draw_limits.bottom] ; ecx = area y end     ebx = window y start
Line 3890... Line 3908...
3890
        call    wakeup_osloop
3908
        call    wakeup_osloop
3891
;--------------------------------------
3909
;--------------------------------------
3892
align 4
3910
align 4
3893
newdw8:
3911
newdw8:
3894
nobgrd:
3912
nobgrd:
-
 
3913
;--------------------------------------
-
 
3914
        push    eax  edi ebp
-
 
3915
        mov     edi, [esp+12]
-
 
3916
        cmp     edi, 1
-
 
3917
        je      .found
-
 
3918
 
-
 
3919
        mov     eax, [draw_limits.left]
-
 
3920
        mov     ebx, [draw_limits.top]
-
 
3921
        mov     ecx, [draw_limits.right]
-
 
3922
        sub     ecx, eax
-
 
3923
        test    ecx, ecx
-
 
3924
        jz      .not_found
-
 
3925
 
-
 
3926
        mov     edx, [draw_limits.bottom]
-
 
3927
        sub     edx, ebx
-
 
3928
        test    edx, edx
-
 
3929
        jz      .not_found
-
 
3930
 
-
 
3931
; eax - x, ebx - y
-
 
3932
; ecx - size x, edx - size y
-
 
3933
        add     ebx, edx
-
 
3934
;--------------------------------------
-
 
3935
align 4
-
 
3936
.start_y:
-
 
3937
        push    ecx
-
 
3938
;--------------------------------------
-
 
3939
align 4
-
 
3940
.start_x:
-
 
3941
        add     eax, ecx
-
 
3942
        mov     ebp, [d_width_calc_area + ebx*4]
-
 
3943
        add     ebp, [_WinMapAddress]
-
 
3944
        movzx   ebp, byte[eax+ebp] ; get value for current point
-
 
3945
        cmp     ebp, edi
-
 
3946
        jne     @f
-
 
3947
 
-
 
3948
        pop     ecx
-
 
3949
        jmp     .found
-
 
3950
;--------------------------------------
-
 
3951
align 4
-
 
3952
@@:
-
 
3953
        sub     eax, ecx
-
 
3954
 
-
 
3955
        dec     ecx
-
 
3956
        jnz     .start_x
-
 
3957
 
-
 
3958
        pop     ecx
-
 
3959
        dec     ebx
-
 
3960
        dec     edx
-
 
3961
        jnz     .start_y
-
 
3962
;--------------------------------------
-
 
3963
align 4
-
 
3964
.not_found:
-
 
3965
        pop     ebp edi eax
-
 
3966
        jmp     ricino
-
 
3967
;--------------------------------------
-
 
3968
align 4
-
 
3969
.found:
-
 
3970
        pop     ebp edi eax
Line 3895... Line 3971...
3895
 
3971
 
3896
        mov     [eax + WDATA.fl_redraw], byte 1  ; mark as redraw
3972
        mov     [eax + WDATA.fl_redraw], byte 1  ; mark as redraw
3897
;--------------------------------------
3973
;--------------------------------------
3898
align 4
3974
align 4
Line 5509... Line 5585...
5509
        mov     [esp+32], eax
5585
        mov     [esp+32], eax
5510
        ret
5586
        ret
Line 5511... Line 5587...
5511
 
5587
 
5512
align 4
5588
align 4
5513
syscall_threads:                        ; CreateThreads
-
 
5514
; eax=1 create thread
5589
syscall_threads:                        ; CreateThreads
5515
;
5590
;
5516
;   ebx=thread start
5591
;   ecx=thread entry point
5517
;   ecx=thread stack value
5592
;   edx=thread stack pointer
5518
;
5593
;
Line -... Line 5594...
-
 
5594
; on return : eax = pid
5519
; on return : eax = pid
5595
 
Line 5520... Line 5596...
5520
 
5596
        xor     ebx, ebx
5521
        call    new_sys_threads
5597
        call    new_sys_threads