/kernel/branches/Kolibri-acpi/drivers/vidintel.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/vt823x.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/sceletone.asm |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/mix_sse2.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/mixer.asm |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/imports.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/com_mouse.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/sound.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/infinity.asm |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/fm801.asm |
---|
File deleted |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/sb16/sb16.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/sb16/README.TXT |
---|
File deleted |
\ No newline at end of file |
/kernel/branches/Kolibri-acpi/drivers/sb16/CONFIG.INC |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/sb16/SB16.INC |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/sis.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/tmpdisk_fat.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/mouse.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/report.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/keyboard.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/unclaimed.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/usbhid.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid/sort.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/usbhid |
---|
Property changes: |
Deleted: tsvn:logminsize |
-5 |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/intelac97.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/proc32.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/usbstor.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/fdo.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/codec.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/tmpdisk_work.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/mix_mmx.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/agp.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/emu10k1x.asm |
---|
File deleted |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/tmpdisk.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/vidrdc.asm |
---|
File deleted |
\ No newline at end of file |
/kernel/branches/Kolibri-acpi/drivers/uart.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers/ensoniq.asm |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/main.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/drivers/apm.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/drivers |
---|
Property changes: |
Deleted: svn:ignore |
-*.mnt |
-lang.inc |
-*.bat |
-out.txt |
-scin* |
-*.obj |
/kernel/branches/Kolibri-acpi/blkdev/cdrom.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/blkdev/cd_drv.inc |
---|
1132,22 → 1132,21 |
mov [ignore_CD_eject_wait], 0 |
ret |
;----------------------------------------------------------------------------- |
uglobal |
align 4 |
timer_ATAPI_check dd ? |
ATAPI_IDE0_lock db ? |
ATAPI_IDE1_lock db ? |
ATAPI_IDE2_lock db ? |
ATAPI_IDE3_lock db ? |
ATAPI_IDE4_lock db ? |
ATAPI_IDE5_lock db ? |
ATAPI_IDE6_lock db ? |
ATAPI_IDE7_lock db ? |
ATAPI_IDE8_lock db ? |
ATAPI_IDE9_lock db ? |
ATAPI_IDE10_lock db ? |
ATAPI_IDE11_lock db ? |
ignore_CD_eject_wait db ? |
iglobal |
timer_ATAPI_check dd 0 |
ATAPI_IDE0_lock db 0 |
ATAPI_IDE1_lock db 0 |
ATAPI_IDE2_lock db 0 |
ATAPI_IDE3_lock db 0 |
ATAPI_IDE4_lock db 0 |
ATAPI_IDE5_lock db 0 |
ATAPI_IDE6_lock db 0 |
ATAPI_IDE7_lock db 0 |
ATAPI_IDE8_lock db 0 |
ATAPI_IDE9_lock db 0 |
ATAPI_IDE10_lock db 0 |
ATAPI_IDE11_lock db 0 |
ignore_CD_eject_wait db 0 |
endg |
;----------------------------------------------------------------------------- |
;************************************************* |
/kernel/branches/Kolibri-acpi/boot/ETFONT.FNT |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/kernel/branches/Kolibri-acpi/bus/pci/pci32.inc |
---|
166,8 → 166,6 |
call pci_make_config_cmd |
mov ebx, eax |
mov dx, 0xcf8 |
in eax, dx |
push eax |
; set up addressing to config data |
mov eax, ebx |
and al, 0xfc; make address dword-aligned |
193,14 → 191,7 |
jmp pci_fin_read1 |
pci_read_dword1: |
in eax, dx |
jmp pci_fin_read1 |
pci_fin_read1: |
; restore configuration control |
xchg eax, [esp] |
mov dx, 0xcf8 |
out dx, eax |
pop eax |
pop esi ebx |
ret |
pci_read_reg_2: |
211,15 → 202,8 |
mov esi, eax ; save register size into ESI |
and esi, 3 |
push eax |
;store current state of config space |
mov dx, 0xcf8 |
in al, dx |
mov ah, al |
mov dl, 0xfa |
in al, dx |
mov dx, 0xcfa |
xchg eax, [esp] |
; out 0xcfa,bus |
mov al, ah |
out dx, al |
248,18 → 232,8 |
jmp pci_fin_read2 |
pci_read_dword2: |
in eax, dx |
; jmp pci_fin_read2 |
pci_fin_read2: |
; restore configuration space |
xchg eax, [esp] |
mov dx, 0xcfa |
out dx, al |
mov dl, 0xf8 |
mov al, ah |
out dx, al |
pop eax |
pop esi ebx |
ret |
295,10 → 269,7 |
call pci_make_config_cmd |
mov ebx, eax |
; get current state into ecx |
mov dx, 0xcf8 |
in eax, dx |
push eax |
; set up addressing to config data |
mov eax, ebx |
and al, 0xfc; make address dword-aligned |
325,14 → 296,8 |
jmp pci_fin_write1 |
pci_write_dword1: |
out dx, eax |
jmp pci_fin_write1 |
pci_fin_write1: |
; restore configuration control |
pop eax |
mov dl, 0xf8 |
out dx, eax |
xor eax, eax |
pop ebx esi |
346,14 → 311,7 |
mov esi, eax ; save register size into ESI |
and esi, 3 |
push eax |
;store current state of config space |
mov dx, 0xcf8 |
in al, dx |
mov ah, al |
mov dl, 0xfa |
in al, dx |
xchg eax, [esp] |
mov dx, 0xcfa |
; out 0xcfa,bus |
mov al, ah |
out dx, al |
384,15 → 342,7 |
jmp pci_fin_write2 |
pci_write_dword2: |
out dx, eax |
jmp pci_fin_write2 |
pci_fin_write2: |
; restore configuration space |
pop eax |
mov dx, 0xcfa |
out dx, al |
mov dl, 0xf8 |
mov al, ah |
out dx, al |
xor eax, eax |
pop ebx esi |
658,12 → 608,6 |
mov dword[esp + 32], eax |
ret |
PCI_VENDOR_ID equ 0x00 |
PCI_CLASS_REVISION equ 0x08 |
PCI_HEADER_TYPE equ 0x0E |
PCI_SUBSYSTEM_VENDOR_ID equ 0x2c |
PCI_IRQ_LINE equ 0x3C |
proc pci_enum |
push ebp |
mov ebp, esp |
676,7 → 620,7 |
mov ah, [.bus] |
mov al, 2 |
mov bh, [.devfn] |
mov bl, PCI_VENDOR_ID |
mov bl, 0 |
call pci_read_reg |
cmp eax, 0xFFFFFFFF |
jnz .has_device |
692,37 → 636,27 |
jz .nomemory |
mov edi, eax |
mov [edi+PCIDEV.vendor_device_id], ecx |
mov edx, pcidev_list |
list_add_tail edi, edx |
mov eax, pcidev_list |
mov ecx, [eax+PCIDEV.bk] |
mov [edi+PCIDEV.bk], ecx |
mov [edi+PCIDEV.fd], eax |
mov [ecx+PCIDEV.fd], edi |
mov [eax+PCIDEV.bk], edi |
mov eax, dword [.devfn] |
mov word [edi+PCIDEV.devfn], ax |
mov dword [edi+PCIDEV.devfn], eax |
mov dword [edi+PCIDEV.owner], 0 |
mov bh, al |
mov al, 2 |
mov bl, PCI_CLASS_REVISION |
mov bl, 8 |
call pci_read_reg |
shr eax, 8 ;FIXME use byte mask |
shr eax, 8 |
mov [edi+PCIDEV.class], eax |
; mov ah, [.bus] |
; mov bh, byte [.devfn] |
; mov al, 2 |
; mov bl, PCI_SUBSYSTEM_VENDOR_ID |
; call pci_read_reg |
; mov [edi+PCIDEV.svid_sdid], eax |
; mov ah, [.bus] |
; mov al, 0 |
; mov bh, [.devfn] |
; mov bl, PCI_IRQ_LINE |
; call pci_read_reg |
; mov [edi+PCIDEV.irq_line], al |
test byte [.devfn], 7 |
jnz .next_func |
mov ah, [.bus] |
mov al, 0 |
mov bh, [.devfn] |
mov bl, PCI_HEADER_TYPE |
mov bl, 0Eh |
call pci_read_reg |
test al, al |
js .next_func |
743,334 → 677,3 |
mov eax, pcidev_list |
ret |
endp |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;internal functions |
;ecx (bus << 8)|devfn |
;edx register |
align 4 |
pci_bus: |
.conf1_index: |
; dword CF8 = (0x80000000 | ((reg & 0xF00) << 16) | (bus << 16) | (devfn << 8) | (reg & 0xFC)) |
push edx |
mov eax, edx ; eax = reg |
shl eax, 16 ; eax = reg << 16 |
shl ecx, 8 ; ecx = (bus << 16)|(devfn<<8) |
mov al, dl ; eax = (reg << 16)|reg |
and eax, 0x0F0000FC ; eax = ((reg & 0xF00) << 16)|(reg & 0xFC) |
lea eax, [0x80000000+eax+ecx] |
mov dx, 0xCF8 |
out dx, eax |
pop edx |
xor eax, eax |
ret |
align 4 |
.conf2_index: |
; byte CF8 = 0xF0 | (fn << 1) |
; byte CFA = bus |
push edx |
mov eax, ecx ; (bus << 8)|devfn |
and al, 7 ; fn |
lea eax, [0xF0+eax+eax] |
mov dx, 0xCF8 |
out dx, al |
mov al, ch ; bus |
mov dx, 0xCFA |
out dx, al |
pop edx |
xor eax, eax |
ret |
align 4 |
.conf1_read8: |
call .conf1_index |
and dx, 3 |
add dx, 0xCFC |
in al, dx |
ret |
align 4 |
.conf1_read16: |
call .conf1_index |
and dx, 2 |
add dx, 0xCFC |
in ax, dx |
ret |
align 4 |
.conf1_read32: |
call .conf1_index |
mov dx, 0xCFC |
in eax, dx |
ret |
align 4 |
.conf1_write8: |
call .conf1_index |
mov eax, [esp+4] |
and dx, 3 |
add dx, 0xCFC |
out dx, al |
ret 4 |
align 4 |
.conf1_write16: |
call .conf1_index |
mov eax, [esp+4] |
and dx, 2 |
add dx, 0xCFC |
out dx, ax |
ret 4 |
align 4 |
.conf1_write32: |
call .conf1_index |
mov eax, [esp+4] |
mov dx, 0xCFC |
out dx, eax |
ret 4 |
align 4 |
.conf2_read8: |
; in (0xC000 | (dev << 8) | reg) |
call .conf2_index |
and ecx, 0xF1 ;ecx = dev << 3 |
shl ecx, 5 ;ecx = dev << 8 |
lea edx, [0xC000+edx+ecx] |
in al, dx |
ret |
align 4 |
.conf2_read16: |
call .conf2_index |
and ecx, 0xF1 |
shl ecx, 5 |
lea edx, [0xC000+edx+ecx] |
in ax, dx |
ret |
align 4 |
.conf2_read32: |
call .conf2_index |
and ecx, 0xF1 |
shl ecx, 5 |
lea edx, [0xC000+edx+ecx] |
in eax, dx |
ret |
PCI_R8 equ 0 |
PCI_R16 equ 4 |
PCI_R32 equ 8 |
PCI_W8 equ 12 |
PCI_W16 equ 16 |
PCI_W32 equ 20 |
align 4 |
pci_conf1_rw: |
;internal function |
;eax accessor |
;ecx (bus << 8)|devfn |
.val equ esp+4 |
; dword CF8 = (0x80000000 | ((reg & 0xF00) << 16) | (bus << 16) | (devfn << 8) | (reg & 0xFC)) |
pushfd |
cli |
push edx |
push eax |
mov eax, edx ; eax = reg |
shl eax, 16 ; eax = reg << 16 |
shl ecx, 8 ; ecx = (bus << 16)|(devfn<<8) |
mov al, dl ; eax = (reg << 16)|reg |
and eax, 0x0F0000FC ; eax = ((reg & 0xF00) << 16)|(reg & 0xFC) |
lea eax, [0x80000000+eax+ecx] |
mov dx, 0xCF8 |
out dx, eax |
pop eax |
pop edx |
jmp dword [.fntab+eax] |
.r32: |
mov dx, 0xCFC |
in eax, dx |
.rdone: |
popfd |
ret |
.r16: |
and dx, 2 |
add dx, 0xCFC |
in al, dx |
jmp .rdone |
.r8: |
and dx, 3 |
add dx, 0xCFC |
in al, dx |
jmp .rdone |
.w32: |
mov eax, [esp+8] |
mov dx, 0xCFC |
out dx, eax |
.wdone: |
popfd |
ret 4 |
.w16: |
mov eax, [esp+8] |
and dx, 2 |
add dx, 0xCFC |
out dx, ax |
jmp .wdone |
.w8: |
mov eax, [esp+8] |
and dx, 3 |
add dx, 0xCFC |
out dx, al |
jmp .wdone |
align 4 |
.fntab: |
dd .r8 |
dd .r16 |
dd .r32 |
dd .w8 |
dd .w16 |
dd .w32 |
align 4 |
pci_fn_rw dd pci_conf1_rw |
;proc pci_bus_read8 fastcall, busaddr:dword, reg:dword |
;proc pci_bus_read16 fastcall, busaddr:dword, reg:dword |
;proc pci_bus_read32 fastcall, busaddr:dword, reg:dword |
align 4 |
pci_bus_read8: |
xor eax, eax |
jmp dword [pci_fn_rw] |
align 4 |
pci_bus_read16: |
mov eax, PCI_R16 |
jmp dword [pci_fn_rw] |
align 4 |
pci_bus_read32: |
mov eax, PCI_R32 |
jmp dword [pci_fn_rw] |
;proc pci_bus_write8 fastcall, busaddr:dword, reg:dword, val: dword |
;proc pci_bus_write16 fastcall, busaddr:dword, reg:dword, val: dword |
;proc pci_bus_write32 fastcall, busaddr:dword, reg:dword, val: dword |
align 4 |
pci_bus_write8: |
mov eax, PCI_W8 |
jmp dword [pci_fn_rw] |
align 4 |
pci_bus_write16: |
mov eax, PCI_W16 |
jmp dword [pci_fn_rw] |
align 4 |
pci_bus_write32: |
mov eax, PCI_W32 |
jmp dword [pci_fn_rw] |
;deprecated proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword |
;deprecated proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword |
;deprecated proc pci_read32 stdcall, bus:dword, devfn:dword, reg:dword |
align 4 |
pci_read8: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
call pci_bus_read8 |
ret 12 |
align 4 |
pci_read16: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
call pci_bus_read16 |
ret 12 |
align 4 |
pci_read32: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
call pci_bus_read32 |
ret 12 |
;deprecated proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
;deprecated proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
;deprecated proc pci_write32 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
align 4 |
pci_write8: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
push dword [esp+16] |
call pci_bus_write8 |
ret 16 |
align 4 |
pci_write16: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
push dword [esp+16] |
call pci_bus_write16 |
ret 16 |
align 4 |
pci_write32: |
.bus equ esp+4 |
.devfn equ esp+8 |
.pci_reg equ esp+12 |
.val equ esp+16 |
movzx ecx, byte [.devfn] |
mov ch, [.bus] |
movzx edx, word [.pci_reg] |
push dword [esp+16] |
call pci_bus_write32 |
ret 16 |
/kernel/branches/Kolibri-acpi/core/dll.inc |
---|
34,7 → 34,93 |
jmp .wait |
endp |
align 4 |
proc pci_read32 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 6 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
call pci_read_reg |
pop ebx |
ret |
endp |
align 4 |
proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 5 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
call pci_read_reg |
pop ebx |
ret |
endp |
align 4 |
proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 4 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
call pci_read_reg |
pop ebx |
ret |
endp |
align 4 |
proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 8 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
mov ecx, [val] |
call pci_write_reg |
pop ebx |
ret |
endp |
align 4 |
proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 9 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
mov ecx, [val] |
call pci_write_reg |
pop ebx |
ret |
endp |
align 4 |
proc pci_write32 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
xor ebx, ebx |
mov ah, byte [bus] |
mov al, 10 |
mov bh, byte [devfn] |
mov bl, byte [reg] |
mov ecx, [val] |
call pci_write_reg |
pop ebx |
ret |
endp |
handle equ IOCTL.handle |
io_code equ IOCTL.io_code |
input equ IOCTL.input |
1341,10 → 1427,8 |
call free ;release object memory |
ret |
; param |
; eñõ= size |
; ecx= size |
align 4 |
create_object: |
1391,5 → 1475,3 |
xor eax, eax |
ret |
/kernel/branches/Kolibri-acpi/core/heap.inc |
---|
321,11 → 321,11 |
sub [edi+block_size], edx |
mov eax, [edi+block_size] |
calc_index eax |
calc_index eax |
cmp eax, [block_ind] |
je .add_used |
list_del edi |
list_del edi |
mov ecx, [block_ind] |
lea edx, [mem_block_list+ecx*8] |
335,7 → 335,7 |
@@: |
bts [mem_block_mask], eax |
lea edx, [mem_block_list+eax*8] ;edx= list head |
list_add edi, edx |
list_add edi, edx |
.add_used: |
call md.add_to_used |
348,7 → 348,7 |
ret |
.m_eq_size: |
list_del edi |
list_del edi |
lea edx, [mem_block_list+ebx*8] |
cmp edx, [edx] |
jnz @f |
/kernel/branches/Kolibri-acpi/core/memory.inc |
---|
126,7 → 126,7 |
;proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword |
map_page: |
push ebx |
mov eax, [esp+12] ; phis_addr |
mov eax, [esp+12] ; phis_addr |
or eax, [esp+16] ; flags |
and eax, [pte_valid_mask] |
mov ebx, [esp+8] ; lin_addr |
487,7 → 487,7 |
loop @B |
mov dword [LFBAddress], LFB_BASE |
mov eax, cr3 ;flush TLB |
mov eax, cr3 ;flush TLB |
mov cr3, eax |
ret |
1313,9 → 1313,10 |
mov [esp+32], eax |
ret |
iglobal |
align 4 |
f68call: |
f68call: ; keep this table closer to main code |
dd f68.11 ; init_heap |
dd f68.12 ; user_alloc |
dd f68.13 ; user_free |
1333,8 → 1334,8 |
dd f68.25 ; unmask exception |
dd f68.26 ; user_unmap |
dd f68.27 ; load_file_umode |
endg |
align 4 |
proc load_pe_driver stdcall, file:dword, cmdline:dword |
push esi |
/kernel/branches/Kolibri-acpi/core/sync.inc |
---|
5,9 → 5,6 |
;; ;; |
;; Synhronization for MenuetOS. ;; |
;; Author: Halyavin Andrey, halyavin@land.ru ;; |
;; ;; |
;; ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision$ |
389,7 → 386,6 |
ret |
purge MUTEX_WAITER |
purge RWSEM_WAITING_FOR_WRITE |
purge RWSEM_WAITING_FOR_READ |
/kernel/branches/Kolibri-acpi/docs/usbapi_ru.txt |
---|
File deleted |
\ No newline at end of file |
/kernel/branches/Kolibri-acpi/fs/ext2/blocks.inc |
---|
7,7 → 7,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4891 $ |
$Revision: 5363 $ |
;--------------------------------------------------------------------- |
/kernel/branches/Kolibri-acpi/fs/ext2/ext2.asm |
---|
7,7 → 7,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5089 $ |
$Revision: 5363 $ |
include 'ext2.inc' |
/kernel/branches/Kolibri-acpi/fs/ext2/ext2.inc |
---|
7,7 → 7,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4891 $ |
$Revision: 5363 $ |
; Future jobs for driver, in order of preference: |
/kernel/branches/Kolibri-acpi/fs/ext2/inode.inc |
---|
7,7 → 7,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4891 $ |
$Revision: 5363 $ |
;--------------------------------------------------------------------- |
/kernel/branches/Kolibri-acpi/fs/ext2/resource.inc |
---|
7,7 → 7,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4891 $ |
$Revision: 5363 $ |
;--------------------------------------------------------------------- |
/kernel/branches/Kolibri-acpi/fs/fat.inc |
---|
1,38 → 1,38 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; FAT functions for KolibriOS ;; |
;; ;; |
;; Copyright 2002 Paolo Minazzi, paolo.minazzi@inwind.it ;; |
;; ;; |
;; See file COPYING for details ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; FAT functions for KolibriOS ;; |
;; ;; |
;; Copyright 2002 Paolo Minazzi, paolo.minazzi@inwind.it ;; |
;; ;; |
;; See file COPYING for details ;; |
;; 06.2015 fs_read64 - pathoswithin ;; |
;; 04.02.2007 LFN create folder - diamond ;; |
;; 08.10.2006 LFN delete file/folder - diamond ;; |
;; 20.08.2006 LFN set file size (truncate/extend) - diamond ;; |
;; 17.08.2006 LFN write/append to file - diamond ;; |
;; 23.06.2006 LFN start application - diamond ;; |
;; 15.06.2006 LFN get/set file/folder info - diamond ;; |
;; 27.05.2006 LFN create/rewrite file - diamond ;; |
;; 04.05.2006 LFN read folder - diamond ;; |
;; 29.04.2006 Elimination of hangup after the ;; |
;; expiration hd_wait_timeout - Mario79 ;; |
;; 23.04.2006 LFN read file - diamond ;; |
;; 28.01.2006 find all Fat16/32 partition in all input point ;; |
;; to MBR, see file part_set.inc - Mario79 ;; |
;; 15.01.2005 get file size/attr/date, file_append - ATV ;; |
;; 04.12.2004 skip volume label, file delete bug fixed - ATV ;; |
;; 29.11.2004 get_free_FAT changed, append dir bug fixed - ATV ;; |
;; 23.11.2004 don't allow overwrite dir with file - ATV ;; |
;; 18.11.2004 get_disk_info and more error codes - ATV ;; |
;; 17.11.2004 set_FAT/get_FAT and disk cache rewritten - ATV ;; |
;; 10.11.2004 removedir clear whole directory structure - ATV ;; |
;; 08.11.2004 rename - ATV ;; |
;; 30.10.2004 file_read return also dirsize in bytes - ATV ;; |
;; 20.10.2004 Makedir/Removedir - ATV ;; |
;; 14.10.2004 Partition chain/Fat16 - ATV (thanks drh3xx) ;; |
;; 04.02.2007 LFN create folder - diamond ;; |
;; 08.10.2006 LFN delete file/folder - diamond ;; |
;; 20.08.2006 LFN set file size (truncate/extend) - diamond ;; |
;; 17.08.2006 LFN write/append to file - diamond ;; |
;; 23.06.2006 LFN start application - diamond ;; |
;; 15.06.2006 LFN get/set file/folder info - diamond ;; |
;; 27.05.2006 LFN create/rewrite file - diamond ;; |
;; 04.05.2006 LFN read folder - diamond ;; |
;; 29.04.2006 Elimination of hangup after the ;; |
;; expiration hd_wait_timeout - Mario79 ;; |
;; 23.04.2006 LFN read file - diamond ;; |
;; 28.01.2006 find all Fat16/32 partition in all input point ;; |
;; to MBR, see file part_set.inc - Mario79 ;; |
;; 15.01.2005 get file size/attr/date, file_append - ATV ;; |
;; 04.12.2004 skip volume label, file delete bug fixed - ATV ;; |
;; 29.11.2004 get_free_FAT changed, append dir bug fixed - ATV ;; |
;; 23.11.2004 don't allow overwrite dir with file - ATV ;; |
;; 18.11.2004 get_disk_info and more error codes - ATV ;; |
;; 17.11.2004 set_FAT/get_FAT and disk cache rewritten - ATV ;; |
;; 10.11.2004 removedir clear whole directory structure - ATV ;; |
;; 08.11.2004 rename - ATV ;; |
;; 30.10.2004 file_read return also dirsize in bytes - ATV ;; |
;; 20.10.2004 Makedir/Removedir - ATV ;; |
;; 14.10.2004 Partition chain/Fat16 - ATV (thanks drh3xx) ;; |
;; 06.09.2004 Fix free space - Mario79 ;; |
;; 24.05.2004 Write back buffer for File_write - VT ;; |
;; 20.05.2004 File_read function to work with syscall 58 - VT ;; |
40,9 → 40,10 |
;; 29.06.2002 Improved fat32 verification - VT ;; |
;; 20.05.2002 Hd status check - VT ;; |
;; 01.05.2002 Bugfix in device write - VT ;; |
;; ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5578 $ |
cache_max equ 1919 ; max. is 1919*512+0x610000=0x6ffe00 |
60,7 → 61,7 |
fat16_root db 0 ; flag for fat16 rootdir |
fat_change db 0 ; 1=fat has changed |
rb 1 |
Lock MUTEX ? ; currently operations with one partition |
Lock MUTEX ? ; currently operations with one partition |
; can not be executed in parallel since the legacy code is not ready |
SECTORS_PER_FAT dd 0x1f3a |
NUMBER_OF_FATS dd 0x2 |
/kernel/branches/Kolibri-acpi/fs/xfs.asm |
---|
5,7 → 5,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5089 $ |
$Revision: 5363 $ |
include 'xfs.inc' |
/kernel/branches/Kolibri-acpi/fs/xfs.inc |
---|
5,7 → 5,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; from stat.h |
/kernel/branches/Kolibri-acpi/gui/char.mt |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/kernel/branches/Kolibri-acpi/gui/mouse.inc |
---|
407,7 → 407,7 |
@@: |
add eax, [mouse.active_sys_window.new_box.height] |
cmp eax, [_display.height] |
jl .call_window_handler |
jl .call_window_handler |
sub eax, [_display.height] |
sub [mouse.active_sys_window.new_box.top], eax |
jmp .call_window_handler |
/kernel/branches/Kolibri-acpi/hid/keyboard.inc |
---|
470,7 → 470,7 |
mov bl, '/' |
jmp .dowrite |
@@: |
cmp ch, 55 |
jne @f |
/kernel/branches/Kolibri-acpi/hid/mousedrv.inc |
---|
35,10 → 35,10 |
iglobal |
;-------------------------------------- |
align 4 |
mouse_delay dd 10 |
mouse_delay dd 10 |
mouse_speed_factor: |
dd 3 |
mouse_timer_ticks dd 0 |
dd 3 |
mouse_timer_ticks dd 0 |
endg |
;----------------------------------------------------------------------------- |
175,7 → 175,7 |
add eax, ecx ; save picture under mouse |
add ebx, edx |
push ecx |
or ecx, 0x04000000 ; don't load to mouseunder area |
or ecx, 0x04000000 ; don't load to mouseunder area |
push eax ebx edx edi |
call [GETPIXEL] |
pop edi edx ebx eax |
190,12 → 190,12 |
and ebx, 0xffffff |
mov [eax], ebx |
pop ecx |
mov edi, edx ; y cycle |
shl edi, 4 ; *16 bytes per row |
add edi, ecx ; x cycle |
mov edi, edx ; y cycle |
shl edi, 4 ; *16 bytes per row |
add edi, ecx ; x cycle |
mov esi, edi |
add edi, esi |
add edi, esi ; *3 |
add edi, esi ; *3 |
add edi, [MOUSE_PICTURE] ; we have our str address |
mov esi, edi |
add esi, 16*24*3 |
209,19 → 209,19 |
pop ecx |
pop ebx |
pop eax |
add eax, ecx ; we have x coord+cycle |
add ebx, edx ; and y coord+cycle |
add eax, ecx ; we have x coord+cycle |
add ebx, edx ; and y coord+cycle |
push ecx |
mov ecx, [MOUSE_COLOR_MEM] |
mov edi, 1 ; force |
or ecx, 0x04000000 ; don't save to mouseunder area |
or ecx, 0x04000000 ; don't save to mouseunder area |
; call [putpixel] |
call __sys_putpixel |
pop ecx |
mov ebx, [esp+0] ; pure y coord again |
mov eax, [esp+4] ; and x |
inc ecx ; +1 cycle |
cmp ecx, 16 ; if more than 16 |
inc ecx ; +1 cycle |
cmp ecx, 16 ; if more than 16 |
jnz drm |
xor ecx, ecx |
inc edx |
314,11 → 314,11 |
push eax ebx |
; check for Y |
xor ecx, ecx |
mov cx, [Y_UNDER] ; [MOUSE_Y] |
mov cx, [Y_UNDER] ; [MOUSE_Y] |
cmp ebx, ecx |
jb .no_mouse_area |
add ecx, 23 ; mouse cursor Y size |
add ecx, 23 ; mouse cursor Y size |
cmp ebx, ecx |
ja .no_mouse_area |
; offset Y |
329,7 → 329,7 |
mov cx, [X_UNDER] ; [MOUSE_X] |
cmp eax, ecx |
jb .no_mouse_area |
add ecx, 15 ; mouse cursor X size |
add ecx, 15 ; mouse cursor X size |
cmp eax, ecx |
ja .no_mouse_area |
; offset X |
363,10 → 363,10 |
; eax = new color |
push eax |
; check for Y |
mov ax, [Y_UNDER] ; [MOUSE_Y] |
mov ax, [Y_UNDER] ; [MOUSE_Y] |
cmp cx, ax |
jb .no_mouse_area |
add ax, 23 ; mouse cursor Y size |
add ax, 23 ; mouse cursor Y size |
cmp cx, ax |
ja .no_mouse_area |
; offset Y |
379,7 → 379,7 |
shr ecx, 16 |
cmp cx, ax |
jb .no_mouse_area |
add ax, 15 ; mouse cursor X size |
add ax, 15 ; mouse cursor X size |
cmp cx, ax |
ja .no_mouse_area |
; offset X |
407,10 → 407,10 |
push esi edi |
rol eax, 16 |
movzx edi, ax ; y cycle |
shl edi, 4 ; *16 bytes per row |
movzx edi, ax ; y cycle |
shl edi, 4 ; *16 bytes per row |
shr eax, 16 |
add edi, eax ; x cycle |
add edi, eax ; x cycle |
lea edi, [edi*3] |
add edi, [MOUSE_PICTURE] ; we have our str address |
mov esi, edi |
/kernel/branches/Kolibri-acpi/kernel.asm |
---|
1688,8 → 1688,8 |
mov edi, [esp+64+4] |
jmp dtext |
;----------------------------------------------------------------------------- |
uglobal |
midi_base dw ? |
iglobal |
midi_base dw 0 |
endg |
;----------------------------------------------------------------------------- |
align 4 |
/kernel/branches/Kolibri-acpi/kernelsp.inc |
---|
5,7 → 5,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; Éste archivo debe ser editado con codificación CP866 |
/kernel/branches/Kolibri-acpi/network/ARP.inc |
---|
16,7 → 16,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 3386 $ |
$Revision: 5522 $ |
ARP_NO_ENTRY = 0 |
ARP_VALID_MAPPING = 1 |
/kernel/branches/Kolibri-acpi/network/IPv4.inc |
---|
16,7 → 16,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5522 $ |
$Revision: 5584 $ |
IPv4_MAX_FRAGMENTS = 64 |
IPv4_MAX_ROUTES = 64 |
/kernel/branches/Kolibri-acpi/network/ethernet.inc |
---|
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 3346 $ |
$Revision: 5522 $ |
ETH_FRAME_MINIMUM = 60 |
ETH_QUEUE_SIZE = 255 |
69,7 → 69,7 |
; This function is called by ethernet drivers, |
; It pushes the received ethernet packets onto the ethernet input queue |
; |
; IN: [esp] = Pointer to buffer |
; IN: [esp] = Pointer to buffer |
; |
; OUT: / |
; |
241,7 → 241,7 |
.adjust_size: |
mov edx, ETH_FRAME_MINIMUM |
test edx, edx ; clear zero flag |
test edx, edx ; clear zero flag |
jmp .done |
.out_of_ram: |
/kernel/branches/Kolibri-acpi/network/tcp_output.inc |
---|
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5522 $ |
$Revision: 5584 $ |
;----------------------------------------------------------------- |
; |
/kernel/branches/Kolibri-acpi/network/tcp_subr.inc |
---|
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5522 $ |
$Revision: 5584 $ |
align 4 |
iglobal |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootge.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/build_ru.bat |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootvesa.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/macros.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/rdload.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/ru.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/et.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootru.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/preboot.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/shutdown.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootet.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootstr.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/booteng.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/ETFONT.FNT |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/kolibri_ldm.asm |
---|
File deleted |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm |
---|
Property changes: |
Deleted: tsvn:logminsize |
-5 |
\ No newline at end of property |
/kernel/branches/Kolibri-acpi/video/blitter.inc |
---|
5,7 → 5,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5164 $ |
$Revision: 5363 $ |
struct BLITTER_BLOCK |
37,7 → 37,7 |
;esi= clip RECT ptr |
;edi= RECT ptr |
;return code: |
;eax= 0 - draw, 1 - don't draw |
;CF= 0 - draw, 1 - don't draw |
push ebx |
53,18 → 53,15 |
jl .fail |
cmp eax, ecx ;left >= clip.left |
jae @F |
jge @F |
mov eax, ecx |
mov [edi+RECT.left], ecx |
@@: |
mov [edi+RECT.left], eax |
cmp ebx, edx ;right <= clip.right |
jle @f |
mov ebx, edx |
mov [edi+RECT.right], edx |
@@: |
mov [edi+RECT.right], ebx |
mov eax, [edi+RECT.top] |
mov ebx, [edi+RECT.bottom] |
mov ecx, [esi+RECT.top] ;clip.top |
77,23 → 74,21 |
jl .fail |
cmp eax, ecx ;top >= clip.top |
jae @F |
jge @F |
mov eax, ecx |
mov [edi+RECT.top], ecx |
@@: |
mov [edi+RECT.top], eax |
cmp ebx, edx ;bottom <= clip.bottom |
jle @f |
mov ebx, edx |
mov [edi+RECT.bottom], edx |
@@: |
mov [edi+RECT.bottom], ebx |
pop ebx |
xor eax, eax |
clc |
ret |
.fail: |
pop ebx |
mov eax, 1 |
stc |
ret |
100,6 → 95,9 |
align 4 |
blit_clip: |
;return code: |
;CF= 0 - draw, 1 - don't draw |
.sx0 equ 8 |
.sy0 equ 12 |
.sx1 equ 16 |
130,9 → 128,7 |
lea esi, [ebx+BLITTER.sc] |
call block_clip |
test eax, eax |
mov esi, 1 |
jnz .done |
jc .done |
mov edi, [esp+.sx0] |
mov edx, [ebx+BLITTER.dst_x] |
157,9 → 153,7 |
lea edi, [esp+.dx0] |
lea esi, [ebx+BLITTER.dc] |
call block_clip |
test eax, eax |
mov esi, 1 |
jnz .done |
jc .done |
mov edx, [esp+.dx0] |
mov eax, [esp+.dx1] |
182,9 → 176,8 |
mov [ebx+BLITTER.src_y], ecx |
mov [ebx+BLITTER.dst_x], edx |
mov [ebx+BLITTER.dst_y], eax |
xor esi, esi |
clc |
.done: |
mov eax, esi |
add esp, 40 |
pop ebx |
pop esi |
205,16 → 198,17 |
align 4 |
blit_32: |
.x_y equ 72 |
.tmp_x_y equ 76 |
push ebp |
push edi |
push esi |
push ebx |
sub esp, 80 |
virtual at sizeof.BLITTER |
.position dd ? ; (x shl 16) + y |
; ??? |
.extra_var1 dd ? |
.local_vars_size = $ |
end virtual |
sub esp, .local_vars_size |
mov eax, [TASK_BASE] |
mov ebx, [eax-twdw + WDATA.box.width] |
254,14 → 248,13 |
mov eax, [ecx+32] |
mov [esp+56], eax |
mov [esp+BLITTER.bitmap], eax |
mov eax, [ecx+36] |
mov [esp+60], eax |
mov [esp+BLITTER.stride], eax |
mov ecx, esp |
call blit_clip |
test eax, eax |
jne .done |
jc .L57 |
mov eax, [TASK_BASE] |
271,13 → 264,21 |
add ebp, [eax-twdw + WDATA.box.top] |
mov ecx, ebx |
add ecx, [esp+BLITTER.w] |
shl ecx, 16 |
mov cx, bp |
mov [esp+.x_y], ecx |
add ecx, [esp+BLITTER.h] |
mov eax, ebx |
shl eax, 16 |
mov ax, bp |
mov [esp+.position], eax |
mov edi, ebp |
; imul edi, [_display.pitch] |
mov edi, [BPSLine_calc_area+edi*4] |
; imul ebp, [_display.width] |
mov ebp, [d_width_calc_area+ebp*4] |
add ebp, ebx |
289,34 → 290,103 |
lea esi, [eax+esi*4] |
add esi, [esp+BLITTER.bitmap] |
mov eax, ecx |
mov ecx, [esp+BLITTER.h] |
mov edx, [esp+BLITTER.w] |
test ecx, ecx ;FIXME check clipping |
jz .done |
jz .L57 |
test edx, edx |
jz .done |
jz .L57 |
cmp [_display.bits_per_pixel], 32 |
jne .core_24 |
lea edi, [edi+ebx*4] |
; xchg bx, bx |
mov ebx, [CURRENT_TASK] |
mov ecx, [esp+80] |
shr ecx, 4 |
and ecx, 3 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je .core_32.software_cursor |
cmp [_display.select_cursor], 0 |
jne .core_32.hardware_cursor |
;-------------------------------------- |
.core_32.software_cursor: |
align 4 |
.outer32: |
jmp dword [.tbl_32+ecx*4] |
align 4 |
.inner32: |
cmp [ebp], bl |
jne .skip |
;-------------------------------------- |
mov eax, [esi] |
mov ecx, [esp+.position] |
; check mouse area for putpixel |
call [_display.check_mouse] |
;-------------------------------------- |
; store to real LFB |
mov [LFB_BASE+edi], eax |
;-------------------------------------- |
align 4 |
.tbl_32 dd blit_copy_32 |
dd blit_copy_32_bgr |
dd blit_trans_32 |
dd blit_trans_32_bgr |
.skip: |
add esi, 4 |
add edi, 4 |
inc ebp |
add [esp+.position], 1 shl 16 |
dec edx |
jnz .inner32 |
add esi, [esp+BLITTER.stride] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
mov eax, edx |
inc [esp+.position] |
sub ebp, edx |
shl eax, 2 |
sub esi, eax |
sub edi, eax |
shl eax, 16-2 |
sub [esp+.position], eax |
dec [esp+BLITTER.h] |
jnz .outer32 |
jmp .done |
.core_32.hardware_cursor: |
align 4 |
.hw.outer32: |
xor ecx, ecx |
align 4 |
.hw.inner32: |
cmp [ebp+ecx], bl |
jne .hw.skip |
mov eax, [esi+ecx*4] |
mov [LFB_BASE+edi+ecx*4], eax |
align 4 |
.hw.skip: |
inc ecx |
dec edx |
jnz .hw.inner32 |
add esi, [esp+BLITTER.stride] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
mov edx, [esp+BLITTER.w] |
dec [esp+BLITTER.h] |
jnz .hw.outer32 |
.done: |
add esp, 80 |
; call [draw_pointer] |
; call __sys_draw_pointer |
.L57: |
add esp, .local_vars_size |
pop ebx |
pop esi |
pop edi |
323,121 → 393,133 |
pop ebp |
ret |
align 4 |
blit_copy_32_bgr: |
mov ebx, 1 |
.core_24: |
cmp [_display.bits_per_pixel], 24 |
jne .core_16 |
lea ebx, [ebx+ebx*2] |
lea edi, [LFB_BASE+edi+ebx] |
mov ebx, [CURRENT_TASK] |
align 4 |
blit_copy_32: |
.outer24: |
mov [esp+.extra_var1], edi |
xor ecx, ecx |
.outer32: |
mov eax, [esp+.x_y] |
mov [esp+.tmp_x_y], eax |
xor ecx, ecx |
align 4 |
.inner32: |
cmp [ebp+ecx], bl |
jne .skip |
.inner24: |
cmp [ebp+ecx], bl ; Does the process own this pixel? |
jne .skip_1 |
;-------------------------------------- |
push eax |
mov eax, [esi+ecx*4] |
lea edi, [edi+ecx*2] |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
jne .no_mouseunder_1 |
;-------------------------------------- |
align 4 |
@@: |
push ecx |
mov ecx, [esp+4+.tmp_x_y] |
mov ecx, [esp+4] |
ror ecx, 16 |
sub ecx, edx |
rol ecx, 16 |
sub ecx, [esp+BLITTER.h + 8] |
; check mouse area for putpixel |
call [_display.check_mouse] |
pop ecx |
;-------------------------------------- |
align 4 |
.no_mouseunder: |
; store to real LFB |
mov [LFB_BASE+edi+ecx*4], eax |
.no_mouseunder_1: |
mov [edi+ecx], ax |
shr eax, 16 |
mov [edi+ecx+2], al |
pop eax |
;-------------------------------------- |
align 4 |
.skip: |
add [esp+.tmp_x_y], dword 0x10000 |
.skip_1: |
inc ecx |
dec edx |
jnz .inner32 |
jnz .inner24 |
add esi, [esp+BLITTER.stride] |
mov edi, [esp+.extra_var1] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
inc dword [esp+.x_y] |
mov edx, [esp+BLITTER.w] |
dec [esp+BLITTER.h] |
jnz .outer32 |
jnz .outer24 |
jmp blit_32.done |
jmp .done |
align 4 |
blit_trans_32_bgr: |
mov ebx, 1 |
.core_16: |
lea edi, [LFB_BASE+edi+ebx*2] |
mov ebx, [CURRENT_TASK] |
align 4 |
blit_trans_32: |
.outer32: |
mov eax, [esp+.x_y] |
mov [esp+.tmp_x_y], eax |
.outer16: |
mov [esp+.extra_var1], edi |
xor ecx, ecx |
align 4 |
.inner32: |
cmp [ebp+ecx], bl |
jne .skip |
.inner16: |
cmp [ebp+ecx], bl ; Does the process own this pixel? |
jne .skip_2 |
;-------------------------------------- |
push eax |
mov eax, [esi+ecx*4] |
test eax, 0xFF000000 |
jz .skip |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
jne .no_mouseunder_2 |
;-------------------------------------- |
align 4 |
@@: |
@@: |
push ecx |
mov ecx, [esp+4+.tmp_x_y] |
mov ecx, [esp+4] |
ror ecx, 16 |
sub ecx, edx |
rol ecx, 16 |
sub ecx, [esp+BLITTER.h + 8] |
; check mouse area for putpixel |
call [_display.check_mouse] |
pop ecx |
;-------------------------------------- |
align 4 |
.no_mouseunder: |
; store to real LFB |
mov [LFB_BASE+edi+ecx*4], eax |
.no_mouseunder_2: |
; convert to 16 bpp and store to LFB |
and eax, 00000000111110001111110011111000b |
shr ah, 2 |
shr ax, 3 |
ror eax, 8 |
add al, ah |
rol eax, 8 |
mov [edi+ecx*2], ax |
pop eax |
;-------------------------------------- |
align 4 |
.skip: |
add [esp+.tmp_x_y], dword 0x10000 |
.skip_2: |
inc ecx |
dec edx |
jnz .inner32 |
jnz .inner16 |
add esi, [esp+BLITTER.stride] |
mov edi, [esp+.extra_var1] |
add edi, [_display.lfb_pitch] |
add ebp, [_display.width] |
inc dword [esp+.x_y] |
mov edx, [esp+BLITTER.w] |
dec [esp+BLITTER.h] |
jnz .outer32 |
jnz .outer16 |
jmp blit_32.done |
jmp .done |
/kernel/branches/Kolibri-acpi/video/cursors.inc |
---|
305,7 → 305,7 |
align 4 |
.end: |
mov [redrawmouse_unconditional], 1 |
call __sys_draw_pointer |
call __sys_draw_pointer |
ret |
endp |
;------------------------------------------------------------------------------ |
/kernel/branches/Kolibri-acpi/video/vesa20.inc |
---|
84,7 → 84,7 |
@@: |
; check mouse area for putpixel |
test ecx, 0x04000000 ; don't load to mouseunder area |
test ecx, 0x04000000 ; don't load to mouseunder area |
jnz .no_mouseunder |
call [_display.check_m_pixel] |
test ecx, ecx ; 0xff000000 |
94,7 → 94,7 |
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
mov ebx, [BPSLine_calc_area+ebx*4] |
lea edi, [eax+eax*2] ; edi = x*3 |
add edi, ebx ; edi = x*3+(y*y multiplier) |
add edi, ebx ; edi = x*3+(y*y multiplier) |
mov ecx, [LFB_BASE+edi] |
@@: |
116,7 → 116,7 |
@@: |
; check mouse area for putpixel |
test ecx, 0x04000000 ; don't load to mouseunder area |
test ecx, 0x04000000 ; don't load to mouseunder area |
jnz .no_mouseunder |
call [_display.check_m_pixel] |
test ecx, ecx ; 0xff000000 |
879,7 → 879,7 |
jge .exit |
cmp ebx, [_display.height] |
jge .exit |
test edi, 1 ; force ? |
test edi, 1 ; force ? |
jnz .forced |
; not forced |
1175,46 → 1175,46 |
pusha |
xor edx, edx ; clear edx |
xor esi, esi ; unpack arguments |
xor edx, edx ; clear edx |
xor esi, esi ; unpack arguments |
xor ebp, ebp |
mov si, ax ; esi = x2 |
mov bp, bx ; ebp = y2 |
shr eax, 16 ; eax = x1 |
shr ebx, 16 ; ebx = y1 |
push eax ; save x1 |
push ebx ; save y1 |
push esi ; save x2 |
push ebp ; save y2 |
mov si, ax ; esi = x2 |
mov bp, bx ; ebp = y2 |
shr eax, 16 ; eax = x1 |
shr ebx, 16 ; ebx = y1 |
push eax ; save x1 |
push ebx ; save y1 |
push esi ; save x2 |
push ebp ; save y2 |
; checking x-axis... |
sub esi, eax ; esi = x2-x1 |
push esi ; save y2-y1 |
jl .x2lx1 ; is x2 less than x1 ? |
jg .no_vline ; x1 > x2 ? |
mov edx, ebp ; else (if x1=x2) |
sub esi, eax ; esi = x2-x1 |
push esi ; save y2-y1 |
jl .x2lx1 ; is x2 less than x1 ? |
jg .no_vline ; x1 > x2 ? |
mov edx, ebp ; else (if x1=x2) |
call vline |
push edx ; necessary to rightly restore stack frame at .exit |
push edx ; necessary to rightly restore stack frame at .exit |
jmp .exit |
.x2lx1: |
neg esi ; get esi absolute value |
neg esi ; get esi absolute value |
.no_vline: |
; checking y-axis... |
sub ebp, ebx ; ebp = y2-y1 |
push ebp ; save y2-y1 |
jl .y2ly1 ; is y2 less than y1 ? |
jg .no_hline ; y1 > y2 ? |
sub ebp, ebx ; ebp = y2-y1 |
push ebp ; save y2-y1 |
jl .y2ly1 ; is y2 less than y1 ? |
jg .no_hline ; y1 > y2 ? |
mov edx, [dl_x2] ; else (if y1=y2) |
call hline |
jmp .exit |
.y2ly1: |
neg ebp ; get ebp absolute value |
neg ebp ; get ebp absolute value |
.no_hline: |
cmp ebp, esi |
jle .x_rules ; |y2-y1| < |x2-x1| ? |
jle .x_rules ; |y2-y1| < |x2-x1| ? |
cmp [dl_y2], ebx ; make sure y1 is at the begining |
jge .no_reverse1 |
neg dword [dl_dx] |
1227,9 → 1227,9 |
.no_reverse1: |
mov eax, [dl_dx] |
cdq ; extend eax sing to edx |
shl eax, 16 ; using 16bit fix-point maths |
idiv ebp ; eax = ((x2-x1)*65536)/(y2-y1) |
cdq ; extend eax sing to edx |
shl eax, 16 ; using 16bit fix-point maths |
idiv ebp ; eax = ((x2-x1)*65536)/(y2-y1) |
; correction for the remainder of the division |
shl edx, 1 |
1237,12 → 1237,12 |
jb @f |
inc eax |
@@: |
mov edx, ebp ; edx = counter (number of pixels to draw) |
mov edx, ebp ; edx = counter (number of pixels to draw) |
mov ebp, 1 shl 16 ; ebp = dy = 1.0 |
mov esi, eax ; esi = dx |
mov esi, eax ; esi = dx |
jmp .y_rules |
.x_rules: |
cmp [dl_x2], eax ; make sure x1 is at the begining |
cmp [dl_x2], eax ; make sure x1 is at the begining |
jge .no_reverse2 |
neg dword [dl_dy] |
mov edx, [dl_x2] |
1254,9 → 1254,9 |
.no_reverse2: |
xor edx, edx |
mov eax, [dl_dy] |
cdq ; extend eax sing to edx |
shl eax, 16 ; using 16bit fix-point maths |
idiv esi ; eax = ((y2-y1)*65536)/(x2-x1) |
cdq ; extend eax sing to edx |
shl eax, 16 ; using 16bit fix-point maths |
idiv esi ; eax = ((y2-y1)*65536)/(x2-x1) |
; correction for the remainder of the division |
shl edx, 1 |
cmp esi, edx |
1263,9 → 1263,9 |
jb @f |
inc eax |
@@: |
mov edx, esi ; edx = counter (number of pixels to draw) |
mov edx, esi ; edx = counter (number of pixels to draw) |
mov esi, 1 shl 16 ; esi = dx = 1.0 |
mov ebp, eax ; ebp = dy |
mov ebp, eax ; ebp = dy |
.y_rules: |
mov eax, [dl_x1] |
2015,7 → 2015,7 |
dp2: |
mov ebp, [draw_data+32+RECT.left] ; x start |
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp] |
; and LFB data (output for our function) [edi] |
; and LFB data (output for our function) [edi] |
; mov eax, [BytesPerScanLine] |
; mul ebx |
mov eax, [BPSLine_calc_area+ebx*4] |