Deleted old useless functions 32, 33 and accompanying code.

git-svn-id: svn://kolibrios.org@766 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Rus 2008-03-01 16:20:40 +00:00
parent 8d83c4684d
commit b9272bd614
6 changed files with 1654 additions and 1949 deletions

View File

@ -25,18 +25,6 @@ fdc_init: ;start with clean tracks.
rep stosb rep stosb
ret ret
fdc_filesave: ;ebx: cluster to be saved.
pusha ;returns immediately. does not trigger a write.
mov eax,ebx
add eax,31
mov bl,18
div bl
mov ah,0
add eax,OS_BASE+0xD201
mov [eax],byte 1 ;This track is now dirty.
popa
ret
fdc_irq: fdc_irq:
call [fdc_irq_func] call [fdc_irq_func]
fdc_null: fdc_null:

View File

@ -298,167 +298,7 @@ fileread:
xor eax,eax ;read ok xor eax,eax ;read ok
ret ret
filedelete:
;--------------------------------------------
;
; filedelete - sys floppy
; in:
; eax - pointer to filename 11 chars
;
; out:
; eax - 0 = successful, 5 = file not found
;
;--------------------------------------------
sub esp,32
call expand_filename
push eax ebx ecx edx esi edi
call rd_findfile
je fifoundd
pop edi esi edx ecx ebx eax ;file not found
add esp,32
mov eax,5
ret
fifoundd:
mov [edi-11],byte 0xE5 ;mark filename deleted
add edi,0xf
movzx eax,word [edi]
mov edi,eax ;edi = cluster
frnewd:
shl edi,1 ;find next cluster from FAT
add edi,RAMDISK_FAT
movzx eax,word [edi]
mov [edi],word 0x0 ;clear fat chain cluster
mov edi,eax
cmp edi,dword 0xff8 ;last cluster ?
jb frnewd
pop edi esi edx ecx ebx eax
add esp,32
xor eax,eax ; file found
ret
filesave:
;----------------------------------------------------------
;
; filesave - sys floppy
;
; eax points to filename 11 chars
;
; eax ; pointer to file name
; ebx ; buffer
; ecx ; count to write in bytes
; edx ; 0 create new , 1 append
;
;-----------------------------------------------------------
sub esp,32
call expand_filename
test edx,edx
jnz fsdel
pusha
call filedelete
popa
fsdel:
call ramdisk_free_space
cmp ecx,edi
jbe rd_do_save
add esp,32
mov eax,8 ;disk full
ret
rd_do_save:
push eax ebx ecx edx esi edi
mov edi,RAMDISK+512*18+512 ;Point at directory
mov edx,224 +1
; find an empty spot for filename in the root dir
l20ds:
dec edx
jz frnoreadds
l21ds:
cmp [edi],byte 0xE5
jz fifoundds
cmp [edi],byte 0x0
jz fifoundds
add edi,32 ; Advance to next entry
jmp l20ds
fifoundds:
push edi ; move the filename to root dir
mov esi,[esp+4+20]
mov ecx,11
cld
rep movsb
pop edi
mov edx,edi
add edx,11+0xf ; edx <- cluster save position
mov ebx,[esp+12] ; save file size
mov [edi+28],ebx
mov [edi+11],byte 0x20 ; attribute
; Ivan Poddubny 11/12/2003:
call get_date_for_file ; from FAT32.INC
mov [edi+24],ax ; date
call get_time_for_file ; from FAT32.INC
mov [edi+22],ax ; time
; End
mov edi,RAMDISK_FAT ;pointer to first cluster
mov ecx,2849
cld
frnewds:
xor ax,ax
repne scasw
mov ebx,2848
sub ebx,ecx
mov [edx],bx ; save next cluster pos. to prev cl.
mov edx,edi ; next save pos abs mem add
dec edx
dec edx
call fdc_filesave
pusha ; move save to floppy cluster
add ebx,31
shl ebx,9
add ebx,RAMDISK
mov eax,[esp+32+16]
mov ecx,512
call memmove
popa
mov eax,[esp+12]
cmp eax,512
jbe flnsa
sub eax,512
mov [esp+12],eax
add dword [esp+16], 512
jmp frnewds
flnsa:
mov [edi-2],word 4095 ; mark end of file - last cluster
frnoreadds:
pop edi esi edx ecx ebx eax
add esp,32
; pusha
; cli
; call fdc_commitfile
; sti
; popa
xor eax,eax ;ok write
ret
rd_findfile: rd_findfile:
;by Mihasik ;by Mihasik

View File

@ -135,8 +135,8 @@ iglobal
dd 0 dd 0
dd sys_current_directory ; 30-Get/SetCurrentDirectory dd sys_current_directory ; 30-Get/SetCurrentDirectory
dd 0 dd 0
dd syscall_delramdiskfile ; 32-DelRamdiskFile dd 0
dd syscall_writeramdiskfile; 33-WriteRamdiskFile dd 0
dd 0 dd 0
dd 0 dd 0
dd 0 dd 0
@ -215,8 +215,8 @@ iglobal
dd sys_date ; 29-GetDate dd sys_date ; 29-GetDate
dd cross_order ; 30-Get/SetCurrentDirectory dd cross_order ; 30-Get/SetCurrentDirectory
dd undefined_syscall ; 31-reserved dd undefined_syscall ; 31-reserved
dd cross_order ; 32-DelRamdiskFile dd undefined_syscall ; 32-reserved
dd cross_order ; 33-WriteRamdiskFile dd undefined_syscall ; 33-reserved
dd undefined_syscall ; 34-reserved dd undefined_syscall ; 34-reserved
dd syscall_getpixel ; 35-GetPixel dd syscall_getpixel ; 35-GetPixel
dd undefined_syscall ; 36-reserved dd undefined_syscall ; 36-reserved

View File

@ -1776,56 +1776,6 @@ dd 638
ЊЎЏЈруются тЎЋьЊЎ ЏЅрЂыЅ (edx-1) Ё Љт ЊЎЏЈруются тЎЋьЊЎ ЏЅрЂыЅ (edx-1) Ё Љт
Ј Ђ ЊЎ­цЅ ст ЂЈтся Ї ЂЅрш ющЈЉ 0. Ј Ђ ЊЎ­цЅ ст ЂЈтся Ї ЂЅрш ющЈЉ 0.
======================================================================
================ ”ã­ªæ¨ï 32 - 㤠«¨âì ä ©« á à ¬¤¨áª . ===============
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 32 - ­®¬¥à ä㭪樨
* ebx = 㪠§ â¥«ì ­  ¨¬ï ä ©« 
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0 - ãᯥ譮; ¨­ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë
‡ ¬¥ç ­¨ï:
* <20>â  äã­ªæ¨ï ãáâ à¥« ; äã­ªæ¨ï 58 ¯®§¢®«ï¥â ¢ë¯®«­ïâì
⥠¦¥ ¤¥©á⢨ï á à áè¨à¥­­ë¬¨ ¢®§¬®¦­®áâﬨ.
* ’¥ªãé ï ॠ«¨§ æ¨ï ¢®§¢à é ¥â ⮫쪮 §­ ç¥­¨ï 0(ãᯥå) ¨
5(ä ©« ­¥ ­ ©¤¥­).
* ˆ¬ï ä ©«  ¤®«¦­® ¡ëâì «¨¡® ¢ ä®à¬ â¥ 8+3 ᨬ¢®«®¢ (¯¥à¢ë¥
8 ᨬ¢®«®¢ - ᮡá⢥­­® ¨¬ï, ¯®á«¥¤­¨¥ 3 - à áè¨à¥­¨¥,
ª®à®âª¨¥ ¨¬¥­  ¨ à áè¨à¥­¨ï ¤®¯®«­ïîâáï ¯à®¡¥« ¬¨),
«¨¡® ¢ ä®à¬ â¥ 8.3 ᨬ¢®«®¢ "FILE.EXT"/"FILE.EX "
(¨¬ï ­¥ ¡®«¥¥ 8 ᨬ¢®«®¢, â®çª , à áè¨à¥­¨¥ 3 ᨬ¢®« ,
¤®¯®«­¥­­®¥ ¯à¨ ­¥®¡å®¤¨¬®á⨠¯à®¡¥« ¬¨).
ˆ¬ï ä ©«  ¤®«¦­® ¡ëâì § ¯¨á ­® § £« ¢­ë¬¨ ¡ãª¢ ¬¨.
‡ ¢¥àè î騩 ᨬ¢®« á ª®¤®¬ 0 ­¥ ­ã¦¥­ (­¥ ASCIIZ-áâப ).
* <20>â  äã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥â ¯ ¯®ª ­  à ¬¤¨áª¥.
======================================================================
=============== ”ã­ªæ¨ï 33 - § ¯¨á âì ä ©« ­  à ¬¤¨áª. ===============
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 33 - ­®¬¥à ä㭪樨
* ebx = 㪠§ â¥«ì ­  ¨¬ï ä ©« 
* ecx = 㪠§ â¥«ì ­  ¤ ­­ë¥ ¤«ï § ¯¨á¨
* edx = ç¨á«® ¡ ©â ¤«ï § ¯¨á¨
* á«¥¤ã¥â ãáâ ­ ¢«¨¢ âì esi=0
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0 - ãᯥ譮, ¨­ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë
‡ ¬¥ç ­¨ï:
* <20>â  äã­ªæ¨ï ãáâ à¥« ; äã­ªæ¨ï 70 ¯®§¢®«ï¥â ¢ë¯®«­ïâì
⥠¦¥ ¤¥©á⢨ï á à áè¨à¥­­ë¬¨ ¢®§¬®¦­®áâﬨ.
* …᫨ 㪠§ âì ­¥­ã«¥¢®¥ §­ ç¥­¨¥ ¢ esi ¨ ­  à ¬¤¨áª¥ 㦥 ¥áâì
㪠§ ­­ë© ä ©«, â® ¡ã¤¥â ᮧ¤ ­ ¥éñ ®¤¨­ ä ©« á ⥬ ¦¥ ¨¬¥­¥¬.
* ¯à®â¨¢­®¬ á«ãç ¥ ä ©« ¯¥à¥§ ¯¨á뢠¥âáï.
* ˆ¬ï ä ©«  ¤®«¦­® ¡ëâì «¨¡® ¢ ä®à¬ â¥ 8+3 ᨬ¢®«®¢
(¯¥à¢ë¥ 8 ᨬ¢®«®¢ - ᮡá⢥­­® ¨¬ï, ¯®á«¥¤­¨¥ 3 - à áè¨à¥­¨¥,
ª®à®âª¨¥ ¨¬¥­  ¨ à áè¨à¥­¨ï ¤®¯®«­ïîâáï ¯à®¡¥« ¬¨),
«¨¡® ¢ ä®à¬ â¥ 8.3 ᨬ¢®«®¢ "FILE.EXT"/"FILE.EX "
(¨¬ï ­¥ ¡®«¥¥ 8 ᨬ¢®«®¢, â®çª , à áè¨à¥­¨¥ 3 ᨬ¢®« ,
¤®¯®«­¥­­®¥ ¯à¨ ­¥®¡å®¤¨¬®á⨠¯à®¡¥« ¬¨).
ˆ¬ï ä ©«  ¤®«¦­® ¡ëâì § ¯¨á ­® § £« ¢­ë¬¨ ¡ãª¢ ¬¨.
‡ ¢¥àè î騩 ᨬ¢®« á ª®¤®¬ 0 ­¥ ­ã¦¥­ (­¥ ASCIIZ-áâப ).
* <20>â  äã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥â ¯ ¯®ª ­  à ¬¤¨áª¥.
====================================================================== ======================================================================
============ <20>у­ЊцЈя 35 - ЏрЎчЈт ть цЂЅт тЎчЊЈ ­  эЊр ­Ѕ. ============ ============ <20>у­ЊцЈя 35 - ЏрЎчЈт ть цЂЅт тЎчЊЈ ­  эЊр ­Ѕ. ============
====================================================================== ======================================================================

View File

@ -1750,56 +1750,6 @@ Remarks:
* If the buffer is too small to hold all data, only first (edx-1) * If the buffer is too small to hold all data, only first (edx-1)
bytes are copied and than terminating 0 is inserted. bytes are copied and than terminating 0 is inserted.
======================================================================
=============== Function 32 - delete file from ramdisk. ==============
======================================================================
Parameters:
* eax = 32 - function number
* ebx = pointer to the filename
Returned value:
* eax = 0 - success; otherwise file system error code
Remarks:
* This function is obsolete; function 58 allows to fulfill
the same operations with the extended possibilities.
* The current implementation returns only values 0(success) and
5(file not found).
* The filename must be either in the format 8+3 characters
(first 8 characters - name itself, last 3 - extension,
the short names and extensions are supplemented with spaces),
or in the format 8.3 characters "FILE.EXT"/"FILE.EX "
(name no more than 8 characters, dot, extension 3 characters
supplemented if necessary by spaces).
The filename must be written with capital letters. The terminating
character with code 0 is not necessary (not ASCIIZ-string).
* This function does not support folders on the ramdisk.
======================================================================
================ Function 33 - write file to ramdisk. ================
======================================================================
Parameters:
* eax = 33 - function number
* ebx = pointer to the filename
* ecx = pointer to data for writing
* edx = number of bytes for writing
* should be set esi=0
Returned value:
* eax = 0 - success, otherwise file system error code
Remarks:
* This function is obsolete; function 70 allows to fulfil
the same operations with extended possibilities.
* If esi contains non-zero value and selected file already exists,
one more file with the same name will be created.
* Otherwise file will be overwritten.
* The filename must be either in the format 8+3 characters
(first 8 characters - name itself, last 3 - extension,
the short names and extensions are supplemented with spaces),
or in the format 8.3 characters "FILE.EXT"/"FILE.EX "
(name no more than 8 characters, dot, extension 3 characters
supplemented if necessary by spaces).
The filename must be written with capital letters. The terminating
character with code 0 is not necessary (not ASCIIZ-string).
* This function does not support folders on the ramdisk.
====================================================================== ======================================================================
======= Function 35 - read the color of a pixel on the screen. ======= ======= Function 35 - read the color of a pixel on the screen. =======
====================================================================== ======================================================================

View File

@ -5045,29 +5045,6 @@ syscall_cdaudio: ; CD
align 4 align 4
syscall_delramdiskfile: ; DelRamdiskFile
mov edi,[TASK_BASE]
add edi,TASKDATA.mem_start
add eax,[edi]
call filedelete
mov [esp+36],eax
ret
align 4
syscall_writeramdiskfile: ; WriteRamdiskFile
mov edi,[TASK_BASE]
add edi,TASKDATA.mem_start
add eax,[edi]
add ebx,[edi]
call filesave
mov [esp+36],eax
ret
align 4
syscall_getpixel: ; GetPixel syscall_getpixel: ; GetPixel
mov ecx, [Screen_Max_X] mov ecx, [Screen_Max_X]
inc ecx inc ecx