The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: cman on September 29, 2005, 04:06:40 PM

Title: Low Level File Access
Post by: cman on September 29, 2005, 04:06:40 PM
I think I might have asked before ( but since forgotten  :red ) , how can low level file access be done in assembler? Can this be done as with an array ( set a pointer to the begining addess do the file structure and move back and forth by adding / subtracting offsets ). How is a Windows file stored in memory. Thanks!
Title: Re: Low Level File Access
Post by: Farabi on September 30, 2005, 07:48:56 AM
If you mean creating a function to read the harddisk and then read the FAT structure it is difficult. But for only opening a file, you can use WriteFile function on the windows API.
Title: Re: Low Level File Access
Post by: ToutEnMasm on September 30, 2005, 12:35:35 PM
hello,
A driver sys is needed,download a ddk (ddk98) to have some samples.
                           ToutEnMasm
Title: Re: Low Level File Access
Post by: hutch-- on October 01, 2005, 12:21:16 AM
Unless you are interested in the ring0 driver level, it sounds like normal API style file IO. Have a look at the file IO macros in the MASM32 macro file as they use the normal API calls and this will almost exclusively do all of what you want.