/kernel/trunk/docs/sysfuncr.txt |
---|
File deleted |
/kernel/trunk/kernel.asm |
---|
72,7 → 72,7 |
putpixel dd __sys_putpixel |
; } mike.dld |
version db 'Kolibri OS version 0.5.3.1 ',13,10,13,10,0 |
version db 'Kolibri OS version 0.5.3.0 ',13,10,13,10,0 |
;dd endofcode-0x10000 |
;db 'Boot02' |
148,7 → 148,7 |
or eax, ecx |
and eax, 10011111b *65536*256 + 0xffffff ; caching enabled |
mov cr0, eax |
jmp $+2 |
jmp byte $+2 |
mov ax,os_data ; Selector for os |
mov ds,ax |
mov es,ax |
2305,7 → 2305,7 |
iglobal |
version_inf: |
db 0,5,3,1 ; version 0.5.3.1 |
db 0,5,3,0 ; version 0.5.3.0 |
db UID_KOLIBRI |
db 'Kolibri',0 |
version_end: |
/kernel/trunk/blkdev/rd.inc |
---|
927,7 → 927,7 |
; ecx number of bytes to read, 0+ |
; edx mem location to return data |
; |
; ret ebx = bytes read or 0xffffffff file not found |
; ret ebx = size or 0xffffffff file not found |
; eax = 0 ok read or other = errormsg |
; |
;-------------------------------------------------------------- |
950,7 → 950,7 |
jz .l1 |
cmp dword [ebx+4], 0 |
jz @f |
xor ebx, ebx |
mov ebx, [edi+28] |
.reteof: |
mov eax, 6 ; EOF |
pop edi |
958,17 → 958,10 |
@@: |
mov ebx, [ebx] |
.l1: |
push dword [edi+28] ; file size |
push dword [edi+28] |
movzx edi, word [edi+26] ; cluster |
push ecx edx |
push 0 |
mov eax, [edi+28] |
sub eax, ebx |
jb .eof |
cmp eax, ecx |
jae @f |
mov ecx, eax |
mov byte [esp], 6 ; EOF |
@@: |
movzx edi, word [edi+26] ; cluster |
.new: |
jecxz .done |
test edi, edi |
988,24 → 981,30 |
jbe @f |
mov ecx, ebx |
@@: |
cmp ecx, [esp+12] |
jbe @f |
mov ecx, [esp+12] |
@@: |
mov ebx, edx |
call memmove |
add edx, ecx |
sub [esp], ecx |
sub [esp+12], ecx |
pop ecx |
xor ebx, ebx |
cmp [esp+8], ebx |
jnz .skip |
jecxz .done |
jmp .eof |
.skip: |
movzx edi, word [edi*2+0x280000] ; find next cluster from FAT |
jmp .new |
.eof: |
mov ebx, edx |
pop eax edx ecx |
sub ebx, edx |
pop edx ecx ebx ebx |
jmp .reteof |
.done: |
mov ebx, edx |
pop eax edx ecx edi |
sub ebx, edx |
pop edx ecx ebx ebx edi |
xor eax, eax |
ret |
;---------------------------------------------------------------- |
1066,7 → 1065,7 |
jb .l1 |
add esp, 262*2+4 |
pop ebp |
mov ebx, [edx+4] |
mov ebx, [edx+8] |
xor eax, eax |
dec ecx |
js @f |
/kernel/trunk/fs/fat12.inc |
---|
1174,7 → 1174,7 |
; ecx number of bytes to read, 0+ |
; edx mem location to return data |
; |
; ret ebx = bytes read or 0xffffffff file not found |
; ret ebx = size or 0xffffffff file not found |
; eax = 0 ok read or other = errormsg |
; |
;-------------------------------------------------------------- |
1198,7 → 1198,7 |
jz .l1 |
cmp dword [ebx+4], 0 |
jz @f |
xor ebx, ebx |
mov ebx, [edi+28] |
.reteof: |
mov eax, 6 ; EOF |
pop edi |
1206,17 → 1206,10 |
@@: |
mov ebx, [ebx] |
.l1: |
push dword [edi+28] |
push dword [edi+28] |
movzx edi, word [edi+26] |
push ecx edx |
push 0 |
mov eax, [edi+28] |
sub eax, ebx |
jb .eof |
cmp eax, ecx |
jae @f |
mov ecx, eax |
mov byte [esp], 6 ; EOF |
@@: |
movzx edi, word [edi+26] |
.new: |
jecxz .done |
test edi, edi |
1223,7 → 1216,8 |
jz .eof |
cmp edi, 0xFF8 |
jae .eof |
lea eax, [edi+31] |
mov eax, edi |
add eax, 31 |
pusha |
call read_chs_sector |
popa |
1231,7 → 1225,7 |
jnz .err |
sub ebx, 512 |
jae .skip |
lea eax, [0xD000+ebx+512] |
lea eax, [eax+ebx+512] |
neg ebx |
push ecx |
cmp ecx, ebx |
1238,29 → 1232,35 |
jbe @f |
mov ecx, ebx |
@@: |
cmp ecx, [esp+12] |
jbe @f |
mov ecx, [esp+12] |
@@: |
mov ebx, edx |
mov eax, 0xD000 |
call memmove |
add edx, ecx |
sub [esp], ecx |
sub [esp+12], ecx |
pop ecx |
xor ebx, ebx |
cmp [esp+8], ebx |
jnz .skip |
jecxz .done |
jmp .eof |
.skip: |
movzx edi, word [edi*2+0x282000] |
jmp .new |
.done: |
mov ebx, edx |
pop eax edx ecx edi |
sub ebx, edx |
pop edx ecx ebx ebx edi |
xor eax, eax |
ret |
.eof: |
mov ebx, edx |
pop eax edx ecx |
pop edx ecx ebx ebx |
jmp .reteof |
.err: |
mov ebx, edx |
pop eax edx ecx edi |
sub ebx, edx |
mov al, 5 ; may be other error code? |
mov eax, 5 ; may be other error code? |
pop edx ecx ebx ebx edi |
ret |
;---------------------------------------------------------------- |
1272,7 → 1272,7 |
; ecx number of blocks to read, 0+ |
; edx mem location to return data |
; |
; ret ebx = blocks read or 0xffffffff folder not found |
; ret ebx = size or 0xffffffff folder not found |
; eax = 0 ok read or other = errormsg |
; |
;-------------------------------------------------------------- |
1388,7 → 1388,7 |
.done: |
add esp, 262*2+4 |
pop ebp |
mov ebx, [edx+4] |
mov ebx, [edx+8] |
xor eax, eax |
dec ecx |
js @f |
/kernel/trunk/fs/fat32.inc |
---|
3053,7 → 3053,7 |
; ecx number of bytes to read, 0+ |
; edx mem location to return data |
; |
; ret ebx = bytes read or 0xffffffff file not found |
; ret ebx = size or 0xffffffff file not found |
; eax = 0 ok read or other = errormsg |
; |
;-------------------------------------------------------------- |
3099,7 → 3099,7 |
jz .l1 |
cmp dword [ebx+4], 0 |
jz @f |
xor ebx, ebx |
mov ebx, [edi+28] |
.reteof: |
mov eax, 6 |
pop edi |
3107,18 → 3107,11 |
@@: |
mov ebx, [ebx] |
.l1: |
push ecx edx |
push 0 |
mov eax, [edi+28] |
sub eax, ebx |
jb .eof |
cmp eax, ecx |
jae @f |
mov ecx, eax |
mov byte [esp], 6 |
@@: |
push dword [edi+28] ; file size |
mov eax, [edi+20-2] |
mov ax, [edi+26] |
push ecx edx |
push dword [edi+28] |
; now eax=cluster, ebx=position, ecx=count, edx=buffer for data |
.new_cluster: |
jecxz .new_sector |
3141,6 → 3134,8 |
jnz .force_buf |
cmp ecx, 512 |
jb .force_buf |
cmp dword [esp], 512 |
jb .force_buf |
; we may read directly to given buffer |
push ebx |
mov ebx, edx |
3147,9 → 3142,11 |
call hd_read |
cmp [hd_error],0 |
jne .noaccess_1 |
pop ebx |
add edx, 512 |
sub ecx, 512 |
sub dword [esp], 512 |
jmp .skip |
.force_buf: |
; we must read sector to temporary buffer and then copy it to destination |
3169,13 → 3166,22 |
mov ecx, 512 |
@@: |
sub ecx, ebx |
cmp ecx, [esp+8] |
jbe @f |
mov ecx, [esp+8] |
@@: |
mov ebx, edx |
call memmove |
add edx, ecx |
sub [esp], ecx |
sub [esp+8], ecx |
pop ecx |
pop eax |
xor ebx, ebx |
cmp [esp], ebx |
jnz .skip |
jecxz .done |
jmp .eof |
.skip: |
inc eax |
dec edi |
3187,14 → 3193,11 |
jmp .new_cluster |
.done: |
mov ebx, edx |
pop eax edx ecx edi |
sub ebx, edx |
pop ebx edx ecx ebx edi |
xor eax, eax |
ret |
.eof: |
mov ebx, edx |
pop eax edx ecx |
sub ebx, edx |
pop ebx edx ecx ebx |
jmp .reteof |
;---------------------------------------------------------------- |
3206,7 → 3209,7 |
; ecx number of blocks to read, 0+ |
; edx mem location to return data |
; |
; ret ebx = blocks read or 0xffffffff folder not found |
; ret ebx = size or 0xffffffff folder not found |
; eax = 0 ok read or other = errormsg |
; |
;-------------------------------------------------------------- |
3355,7 → 3358,7 |
.done: |
add esp, 262*2+4+8 |
pop ebp |
mov ebx, [edx+4] |
mov ebx, [edx+8] |
xor eax, eax |
dec ecx |
js @f |