fileinfo.mode = 2  ; delete file/directory
fileinfo.mode = 3  ; append file (return: ebx = bytes written)
fileinfo.mode = 4  ; makedir
fileinfo.mode = 5  ; rename/move file/directory
fileinfo.mode = 12 ; get_filesize (return: ebx = file/dir size in bytes)
fileinfo.mode = 13 ; get_fileattr (return: ebx = file/dir attribute)
                   ;   bit 5 = archive
                   ;   bit 4 = directory
                   ;   bit 3 = volume
                   ;   bit 2 = system
                   ;   bit 1 = hidden
                   ;   bit 0 = readonly
fileinfo.mode = 14 ; get_filedate (return: ebx = file/dir date/time)
                   ;   bits 31..25 = year-1980
                   ;   bits 24..21 = month
                   ;   bits 20..16 = day
                   ;   bits 15..11 = hour
                   ;   bits 10..5  = minute
                   ;   bits 4..0   = second/2
fileinfo.mode = 15 ; get_disk_info

fileinfo:                       ; fileinfo for function 58
  .mode            dd 5         ; 2=delete, 3=append, 4=makedir, 5=rename
  .start_block     dd 0x0       ; block to read
  .blocks          dd 0x0       ; num of blocks
  .address         dd 0x20000   ; return data pointer
  .workarea        dd 0x10000   ; work area for os
  dirnamez:        times 256 db 0 ; 2 successive asciiz names


  mov  eax,58
  mov  ebx,fileinfo
  int  0x40

Notes:
- in russian kernel.asm need to remove Mario79 added part2_ld/fat32part
  routine in sys_setup and replace it with single line:
    mov [fat32part],ebx
  before it can use new fat32.inc
- partition_count in current hd can be returned after set_FAT32_variables call
- file_read return also dirsize in bytes
- Makedir can only make one directory at time
- Rename can only rename/move file/dir inside current hd
- Rename dirnamez field need 2 successive asciiz name
  (full source and full destination)
  ex. "/HD/1/MEOSTEST/TEST.TXT",0,"/HD/1/MEOSTEST/TEST.BAK",0
  ex. "/HD/1/WINDOWS",0,"/HD/1/RECYCLED/WIN",0
- get_disk_info return current hd cluster info thru dirnamez field
  dword [dirnamez+0] = cluster size in bytes
  dword [dirnamez+4] = total clusters
  dword [dirnamez+8] = free clusters
- New error codes for function 58
  eax = 8  : disk full
  eax = 9  : fat table corrupted
  eax = 10 : access denied
- Original file_read was return end_of_file with code 5 (now 6)
  and file_not_found with code 6 (now 5) they are fixed now,
  but tinypad don't like it. In tinypad loadhdfile need change line
     cmp  ebx,5
  with
     cmp  ebx,6
- Append uses byte size blocks
    .mode        dd 3       ; 3=append file
    .start_block dd 0x0     ; start position in bytes 0..File Size (-1 = EOF)
    .blocks      dd 0x0     ; bytes to write (0 = truncate file at StartPos)
    .address     dd buffer  ; source data pointer
    .workarea    dd 0x10000 ; work area for os
    dirnamez:    times 128 db 0
