Subversion Repositories Kolibri OS

Rev

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

Rev 1313 Rev 1316
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 1313 $
8
$Revision: 1316 $
9
 
9
 
10
 
10
 
Line 30... Line 30...
30
virtual at 0
30
virtual at 0
31
  BI BITMAPINFOHEADER
31
  BI BITMAPINFOHEADER
32
end virtual
32
end virtual
Line 33... Line 33...
33
 
33
 
34
align 4
34
align 4
35
proc vesa_init_cursor stdcall, dst:dword, src:dword
35
proc init_cursor stdcall, dst:dword, src:dword
36
           locals
36
           locals
37
             rBase    dd ?
37
             rBase    dd ?
38
             pQuad    dd ?
38
             pQuad    dd ?
39
             pBits    dd ?
39
             pBits    dd ?
Line 288... Line 288...
288
; param
288
; param
289
;  eax= pid
289
;  eax= pid
290
;  ebx= src
290
;  ebx= src
291
;  ecx= flags
291
;  ecx= flags
Line 292... Line 292...
292
 
292
 
293
vesa_cursor:
293
create_cursor:
294
.src     equ esp
294
.src     equ esp
295
.flags   equ esp+4
295
.flags   equ esp+4
Line 296... Line 296...
296
.hcursor equ esp+8
296
.hcursor equ esp+8
Line 328... Line 328...
328
           movzx ecx, word [esi+10]
328
           movzx ecx, word [esi+10]
329
           movzx edx, word [esi+12]
329
           movzx edx, word [esi+12]
330
           mov [edi+CURSOR.hot_x], ecx
330
           mov [edi+CURSOR.hot_x], ecx
331
           mov [edi+CURSOR.hot_y], edx
331
           mov [edi+CURSOR.hot_y], edx
Line 332... Line 332...
332
 
332
 
-
 
333
           stdcall init_cursor, eax, esi
-
 
334
 
-
 
335
           mov eax, [.hcursor]
-
 
336
           lea eax, [eax+CURSOR.list_next]
-
 
337
           lea edx, [_display.cr_list.next]
-
 
338
 
-
 
339
           pushfd
-
 
340
           cli
-
 
341
           mov ecx, [edx]
-
 
342
 
-
 
343
           mov [eax], ecx
-
 
344
           mov [eax+4], edx
-
 
345
 
-
 
346
           mov [ecx+4], eax
-
 
347
           mov [edx], eax
-
 
348
           popfd
-
 
349
 
-
 
350
           mov eax, [.hcursor]
-
 
351
.check_hw:
-
 
352
           cmp [_display.init_cursor], 0
-
 
353
           je .fail
-
 
354
 
-
 
355
           push eax
-
 
356
           call [_display.init_cursor]
-
 
357
           add esp, 4
333
           stdcall vesa_init_cursor, eax, esi
358
 
334
           mov eax, [.hcursor]
359
           mov eax, [.hcursor]
335
.fail:
360
.fail:
336
           add esp, 12
361
           add esp, 12
337
           ret
362
           ret
Line 344... Line 369...
344
 
369
 
345
           xchg edi, eax
370
           xchg edi, eax
346
           mov ecx, 1024
371
           mov ecx, 1024
347
           cld
372
           cld
348
           rep movsd
373
           rep movsd
349
           add esp, 12
-
 
Line 350... Line 374...
350
           ret
374
           jmp .check_hw
351
 
375
 
352
align 4
376
align 4
353
proc load_cursor stdcall, src:dword, flags:dword
377
proc load_cursor stdcall, src:dword, flags:dword
Line 375... Line 399...
375
           mov eax, [CURRENT_TASK]
399
           mov eax, [CURRENT_TASK]
376
           shl eax, 5
400
           shl eax, 5
377
           mov eax, [CURRENT_TASK+eax+4]
401
           mov eax, [CURRENT_TASK+eax+4]
378
           mov ebx, [src]
402
           mov ebx, [src]
379
           mov ecx, [flags]
403
           mov ecx, [flags]
380
           call [create_cursor]    ;eax, ebx, ecx
404
           call create_cursor    ;eax, ebx, ecx
381
           mov [handle], eax
405
           mov [handle], eax
Line 382... Line 406...
382
 
406
 
383
           cmp word [flags], LOAD_FROM_FILE
407
           cmp word [flags], LOAD_FROM_FILE
384
           jne .exit
408
           jne .exit
Line 405... Line 429...
405
           endl
429
           endl
Line 406... Line 430...
406
 
430
 
407
           mov esi, [hcursor]
431
           mov esi, [hcursor]
408
           cmp [esi+CURSOR.magic], 'CURS'
432
           cmp [esi+CURSOR.magic], 'CURS'
409
           jne .fail
-
 
410
;           cmp [esi+CURSOR.size], CURSOR_SIZE
-
 
Line 411... Line 433...
411
;           jne .fail
433
           jne .fail
412
 
434
 
413
           mov ebx, [CURRENT_TASK]
435
           mov ebx, [CURRENT_TASK]
414
           shl ebx, 5
436
           shl ebx, 5
Line 441... Line 463...
441
           call destroy_kernel_object
463
           call destroy_kernel_object
442
           ret
464
           ret
Line 443... Line 465...
443
 
465
 
444
align 4
466
align 4
445
select_cursor:
-
 
-
 
467
select_cursor:
-
 
468
           mov eax, [esp+4]
446
 
469
           mov [_display.cursor], eax
Line 447... Line 470...
447
           ret 4
470
           ret 4
448
 
-
 
449
align 4
-
 
450
proc init_cursors
-
 
451
 
-
 
452
           cmp [SCR_MODE],word 0x13
-
 
453
           jbe .fail
-
 
454
 
-
 
455
           test word [SCR_MODE], 0x4000
-
 
456
           jz .fail
-
 
457
 
-
 
458
           movzx eax, byte [ScreenBPP]
-
 
459
           mov ebx, [BytesPerScanLine]
-
 
460
           cmp eax, 32
-
 
461
           jne @F
-
 
462
           sub ebx, 128
-
 
463
           jmp .init
-
 
464
@@:
-
 
465
           cmp eax, 24
-
 
466
           jne .fail
-
 
467
           sub ebx, 96
-
 
468
.init:
-
 
469
           mov [cur_def_interl], ebx
-
 
470
 
-
 
471
           stdcall load_driver, szHwMouse
-
 
472
           mov [hw_cursor], eax
-
 
473
           test eax, eax
-
 
474
           jz .sw_mouse
-
 
475
 
-
 
476
           stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
-
 
477
           mov [def_cursor], eax
-
 
478
           ret
-
 
479
.sw_mouse:
-
 
480
           mov [create_cursor], vesa_cursor
-
 
481
 
-
 
482
           stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
-
 
483
           mov [def_cursor], eax
-
 
484
 
-
 
485
           mov ecx, [Screen_Max_X]
-
 
486
           mov edx, [Screen_Max_Y]
-
 
487
           inc ecx
-
 
488
           inc edx
-
 
489
           mov [scr_width], ecx
-
 
490
           mov [scr_height], edx
-
 
491
 
-
 
492
           movzx ebx, byte [ScreenBPP]
-
 
493
           cmp ebx, 32
-
 
494
           jne @F
-
 
495
 
-
 
496
 
-
 
497
           mov dword [select_hw_cursor], select_cursor
-
 
498
           mov dword [set_hw_cursor], cursor_32
-
 
499
           mov dword [hw_restore], restore_32
-
 
500
           ret
-
 
501
@@:
-
 
502
           mov dword [select_hw_cursor], select_cursor
-
 
503
           mov dword [set_hw_cursor], cursor_24
-
 
504
           mov dword [hw_restore], restore_24
-
 
505
           ret
-
 
506
.fail:
-
 
507
           xor eax, eax
-
 
508
           mov dword [select_hw_cursor], eax
-
 
509
           mov dword [set_hw_cursor], eax
-
 
510
           mov dword [hw_restore], eax
-
 
511
           ret
-
 
512
endp
-
 
513
 
471
 
514
align 4
-
 
515
proc restore_24 stdcall, x:dword, y:dword
-
 
516
           locals
-
 
Line 517... Line 472...
517
             w  dd ?
472
align 4
-
 
473
proc restore_24 stdcall, x:dword, y:dword
518
           endl
474
 
519
 
475
           push ebx
520
           mov edi, [cur_saved_base]
476
 
521
           mov edx, [cur_saved_h]
477
           mov ebx, [cur_saved_base]
Line -... Line 478...
-
 
478
           mov edx, [cur.h]
-
 
479
           test edx, edx
-
 
480
           jz  .ret
522
           mov ebx, [cur_saved_interl]
481
 
523
           test edx, edx
-
 
524
           jz  .ret
482
           push esi
525
 
483
           push edi
-
 
484
 
-
 
485
           mov esi, cur_saved_data
-
 
486
           mov ecx, [cur.w]
-
 
487
           lea ecx, [ecx+ecx*2]
-
 
488
           push ecx
-
 
489
@@:
526
           mov esi, cur_saved_data
490
           mov edi, ebx
527
@@:
-
 
528
           mov ecx, [cur_saved_w]
491
           add ebx, [BytesPerScanLine]
529
           lea ecx, [ecx+ecx*2]
492
 
-
 
493
           mov ecx, [esp]
-
 
494
           rep movsb
-
 
495
           dec edx
-
 
496
           jnz @B
530
           rep movsb
497
 
-
 
498
           pop ecx
531
           add edi, ebx
499
           pop edi
532
           dec edx
500
           pop esi
Line 533... Line 501...
533
           jnz @B
501
.ret:
534
.ret:
502
           pop ebx
535
           ret
-
 
536
endp
-
 
537
 
-
 
Line 538... Line 503...
538
align 4
503
           ret
-
 
504
endp
539
proc restore_32 stdcall, x:dword, y:dword
505
 
540
           locals
506
align 4
541
             w  dd ?
507
proc restore_32 stdcall, x:dword, y:dword
542
           endl
508
 
Line -... Line 509...
-
 
509
           push ebx
-
 
510
 
-
 
511
           mov ebx, [cur_saved_base]
543
 
512
           mov edx, [cur.h]
544
           mov edi, [cur_saved_base]
513
           test edx, edx
-
 
514
           jz  .ret
-
 
515
 
-
 
516
           push esi
545
           mov edx, [cur_saved_h]
517
           push edi
546
           mov ebx, [cur_saved_interl]
518
 
547
           test edx, edx
-
 
548
           jz  .ret
519
           mov esi, cur_saved_data
549
 
520
@@:
-
 
521
           mov edi, ebx
-
 
522
           add ebx, [BytesPerScanLine]
550
           mov esi, cur_saved_data
523
 
-
 
524
           mov ecx, [cur.w]
-
 
525
           rep movsd
551
@@:
526
           dec edx
552
           mov ecx, [cur_saved_w]
527
           jnz @B
Line 553... Line 528...
553
           rep movsd
528
 
554
           add edi, ebx
529
           pop edi
555
           dec edx
530
.ret:
556
           jnz @B
-
 
557
.ret:
531
           pop esi
558
           ret
-
 
559
endp
532
           pop ebx
560
 
533
           ret
561
align 4
534
endp
Line 562... Line 535...
562
proc cursor_24 stdcall, hcursor:dword, x:dword, y:dword
535
 
Line 573... Line 546...
573
           mov eax, [y]
546
           mov eax, [y]
574
           mov ebx, [BytesPerScanLine]
547
           mov ebx, [BytesPerScanLine]
Line 575... Line 548...
575
 
548
 
576
           xor edx, edx
549
           xor edx, edx
-
 
550
           sub ecx, [esi+CURSOR.hot_x]
577
           sub ecx, [esi+CURSOR.hot_x]
551
           lea ebx, [ecx+32-1]
578
           mov [x], ecx
552
           mov [x], ecx
579
           sets dl
553
           sets dl
580
           dec edx
554
           dec edx
-
 
555
           and ecx, edx       ;clip x to 0<=x
581
           and ecx, edx       ;clip x to 0<=x
556
           mov [cur.left], ecx
582
           mov edi, ecx
557
           mov edi, ecx
583
           sub edi, [x]
558
           sub edi, [x]
Line 584... Line 559...
584
           mov [_dx], edi
559
           mov [_dx], edi
585
 
560
 
-
 
561
           xor edx, edx
586
           xor edx, edx
562
           sub eax, [esi+CURSOR.hot_y]
587
           sub eax, [esi+CURSOR.hot_y]
563
           lea edi, [eax+32-1]
588
           mov [y], eax
564
           mov [y], eax
589
           sets dl
565
           sets dl
-
 
566
           dec edx
590
           dec edx
567
           and eax, edx       ;clip y to 0<=y
591
           and eax, edx       ;clip y to 0<=y
568
           mov [cur.top], eax
592
           mov edi, eax
569
           mov edx, eax
Line 593... Line -...
593
           sub edi, [y]
-
 
594
           mov [_dy], edi
570
           sub edx, [y]
595
 
571
           mov [_dy], edx
596
           mul ebx
572
 
597
           lea esi, [ecx+ecx*2]
573
           mul dword [BytesPerScanLine]
598
           add esi, [LFBAddress]
-
 
599
           add esi, eax
-
 
600
           mov [cur_saved_base],esi
-
 
601
 
-
 
602
           mov edi, [scr_width]
-
 
603
           mov edx, [scr_height]
-
 
604
           mov eax, 32
-
 
605
 
-
 
606
           sub edi, ecx
-
 
607
           cmp edi, eax
-
 
608
           jng @F
-
 
Line -... Line 574...
-
 
574
           lea edx, [LFB_BASE+ecx*3]
609
           mov edi, eax
575
           add edx, eax
-
 
576
           mov [cur_saved_base],edx
-
 
577
 
610
@@:
578
           cmp ebx, [Screen_Max_X]
611
           sub edi, [_dx]
579
           jbe @F
612
 
580
           mov ebx, [Screen_Max_X]
613
           sub edx, [y]
581
@@:
-
 
582
           cmp edi, [Screen_Max_Y]
614
           cmp edx, eax
583
           jbe @F
Line 615... Line 584...
615
           jng @F
584
           mov edi, [Screen_Max_Y]
616
           mov edx, eax
585
@@:
617
@@:
-
 
618
           sub edx, [_dy]
-
 
619
 
-
 
620
           mov [w], edi
586
           mov [cur.right],  ebx
621
           mov [h], edx
-
 
622
           mov [cur_saved_w], edi
-
 
623
           mov [cur_saved_h], edx
587
           mov [cur.bottom], edi
624
 
-
 
Line -... Line 588...
-
 
588
 
-
 
589
           sub ebx, [x]
-
 
590
           sub edi, [y]
-
 
591
           inc ebx
-
 
592
           inc edi
625
           sub eax, edi
593
 
626
           shl eax, 2       ;lea eax, [eax+eax*2]
594
           mov [cur.w], ebx
-
 
595
           mov [cur.h], edi
-
 
596
           mov [h], edi
627
           lea edi, [edi+edi*2]
597
 
628
           sub ebx, edi
598
           mov eax, edi
629
           mov [cur_saved_interl], ebx
599
           mov edi, cur_saved_data
630
 
-
 
631
           mov edi, cur_saved_data
600
@@:
632
@@:
601
           mov esi, edx
Line 633... Line 602...
633
           mov ecx, [w]
602
           add edx, [BytesPerScanLine]
634
           lea ecx, [ecx+ecx*2]
-
 
635
           rep movsb
603
           mov ecx, [cur.w]
636
           add esi, ebx
604
           lea ecx, [ecx+ecx*2]
637
           dec edx
605
           rep movsb
638
           jnz @B
606
           dec eax
639
 
-
 
Line 640... Line 607...
640
;draw cursor
607
           jnz @B
641
           mov edx, eax
608
 
642
           mov edi, [cur_saved_base]
609
;draw cursor
643
           mov eax, [_dy]
610
           mov ebx, [cur_saved_base]
644
           shl eax, 5
611
           mov eax, [_dy]
-
 
612
           shl eax, 5
-
 
613
           add eax, [_dx]
-
 
614
 
-
 
615
           mov esi, [hcursor]
645
           add eax, [_dx]
616
           mov esi, [esi+CURSOR.base]
646
           shl eax, 2
617
           lea edx, [esi+eax*4]
647
 
618
.row:
648
           mov esi, [hcursor]
619
           mov ecx, [cur.w]
649
           mov esi, [esi+CURSOR.base]
-
 
650
           add esi, eax
620
           mov esi, edx
651
.row:
621
           mov edi, ebx
652
           mov ecx, [w]
622
           add edx, 32*4
653
.pix:
623
           add ebx, [BytesPerScanLine]
654
           lodsd
624
.pix:
655
           test eax, 0xFF000000
625
           lodsd
656
           jz @F
626
           test eax, 0xFF000000
Line 657... Line -...
657
 
-
 
658
           mov word [edi], ax
-
 
659
           shr eax, 16
627
           jz @F
660
           mov [edi+2],al
628
           mov [edi], ax
661
@@:
629
           shr eax, 16
662
           add edi, 3
630
           mov [edi+2],al
Line -... Line 631...
-
 
631
@@:
663
           dec ecx
632
           add edi, 3
664
           jnz .pix
633
           dec ecx
665
 
634
           jnz .pix
666
           add esi, edx
-
 
667
           add edi, ebx
635
 
668
           dec [h]
-
 
669
           jnz .row
636
           dec [h]
670
           ret
637
           jnz .row
671
endp
638
           ret
Line 672... Line 639...
672
 
639
endp
673
align 4
640
 
674
proc cursor_32 stdcall, hcursor:dword, x:dword, y:dword
641
 
675
           locals
-
 
Line 676... Line 642...
676
             w      dd ?
642
align 4
677
             h      dd ?
643
proc move_cursor_32 stdcall, hcursor:dword, x:dword, y:dword
-
 
644
           locals
678
             st     dd ?
645
             h      dd ?
679
             _dx     dd ?
646
             _dx     dd ?
680
             _dy     dd ?
647
             _dy     dd ?
681
           endl
648
           endl
-
 
649
 
682
 
650
           mov esi, [hcursor]
683
           mov esi, [hcursor]
651
           mov ecx, [x]
684
           mov ecx, [x]
652
           mov eax, [y]
Line 685... Line 653...
685
           mov eax, [y]
653
 
686
           mov ebx, [BytesPerScanLine]
654
           xor edx, edx
-
 
655
           sub ecx, [esi+CURSOR.hot_x]
687
 
656
           lea ebx, [ecx+32-1]
688
           xor edx, edx
657
           mov [x], ecx
689
           sub ecx, [esi+CURSOR.hot_x]
658
           sets dl
690
           mov [x], ecx
659
           dec edx
-
 
660
           and ecx, edx       ;clip x to 0<=x
691
           sets dl
661
           mov [cur.left], ecx
692
           dec edx
662
           mov edi, ecx
693
           and ecx, edx       ;clip x to 0<=x
663
           sub edi, [x]
Line 694... Line 664...
694
           mov edi, ecx
664
           mov [_dx], edi
695
           sub edi, [x]
665
 
696
           mov [_dx], edi
-
 
697
 
666
           xor edx, edx
698
           xor edx, edx
-
 
699
           sub eax, [esi+CURSOR.hot_y]
-
 
700
           mov [y], eax
-
 
701
           sets dl
-
 
702
           dec edx
-
 
703
           and eax, edx       ;clip y to 0<=y
-
 
704
           mov edi, eax
-
 
705
           sub edi, [y]
-
 
706
           mov [_dy], edi
-
 
707
 
-
 
708
           mul ebx
-
 
Line -... Line 667...
-
 
667
           sub eax, [esi+CURSOR.hot_y]
709
           lea esi, [eax+ecx*4]
668
           lea edi, [eax+32-1]
-
 
669
           mov [y], eax
-
 
670
           sets dl
710
           add esi, [LFBAddress]
671
           dec edx
711
           mov [cur_saved_base],esi
672
           and eax, edx       ;clip y to 0<=y
712
 
673
           mov [cur.top], eax
713
           mov edi, [scr_width]
674
           mov edx, eax
-
 
675
           sub edx, [y]
714
           mov edx, [scr_height]
676
           mov [_dy], edx
Line 715... Line 677...
715
           mov eax, 32
677
 
716
 
678
           mul dword [BytesPerScanLine]
717
           sub edi, ecx
679
           lea edx, [LFB_BASE+eax+ecx*4]
718
           cmp edi, eax
680
           mov [cur_saved_base],edx
719
           jng @F
681
 
720
           mov edi, eax
682
           cmp ebx, [Screen_Max_X]
721
@@:
-
 
722
           sub edi, [_dx]
683
           jbe @F
723
 
684
           mov ebx, [Screen_Max_X]
724
           sub edx, [y]
-
 
Line -... Line 685...
-
 
685
@@:
725
           cmp edx, eax
686
           cmp edi, [Screen_Max_Y]
726
           jng @F
687
           jbe @F
-
 
688
           mov edi, [Screen_Max_Y]
-
 
689
@@:
727
           mov edx, eax
690
           mov [cur.right],  ebx
728
@@:
691
           mov [cur.bottom], edi
729
           sub edx, [_dy]
-
 
730
 
692
 
731
           mov [w], edi
693
           sub ebx, [x]
Line 732... Line 694...
732
           mov [h], edx
694
           sub edi, [y]
733
           mov [cur_saved_w], edi
-
 
734
           mov [cur_saved_h], edx
695
           inc ebx
735
 
696
           inc edi
736
           sub eax, edi
697
 
737
           shl eax, 2
698
           mov [cur.w], ebx
738
           shl edi, 2
-
 
Line 739... Line 699...
739
           sub ebx, edi
699
           mov [cur.h], edi
740
           mov [cur_saved_interl], ebx
700
           mov [h], edi
741
 
701
 
742
           mov edi, cur_saved_data
702
           mov eax, edi
743
@@:
703
           mov edi, cur_saved_data
-
 
704
@@:
-
 
705
           mov esi, edx
-
 
706
           add edx, [BytesPerScanLine]
-
 
707
           mov ecx, [cur.w]
744
           mov ecx, [w]
708
           rep movsd
745
           rep movsd
709
           dec eax
746
           add esi, ebx
710
           jnz @B
747
           dec edx
711
 
748
           jnz @B
712
;draw cursor
749
 
713
           mov ebx, [cur_saved_base]
750
;draw cursor
714
           mov eax, [_dy]
751
           mov edx, eax
715
           shl eax, 5
752
           mov edi, [cur_saved_base]
716
           add eax, [_dx]
753
           mov eax, [_dy]
-
 
754
           shl eax, 5
-
 
-
 
717
 
755
           add eax, [_dx]
718
           mov esi, [hcursor]
756
           shl eax, 2
719
           mov esi, [esi+CURSOR.base]
757
 
720
           lea edx, [esi+eax*4]
758
           mov esi, [hcursor]
721
.row:
Line -... Line 722...
-
 
722
           mov ecx, [cur.w]
-
 
723
           mov esi, edx
-
 
724
           mov edi, ebx
-
 
725
           add edx, 32*4
-
 
726
           add ebx, [BytesPerScanLine]
-
 
727
.pix:
-
 
728
           lodsd
-
 
729
           test eax, 0xFF000000
-
 
730
           jz @F
-
 
731
           mov [edi], eax
-
 
732
@@:
-
 
733
           add edi, 4
-
 
734
           dec ecx
-
 
735
           jnz .pix
-
 
736
 
-
 
737
           dec [h]
-
 
738
           jnz .row
-
 
739
           ret
-
 
740
endp
-
 
741
 
-
 
742
 
-
 
743
align 4
-
 
744
get_display:
-
 
745
           mov eax, _display
-
 
746
           ret
-
 
747
 
-
 
748
align 4
-
 
749
init_display:
-
 
750
 
-
 
751
           xor eax, eax
-
 
752
           mov edi, _display
-
 
753
 
-
 
754
           mov [edi+display_t.init_cursor],    eax
-
 
755
           mov [edi+display_t.select_cursor],  eax
-
 
756
           mov [edi+display_t.show_cursor],    eax
-
 
757
           mov [edi+display_t.move_cursor],    eax
-
 
758
           mov [edi+display_t.restore_cursor], eax
-
 
759
 
-
 
760
           lea ecx, [edi+display_t.cr_list.next]
-
 
761
           mov [edi+display_t.cr_list.next], ecx
-
 
762
           mov [edi+display_t.cr_list.prev], ecx
-
 
763
 
-
 
764
           cmp [SCR_MODE],word 0x13
-
 
765
           jbe .fail
-
 
766
 
-
 
767
           test word [SCR_MODE], 0x4000
-
 
768
           jz .fail
-
 
769
 
-
 
770
           mov ebx, restore_32
-
 
771
           mov ecx, move_cursor_32
-
 
772
           movzx eax, byte [ScreenBPP]
-
 
773
           cmp eax, 32
-
 
774
           je @F
-
 
775
 
-
 
776
           mov ebx, restore_24
-
 
777
           mov ecx, move_cursor_24
-
 
778
           cmp eax, 24
-
 
779
           jne .fail
-
 
780
@@:
-
 
781
           mov [_display.select_cursor],  select_cursor
-
 
782
           mov [_display.move_cursor],    ecx
759
           mov esi, [esi+CURSOR.base]
783
           mov [_display.restore_cursor], ebx
760
           add esi, eax
784
 
761
.row:
785
           stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM