Subversion Repositories Kolibri OS

Rev

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

Rev 714 Rev 730
Line 170... Line 170...
170
 
170
 
Line 171... Line 171...
171
;        push    0
171
;        push    0
172
;        pop     es
172
;        pop     es
Line 173... Line 173...
173
 
173
 
174
        mov     si,word[es:vi.VideoModePtr]
-
 
175
        push    word[es:vi.VideoModePtr+2]
-
 
Line 176... Line 174...
176
        pop     fs
174
        lfs     si, [es:vi.VideoModePtr]
177
 
175
 
178
        mov     bx,modes_table
176
        mov     bx,modes_table
179
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
177
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
Line 203... Line 201...
203
        jz      @f
201
        jz      @f
204
        test    [es:mi.ModeAttributes],10000000b   ;LFB ?
202
        test    [es:mi.ModeAttributes],10000000b   ;LFB ?
205
        jz      @f
203
        jz      @f
206
 
204
 
Line -... Line 205...
-
 
205
;        cmp     [es:mi.BitsPerPixel], 24
-
 
206
;        jb      @f
-
 
207
 
207
        cmp     [es:mi.BitsPerPixel],16
208
        cmp     [es:mi.BitsPerPixel],16
208
        jne     .l0
209
        jne     .l0
209
        cmp     [es:mi.GreenMaskSize],5
210
        cmp     [es:mi.GreenMaskSize],5
210
        jne     .l0
211
        jne     .l0
211
        mov     [es:mi.BitsPerPixel],15
212
        mov     [es:mi.BitsPerPixel],15
Line 510... Line 511...
510
 
511
 
Line 511... Line 512...
511
.@@_end:
512
.@@_end:
512
        mov     si,_bt
513
        mov     si,_bt
513
        call    printplain
514
        call    printplain
-
 
515
; show scroll
-
 
516
        push    es
-
 
517
        push    0xB800
-
 
518
        pop     es
-
 
519
; arrows
-
 
520
        mov     di, (11*80+53)*2
-
 
521
        mov     al, 30
-
 
522
        stosb
-
 
523
        add     di, 80*2-1
-
 
524
        mov     al, 32
-
 
525
        mov     cx, 7
-
 
526
@@:
-
 
527
        stosb
-
 
528
        add     di, 80*2-1
-
 
529
        loop    @b
-
 
530
        mov     al, 31
-
 
531
        stosb
-
 
532
; calculate scroll size
-
 
533
        mov     ax, [end_cursor]
-
 
534
        sub     ax, modes_table
-
 
535
        mov     bx, size_of_step
-
 
536
        cwd
-
 
537
        div     bx
-
 
538
        mov     si, ax          ; si = size of list
-
 
539
        mov     ax, [home_cursor]
-
 
540
        sub     ax, modes_table
-
 
541
        cwd
-
 
542
        div     bx
-
 
543
        mov     di, ax
-
 
544
        mov     ax, 7*9
-
 
545
        cwd
-
 
546
        div     si
-
 
547
        test    ax, ax
-
 
548
        jnz     @f
-
 
549
        inc     ax
-
 
550
@@:
-
 
551
        cmp     al, 7
-
 
552
        jb      @f
-
 
553
        mov     al, 7
-
 
554
@@:
-
 
555
        mov     cx, ax
-
 
556
; cx = scroll height
-
 
557
; calculate scroll pos
-
 
558
        xor     bx, bx          ; initialize scroll pos
-
 
559
        sub     al, 7+1
-
 
560
        neg     al
-
 
561
        sub     si, 9-1
-
 
562
        jbe     .draw_scroll
-
 
563
        mul     di
-
 
564
        div     si
-
 
565
        mov     bx, ax
-
 
566
.draw_scroll:
-
 
567
        mov     al, 0xDB
-
 
568
        imul    di, bx, 80*2
-
 
569
        add     di, (12*80+53)*2
-
 
570
@@:
-
 
571
        stosb
-
 
572
        add     di, 80*2-1
-
 
573
        loop    @b
-
 
574
        pop     es
514
        ret
575
        ret
515
.show_0x13:
576
.show_0x13:
516
        push    si
577
        push    si
Line 517... Line 578...
517
 
578