From 8a94df9a7611458d1a401ae17fe154b72c70006b Mon Sep 17 00:00:00 2001 From: turbanoff Date: Sat, 23 Jan 2010 16:01:24 +0000 Subject: [PATCH] small fix git-svn-id: svn://kolibrios.org@1379 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/data32.inc | 1 - kernel/trunk/fs/fat32.inc | 4 +- kernel/trunk/fs/fs.inc | 3 +- kernel/trunk/fs/fs_lfn.inc | 12 +- kernel/trunk/fs/ntfs.inc | 8 +- kernel/trunk/fs/part_set.inc | 69 +++-- kernel/trunk/kernel32.inc | 561 +++++++++++++++++------------------ 7 files changed, 323 insertions(+), 335 deletions(-) diff --git a/kernel/trunk/data32.inc b/kernel/trunk/data32.inc index ab8669f005..90e307d33a 100644 --- a/kernel/trunk/data32.inc +++ b/kernel/trunk/data32.inc @@ -465,4 +465,3 @@ BiosDiskCaches rb 80h*(cache_ide1-cache_ide0) BiosDiskPartitions rd 80h IncludeUGlobals - diff --git a/kernel/trunk/fs/fat32.inc b/kernel/trunk/fs/fat32.inc index 7742e11b7c..67a9b8f34d 100644 --- a/kernel/trunk/fs/fat32.inc +++ b/kernel/trunk/fs/fat32.inc @@ -169,6 +169,7 @@ reserve_hd_channel: call clear_hd_cache @@: pop eax + sti .ret: ret @@ -2930,5 +2931,4 @@ fs_HdDelete: @@: ret -; \end{diamond} - +; \end{diamond} diff --git a/kernel/trunk/fs/fs.inc b/kernel/trunk/fs/fs.inc index 49c68eeb4b..dc1afdbfd0 100644 --- a/kernel/trunk/fs/fs.inc +++ b/kernel/trunk/fs/fs.inc @@ -794,5 +794,4 @@ error: jmp i4 partition_string: dd 0 - db 32 - + db 32 diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index 1282f70366..e79c1c1ae0 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -104,12 +104,7 @@ file_system_lfn: ; 8 : delete file ; 9 : create directory -; parse file name - cmp dword [eax], 1 - jne @F - ;xchg bx,bx -@@: - ;up to file_system_lfn - TEMP!!! +; parse file name xchg ebx, eax lea esi, [ebx+20] lodsb @@ -187,7 +182,7 @@ file_system_lfn: pop ecx mov byte [edx], 1 ; version .maindir_loop: - call esi ;!!!!!!!!!!!!!!!!!! + call esi jc .maindir_done inc dword [edx+8] dec dword [esp] @@ -1147,5 +1142,4 @@ get_full_file_name: test esi, esi jz .ret.ok mov byte [edi-1], '/' - jmp .set_copy_cont - + jmp .set_copy_cont diff --git a/kernel/trunk/fs/ntfs.inc b/kernel/trunk/fs/ntfs.inc index 03799c67aa..9f417f33b8 100644 --- a/kernel/trunk/fs/ntfs.inc +++ b/kernel/trunk/fs/ntfs.inc @@ -95,7 +95,7 @@ ntfs_test_bootsec: ntfs_setup: ; CODE XREF: part_set.inc ; By given bootsector, initialize some NTFS variables -; call ntfs_test_bootsec +; call ntfs_test_bootsec ; checking boot sector was already ; jc problem_fat_dec_count movzx eax, byte [ebx+13] mov [ntfs_data.sectors_per_cluster], eax @@ -1267,8 +1267,7 @@ ntfs_HdRead: ; eax = 0 ok read or other = errormsg ; ;-------------------------------------------------------------- -ntfs_HdReadFolder: - xchg bx, bx +ntfs_HdReadFolder: mov eax, 5 ; root cluster cmp byte [esi], 0 jz .doit @@ -1813,5 +1812,4 @@ ntfs_HdGetFileInfo: call ntfs_direntry_to_bdfe pop edi esi xor eax, eax - ret - + ret diff --git a/kernel/trunk/fs/part_set.inc b/kernel/trunk/fs/part_set.inc index acc5d9d566..c10b03c0fe 100644 --- a/kernel/trunk/fs/part_set.inc +++ b/kernel/trunk/fs/part_set.inc @@ -55,7 +55,7 @@ fs_dependent_data_end: file_system_data_size = $ - PARTITION_START if file_system_data_size > 96 ERROR: sizeof(file system data) too big! -end if +end if virtual at fs_dependent_data_start ; NTFS data @@ -76,30 +76,30 @@ ntfs_data: if $ > fs_dependent_data_end ERROR: increase sizeof(fs_dependent_data)! end if -end virtual - +end virtual + virtual at fs_dependent_data_start ; EXT2 data ext2_data: - .log_block_size dd ? - .block_size dd ? - .count_block_in_block dd ? - .blocks_per_group dd ? - .inodes_per_group dd ? - .global_desc_table dd ? - .root_inode dd ? ; pointer to root inode in memory - .inode_size dd ? - .count_pointer_in_block dd ? ; block_size / 4 - .count_pointer_in_block_square dd ? ; (block_size / 4)**2 - .ext2_save_block dd ? ; блок на глобальную 1 процедуру - .ext2_temp_block dd ? ; блок для мелких процедур - .ext2_save_inode dd ? ; inode на глобальную процедуру + .log_block_size dd ? + .block_size dd ? + .count_block_in_block dd ? + .blocks_per_group dd ? + .inodes_per_group dd ? + .global_desc_table dd ? + .root_inode dd ? ; pointer to root inode in memory + .inode_size dd ? + .count_pointer_in_block dd ? ; block_size / 4 + .count_pointer_in_block_square dd ? ; (block_size / 4)**2 + .ext2_save_block dd ? ; блок на глобальную 1 процедуру + .ext2_temp_block dd ? ; блок для мелких процедур + .ext2_save_inode dd ? ; inode на глобальную процедуру .ext2_temp_inode dd ? ; inode для мелких процедур if $ > fs_dependent_data_end ERROR: increase sizeof(fs_dependent_data)! end if end virtual - + ;*************************************************************************** ; End place ; Mario79 @@ -126,7 +126,7 @@ iglobal db 0xd4 ; Old Multiuser DOS secured: fat16 <32M db 0xd6 ; Old Multiuser DOS secured: fat16 >32M db 0x07 ; NTFS - db 0x17 ; NTFS, hidden + db 0x27 ; NTFS, hidden db 0x83 ; Linux native file system (ext2fs) partition_types_end: @@ -141,13 +141,13 @@ iglobal endg ; Partition chain used: -; MBR <--------------------- -; | | -; |-> PARTITION1 | -; |-> EXTENDED PARTITION - ;not need be second partition -; |-> PARTITION3 -; |-> PARTITION4 - +; MBR <--------------------- +; | | +; |-> PARTITION1 | +; |-> EXTENDED PARTITION - ;not need be second partition +; |-> PARTITION3 +; |-> PARTITION4 + set_PARTITION_variables: set_FAT32_variables: ;deprecated mov [problem_partition],0 @@ -392,14 +392,14 @@ boot_read_ok: ; if we are running on NTFS, check bootsector call ntfs_test_bootsec ; test ntfs - jnc ntfs_setup - - call ext2_test_superblock ; test ext2fs - jnc ext2_setup - - mov eax, [PARTITION_START] ;ext2 test changes [buffer] - call hd_read - cmp [hd_error], 0 + jnc ntfs_setup + + call ext2_test_superblock ; test ext2fs + jnc ext2_setup + + mov eax, [PARTITION_START] ;ext2 test changes [buffer] + call hd_read + cmp [hd_error], 0 jnz problem_fat_dec_count cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector? @@ -505,5 +505,4 @@ fat16_partition: mov [fs_type],16 ; Fat16 call free_hd_channel mov [hd1_status],0 ; free - ret - + ret diff --git a/kernel/trunk/kernel32.inc b/kernel/trunk/kernel32.inc index 6db891138e..f0520e1427 100644 --- a/kernel/trunk/kernel32.inc +++ b/kernel/trunk/kernel32.inc @@ -1,103 +1,103 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;; KERNEL32.INC ;; -;; ;; -;; Included 32 bit kernel files for MenuetOS ;; -;; ;; -;; This file is kept separate as it will be easier to ;; -;; maintain and compile with an automated SETUP program ;; -;; in the future. ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -$Revision$ - - -;struc db [a] { common . db a -; if ~used . -; display 'not used db: ',`.,13,10 -; end if } -;struc dw [a] { common . dw a -; if ~used . -; display 'not used dw: ',`.,13,10 -; end if } -;struc dd [a] { common . dd a -; if ~used . -; display 'not used dd: ',`.,13,10 -; end if } -;struc dp [a] { common . dp a -; if ~used . -; display 'not used dp: ',`.,13,10 -; end if } -;struc dq [a] { common . dq a -; if ~used . -; display 'not used dq: ',`.,13,10 -; end if } -;struc dt [a] { common . dt a -; if ~used . -; display 'not used dt: ',`.,13,10 -; end if } - -struc RECT { - .left dd ? - .top dd ? - .right dd ? - .bottom dd ? -} -virtual at 0 - RECT RECT -end virtual - -struc BOX { - .left dd ? - .top dd ? - .width dd ? - .height dd ? -} -virtual at 0 - BOX BOX -end virtual - -struc DISPMODE { - .width rw 1 - .height rw 1 - .bpp rw 1 - .freq rw 1 -} - -; constants definition -WSTATE_NORMAL = 00000000b -WSTATE_MAXIMIZED = 00000001b -WSTATE_MINIMIZED = 00000010b -WSTATE_ROLLEDUP = 00000100b - -WSTATE_REDRAW = 00000001b -WSTATE_WNDDRAWN = 00000010b - -WSTYLE_HASCAPTION = 00010000b -WSTYLE_CLIENTRELATIVE = 00100000b - -struc TASKDATA -{ - .event_mask dd ? - .pid dd ? - dw ? - .state db ? - db ? - dw ? - .wnd_number db ? - db ? - .mem_start dd ? - .counter_sum dd ? - .counter_add dd ? - .cpu_usage dd ? -} -virtual at 0 - TASKDATA TASKDATA -end virtual +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;; KERNEL32.INC ;; +;; ;; +;; Included 32 bit kernel files for MenuetOS ;; +;; ;; +;; This file is kept separate as it will be easier to ;; +;; maintain and compile with an automated SETUP program ;; +;; in the future. ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +$Revision$ + + +;struc db [a] { common . db a +; if ~used . +; display 'not used db: ',`.,13,10 +; end if } +;struc dw [a] { common . dw a +; if ~used . +; display 'not used dw: ',`.,13,10 +; end if } +;struc dd [a] { common . dd a +; if ~used . +; display 'not used dd: ',`.,13,10 +; end if } +;struc dp [a] { common . dp a +; if ~used . +; display 'not used dp: ',`.,13,10 +; end if } +;struc dq [a] { common . dq a +; if ~used . +; display 'not used dq: ',`.,13,10 +; end if } +;struc dt [a] { common . dt a +; if ~used . +; display 'not used dt: ',`.,13,10 +; end if } + +struc RECT { + .left dd ? + .top dd ? + .right dd ? + .bottom dd ? +} +virtual at 0 + RECT RECT +end virtual + +struc BOX { + .left dd ? + .top dd ? + .width dd ? + .height dd ? +} +virtual at 0 + BOX BOX +end virtual + +struc DISPMODE { + .width rw 1 + .height rw 1 + .bpp rw 1 + .freq rw 1 +} + +; constants definition +WSTATE_NORMAL = 00000000b +WSTATE_MAXIMIZED = 00000001b +WSTATE_MINIMIZED = 00000010b +WSTATE_ROLLEDUP = 00000100b + +WSTATE_REDRAW = 00000001b +WSTATE_WNDDRAWN = 00000010b + +WSTYLE_HASCAPTION = 00010000b +WSTYLE_CLIENTRELATIVE = 00100000b + +struc TASKDATA +{ + .event_mask dd ? + .pid dd ? + dw ? + .state db ? + db ? + dw ? + .wnd_number db ? + db ? + .mem_start dd ? + .counter_sum dd ? + .counter_add dd ? + .cpu_usage dd ? +} +virtual at 0 + TASKDATA TASKDATA +end virtual TSTATE_RUNNING = 0 TSTATE_RUN_SUSPENDED = 1 @@ -106,185 +106,184 @@ TSTATE_ZOMBIE = 3 TSTATE_TERMINATING = 4 TSTATE_WAITING = 5 TSTATE_FREE = 9 - -; structures definition -struc WDATA { - .box BOX - .cl_workarea dd ? - .cl_titlebar dd ? - .cl_frames dd ? - .reserved db ? - .fl_wstate db ? - .fl_wdrawn db ? - .fl_redraw db ? - .sizeof: -} -virtual at 0 - WDATA WDATA -end virtual -label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 - -struc APPDATA -{ - .app_name db 11 dup(?) - db 5 dup(?) - - .fpu_state dd ? ;+16 - .ev_count_ dd ? ;unused ;+20 - .exc_handler dd ? ;+24 - .except_mask dd ? ;+28 - .pl0_stack dd ? ;unused ;+32 - .heap_base dd ? ;+36 - .heap_top dd ? ;+40 - .cursor dd ? ;+44 - .fd_ev dd ? ;+48 - .bk_ev dd ? ;+52 - .fd_obj dd ? ;+56 - .bk_obj dd ? ;+60 - .saved_esp dd ? ;+64 - .io_map rd 2 ;+68 - .dbg_state dd ? ;+76 - .cur_dir dd ? ;+80 - .wait_timeout dd ? ;+84 - .saved_esp0 dd ? ;+88 - .wait_begin dd ? ;+92 +++ - .wait_test dd ? ;+96 +++ - .wait_param dd ? ;+100 +++ - .tls_base dd ? ;+104 - .dlls_list_ptr dd ? ;+108 - db 16 dup(?) ;+112 - - .wnd_shape dd ? ;+128 - .wnd_shape_scale dd ? ;+132 - dd ? ;+136 - .mem_size dd ? ;+140 - .saved_box BOX - .ipc_start dd ? - .ipc_size dd ? - .event_mask dd ? - .debugger_slot dd ? - dd ? - .keyboard_mode db ? - db 3 dup(?) - .dir_table dd ? - .dbg_event_mem dd ? - .dbg_regs: - .dbg_regs.dr0 dd ? - .dbg_regs.dr1 dd ? - .dbg_regs.dr2 dd ? - .dbg_regs.dr3 dd ? - .dbg_regs.dr7 dd ? - .wnd_caption dd ? - .wnd_clientbox BOX -} -virtual at 0 - APPDATA APPDATA -end virtual - -;// mike.dld, 2006-29-01 ] - - -; Core functions -include "core/sync.inc" ; macros for synhronization objects -include "core/sys32.inc" ; process management -include "core/sched.inc" ; process scheduling -include "core/syscall.inc" ; system call -include "core/fpu.inc" ; all fpu/sse support -include "core/memory.inc" -include "core/heap.inc" ; kernel and app heap -include "core/malloc.inc" ; small kernel heap -include "core/taskman.inc" -include "core/dll.inc" -include "core/peload.inc" ; -include "core/exports.inc" -include "core/string.inc" -include "core/v86.inc" ; virtual-8086 manager - -; GUI stuff -include "gui/window.inc" -include "gui/event.inc" -include "gui/font.inc" -include "gui/button.inc" - -; shutdown - -; file system - -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 "blkdev/rd.inc" ; ramdisk read /write -include "fs/fs_lfn.inc" ; syscall, version 2 -include "fs/iso9660.inc" ; read for iso9660 filesystem CD -include "fs/ext2.inc" ; read / write for ext2 filesystem - -; sound - -include "sound/playnote.inc" ; player Note for Speaker PC - -; display - -include "video/vesa12.inc" ; Vesa 1.2 functions -include "video/vesa20.inc" ; Vesa 2.0 functions -include "video/vga.inc" ; VGA 16 color functions -include "video/cursors.inc" ; cursors functions - -; Network Interface & TCPIP Stack - -include "network/stack.inc" - -;include "drivers/uart.inc" - - -; Mouse pointer - -include "gui/mouse.inc" - -; Window skinning - -include "gui/skincode.inc" - -; Pci functions - -include "bus/pci/pci32.inc" - -; Floppy drive controller - -include "blkdev/fdc.inc" -include "blkdev/flp_drv.inc" - -; IDE cache -include "blkdev/ide_cache.inc" - -; 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" -include "hid/mousedrv.inc" - -; setting date,time,clock and alarm-clock - -include "hid/set_dtc.inc" - -;% -include - -;parser file names -include "fs/parse_fn.inc" - -; work with conf lib -include "core/conf_lib.inc" - -; load external lib -include "core/ext_lib.inc" - -; list of external functions -include "imports.inc" +; structures definition +struc WDATA { + .box BOX + .cl_workarea dd ? + .cl_titlebar dd ? + .cl_frames dd ? + .reserved db ? + .fl_wstate db ? + .fl_wdrawn db ? + .fl_redraw db ? + .sizeof: +} +virtual at 0 + WDATA WDATA +end virtual +label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 + +struc APPDATA +{ + .app_name db 11 dup(?) + db 5 dup(?) + + .fpu_state dd ? ;+16 + .ev_count_ dd ? ;unused ;+20 + .exc_handler dd ? ;+24 + .except_mask dd ? ;+28 + .pl0_stack dd ? ;unused ;+32 + .heap_base dd ? ;+36 + .heap_top dd ? ;+40 + .cursor dd ? ;+44 + .fd_ev dd ? ;+48 + .bk_ev dd ? ;+52 + .fd_obj dd ? ;+56 + .bk_obj dd ? ;+60 + .saved_esp dd ? ;+64 + .io_map rd 2 ;+68 + .dbg_state dd ? ;+76 + .cur_dir dd ? ;+80 + .wait_timeout dd ? ;+84 + .saved_esp0 dd ? ;+88 + .wait_begin dd ? ;+92 +++ + .wait_test dd ? ;+96 +++ + .wait_param dd ? ;+100 +++ + .tls_base dd ? ;+104 + .dlls_list_ptr dd ? ;+108 + db 16 dup(?) ;+112 + + .wnd_shape dd ? ;+128 + .wnd_shape_scale dd ? ;+132 + dd ? ;+136 + .mem_size dd ? ;+140 + .saved_box BOX + .ipc_start dd ? + .ipc_size dd ? + .event_mask dd ? + .debugger_slot dd ? + dd ? + .keyboard_mode db ? + db 3 dup(?) + .dir_table dd ? + .dbg_event_mem dd ? + .dbg_regs: + .dbg_regs.dr0 dd ? + .dbg_regs.dr1 dd ? + .dbg_regs.dr2 dd ? + .dbg_regs.dr3 dd ? + .dbg_regs.dr7 dd ? + .wnd_caption dd ? + .wnd_clientbox BOX +} +virtual at 0 + APPDATA APPDATA +end virtual + +;// mike.dld, 2006-29-01 ] + + +; Core functions +include "core/sync.inc" ; macros for synhronization objects +include "core/sys32.inc" ; process management +include "core/sched.inc" ; process scheduling +include "core/syscall.inc" ; system call +include "core/fpu.inc" ; all fpu/sse support +include "core/memory.inc" +include "core/heap.inc" ; kernel and app heap +include "core/malloc.inc" ; small kernel heap +include "core/taskman.inc" +include "core/dll.inc" +include "core/peload.inc" ; +include "core/exports.inc" +include "core/string.inc" +include "core/v86.inc" ; virtual-8086 manager + +; GUI stuff +include "gui/window.inc" +include "gui/event.inc" +include "gui/font.inc" +include "gui/button.inc" + +; shutdown + +; file system + +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 "blkdev/rd.inc" ; ramdisk read /write +include "fs/fs_lfn.inc" ; syscall, version 2 +include "fs/iso9660.inc" ; read for iso9660 filesystem CD +include "fs/ext2.inc" ; read / write for ext2 filesystem + +; sound + +include "sound/playnote.inc" ; player Note for Speaker PC + +; display + +include "video/vesa12.inc" ; Vesa 1.2 functions +include "video/vesa20.inc" ; Vesa 2.0 functions +include "video/vga.inc" ; VGA 16 color functions +include "video/cursors.inc" ; cursors functions + +; Network Interface & TCPIP Stack + +include "network/stack.inc" + +;include "drivers/uart.inc" + + +; Mouse pointer + +include "gui/mouse.inc" + +; Window skinning + +include "gui/skincode.inc" + +; Pci functions + +include "bus/pci/pci32.inc" + +; Floppy drive controller + +include "blkdev/fdc.inc" +include "blkdev/flp_drv.inc" + +; IDE cache +include "blkdev/ide_cache.inc" + +; 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" +include "hid/mousedrv.inc" + +; setting date,time,clock and alarm-clock + +include "hid/set_dtc.inc" + +;% -include + +;parser file names +include "fs/parse_fn.inc" + +; work with conf lib +include "core/conf_lib.inc" + +; load external lib +include "core/ext_lib.inc" + +; list of external functions +include "imports.inc"