Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
431 | serge | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
||
4 | ;; Distributed under terms of the GNU General Public License ;; |
||
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
7 | |||
593 | mikedld | 8 | $Revision: 593 $ |
9 | |||
10 | |||
1 | ha | 11 | ; |
12 | ; Call of videomode driver's functions |
||
13 | ; |
||
14 | ; (Add in System function 21 (and/or 26) as a subfunction 13) |
||
15 | ; |
||
16 | ; Author: Trans |
||
17 | ; Date: 19.07.2003 |
||
18 | ; |
||
19 | ; Include in MeOS kernel and compile with FASM |
||
20 | ; |
||
49 | mikedld | 21 | |
22 | uglobal |
||
23 | old_screen_width dd ? |
||
24 | old_screen_height dd ? |
||
25 | endg |
||
26 | |||
1 | ha | 27 | cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS |
28 | jne .no_vmode_drv_access |
||
381 | serge | 29 | pushd [ScreenWidth] [ScreenHeight] |
49 | mikedld | 30 | popd [old_screen_height] [old_screen_width] |
1 | ha | 31 | or eax,-1 ; If driver is absent then eax does not change |
472 | serge | 32 | call (VMODE_BASE+0x100) ; Entry point of video driver |
1 | ha | 33 | mov [esp+36],eax |
34 | mov [esp+24],ebx |
||
35 | mov [esp+32],ecx |
||
36 | ; mov [esp+28],edx |
||
49 | mikedld | 37 | mov eax,[old_screen_width] |
38 | mov ebx,[old_screen_height] |
||
381 | serge | 39 | sub eax,[ScreenWidth] |
49 | mikedld | 40 | jnz @f |
381 | serge | 41 | sub ebx,[ScreenHeight] |
49 | mikedld | 42 | jz .resolution_wasnt_changed |
43 | jmp .lp1 |
||
381 | serge | 44 | @@: sub ebx,[ScreenHeight] |
49 | mikedld | 45 | .lp1: sub [screen_workarea.right],eax |
46 | sub [screen_workarea.bottom],ebx |
||
47 | |||
48 | call repos_windows |
||
112 | poddubny | 49 | mov eax, 0 |
50 | mov ebx, 0 |
||
381 | serge | 51 | mov ecx, [ScreenWidth] |
52 | mov edx, [ScreenHeight] |
||
49 | mikedld | 53 | call calculatescreen |
54 | |||
55 | .resolution_wasnt_changed: |
||
1 | ha | 56 | ret |
57 | .no_vmode_drv_access: |