Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3486 → Rev 3487

/kernel/branches/Kolibri-A/trunk/blkdev/cdrom.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/branches/Kolibri-A/trunk/blkdev/cd_drv.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/branches/Kolibri-A/trunk/blkdev/fdc.inc
8,10 → 8,6
$Revision$
 
 
iglobal
;function pointers.
fdc_irq_func dd fdc_null
endg
 
uglobal
dmasize db 0x0
25,47 → 21,9
rep stosb
ret
 
fdc_irq:
call [fdc_irq_func]
;fdc_irq:
fdc_null:
ret
 
save_image:
call reserve_flp
call restorefatchain
pusha
call check_label
cmp [FDC_Status],0
jne unnecessary_save_image
mov [FDD_Track],0 ; Öèëèíäð
mov [FDD_Head],0 ; Ñòîðîíà
mov [FDD_Sector],1 ; Ñåêòîð
mov esi,RAMDISK
call SeekTrack
save_image_1:
push esi
call take_data_from_application_1
pop esi
add esi,512
call WriteSectWithRetr
; call WriteSector
cmp [FDC_Status],0
jne unnecessary_save_image
inc [FDD_Sector]
cmp [FDD_Sector],19
jne save_image_1
mov [FDD_Sector],1
inc [FDD_Head]
cmp [FDD_Head],2
jne save_image_1
mov [FDD_Head],0
inc [FDD_Track]
call SeekTrack
cmp [FDD_Track],80
jne save_image_1
unnecessary_save_image:
mov [fdc_irq_func],fdc_null
popa
mov [flp_status],0
ret
 
 
/kernel/branches/Kolibri-A/trunk/core/sys32.inc
245,7 → 245,7
mov edi, 6
cmp [v86_irqhooks+edi*8], 0
jnz v86_irq2
call fdc_irq
; call fdc_irq
call ready_for_next_irq
restore_ring3_context
iret
684,11 → 684,11
; jnz @f
; call free_cd_channel
; and [cd_status], 0
;@@:
; cmp [flp_status], esi
; jnz @f
; and [flp_status], 0
@@:
cmp [flp_status], esi
jnz @f
and [flp_status], 0
@@:
pop esi
cmp [bgrlockpid], esi
jnz @f
/kernel/branches/Kolibri-A/trunk/fs/fat12.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/branches/Kolibri-A/trunk/fs/fat32.inc
2934,3 → 2934,50
ret
 
; \end{diamond}
 
 
; \begin{diamond}
fat_find_lfn:
; in: esi->name
; [esp+4] = next
; [esp+8] = first
; [esp+C]... - possibly parameters for first and next
; out: CF=1 - file not found
; else CF=0, esi->next name component, edi->direntry
pusha
lea eax, [esp+0Ch+20h]
call dword [eax-4]
jc .reterr
sub esp, 262*2 ; reserve place for LFN
mov ebp, esp
push 0 ; for fat_get_name: read ASCII name
.l1:
call fat_get_name
jc .l2
call fat_compare_name
jz .found
.l2:
lea eax, [esp+0Ch+20h+262*2+4]
call dword [eax-8]
jnc .l1
add esp, 262*2+4
.reterr:
stc
popa
ret
.found:
add esp, 262*2+4
; if this is LFN entry, advance to true entry
cmp byte [edi+11], 0xF
jnz @f
lea eax, [esp+0Ch+20h]
call dword [eax-8]
jc .reterr
@@:
add esp, 8 ; CF=0
push esi
push edi
popa
ret
 
 
/kernel/branches/Kolibri-A/trunk/fs/fs.inc
268,49 → 268,49
 
;********************************************************************
mov eax,[edi+1]
cmp eax,'FD '
je fs_yesflpdisk
cmp eax,'FLOP'
; cmp eax,'FD '
; je fs_yesflpdisk
; cmp eax,'FLOP'
jne fs_noflpdisk
 
fs_yesflpdisk:
call reserve_flp
; fs_yesflpdisk:
; call reserve_flp
 
cmp byte [edi+1+11],0
je fs_give_dir1
; cmp byte [edi+1+11],0
; je fs_give_dir1
 
mov eax,[edi+1+12]
cmp eax,'1 '
je fs_yesflpdisk_first
cmp eax,'FIRS'
je fs_yesflpdisk_first
cmp eax,'2 '
je fs_yesflpdisk_second
cmp eax,'SECO'
jne fs_noflpdisk
jmp fs_yesflpdisk_second
; mov eax,[edi+1+12]
; cmp eax,'1 '
; je fs_yesflpdisk_first
; cmp eax,'FIRS'
; je fs_yesflpdisk_first
; cmp eax,'2 '
; je fs_yesflpdisk_second
; cmp eax,'SECO'
; jne fs_noflpdisk
; jmp fs_yesflpdisk_second
 
fs_yesflpdisk_first:
mov [flp_number],1
jmp fs_yesflpdisk_start
fs_yesflpdisk_second:
mov [flp_number],2
fs_yesflpdisk_start:
cmp dword [esp+20],0 ; READ
jne fs_noflpdisk_read
; fs_yesflpdisk_first:
; mov [flp_number],1
; jmp fs_yesflpdisk_start
; fs_yesflpdisk_second:
; mov [flp_number],2
; fs_yesflpdisk_start:
; cmp dword [esp+20],0 ; READ
; jne fs_noflpdisk_read
 
mov eax,[esp+4] ; fname
add eax,2*12+1
mov ebx,[esp+16] ; block start
inc ebx
mov ecx,[esp+12] ; block count
mov edx,[esp+8] ; return
mov esi,[esp+0]
sub esi,eax
add esi,12+1 ; file name length
call floppy_fileread
; mov eax,[esp+4] ; fname
; add eax,2*12+1
; mov ebx,[esp+16] ; block start
; inc ebx
; mov ecx,[esp+12] ; block count
; mov edx,[esp+8] ; return
; mov esi,[esp+0]
; sub esi,eax
; add esi,12+1 ; file name length
; call floppy_fileread
 
jmp file_system_return
; jmp file_system_return
 
 
fs_noflpdisk_read:
/kernel/branches/Kolibri-A/trunk/fs/fs_lfn.inc
22,12 → 22,6
db 7,'ramdisk'
dd fs_OnRamdisk
dd fs_NextRamdisk
db 2,'fd'
dd fs_OnFloppy
dd fs_NextFloppy
db 10,'floppydisk'
dd fs_OnFloppy
dd fs_NextFloppy
db 3,'hd0'
dd fs_OnHd0
dd fs_NextHd0
441,37 → 435,6
dd fs_RamdiskCreateFolder
fs_NumRamdiskServices = ($ - fs_RamdiskServices)/4
 
fs_OnFloppy:
cmp ecx, 2
ja file_system_lfn.notfound
mov eax, [ebx]
cmp eax, fs_NumFloppyServices
jae fs_OnRamdisk.not_impl
call reserve_flp
mov [flp_number], cl
mov ecx, [ebx+12]
mov edx, [ebx+16]
; add edx, std_application_base_address
add ebx, 4
call dword [fs_FloppyServices + eax*4]
and [flp_status], 0
mov [image_of_eax], eax
mov [image_of_ebx], ebx
ret
 
fs_FloppyServices:
dd fs_FloppyRead
dd fs_FloppyReadFolder
dd fs_FloppyRewrite
dd fs_FloppyWrite
dd fs_FloppySetFileEnd
dd fs_FloppyGetFileInfo
dd fs_FloppySetFileInfo
dd 0
dd fs_FloppyDelete
dd fs_FloppyCreateFolder
fs_NumFloppyServices = ($ - fs_FloppyServices)/4
 
fs_OnHd0:
call reserve_hd1
mov [hdbase], 0x1F0
/kernel/branches/Kolibri-A/trunk/kernel.asm
695,7 → 695,7
; STACK AND FDC
 
call stack_init
call fdc_init
; call fdc_init
 
 
; LOAD DEFAULT SKIN
1998,23 → 1998,8
version_end:
endg
 
sys_cachetodiskette:
cmp ebx, 1
jne .no_floppy_a_save
mov [flp_number], 1
jmp .save_image_on_floppy
.no_floppy_a_save:
cmp ebx, 2
jne .no_floppy_b_save
mov [flp_number], 2
.save_image_on_floppy:
call save_image
mov [esp + 32], dword 0
cmp [FDC_Status], 0
je .yes_floppy_save
.no_floppy_b_save:
mov [esp + 32], dword 1
.yes_floppy_save:
sys_cachetodiskette: ; << removed
mov [esp + 32], ebx
ret
 
uglobal
/kernel/branches/Kolibri-A/trunk/kernel32.inc
211,7 → 211,7
include "fs/fs.inc" ; syscall
include "fs/fat32.inc" ; read / write for fat32 filesystem
include "fs/ntfs.inc" ; read / write for ntfs filesystem
include "fs/fat12.inc" ; read / write for fat12 filesystem
;include "fs/fat12.inc" ; read / write for fat12 filesystem
include "blkdev/rd.inc" ; ramdisk read /write
include "fs/fs_lfn.inc" ; syscall, version 2
;include "fs/iso9660.inc" ; read for iso9660 filesystem CD
253,7 → 253,7
; Floppy drive controller
 
include "blkdev/fdc.inc"
include "blkdev/flp_drv.inc"
;include "blkdev/flp_drv.inc"
 
; IDE cache
include "blkdev/ide_cache.inc"
261,11 → 261,6
; HD drive controller
include "blkdev/hd_drv.inc"
 
; CD drive controller
 
;include "blkdev/cdrom.inc"
;include "blkdev/cd_drv.inc"
 
; Character devices
 
include "hid/keyboard.inc"
/kernel/branches/Kolibri-A/trunk/memmap.inc
80,6 → 80,7
; C402 -> C7FF window position in stack
; D000 -> D1FF FDC controller
; D200 -> D3FF FDC controller for Fat12
; - D201..D2A1 cleaned in fdc.init (fs/fdc.inc)
; D400 -> DFFF free (3k)
 
; E000 -> F9FF free (6k5)