Question

NC - Norton Commander I should write a program like NC. I need to access Fat Table in Assembly to show files and directories in my program. Does anybody know how I can access Fat in assembly( both floppy and Hard Disk ) What Interrupts should I use?

Thanks in advance.

Was it helpful?

Solution

Probably the FAT is protected by the OS for security reasons, so I guess you can't read/write it. You can still use the interrupt #21h (3D - open, 3E - close, 3F - read, 40 - write, 42 - seek, 4E - find first file, 4F - find next file) or the interrupt #13h.

  • Int 13h is for low level disk services, so you can directly read or write any (I think) hard disk's (and floppy's) sector you want (functions 2 and 3).

  • Int 21h allows you more high level file operations (some of which are listed above). Find first file and first next file find files that match a certain search pattern (just like windows's find, so you can list all files whose name is "ab?c.e?d"). I'm not sure if these functions list the directories too, you should check

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top