Rev 129 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
129 | mikedld | 1 | ; |
2 | ; Call of videomode driver's functions |
||
3 | ; |
||
4 | ; (Add in System function 21 (and/or 26) as a subfunction 13) |
||
5 | ; |
||
6 | ; Author: Trans |
||
7 | ; Date: 19.07.2003 |
||
8 | ; |
||
9 | ; Include in MeOS kernel and compile with FASM |
||
10 | ; |
||
11 | |||
12 | uglobal |
||
13 | old_screen_width dd ? |
||
14 | old_screen_height dd ? |
||
15 | endg |
||
16 | |||
17 | cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS |
||
18 | jne .no_vmode_drv_access |
||
384 | mikedld | 19 | pushd [ScreenWidth] [ScreenHeight] |
129 | mikedld | 20 | popd [old_screen_height] [old_screen_width] |
21 | or eax,-1 ; If driver is absent then eax does not change |
||
22 | call 0x760100 ; Entry point of video driver |
||
23 | mov [esp+36],eax |
||
24 | mov [esp+24],ebx |
||
25 | mov [esp+32],ecx |
||
26 | ; mov [esp+28],edx |
||
27 | mov eax,[old_screen_width] |
||
28 | mov ebx,[old_screen_height] |
||
384 | mikedld | 29 | sub eax,[ScreenWidth] |
129 | mikedld | 30 | jnz @f |
384 | mikedld | 31 | sub ebx,[ScreenHeight] |
129 | mikedld | 32 | jz .resolution_wasnt_changed |
33 | jmp .lp1 |
||
384 | mikedld | 34 | @@: sub ebx,[ScreenHeight] |
129 | mikedld | 35 | .lp1: sub [screen_workarea.right],eax |
36 | sub [screen_workarea.bottom],ebx |
||
37 | |||
38 | call repos_windows |
||
39 | mov eax, 0 |
||
40 | mov ebx, 0 |
||
384 | mikedld | 41 | mov ecx, [ScreenWidth] |
42 | mov edx, [ScreenHeight] |
||
129 | mikedld | 43 | call [calculatescreen] |
44 | |||
45 | .resolution_wasnt_changed: |
||
46 | ret |
||
47 | .no_vmode_drv_access: |