Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 520 → Rev 521

/kernel/trunk/blkdev/rd.inc
995,7 → 995,7
ret
 
rd_find_lfn:
; in: esi->name
; in: esi+ebp -> name
; out: CF=1 - file not found
; else CF=0 and edi->direntry
push esi edi
1007,6 → 1007,7
jc .notfound
cmp byte [esi], 0
jz .found
.continue:
test byte [edi+11], 10h
jz .notfound
movzx eax, word [edi+26]
1020,6 → 1021,12
stc
ret
.found:
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
jmp .continue
@@:
mov eax, [esp+8]
add esp, 16 ; CF=0
pop esi
1501,8 → 1508,11
cmp byte [esi], 0
jz @b
pushad
xor ebp, ebp
xor edi, edi
push esi
test ebp, ebp
jz @f
mov esi, ebp
@@:
lodsb
test al, al
1509,28 → 1519,42
jz @f
cmp al, '/'
jnz @b
lea ebp, [esi-1]
lea edi, [esi-1]
jmp @b
@@:
pop esi
test edi, edi
jnz .noroot
test ebp, ebp
jnz .noroot
jnz .hasebp
push ramdisk_root_extend_dir
push ramdisk_root_next_write
push ebp
push edi
push ramdisk_root_first
push ramdisk_root_next
jmp .common1
.hasebp:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp], 0
jz .ret1
push ebp
xor ebp, ebp
call rd_find_lfn
pop esi
jc .notfound0
jmp .common0
.noroot:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp+1], 0
cmp byte [edi+1], 0
jz .ret1
; check existence
mov byte [ebp], 0
mov byte [edi], 0
push edi
call rd_find_lfn
mov byte [ebp], '/'
lea esi, [ebp+1]
pop esi
mov byte [esi], '/'
jnc @f
.notfound0:
mov eax, ERROR_FILE_NOT_FOUND
.ret1:
mov [esp+28], eax
1538,6 → 1562,8
xor ebx, ebx
ret
@@:
inc esi
.common0:
test byte [edi+11], 0x10 ; must be directory
mov eax, ERROR_ACCESS_DENIED
jz .ret1
2285,97 → 2311,6
 
;----------------------------------------------------------------
;
; fs_RamdiskExecute - LFN variant for executing on sys floppy
;
; esi points to ramdisk filename (e.g. 'launcher')
; ebp points to full filename (e.g. '/rd/1/launcher')
; dword [ebx] = flags
; dword [ebx+4] = cmdline
;
; ret ebx,edx destroyed
; eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
fs_RamdiskExecute:
mov edx, [ebx]
mov ebx, [ebx+4]
test ebx, ebx
jz @f
; add ebx, std_application_base_address
@@:
 
;----------------------------------------------------------------
;
; fs_RamdiskExecute.flags - second entry
;
; esi points to ramdisk filename (kernel address)
; ebp points to full filename
; edx flags
; ebx cmdline (kernel address)
;
; ret eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
 
.flags:
cmp byte [esi], 0
jnz @f
; cannot execute root!
mov eax, -ERROR_ACCESS_DENIED
ret
@@:
push edi
call rd_find_lfn
jnc .found
pop edi
mov eax, -ERROR_FILE_NOT_FOUND
ret
.found:
movzx eax, word [edi+26] ; cluster
push eax
push dword [edi+28] ; size
push .DoRead
call fs_execute
add esp, 12
pop edi
ret
 
.DoRead:
; read next block
; in: eax->parameters, edi->buffer
; out: eax = error code
pushad
cmp dword [eax], 0 ; file size
jz .eof
mov edx, [eax+4] ; cluster
lea esi, [edx+31]
shl esi, 9
add esi, RAMDISK
mov ecx, 512/4
rep movsd
mov ecx, [eax]
sub ecx, 512
jae @f
add edi, ecx
neg ecx
push eax
xor eax, eax
rep stosb
pop eax
@@:
mov [eax], ecx
mov dx, [edx*2+RAMDISK_FAT]
mov [eax+4], dx ; high word is already zero
popad
xor eax, eax
ret
.eof:
popad
mov eax, 6
ret
 
;----------------------------------------------------------------
;
; fs_RamdiskDelete - delete file or empty folder from ramdisk
;
; esi points to filename
/kernel/trunk/core/conf_lib.inc
10,7 → 10,7
conf_file_loaded: db 0 ; ä« £ § £à㧪¨ ª®­ä¨£ 
conf_path_sect: db 'path',0
 
conf_fname db '%sys%/sys.conf',0
conf_fname db '/%sys%/sys.conf',0
 
 
 
/kernel/trunk/core/dll.inc
526,10 → 526,12
lea edi, [eax+ebx] ;cleanup remain space
mov ecx, 4096 ;from file end
and ebx, 4095
jz @f
sub ecx, ebx
xor eax, eax
cld
rep stosb
@@:
mov ebx, [file_size]
pop eax
ret
696,16 → 698,16
 
exports dd ? ;fake exports table
dd ?
file_name rb 14+16+4+1 ; '/rd/1/drivers/<up-to-16-chars>.obj'
file_name rb 15+16+4+1 ; '/%sys%/drivers/<up-to-16-chars>.obj'
endl
 
lea edx, [file_name]
mov dword [edx], '%sys'
mov dword [edx+4], '%/dr'
mov dword [edx+8], 'iver'
mov word [edx+12], 's/'
mov dword [edx], '/%sy'
mov dword [edx+4], 's%/d'
mov dword [edx+8], 'rive'
mov dword [edx+12], 'rs/'
mov esi, [driver_name]
lea edi, [edx+14]
lea edi, [edx+15]
mov ecx, 16
@@:
lodsb
/kernel/trunk/core/ext_lib.inc
15,7 → 15,6
common
dd 0
forward
align 4
__#name#_library_name__ db fname,0
}
 
29,18 → 28,17
common
dd 0
forward
align 4
__#name#_import_name__ db sname,0
}
 
macro export [name,sname]
{
align 4
forward
dd __#name#_export_name__,name
common
dd 0
forward
align 4
__#name#_export_name__ db sname,0
}
 
159,7 → 157,9
 
mov edi,s_libname
 
mov esi,sys_path
mov al, '/'
stosb
mov esi,sysdir_path
@@: lodsb
stosb
or al,al
306,4 → 306,6
ret
endp
 
uglobal
s_libname db 64 dup (0)
endg
/kernel/trunk/core/sys32.inc
646,10 → 646,15
 
mov ebx, [.slot]
shl ebx, 8
push ebx
mov ebx,[SLOT_BASE+ebx+APPDATA.pl0_stack]
 
stdcall kernel_free, ebx
 
pop ebx
mov ebx,[SLOT_BASE+ebx+APPDATA.cur_dir]
stdcall kernel_free, ebx
 
mov edi, [.slot]
shl edi,8
add edi,SLOT_BASE
/kernel/trunk/core/syscall.inc
169,7 → 169,7
dd undefined_syscall ; 27-reserved
dd sys_sb16II ; 28-SetSb16
dd sys_date ; 29-GetDate
dd undefined_syscall ; 30-reserved
dd sys_current_directory ; 30-Get/SetCurrentDirectory
dd undefined_syscall ; 31-reserved
dd syscall_delramdiskfile ; 32-DelRamdiskFile
dd syscall_writeramdiskfile; 33-WriteRamdiskFile
/kernel/trunk/core/taskman.inc
44,6 → 44,10
rep stosd
}
 
fs_execute_from_sysdir:
xor ebx, ebx
xor edx, edx
mov esi, sysdir_path
 
align 4
proc fs_execute
80,10 → 84,34
 
; [ebp] pointer to filename
 
lea eax, [filename]
mov dword [eax+1020],0 ;force terminate
;string
stdcall strncpy, eax, [ebp], 1023
lea edi, [filename]
lea ecx, [edi+1024]
mov al, '/'
stosb
@@:
cmp edi, ecx
jae .bigfilename
lodsb
stosb
test al, al
jnz @b
mov esi, [ebp]
test esi, esi
jz .namecopied
mov byte [edi-1], '/'
@@:
cmp edi, ecx
jae .bigfilename
lodsb
stosb
test al, al
jnz @b
jmp .namecopied
.bigfilename:
popad
mov eax, -ERROR_FILE_NOT_FOUND
ret
.namecopied:
 
mov [cmdline], ebx
test ebx, ebx
688,7 → 716,7
 
mov [slot], eax
mov [buff], ebx
mov [r_count], ecx
and [r_count], 0
mov [tmp_r_cnt], ecx
mov [offset], edx
 
724,6 → 752,7
mov edi, [buff]
mov edx, ecx
rep movsb
add [r_count], edx
 
add [offset], edx
sub [tmp_r_cnt], edx
754,7 → 783,7
 
mov [slot], eax
mov [buff], ebx
mov [w_count], ecx
and [w_count], 0
mov [tmp_w_cnt], ecx
mov [offset], edx
 
791,6 → 820,7
mov edx, ecx
rep movsb
 
add [w_count], edx
add [offset], edx
sub [tmp_w_cnt], edx
jnz .read_mem
964,6 → 994,16
mov eax, [pl0_stack]
mov [SLOT_BASE+APPDATA.pl0_stack+ebx],eax
 
push ebx
stdcall kernel_alloc, 0x1000
pop ebx
mov esi,[current_slot]
mov esi,[esi+APPDATA.cur_dir]
mov ecx,0x1000/4
mov edi,eax
mov [ebx+SLOT_BASE+APPDATA.cur_dir],eax
rep movsd
 
shr ebx,3
mov eax, new_app_base
mov dword [CURRENT_TASK+ebx+0x10],eax
/kernel/trunk/data32.inc
82,30 → 82,15
szEXPORTS db 'EXPORTS',0
szIMPORTS db 'IMPORTS',0
 
firstapp db '%sys%/LAUNCHER',0
firstapp db 'LAUNCHER',0
 
if 0
char dd 0,0,0
dd 2560
dd FONT_I
db '%sys%/FONTS/CHAR.MT',0
char db '/%sys%/FONTS/CHAR.MT',0
char2 db '/%sys%/FONTS/CHAR2.MT',0
 
char2 dd 0,0,0
dd 2560
dd FONT_II
db '%sys%/FONTS/CHAR2.MT',0
else
 
char db '%sys%/FONTS/CHAR.MT',0
char2 db '%sys%/FONTS/CHAR2.MT',0
 
end if
 
 
bootpath db '/KOLIBRI '
bootpath2 db 0
vmode db 'drivers/VMODE.MDR',0
vrr_m db '%sys%/VRR_M',0
vrr_m db 'VRR_M',0
kernel_file db 'KERNEL MNT'
 
 
/kernel/trunk/docs/sysfuncr.txt
1667,6 → 1667,31
* ‘¨á⥬­ãî ¤ âã ¬®¦­® ãáâ ­®¢¨âì ä㭪樥© 22.
 
======================================================================
================ ”ã­ªæ¨ï 30 - à ¡®â  á ⥪ã饩 ¯ ¯ª®©. ===============
======================================================================
 
-------- ®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì ⥪ãéãî ¯ ¯ªã ¤«ï ¯®â®ª . ---------
 à ¬¥âàë:
* eax = 30 - ­®¬¥à ä㭪樨
* ebx = 1 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ASCIIZ-áâபã á ¯ãâñ¬ ª ­®¢®© ⥪ã饩 ¯ ¯ª¥
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
 
--------- ®¤äã­ªæ¨ï 2 - ¯®«ãç¨âì ⥪ãéãî ¯ ¯ªã ¤«ï ¯®â®ª . ----------
 à ¬¥âàë:
* eax = 30 - ­®¬¥à ä㭪樨
* ebx = 2 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ¡ãä¥à
* edx = à §¬¥à ¡ãä¥à 
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = ¤«¨­  ¨¬¥­¨ ⥪ã饩 ¯ ¯ª¨ (¢ª«îç ï § ¢¥àè î騩 0)
‡ ¬¥ç ­¨ï:
* …᫨ à §¬¥à  ¡ãä¥à  ­¥¤®áâ â®ç­® ¤«ï ª®¯¨à®¢ ­¨ï ¢á¥£® ¨¬¥­¨,
ª®¯¨àãîâáï ⮫쪮 ¯¥à¢ë¥ (edx-1) ¡ ©â
¨ ¢ ª®­æ¥ áâ ¢¨âáï § ¢¥àè î騩 0.
 
======================================================================
================ ”ã­ªæ¨ï 32 - 㤠«¨âì ä ©« á à ¬¤¨áª . ===============
======================================================================
 à ¬¥âàë:
/kernel/trunk/docs/sysfuncs.txt
1642,6 → 1642,30
* To set system date use function 22.
 
======================================================================
============= Function 30 - work with the current folder. ============
======================================================================
 
--------- Subfunction 1 - set current folder for the thread. ---------
Parameters:
* eax = 30 - function number
* ebx = 1 - subfunction number
* ecx = pointer to ASCIIZ-string with the path to new current folder
Returned value:
* function does not return value
 
--------- Subfunction 2 - get current folder for the thread. ---------
Parameters:
* eax = 30 - function number
* ebx = 2 - subfunction number
* ecx = pointer to buffer
* edx = size of buffer
Returned value:
* eax = size of the current folder's name (including terminating 0)
Remarks:
* If the buffer is too small to hold all data, only first (edx-1)
bytes are copied and than terminating 0 is inserted.
 
======================================================================
=============== Function 32 - delete file from ramdisk. ==============
======================================================================
Parameters:
/kernel/trunk/fs/fat12.inc
809,7 → 809,7
ret
 
fd_find_lfn:
; in: esi->name
; in: esi+ebp -> name
; out: CF=1 - file not found
; else CF=0 and edi->direntry, eax=directory cluster (0 for root)
push esi edi
821,6 → 821,7
jc .notfound
cmp byte [esi], 0
jz .found
.continue:
test byte [edi+11], 10h
jz .notfound
movzx eax, word [edi+26] ; cluster
834,6 → 835,12
stc
ret
.found:
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
jmp .continue
@@:
mov eax, [esp+8]
add eax, 31
cmp dword [esp], flp_root_next
1116,8 → 1123,11
cmp [FDC_Status], 0
jnz fsfrfe
pushad
xor ebp, ebp
xor edi, edi
push esi
test ebp, ebp
jz @f
mov esi, ebp
@@:
lodsb
test al, al
1124,12 → 1134,14
jz @f
cmp al, '/'
jnz @b
lea ebp, [esi-1]
lea edi, [esi-1]
jmp @b
@@:
pop esi
test edi, edi
jnz .noroot
test ebp, ebp
jnz .noroot
jnz .hasebp
call read_flp_root
cmp [FDC_Status], 0
jnz fsfrfe2
1142,16 → 1154,28
push flp_rootmem_first
push flp_rootmem_next
jmp .common1
.hasebp:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp], 0
jz .ret1
push ebp
xor ebp, ebp
call fd_find_lfn
pop esi
jc .notfound0
jmp .common0
.noroot:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp+1], 0
cmp byte [edi+1], 0
jz .ret1
; check existence
mov byte [ebp], 0
mov byte [edi], 0
push edi
call fd_find_lfn
mov byte [ebp], '/'
lea esi, [ebp+1]
pop esi
mov byte [esi], '/'
jnc @f
.notfound0:
mov eax, ERROR_FILE_NOT_FOUND
.ret1:
mov [esp+28], eax
1159,6 → 1183,8
xor ebx, ebx
ret
@@:
inc esi
.common0:
test byte [edi+11], 0x10 ; must be directory
mov eax, ERROR_ACCESS_DENIED
jz .ret1
2109,112 → 2135,8
@@:
ret
 
if 0
;----------------------------------------------------------------
;
; fs_FloppyExecute - LFN variant for executing from floppy
;
; esi points to floppy filename (e.g. 'dir1/name')
; ebp points to full filename (e.g. '/fd/1/dir1/name')
; dword [ebx] = flags
; dword [ebx+4] = cmdline
;
; ret ebx,edx destroyed
; eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
fs_FloppyExecute:
mov edx, [ebx]
mov ebx, [ebx+4]
test ebx, ebx
jz @f
; add ebx, std_application_base_address
@@:
 
;----------------------------------------------------------------
;
; fs_FloppyExecute.flags - second entry
;
; esi points to floppy filename (kernel address)
; ebp points to full filename
; edx flags
; ebx cmdline (kernel address)
;
; ret eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
 
.flags:
call read_flp_fat
cmp byte [esi], 0
jnz @f
; cannot execute root!
mov eax, -ERROR_ACCESS_DENIED
ret
@@:
push edi
call fd_find_lfn
jnc .found
pop edi
mov eax, -ERROR_FILE_NOT_FOUND
ret
.found:
movzx eax, word [edi+26] ; cluster
push eax
push dword [edi+28] ; size
push .DoRead
call fs_execute
add esp, 12
pop edi
ret
 
.DoRead:
; read next block
; in: eax->parameters, edi->buffer
; out: eax = error code
pushad
cmp dword [eax], 0 ; file size
jz .eof
mov eax, [eax+4] ; cluster
add eax, 31
call read_chs_sector
cmp [FDC_Status], 0
jnz .err
pop edi
mov esi, FDD_BUFF
push edi
mov ecx, 512/4
rep movsd
mov eax, [esp+28]
mov ecx, [eax]
sub ecx, 512
jae @f
add edi, ecx
neg ecx
push eax
xor eax, eax
rep stosb
pop eax
@@:
mov [eax], ecx
mov edx, [eax+4]
mov dx, [edx*2+FLOPPY_FAT]
mov [eax+4], dx ; high word is already zero
popad
xor eax, eax
ret
.eof:
popad
mov eax, 6
ret
.err:
popad
mov eax, 11
ret
end if
 
;----------------------------------------------------------------
;
; fs_FloppyDelete - delete file or empty folder from floppy
;
; esi points to filename
/kernel/trunk/fs/fat32.inc
956,7 → 956,7
 
; \begin{diamond}
hd_find_lfn:
; in: esi->name
; in: esi+ebp -> name
; out: CF=1 - file not found
; else CF=0 and edi->direntry, eax=sector
; destroys eax
973,6 → 973,7
jc .notfound
cmp byte [esi], 0
jz .found
.continue:
test byte [edi+11], 10h
jz .notfound
and dword [esp+12], 0
989,6 → 990,12
stc
ret
.found:
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
jmp .continue
@@:
lea eax, [esp+8]
cmp dword [eax], 0
jz .root
1573,8 → 1580,11
cmp byte [esi], 0
jz fshrad
pushad
xor ebp, ebp
xor edi, edi
push esi
test ebp, ebp
jz @f
mov esi, ebp
@@:
lodsb
test al, al
1581,12 → 1591,14
jz @f
cmp al, '/'
jnz @b
lea ebp, [esi-1]
lea edi, [esi-1]
jmp @b
@@:
pop esi
test edi, edi
jnz .noroot
test ebp, ebp
jnz .noroot
jnz .hasebp
mov ebp, [ROOT_CLUSTER]
cmp [fs_type], 32
jz .pushnotroot
1600,16 → 1612,28
push fat16_root_first
push fat16_root_next
jmp .common1
.hasebp:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp], 0
jz .ret1
push ebp
xor ebp, ebp
call hd_find_lfn
pop esi
jc .notfound0
jmp .common0
.noroot:
mov eax, ERROR_ACCESS_DENIED
cmp byte [ebp+1], 0
cmp byte [edi+1], 0
jz .ret1
; check existence
mov byte [ebp], 0
mov byte [edi], 0
push edi
call hd_find_lfn
mov byte [ebp], '/'
lea esi, [ebp+1]
pop esi
mov byte [esi], '/'
jnc @f
.notfound0:
mov eax, ERROR_FILE_NOT_FOUND
.ret1:
mov [esp+28], eax
1617,6 → 1641,8
xor ebx, ebx
ret
@@:
inc esi
.common0:
test byte [edi+11], 0x10 ; must be directory
mov eax, ERROR_ACCESS_DENIED
jz .ret1
2723,131 → 2749,8
xor eax, eax
ret
 
if 0 ; starting from revision 237 execute is implemented in taskman.inc
; through fs_XxxGetFileInfo and fs_XxxRead
;----------------------------------------------------------------
;
; fs_HdExecute - LFN variant for executing from harddisk
;
; esi points to hd filename (e.g. 'dir1/name')
; ebp points to full filename (e.g. '/hd0/1/dir1/name')
; dword [ebx] = flags
; dword [ebx+4] = cmdline
;
; ret ebx,edx destroyed
; eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
fs_HdExecute:
mov edx, [ebx]
mov ebx, [ebx+4]
test ebx, ebx
jz @f
; add ebx, std_application_base_address
@@:
 
;----------------------------------------------------------------
;
; fs_HdExecute.flags - second entry
;
; esi points to floppy filename (kernel address)
; ebp points to full filename
; edx flags
; ebx cmdline (kernel address)
;
; ret eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
 
.flags:
cmp [fat_type], 0
jnz @f
mov eax, -ERROR_UNKNOWN_FS
ret
@@:
cmp byte [esi], 0
jnz @f
; cannot execute root!
mov eax, -ERROR_ACCESS_DENIED
ret
@@:
push edi
call hd_find_lfn
jnc .found
pop edi
mov eax, -ERROR_FILE_NOT_FOUND
cmp [hd_error], 0
jz @f
mov al, -11
@@:
ret
.found:
mov eax, [edi+20-2]
mov ax, [edi+26]
push 0
push eax
push dword [edi+28] ; size
push .DoRead
call fs_execute
add esp, 16
pop edi
ret
 
.DoRead:
; read next block
; in: eax->parameters, edi->buffer
; out: eax = error code
pushad
cmp dword [eax], 0 ; file size
jz .eof
add eax, 4
call fat_get_sector
mov ebx, edi
call hd_read
cmp [hd_error], 0
jnz .err
mov eax, [esp+28]
mov ecx, [eax]
sub ecx, 512
jae @f
lea edi, [edi+ecx+512]
neg ecx
push eax
xor eax, eax
rep stosb
pop eax
@@:
mov [eax], ecx
mov edx, [eax+8]
inc edx
cmp edx, [SECTORS_PER_CLUSTER]
jb @f
push eax
mov eax, [eax+4]
call get_FAT
cmp [hd_error], 0
jnz .err
mov ecx, eax
pop eax
mov [eax+4], ecx
xor edx, edx
@@:
mov [eax+8], edx
popad
xor eax, eax
ret
.eof:
popad
mov eax, 6
ret
.err:
popad
mov eax, 11
ret
end if
 
;----------------------------------------------------------------
;
; fs_HdDelete - delete file or empty folder from hard disk
;
; esi points to filename
/kernel/trunk/fs/fs_lfn.inc
6,8 → 6,8
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
image_of_eax EQU esp+44 ;36
image_of_ebx EQU esp+32 ;24
image_of_eax EQU esp+36
image_of_ebx EQU esp+24
 
; System function 70 - files with long names (LFN)
; diamond, 2006
82,12 → 82,6
dd 0
endg
 
end_of_file_system_lfn:
pop edx
stdcall kernel_free, edx
ret
 
 
file_system_lfn:
; in: eax->fileinfo block
; operation codes:
102,84 → 96,39
; 8 : delete file
; 9 : create directory
 
; çàìåíà àäðåñà âîçâðàòà
push eax
stdcall kernel_alloc, 200
mov edx,eax
pop eax
 
push edx
push end_of_file_system_lfn
mov ebx,edx
 
mov ecx, [eax]
mov [ebx],ecx
 
add ebx,4
mov ecx, [eax+4]
mov [ebx],ecx
 
add ebx,4
mov ecx, [eax+8]
mov [ebx],ecx
 
add ebx,4
mov ecx, [eax+12]
mov [ebx],ecx
 
add ebx,4
mov ecx, [eax+16]
mov [ebx],ecx
 
add ebx,4
push edx ; !!!!!!!!!!!!!!!!!!!
; eax - yíà÷àëî ñòàðîãî ïàêåòà
; edx - íà÷àëî íîâîãî ïàêåòà
; ebx - êóäà ëîæèòü ñòðîêó
add eax,20
mov cl, [eax]
test cl,cl
jnz @f
mov eax,[eax+1]
@@:
stdcall full_file_name,eax,ebx
pop eax
 
 
 
; add eax, std_application_base_address
; parse file name
xchg ebx, eax
lea esi, [ebx+20]
mov ebp, esi ; for 'start app' function full path must be known
lodsb
test al, al
jnz @f
mov esi, [esi]
; add esi, std_application_base_address
mov ebp, esi
lodsb
@@:
cmp al, '/'
jz .notcurdir
dec esi
mov ebp, esi
test al, al
jnz @f
xor ebp, ebp
@@:
mov esi, [current_slot]
mov esi, [esi+APPDATA.cur_dir]
jmp .parse_normal
.notcurdir:
cmp byte [esi], 0
jz .rootdir
call process_replace_file_name
.parse_normal:
cmp dword [ebx], 7
jne @F
mov edx, [ebx+4]
mov ebx, [ebx+8]
test ebx, ebx
jz .l1
; add ebx, new_app_base
.l1:
call fs_execute ; ebp, ebx, edx
call fs_execute ; esi+ebp, ebx, edx
mov [image_of_eax], eax
ret
@@:
cmp al, '/'
jz @f
.notfound:
mov dword [image_of_eax], 5 ; file not found
ret
@@:
cmp byte [esi], 0
jz .rootdir
mov edi, rootdirs-8
xor ecx, ecx
push esi
189,7 → 138,8
scasd
scasd
mov cl, byte [edi]
jecxz .notfound
test cl, cl
jz .notfound
inc edi
push esi
@@:
356,6 → 306,10
mov [image_of_eax], eax
mov [image_of_ebx], ebx
ret
.notfound:
mov dword [image_of_eax], ERROR_FILE_NOT_FOUND
and dword [image_of_ebx], 0
ret
 
.found1:
pop eax
373,16 → 327,22
sub al, '0'
cmp al, 9
ja .notfound
imul ecx, 10
add ecx, eax
lea ecx, [ecx*5]
lea ecx, [ecx*2+eax]
jmp @b
.done1:
test ecx, ecx
jz .notfound
jecxz .notfound
test al, al
jnz @f
dec esi
@@:
cmp byte [esi], 0
jnz @f
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
@@:
; now [edi] contains handler address, ecx - partition number,
; esi points to ASCIIZ string - rest of name
jmp dword [edi]
392,6 → 352,7
; in: ecx = partition number
; esi -> relative (for device) name
; ebx -> fileinfo
; ebp = 0 or pointer to rest of name from folder addressed by esi
; out: [image_of_eax]=image of eax, [image_of_ebx]=image of ebx
 
fs_OnRamdisk:
424,7 → 385,7
dd fs_RamdiskSetFileEnd
dd fs_RamdiskGetFileInfo
dd fs_RamdiskSetFileInfo
dd 0 ;fs_RamdiskExecute
dd 0
dd fs_RamdiskDelete
dd fs_RamdiskCreateFolder
fs_NumRamdiskServices = ($ - fs_RamdiskServices)/4
455,7 → 416,7
dd fs_FloppySetFileEnd
dd fs_FloppyGetFileInfo
dd fs_FloppySetFileInfo
dd 0 ;fs_FloppyExecute
dd 0
dd fs_FloppyDelete
dd fs_FloppyCreateFolder
fs_NumFloppyServices = ($ - fs_FloppyServices)/4
528,7 → 489,7
dd fs_HdSetFileEnd
dd fs_HdGetFileInfo
dd fs_HdSetFileInfo
dd 0 ;fs_HdExecute
dd 0
dd fs_HdDelete
dd fs_HdCreateFolder
fs_NumHdServices = ($ - fs_HdServices)/4
604,7 → 565,7
dd fs_NotImplemented
dd fs_CdGetFileInfo
dd fs_NotImplemented
dd fs_CdExecute
dd 0
fs_NumCdServices = ($ - fs_CdServices)/4
 
;*******************************************************
738,3 → 699,156
ret
;*******************************************************
 
process_replace_file_name:
mov ebp, [full_file_name_table]
mov edi, [full_file_name_table.size]
dec edi
shl edi, 7
add edi, ebp
.loop:
cmp edi, ebp
jb .notfound
push esi edi
@@:
cmp byte [edi], 0
jz .dest_done
lodsb
test al, al
jz .cont
or al, 20h
scasb
jz @b
jmp .cont
.dest_done:
cmp byte [esi], 0
jz .found
cmp byte [esi], '/'
jnz .cont
inc esi
jmp .found
.cont:
pop edi esi
sub edi, 128
jmp .loop
.found:
pop edi eax
mov ebp, esi
cmp byte [esi], 0
lea esi, [edi+64]
jnz .ret
.notfound:
xor ebp, ebp
.ret:
ret
 
sys_current_directory:
mov esi, [current_slot]
mov esi, [esi+APPDATA.cur_dir]
mov edx, esi
dec eax
jz .set
dec eax
jz .get
ret
.get:
; sysfunction 30.2: [for app] eax=30,ebx=2,ecx->buffer,edx=len
; for our code: ebx->buffer,ecx=len
@@:
lodsb
test al, al
jnz @b
sub esi, edx
inc esi
mov [esp+36], esi
cmp ecx, esi
jbe @f
mov ecx, esi
@@:
cmp ecx, 1
jbe .ret
mov esi, edx
mov edi, ebx
mov al, '/'
stosb
dec ecx
dec ecx
rep movsb
mov byte [edi], 0
.ret:
ret
.set:
; sysfunction 30.1: [for app] eax=30,ebx=1,ecx->string
; for our code: ebx->string to set
@@:
inc esi
cmp byte [esi-1], 0
jnz @b
dec esi
cmp byte [ebx], '/'
jz .set_absolute
; string gives relative path
.relative:
cmp byte [ebx], 0
jz .set_ok
cmp word [ebx], '.'
jz .set_ok
cmp word [ebx], './'
jnz @f
add ebx, 2
jmp .relative
@@:
cmp word [ebx], '..'
jnz .doset_relative
cmp byte [ebx+2], 0
jz @f
cmp byte [ebx+2], '/'
jnz .doset_relative
@@:
dec esi
cmp byte [esi], '/'
jnz @b
mov byte [esi], 0
add ebx, 3
jmp .relative
.doset_relative:
add edx, 0x1000
mov byte [esi], '/'
inc esi
cmp esi, edx
jae .overflow_esi
@@:
mov al, [ebx]
inc ebx
mov [esi], al
inc esi
test al, al
jz .set_ok
cmp esi, edx
jb @b
.overflow_esi:
mov byte [esi-1], 0 ; force null-terminated string
.set_ok:
ret
.set_absolute:
lea esi, [ebx+1]
call process_replace_file_name
mov edi, edx
add edx, 0x1000
.set_copy:
lodsb
stosb
test al, al
jz .set_part2
.set_copy_cont:
cmp edi, edx
jb .set_copy
.overflow_edi:
mov byte [edi-1], 0
ret
.set_part2:
mov esi, ebp
xor ebp, ebp
test esi, esi
jz .set_ok
mov byte [edi-1], '/'
jmp .set_copy_cont
/kernel/trunk/fs/iso9660.inc
488,128 → 488,8
xor eax, eax
ret
 
;----------------------------------------------------------------
;
; fs_CdExecute - LFN variant for executing from CD
;
; esi points to hd filename (e.g. 'dir1/name')
; ebp points to full filename (e.g. '/hd0/1/dir1/name')
; dword [ebx] = flags
; dword [ebx+4] = cmdline
;
; ret ebx,edx destroyed
; eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
fs_CdExecute:
mov edx, [ebx]
mov ebx, [ebx+4]
test ebx, ebx
jz @f
; add ebx, std_application_base_address
@@:
 
;----------------------------------------------------------------
;
; fs_CdExecute.flags - second entry
;
; esi points to floppy filename (kernel address)
; ebp points to full filename
; edx flags
; ebx cmdline (kernel address)
;
; ret eax > 0 - PID, < 0 - error
;
;--------------------------------------------------------------
 
.flags:
cmp byte [esi], 0
jnz @f
; cannot execute root!
mov eax, -ERROR_ACCESS_DENIED
ret
@@:
push edi
call cd_find_lfn
jnc .found
pop edi
mov eax, -ERROR_FILE_NOT_FOUND
cmp [DevErrorCode], 0
jz @f
mov al, -11
@@:
ret
.found:
mov edi,[cd_current_pointer_of_input]
mov eax,[edi+2]
push 0
push eax
push dword [edi+10] ; size
push .DoRead
call fs_execute
add esp, 16
pop edi
ret
 
.DoRead:
; read next block
; in: eax->parameters, edi->buffer
; out: eax = error code
pushad
cmp dword [eax], 0 ; file size
jz .eof
cmp [eax+8],dword 0
jne @f
mov ecx,[eax+4]
inc dword [eax+4]
mov [CDSectorAddress],ecx
mov [CDDataBuf_pointer],CDDataBuf ;edi
call ReadCDWRetr
cmp [DevErrorCode], 0
jnz .err
@@:
push esi edi ecx
mov esi,512
imul esi,[eax+8]
add esi,CDDataBuf
mov ecx,512/4
cld
rep movsd
pop ecx edi esi
 
mov eax, [esp+28]
mov ecx, [eax]
sub ecx, 512
jae @f
lea edi, [edi+ecx+512]
neg ecx
push eax
xor eax, eax
rep stosb
pop eax
@@:
mov [eax], ecx
mov edx, [eax+8]
inc edx
cmp edx, 4 ; 2048/512=4
jb @f
xor edx, edx
@@:
mov [eax+8], edx
popad
xor eax, eax
ret
.eof:
popad
mov eax, 6
ret
.err:
popad
mov eax, 11
ret
 
cd_find_lfn:
; in: esi->name
; in: esi+ebp -> name
; out: CF=1 - file not found
; else CF=0 and [cd_current_pointer_of_input] direntry
push eax esi
669,6 → 549,7
; êîíåö ïóòè ôàéëà
cmp byte [esi-1], 0
jz .done
.nested:
mov eax,[cd_current_pointer_of_input]
push dword [eax+2]
pop dword [CDSectorAddress] ; íà÷àëî äèðåêòîðèè
676,6 → 557,12
jmp .mainloop
; óêàçàòåëü ôàéëà íàéäåí
.done:
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
jmp .nested
@@:
pop esi eax
clc
ret
/kernel/trunk/fs/ntfs.inc
938,7 → 938,7
ret
 
ntfs_find_lfn:
; in: esi->name
; in: esi+ebp -> name
; out: CF=1 - file not found
; else CF=0, [ntfs_cur_iRecord] valid, eax->record in parent directory
mov [ntfs_cur_iRecord], 5 ; start parse from root cluster
1090,6 → 1090,12
inc esi
cmp byte [esi-1], 0
jnz .doit2
test ebp, ebp
jz @f
mov esi, ebp
xor ebp, ebp
jmp .doit2
@@:
ret
 
;----------------------------------------------------------------
/kernel/trunk/fs/parse_fn.inc
7,210 → 7,194
;
;-------------------------------------------------------------------------
 
full_file_name_table dd 0 ; 㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï â ¡«¨æë ¯ã⥩ 4Š § ¯¨áì 64 (32 - áâப  è ¡«®­ ¤«ï ¯®¨áª , 32 - áâப  è ¡«®­ ¤«ï § ¬¥­ë)
iglobal
; pointer to memory for path replace table,
; size of one record is 128 bytes: 64 bytes for search pattern + 64 bytes for replace string
 
; ¯¥à¥¡¨à ¥â ¯® ä ©«ã ¢ à¨ ­âë § ¬¥­
proc full_file_name stdcall,sourc,dest
locals
tmpsrc rb 260 ; ¢à¥¬¥­­®¥ åà ­¥­¨¥ ¯à¥®¡à §®¢ ­¨ï
endl
pushad
mov esi,[sourc]
lea edi, [tmpsrc]
; start with one entry: %sys% -> <sysdir>
full_file_name_table dd sysdir_name
.size dd 1
 
@@:
lodsb
stosb
or al,al
jnz @b
tmp_file_name_size dd 1
endg
 
mov al,[conf_file_loaded] ; âॡã¥âáï ¯à¨ ®¡à é¥­¨¨ ª ¯¥à¢®¬ã ä ©«ã (ª®­ä¨£ã)
or al,al
jnz @use_replace
uglobal
; Parser_params will initialize: sysdir_name = "%sys%", sysdir_path = <sysdir>
sysdir_name rb 64
sysdir_path rb 64
tmp_file_name_table dd ?
endg
 
jmp full_file_name_exit
 
 
;--------------------------------
@use_replace:
 
xor eax,eax
.loop:
push eax
imul eax,eax,64
add eax,[full_file_name_table]
mov ebx,eax
add eax,32
mov cl,[ebx]
or cl,cl
jz .done
 
lea ecx, [tmpsrc]
mov edx,[dest]
 
stdcall full_file_name_parse, ecx,edx,ebx,eax
 
mov esi,[dest]
lea edi, [tmpsrc]
; ¡¥à¥â ¯ à ¬¥âàë bx_from_load ¨ ¨­¨æ¨ «¨§¨àã¥â § ¬¥­ã ¤«ï %sys%
Parser_params:
mov eax,[OS_BASE+0x10000+bx_from_load]
mov ecx,sysdir_path
mov [ecx-64],dword '%sys'
mov [ecx-64+4],word '%'
cmp al,'r' ; à ¬ ¤¨áª
jnz @f
mov [ecx],dword 'RD/?'
mov [ecx+3],byte ah
mov [ecx+4],byte 0
ret
@@:
lodsb
stosb
or al,al
jnz @b
sub al,49
mov [ecx],dword 'HD?/'
mov [ecx+2],byte al
mov [ecx+4],byte ah
mov [ecx+5],dword '/KOL'
mov [ecx+9],dword 'IBRI'
mov [ecx+13],byte 0
ret
 
pop eax
inc eax
jmp .loop
proc load_file_parse_table
stdcall kernel_alloc,0x1000
mov [tmp_file_name_table],eax
mov edi,eax
mov esi,sysdir_name
mov ecx,128/4
rep movsd
 
.done:
pop eax
full_file_name_exit:
invoke ini.enum_keys,conf_fname,conf_path_sect,get_every_key
 
lea eax, [tmpsrc]
stdcall full_file_name_parse , eax , [dest], sysdir_ , sys_path
popad
mov eax,[tmp_file_name_table]
mov [full_file_name_table],eax
mov eax,[tmp_file_name_size]
mov [full_file_name_table.size],eax
ret
endp
 
;
; à¥®¡à §®¢ âì ¨¬ï ¢ ¯®«­®¥. …᫨ ¢ ­ ç «¥ á⮨â
; sourc - áá뫪  ­  áâபã...
; dest - áá뫪  ­  ¡ãä¥à ªã¤  १ã«ìâ â «®¦¨âì
; def - áâப  è ¡«®­ ¤«ï ¯®¨áª 
; dval - ª 祬㠯à¨à ¢­¨¢ âì è ¡«®­
proc full_file_name_parse stdcall,sourc,dest,def,dval
; ¤«ï ®¤­®£®
pushad
uglobal
def_val_1 db 0
endg
 
mov eax,[sourc]
mov ebx,[def]
proc get_every_key stdcall, f_name, sec_name, key_name
mov esi, [key_name]
mov ecx, esi
cmp byte [esi], '/'
jnz @f
inc esi
@@:
mov dl,[ebx]
mov cl,[eax]
cmp cl,0
je @@bad_s
cmp dl,0
je @@good
 
or cl,0x20
or dl,0x20
cmp cl,dl
jne @@bad
 
inc eax
inc ebx
mov edi, [tmp_file_name_size]
shl edi, 7
cmp edi, 0x1000
jae .stop_parse
add edi, [tmp_file_name_table]
lea ebx, [edi+64]
@@:
cmp edi, ebx
jae .skip_this_key
lodsb
test al, al
jz @f
or al, 20h
stosb
jmp @b
@@:
stosb
 
@@bad_s:
cmp dl,0
je @@good
invoke ini.get_str, [f_name],[sec_name],ecx,ebx,64,def_val_1
 
@@bad:
mov edi,[dest]
mov esi,[sourc]
cmp byte [ebx], '/'
jnz @f
lea esi, [ebx+1]
mov edi, ebx
mov ecx, 63
rep movsb
@@:
push ebp
mov ebp, [tmp_file_name_table]
mov ecx, [tmp_file_name_size]
jecxz .noreplace
mov eax, ecx
dec eax
shl eax, 7
add ebp, eax
.replace_loop:
mov edi, ebx
mov esi, ebp
@@:
lodsb
stosb
or al,al
jnz @b
jmp @@ret_ok
test al, al
jz .doreplace
mov dl, [edi]
inc edi
test dl, dl
jz .replace_loop_cont
or dl, 20h
cmp al, dl
jz @b
jmp .replace_loop_cont
.doreplace:
cmp byte [edi], 0
jz @f
cmp byte [edi], '/'
jnz .replace_loop_cont
@@:
lea esi, [ebp+64]
call .replace
jc .skip_this_key2
.replace_loop_cont:
sub ebp, 128
loop .replace_loop
.noreplace:
pop ebp
 
@@good:
push eax
mov edi,[dest]
mov esi,[dval]
inc [tmp_file_name_size]
.skip_this_key:
xor eax, eax
inc eax
ret
.skip_this_key2:
pop ebp
jmp .skip_this_key
.stop_parse:
xor eax, eax
ret
endp
 
proc get_every_key.replace
; in: ebx->destination, esi->first part of name, edi->second part of name
; maximum length is 64 bytes
; out: CF=1 <=> overflow
; 1) allocate temporary buffer in stack
sub esp, 64
; 2) save second part of name to temporary buffer
push esi
lea esi, [esp+4] ; esi->tmp buffer
xchg esi, edi ; edi->tmp buffer, esi->source
@@:
lodsb
stosb
or al,al
test al, al
jnz @b
 
@@goodl:
; 3) copy first part of name to destination
pop esi
dec edi
mov edi, ebx
@@:
lodsb
test al, al
jz @f
stosb
or al,al
jnz @b
 
@@ret_ok:
popad
ret
 
endp
 
sys_dir_mess: db 'System dir is '
sys_path: db '/HD0/1/KOLIBRI',0,0
sysdir_ db '%sys%',0
 
; ¡¥à¥â ¯ à ¬¥âàë bx_from_load ¨ ¨áç¨â ä ©« ª®­ä¨£ãà æ¨¨
Parser_params:
pushad
mov ax,[OS_BASE+0x10000+bx_from_load]
cmp al,'r' ; à ¬ ¤¨áª
jnz @f
mov [sys_path],dword '/RD/'
mov [sys_path+4],byte ah
mov [sys_path+5],word 0 ;0x002F
jmp .done
jmp @b
@@:
sub al,49
mov [sys_path],dword '/HDa'
mov [sys_path+3],byte al
mov [sys_path+4],byte '/'
mov [sys_path+5],byte ah
mov [sys_path+6],dword '/KOL'
mov [sys_path+10],dword 'IBRI'
mov [sys_path+14],word 0 ;0x002F
 
.done:
popad
ret
proc load_file_parse_table
pushad
stdcall kernel_alloc,0x1000
mov [full_file_name_table],eax
 
invoke ini.enum_keys,conf_fname,conf_path_sect,get_every_key
mov eax,[loading_counter]
imul eax,eax,64
add eax,[full_file_name_table]
mov [eax],byte 0
popad
ret
endp
 
loading_counter dd 0
def_val_1 db 0
 
proc get_every_key stdcall,f_name, sec_name, key_name
pushad
mov esi,[key_name]
mov edi,[loading_counter]
imul edi,edi,64
add edi,[full_file_name_table]
; 4) restore second part of name from temporary buffer to destination
; (may cause overflow)
lea edx, [ebx+64] ; limit of destination
mov esi, esp
@@:
cmp edi, edx
jae .overflow
lodsb
stosb
or al,al
test al, al
jnz @b
 
mov eax,[loading_counter]
imul eax,eax,64
add eax,[full_file_name_table]
add eax,32
mov ebx,[key_name]
invoke ini.get_str,conf_fname,conf_path_sect,ebx,eax,32,def_val_1
 
inc dword [loading_counter]
popad
mov eax,1
; all is OK
add esp, 64 ; CF is cleared
ret
.overflow:
; name is too long
add esp, 64
stc
ret
endp
 
/kernel/trunk/gui/skindata.inc
11,7 → 11,7
;
 
iglobal
_skin_file_default db '%sys%/DEFAULT.SKN',0
_skin_file_default db '/%sys%/DEFAULT.SKN',0
endg
 
struct SKIN_DATA
/kernel/trunk/kernel.asm
533,6 → 533,8
include 'detect/disks.inc'
;!!!!!!!!!!!!!!!!!!!!!!!!!!
 
call Parser_params
 
; READ RAMDISK IMAGE FROM HD
 
;!!!!!!!!!!!!!!!!!!!!!!!
549,8 → 551,6
include 'vmodeld.inc'
;!!!!!!!!!!!!!!!!!!!!!!!
 
call Parser_params
 
mov ax,[OS_BASE+0x10000+bx_from_load]
cmp ax,'r1' ; åñëè ñðàì äèñê - òî íå ãðóçèòü áèáëèîòåêè
je no_lib_load
689,6 → 689,8
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
mov dword [SLOT_BASE+256+APPDATA.bk_obj], ebx
 
mov dword [SLOT_BASE+256+APPDATA.cur_dir], sysdir_path
 
; task list
mov [CURRENT_TASK],dword 1
mov [TASK_COUNT],dword 1
774,73 → 776,20
; LOAD FIRST APPLICATION
cli
 
if 0
cmp byte [BOOT_VAR+0x9030],1
jne no_load_vrr_m
 
stdcall kernel_alloc, 0x100
push eax
mov ebx,eax
stdcall full_file_name,vrr_m,eax
mov ebp, eax
mov ebp, vrr_m
call fs_execute_from_sysdir
 
xor ebx, ebx
xor edx, edx
call fs_execute
pop ebx
push eax
stdcall kernel_free, ebx
pop eax
 
cmp eax,2 ; if vrr_m app found (PID=2)
je first_app_found
 
no_load_vrr_m:
 
stdcall kernel_alloc, 0x100
push eax
mov ebx,eax
stdcall full_file_name,firstapp,eax
mov ebp, eax
xor ebx, ebx
xor edx, edx
call fs_execute
pop ebx
push eax
stdcall kernel_free, ebx
pop eax
cmp eax,2 ; continue if a process has been loaded
je first_app_found
mov eax, 0xDEADBEEF ; otherwise halt
hlt
mov ebp, firstapp
call fs_execute_from_sysdir
 
first_app_found:
 
else
sub esp, 0x100
 
cmp byte [BOOT_VAR+0x9030],1
jne no_load_vrr_m
 
mov ebp, esp
stdcall full_file_name,vrr_m,ebp
 
xor ebx, ebx
xor edx, edx
call fs_execute
 
cmp eax,2 ; if vrr_m app found (PID=2)
je first_app_found
 
no_load_vrr_m:
 
mov ebp, esp
stdcall full_file_name,firstapp,ebp
 
xor ebx, ebx
xor edx, edx
call fs_execute
 
cmp eax,2 ; continue if a process has been loaded
je first_app_found
 
849,9 → 798,6
 
first_app_found:
 
add esp, 0x100
 
end if
cli
 
;mov [TASK_COUNT],dword 2
3462,7 → 3408,7
ret
 
iglobal
cpustring db '%sys%/CPU',0
cpustring db 'CPU',0
endg
 
uglobal
3477,22 → 3423,9
cmp [ctrl_alt_del], 1
jne nocpustart
 
mov ebp, cpustring
call fs_execute_from_sysdir
 
stdcall kernel_alloc, 0x100
push eax
mov ebx,eax
stdcall full_file_name,cpustring,eax
mov ebp, eax
 
xor ebx, ebx
xor edx, edx
call fs_execute
 
pop ebx
push eax
stdcall kernel_free, ebx
pop eax
 
mov [ctrl_alt_del], 0
 
nocpustart:
/kernel/trunk/kernel32.inc
126,8 → 126,9
.saved_esp dd ? ;+64
.io_map rd 2 ;+68
.dbg_state dd ? ;+76
.cur_dir dd ? ;+80
 
db 48 dup(?) ;+80
db 44 dup(?) ;+84
 
.wnd_shape dd ? ;+128
.wnd_shape_scale dd ? ;+132
/kernel/trunk/lib_func.inc
9,7 → 9,7
;
;============================================================================
 
 
align 4
@IMPORT:
 
library \
/kernel/trunk/macros.inc
71,6 → 71,8
display 13,10
}
 
include 'kglobals.inc'
 
; \begin{diamond}[29.09.2006]
; may be useful for kernel debugging
; example 1:
/kernel/trunk/sys.conf
1,6 → 1,6
[path]
/rd/1=%sys%
%sys%/dll=%sys%/lib
/rd/1=/%sys%
/rd/1/dll=/%sys%/lib
 
[net]
active=1
/kernel/trunk/vmodeld.inc
28,4 → 28,5
xor ebx, ebx
mov ecx, 0x8000 ; size of memory area for driver
mov edx, VMODE_BASE ; Memory position of driver
xor ebp, ebp
call fs_RamdiskRead