/kernel/trunk/boot/ru.inc |
---|
13,7 → 13,7 |
; Modifyed by BadBugsKiller 12.01.2004 17:45 |
; Øðèôò óìåíüøåí â ðàçìåðå è òåïåðü ñîñòîèò èç 2-óõ ÷àñòåé, |
; ñîäåðæàùèõ òîëüêî ñèìâîëû ðóññêîãî àëôàâèòà. |
; ñèìâîëû â êîäèðîâêå ASCII (ÄÎÑ'îâñêàÿ), êîäîâàÿ ñòàíèöà 866. |
; ñèìâîëû â êîäèðîâêå ASCII (ÄÎÑ'îâñêàÿ), êîäîâàÿ ñòðàíèöà 866. |
RU_FNT1: |
db 0x00, 0x00, 0x1E, 0x36, 0x66, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 |
db 0x00, 0x00, 0xFE, 0x62, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x66, 0xFC, 0x00, 0x00, 0x00, 0x00 |
/kernel/trunk/core/dll.inc |
---|
14,7 → 14,7 |
DRV_VERSION equ (DRV_COMPAT shl 16) or DRV_CURRENT |
align 4 |
proc attach_int_handler stdcall, irq:dword, handler:dword |
proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword |
mov ebx, [irq] ;irq num |
test ebx, ebx |
25,13 → 25,23 |
test eax, eax |
jz .err |
cmp [irq_owner + 4 * ebx], 0 |
jne .err |
je @f |
mov ecx, [irq_rights + 4 * ebx] ; Rights : 0 - full access, 1 - read only, 2 - forbidden |
test ecx, ecx |
jnz .err |
@@: |
mov [irq_tab+ebx*4], eax |
mov eax, [access_rights] |
mov [irq_rights + 4 * ebx], eax |
;push eax |
;mov eax, [TASK_BASE] |
;mov eax, [eax + TASKDATA.pid] |
mov [irq_owner + 4 * ebx], 1 |
;mov eax, [eax + TASKDATA.pid] ; faster or smaller? :) |
call get_pid |
mov [irq_owner + 4 * ebx], eax |
;pop eax |
stdcall enable_irq, [irq] |
41,6 → 51,28 |
ret |
endp |
uglobal |
irq_rights rd 16 |
endg |
proc get_int_handler stdcall, irq:dword |
mov eax, [irq] |
cmp [irq_rights + 4 * eax], dword 1 |
ja .err |
mov eax, [irq_tab + 4 * eax] |
ret |
.err: |
xor eax, eax |
ret |
endp |
align 4 |
proc detach_int_handler |
/kernel/trunk/core/exports.inc |
---|
16,6 → 16,7 |
szGetService db 'GetService',0 |
szServiceHandler db 'ServiceHandler',0 |
szAttachIntHandler db 'AttachIntHandler',0 |
szGetIntHandler db 'GetIntHandler', 0 |
szFpuSave db 'FpuSave',0 |
szFpuRestore db 'FpuRestore',0 |
szReservePortArea db 'ReservePortArea',0 |
88,6 → 89,7 |
dd szGetService , get_service |
dd szServiceHandler , srv_handler |
dd szAttachIntHandler, attach_int_handler |
dd szGetIntHandler , get_int_handler |
dd szFpuSave , fpu_save |
dd szFpuRestore , fpu_restore |
dd szReservePortArea , r_f_port_area |
/kernel/trunk/core/sys32.inc |
---|
668,13 → 668,18 |
shl eax, 5 |
mov eax,[eax+CURRENT_TASK+TASKDATA.pid] |
mov edi,irq_owner |
mov ecx,16 |
xor ebx, ebx |
xor edx, edx |
newirqfree: |
scasd |
cmp [edi + 4 * ebx], eax |
jne nofreeirq |
mov [edi-4],dword 0 |
mov [edi + 4 * ebx], edx ; remove irq reservation |
mov [irq_tab + 4 * ebx], edx ; remove irq handler |
mov [irq_rights + 4 * ebx], edx ; set access rights to full access |
nofreeirq: |
loop newirqfree |
inc ebx |
cmp ebx, 16 |
jb newirqfree |
popa |
pusha ; remove all port reservations |
/kernel/trunk/core/taskman.inc |
---|
576,7 → 576,8 |
align 4 |
get_pid: |
mov eax, [TASK_DATA] |
;mov eax, [TASK_DATA] ; I think it's the bug. (Rus) |
mov eax, [TASK_BASE] |
mov eax, [eax+4] |
ret |
/kernel/trunk/drivers/com_mouse.asm |
---|
3,6 → 3,8 |
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Includes source code by Kulakov Vladimir Gennadievich. ;; |
;; Modified by Mario79 and Rus. ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;driver sceletone |
66,7 → 68,7 |
mov al, 1 |
out dx, al |
stdcall AttachIntHandler, 4, irq4_handler |
stdcall AttachIntHandler, 4, irq4_handler, dword 0 |
if DEBUG |
cmp eax, 0 |
jne .label1 |
99,7 → 101,7 |
;mov [com2_mouse_detected],1 |
;mov [irq_owner+3*4], 1 ; IRQ3 owner is System |
stdcall AttachIntHandler, 3, irq3_handler |
stdcall AttachIntHandler, 3, irq3_handler, dword 0 |
mov eax, 0 |
mov ebx, 0x2F8 |
358,7 → 360,7 |
version dd (5 shl 16) or (API_VERSION and 0xFFFF) |
my_service db 'MY_SERVICE',0 ;max 16 chars include zero |
my_service db 'COM_Mouse',0 ;max 16 chars include zero |
if DEBUG |
msgInit db 'Preved bugoga!',13,10,0 |
/kernel/trunk/drivers/ensoniq.asm |
---|
329,7 → 329,7 |
bt eax, ebx |
jnc .fail |
stdcall AttachIntHandler, ebx, ac97_irq |
stdcall AttachIntHandler, ebx, ac97_irq, dword 0 |
stdcall RegService, sz_sound_srv, service_proc |
ret |
.fail: |
/kernel/trunk/drivers/ps2mouse.asm |
---|
82,7 → 82,7 |
mov bl, 0xAE ; enable keyboard interface |
call kbd_cmd |
stdcall AttachIntHandler, 12, irq_handler |
stdcall AttachIntHandler, 12, irq_handler, dword 0 |
stdcall RegService, my_service, service_proc |
ret |
/kernel/trunk/drivers/sis.asm |
---|
349,7 → 349,7 |
bt eax, ebx |
jnc .fail_msg |
stdcall AttachIntHandler, ebx, ac97_irq |
stdcall AttachIntHandler, ebx, ac97_irq, dword 0 |
.reg: |
stdcall RegService, sz_sound_srv, service_proc |
ret |
/kernel/trunk/drivers/sound.asm |
---|
372,7 → 372,7 |
bt eax, ebx |
jnc .fail_msg |
stdcall AttachIntHandler, ebx, ac97_irq |
stdcall AttachIntHandler, ebx, ac97_irq, dword 0 |
.reg: |
stdcall RegService, sz_sound_srv, service_proc |
ret |
/kernel/trunk/drivers/uart.asm |
---|
278,7 → 278,7 |
mov eax, edi |
call uart_reset.internal ;eax= uart |
stdcall AttachIntHandler, COM_1_IRQ, com_1_isr |
stdcall AttachIntHandler, COM_1_IRQ, com_1_isr, dword 0 |
stdcall RegService, sz_uart_srv, service_proc |
ret |
.fail: |
/kernel/trunk/kernel.asm |
---|
638,17 → 638,7 |
mov [pci_access_enabled],1 |
;call detect_devices |
stdcall load_driver, szPS2MDriver |
stdcall load_driver, szCOM_MDriver |
; SET MOUSE |
mov esi,boot_setmouse |
call boot_log |
call setmouse |
; SET PRELIMINARY WINDOW STACK AND POSITIONS |
mov esi,boot_windefs |
748,6 → 738,17 |
call set_variables |
; SET MOUSE |
;call detect_devices |
stdcall load_driver, szPS2MDriver |
stdcall load_driver, szCOM_MDriver |
mov esi,boot_setmouse |
call boot_log |
call setmouse |
; STACK AND FDC |
call stack_init |
884,7 → 885,7 |
loop ready_for_irqs ; flush the queue |
stdcall attach_int_handler, dword 1, irq1 |
stdcall attach_int_handler, dword 1, irq1, dword 0 |
; mov [dma_hdd],1 |
cmp [IDEContrRegsBaseAddr], 0 |
4205,7 → 4206,7 |
mov ebx, [f_irqs + 4 * eax] |
stdcall attach_int_handler, eax, ebx |
stdcall attach_int_handler, eax, ebx, dword 0 |
mov [ecx], edi |
5034,6 → 5035,9 |
cmp ebx,16 |
jae .err |
cmp [irq_rights + 4 * ebx], dword 2 |
je .err |
mov eax,[4 * ebx + irq_owner] |
mov [esp+32],eax |