Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1496 → Rev 1497

/kernel/trunk/core/syscall.inc
163,7 → 163,7
dd file_system ; 58-Common file system interface
dd 0
dd 0
dd sys_gs ; 61-Direct graphics access
dd 0
dd sys_pci ; 62-PCI functions
dd sys_msg_board ; 63-System message board
 
234,7 → 234,7
dd cross_order ; 58-Common file system interface
dd undefined_syscall ; 59-reserved
dd sys_IPC ; 60-Inter Process Communication
dd cross_order ; 61-Direct graphics access
dd sys_gs ; 61-Direct graphics access
dd cross_order ; 62-PCI functions
dd cross_order ; 63-System message board
dd sys_resize_app_memory ; 64-Resize application memory usage
/kernel/trunk/kernel.asm
4569,38 → 4569,50
mov [esp+32], edx
ret
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 61 sys function. ;;
;; in eax=61,ebx in [1..3] ;;
;; out eax ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iglobal
align 4
f61call:
dd sys_gs.1 ; resolution
dd sys_gs.2 ; bits per pixel
dd sys_gs.3 ; bytes per scanline
endg
 
 
align 4
 
sys_gs: ; direct screen access
dec ebx
cmp ebx,2
ja .not_support
jmp dword [f61call+ebx*4]
.not_support:
or [esp+32],dword -1
ret
 
cmp eax,1 ; resolution
jne no_gs1
 
.1: ; resolution
mov eax,[Screen_Max_X]
shl eax,16
mov ax,[Screen_Max_Y]
add eax,0x00010001
mov [esp+36],eax
mov [esp+32],eax
ret
no_gs1:
 
cmp eax,2 ; bits per pixel
jne no_gs2
.2: ; bits per pixel
movzx eax,byte [ScreenBPP]
mov [esp+36],eax
mov [esp+32],eax
ret
no_gs2:
 
cmp eax,3 ; bytes per scanline
jne no_gs3
.3: ; bytes per scanline
mov eax,[BytesPerScanLine]
mov [esp+36],eax
mov [esp+32],eax
ret
no_gs3:
 
or [esp+36],dword -1
ret
 
 
align 4 ; PCI functions
 
sys_pci: