flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > FOOL disk as file system? |
Author |
|
edfed 21 Sep 2008, 23:42
finally, i adopt this sheme previouslly aborded.
it works very well, need some bugfix ( very meticulous work). bug's are theses: if you don't mov value at [esi+disk.drv] with the right dl, it don't work at all. 3 essentials functions use disk structure. reboot, to read the bootsector and jump to it at 0:7c00h, need plain dos ( not tested). bootcopy, to copy the bootsector on a drive install, to install the current settings on a drive. be carefull, use only with test drives. Code: test config: PC PMMX@233MHz ali chipset 32MB PC100 SDRAM 1025 MB Compact Flash as secondary master LG DVD player as secondary slave floppy drive RTL ???? retwork card SIS 6215 ( hard 24bit/pixel ) SB PCI128 serial mouse AT keyboard it don't works when i type: install 128 <enter> bootcopy 128 <enter> reboot 128 <enter> but it has worked only one time with: x <enter> and don't hav the time to test more tonight...
|
|||||||||||
21 Sep 2008, 23:42 |
|
edfed 09 Dec 2009, 05:14
now, f.disk uses a pointer to a fptr to access memory.
and the best, it uses LBA instead of CHS, even for floppy. it gives this structure: Code: disk: .call=0 .cmd=4 .drv=5 .cnt=6 .lba=8 .ptr=12 .geometry=16 ;returned by disk operation .kb0=20 ;returned by disk operation to do a drive id,call an empty disk item (.ptr=0) .ptr îs a 32bit offset in current address space (org ???) id ptr=0, then, it is not a valid pointer, and it ends. i like this '0' value. next step, link it to a file system. the first attempt is in bootwriter06 it uses DOS int21h 3Dh, 3Fh, 3Eh. open, read, close the dos handle is only used inside this linear stream. then,it limits my needs from file system to that: fileread: .call=0 .ptr=4 ; same structure as one pointed to by disk. .name=8 ; ascci path and name of the file, a command line parameter for example. .handle ; value returned by dos, but not used by fool. knowing theses needs, it is easy to do a singular structure around fptr effectivelly, fptr have all the chances to become a file system structure. fptr: .off=0 .seg=2 .size=4 .size is used by disk and updated by fileread. if you want to read 321 bytes from a 32 bytes file, it will be usefull. if you wan to set the file size to a sector boundary. etc etc. a file would be represented by this on the disk: Code: xfile: ;lol .call=0 .name=4 .lba=8 .size=12 .ptr=16 there, you see it can be possible to set a ram location for the file. why? just to show it is still in ram,at the fptr location. if fptr = 0, then, the file is on the drive, or nowhere. this value is not modified on the drive. only moded in ram. the cached folders will contain the xfiles, xfiles are only file descriptors. like the DOS handle then, a file in ram will be descripted by it's descriptor in folder (in ram too). if not in ram, then, read it from drive. and update fptr. file access can be only with the 'path/folder/file' style. but after loading, the path is converted into a fptr. and this fptr is a DOS-like handle. a little more fool. to update fptr, i need memory management . |
|||
09 Dec 2009, 05:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.