flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > read/write/ioctl |
Author |
|
edfed 25 Apr 2010, 16:44
yep.
for me the problem is not given. i have two types of functions: f.disk f.disk use only a bios compatible code to say, read, or write. f.DOSfile f.DOSfile is separated for the moment, f.read and f.save. both use the same parameter structure, then, i just have to change call pointer and have a read, or a write. maybe the differenciation between R/W is because it is completely a different operation. as an analogy, take a book, read it or write it... what is the harder to do? for machine it is the same, read is easy and not dangerous. write is. |
|||
25 Apr 2010, 16:44 |
|
a115433 25 Apr 2010, 17:25
im talking about exactly same processing of it.
in windows, driver has DispatchXXX functions wich handle IRPs. write/read/ioctl is the same irp! only code differ, so dispatch function also must be diffrent. why not make it only ioctl, and in ioctl handler lookup table to just jump to proper handler? its few instructions more, and makes things much simplier. |
|||
25 Apr 2010, 17:25 |
|
edfed 25 Apr 2010, 19:27
you can do it.
you should define an api for your "IOCTL" function that brings the possibility to support both R and W. |
|||
25 Apr 2010, 19:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.