Page 1 of 1

Help with file I/O

Posted: Mon Nov 17, 2003 5:37 am
by KieranFoot
Help!!!

Please can somebody provide a tutorial in file I/O.
My os is coded in pure ASM and uses fat12.

Please can someone provide me with some examples???

Re:Help with file I/O

Posted: Mon Nov 17, 2003 6:42 am
by Pype.Clicker
what exactly do you need ? what do you already have ?

For instance, are you trying to "read one file's data using the BIOS int 13h interrupt", or "lookup for a file in a directory ?", etc.

There are many "layers" in file I/O. Are you trying to access a disk device in order to read blocks or trying to know which block is part of which file ?

Re:Help with file I/O

Posted: Mon Nov 17, 2003 7:22 am
by KieranFoot
Well I need all of that stuff scince i have none at the moment. ;D

Re:Help with file I/O

Posted: Mon Nov 17, 2003 7:45 am
by Pype.Clicker
i suggest you get a look at Operating System Resource Center (.:QuickLinkz:. again ;) ), where you'd be able to find everything: FAT structure and possibly tutorials&code samples, floppy drive behaviour, ATA hard disk commands, etc.

Re:Help with file I/O

Posted: Mon Nov 17, 2003 7:53 am
by KieranFoot
All of these site contain c source not asm. One of the aims for my os is that it is to be written in pure 16/32 bit ASM

Re:Help with file I/O

Posted: Mon Nov 17, 2003 8:17 am
by BI lazy
@Kieran: STFW!!!!

Further, I suggest, you study the c sources and extract the algorithms. For you seem to be a keen assembler-programmer * you can easily transform the algorithms into magnificient asm-code.

And for you are a programmer you know: not the programming language is the essence of a running program *but* the sum of all the algorithms which are keeping it running - be it an os be it an application using os services.

You of course understand that I 'm not going to accept further moaning about "c-sources and not asm sources"

Stay safe

*: Oh, somebody who has guts to do an os in asm needs to be a very keen asm programmer.

Re:Help with file I/O

Posted: Mon Nov 17, 2003 9:15 am
by Pype.Clicker
KieranFoot wrote: All of these site contain c source not asm. One of the aims for my os is that it is to be written in pure 16/32 bit ASM
I used to program a SoundBlaster module player in 100% asm by studying a pascal implementation in a book... C/pascal code will be easier to follow as a reference as it focuses on *what* has to be done rather than *how* it is done... It will also have cleaner data structures than any ASM code.

What i suggest to you is to convert that code in some kind of "structurograms" or whatever box-and-arrows you're used with and then converting boxes into ASM code.

Re:Help with file I/O

Posted: Wed Nov 19, 2003 7:04 am
by KieranFoot
Cheers guys, sorry for moaning, iot's just that i dont really understand c++ and how it works to get at the needed alogrithyms!!! ;D

Is my spelling O.K :P

Re:Help with file I/O

Posted: Wed Nov 19, 2003 10:23 am
by Tim
Right, well the concepts needed to understand how C++ are at the bottom end of what you need to know to succeed in OS development. Consider that a useful piece of learning to have before you get deep into design. I assume you're designing everything before you begin writing any code, right?

Re:Help with file I/O

Posted: Wed Nov 19, 2003 10:33 am
by BI lazy
You wanna do an operating system?

You wanna program?

Learn using language in the correct way, hm? It's *very* importing for programming.

Re:Help with file I/O

Posted: Wed Nov 19, 2003 10:35 am
by BI lazy
not importing, but *important*

damn, one shan't hold rants if tired and drowsy *yawn*