|
|
@ -4,8 +4,8 @@ vsfs_read_file_index_in_ax: |
|
|
|
pusha ; save all register state |
|
|
|
call vsfs_convert_index_into_regs |
|
|
|
mov bx, .buffer_for_svim |
|
|
|
xor cx, cx |
|
|
|
xor ax, ax |
|
|
|
xor cx, cx |
|
|
|
mov ah, 0x02 ;Read sectors from drive |
|
|
|
mov al, 0x01 ;Number of sectors to read (8 * 512 = 4096 bytes) |
|
|
|
mov ch, 0x02 ;Low 8 bits of cylinder |
|
|
@ -50,12 +50,51 @@ vsfs_convert_index_into_regs: |
|
|
|
; DH Head |
|
|
|
; The rest of the parameters is set in the read and write function. |
|
|
|
|
|
|
|
mov 00000000 |
|
|
|
mov ch, ah |
|
|
|
mov dh, 0x01 |
|
|
|
|
|
|
|
ret |
|
|
|
|
|
|
|
vfsf_write_file_system_information: |
|
|
|
|
|
|
|
ret |
|
|
|
|
|
|
|
vfsf_create_file: |
|
|
|
; ax pointer to filename |
|
|
|
; bx size |
|
|
|
; cx fileIndex |
|
|
|
|
|
|
|
.vfsf_create_file_type_filename db 'Enter filename: ', 0 |
|
|
|
.vfsf_create_file_type_filetype db 'Enter file index: ', 0 |
|
|
|
|
|
|
|
|
|
|
|
pusha ; save all register state |
|
|
|
;AH 03h |
|
|
|
;AL Sectors To Write Count |
|
|
|
;CH Track |
|
|
|
;CL Sector |
|
|
|
;DH Head |
|
|
|
;DL Drive |
|
|
|
;ES:BX Buffer Address Pointer |
|
|
|
mov bx, ds |
|
|
|
mov es, bx |
|
|
|
xor bx, bx |
|
|
|
mov bx, .buffer_for_svim |
|
|
|
xor cx, cx |
|
|
|
xor ax, ax |
|
|
|
mov ah, 0x03 ;Write sectors to drive |
|
|
|
mov al, 0x01 ;Number of sectors to write (8 * 512 = 4096 bytes) |
|
|
|
mov cl, 0x03 ;First sector to read (bits 0-5), upper bits of cylinder (bits 6-7) |
|
|
|
mov ch, 0x02 |
|
|
|
mov dh, 0x01 ;Head number |
|
|
|
mov dl, 0x0 ;Drive number |
|
|
|
int 0x13 ;Low level disk services |
|
|
|
popa |
|
|
|
ret |
|
|
|
|
|
|
|
ret |
|
|
|
|
|
|
|
vfsf_list_files_command: |
|
|
|
; This function takes the adress of the first sector of the disk |
|
|
|
; which the OS has to know |
|
|
|