* Device Driver Development in Assembly Language
@ 2004-07-13 8:51 Fikri Aydemir
2004-07-13 19:56 ` fmarmond
2004-07-14 16:15 ` Daniel R. Blair
0 siblings, 2 replies; 4+ messages in thread
From: Fikri Aydemir @ 2004-07-13 8:51 UTC (permalink / raw)
To: linux-assembly
Hi,
I am making a research on device driver development in assembly
programming language for linux systems. I know that it is easier to
write a device driver in C but my professor wants me to make it in
Assembly language, preferably in Intel syntax.
Is there anyone who has worked on device driver development? Do you know
any resource such as a book or web site which I can benefit from? Thank
you...
Fikri Aydemir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Device Driver Development in Assembly Language
2004-07-13 8:51 Device Driver Development in Assembly Language Fikri Aydemir
@ 2004-07-13 19:56 ` fmarmond
2004-07-14 16:15 ` Daniel R. Blair
1 sibling, 0 replies; 4+ messages in thread
From: fmarmond @ 2004-07-13 19:56 UTC (permalink / raw)
To: Fikri Aydemir; +Cc: linux-assembly
Hi,
Hum...
You know, drivers stands in kernel stage, and must follow 'standardized' way
for regestering to the kernel itself.
What do you teacher wants exactly?
Do the driver's operations in assembly?
-> embed assembly into a C prog, that will take advantage of all C macros for
registering driver to kernel (=> teacher wants you to do assembly for its
speed for particular driver tasks but don't care of the glue around)
or write a .asm that would do all the stuff (teacher wants you to learn
exactly what a driver must do to register, catch events, perform operations,
release, ...) which is pretty much longer to write...
I hope you have access to the sys calls at least!
One tip: if you have to write 100% assembly, write a small driver in C (with
full debugger options), and decompile it, to see what it does. Then,
understand the schem, and re-write it in optimized assembly...
If you have more precise questions, feel free to ask, I can answer in nights
(french time)
good kuck!
Fred
Selon Fikri Aydemir <facse238@fastmail.fm>:
>
> Hi,
>
> I am making a research on device driver development in assembly
> programming language for linux systems. I know that it is easier to
> write a device driver in C but my professor wants me to make it in
> Assembly language, preferably in Intel syntax.
>
> Is there anyone who has worked on device driver development? Do you know
> any resource such as a book or web site which I can benefit from? Thank
> you...
>
> Fikri Aydemir
> -
> To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Device Driver Development in Assembly Language
2004-07-13 8:51 Device Driver Development in Assembly Language Fikri Aydemir
2004-07-13 19:56 ` fmarmond
@ 2004-07-14 16:15 ` Daniel R. Blair
1 sibling, 0 replies; 4+ messages in thread
From: Daniel R. Blair @ 2004-07-14 16:15 UTC (permalink / raw)
To: Fikri Aydemir; +Cc: linux-assembly
On Tue, 13 Jul 2004, Fikri Aydemir wrote:
>
> Hi,
>
> I am making a research on device driver development in assembly
> programming language for linux systems. I know that it is easier to
> write a device driver in C but my professor wants me to make it in
> Assembly language, preferably in Intel syntax.
>
> Is there anyone who has worked on device driver development? Do you know
> any resource such as a book or web site which I can benefit from? Thank
> you...
There are two good books that I have read that will help you a little,
with one example for a device driver for the pc speaker as a timer or
something.. one is the infamous "Assembly Language: Step by Step" now in
it's 2nd edition.. and the other is a smaller book called "Linux Assembly
Language" it is white with Purple writing for the words "Linux Assembly
Language Programming" (it may have Programming as part of the title, I'm
not 100% sure..) but, both of them are great.. the first one is by Jeff
Dunteman (search Amazon for the 2 titles about and you'll find them).. His
first edition (Black cover, blue writing for title) was widely accepted
and lovedby lots of ASM programmers, and when I saw he had a 2nd edition
out, (White with Red writing for the Title) I had to get it and read it
too.. it is a lot of the same, but, updated for use with new registers,
instructions, etc.. as well as a section(s) in the back on Linux.. he uses
NASM too.. so, check these two books out, you will not be dissatisfied..
they are excellent books to read and to use as references later on.. the
one by Jeff Dunteman should be read first, in my opinion, as it is not
only a classic, but also teaches general assembly language.. the 2nd book
is more for assembly language programmers who want to write assembly
language under Linux.. showing how to place your function name, and params
on the stack, and then call the function for system calls and C Library
functions, etc.. it's very useful and goes into more depth than Jeff
Dunteman does in "Assembly Language: Step by Step" but, Jeff Dunteman also
explains how to call C functions by placing their name and then their
parameters, in reverse order (so they can be popped properly) on the stack
for proper C library and system call execution.. so, at that point, going
into the "Linux Assembly Language [Programming]" book, you'll have some
knowledge already, and it will concentrate almost entirely on teaching you
how to write assembly FOR LINUX (and I beleive most of the techniques and
stuff in the book are applicable to other OSes, like FreeBSD, Solaris,
etc..) but, some of the other Unixes out there I'm sure have a different
way for doing different things.. especially device drivers =] But, I use
FreeBSD, not linux, and most of everything in the book worked fine for me
on FreeBSD (altough I do always have Linux Emulation enabled.. so.. it
may/may not have helped for anything.. not 100% sure, as I didn't try with
and without..)
Check out those books and then you can go from there with books like
"Linux Kernel Development" from Orielly, and "Inside the Linux Kernel"
also from Orielly I think.. those may be the same book.. the title should
be almost right, if not 100%, not sure though.. it will explain how the
linux kernel works (scheduling algorithms, loading procedures, context
switching, memory mapping and management methods, etc..) so, you can then
take that information (how it is done under Linux) and then apply that to
how to I do it like that, under assembly language..
Hope this helps,
Danny
= Daniel Blair =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- dblair@realcoders.org - [http://www.realcoders.org]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Device Driver Development in Assembly Language
[not found] ` <1089915393.8863.200440567@webmail.messagingengine.com>
@ 2004-07-16 20:56 ` fmarmond
0 siblings, 0 replies; 4+ messages in thread
From: fmarmond @ 2004-07-16 20:56 UTC (permalink / raw)
To: Fikri Aydemir; +Cc: linux-assembly
hi,
No, i don't have 100% asm driver for linux...
I think it would be waste of time to write one, as (as i wrote you) linux
drivers usually use lots of C macros. But it can be usefull for learn purpose,
to understand internal mechanical. As i'm not still a student, and not a
teacher, I don't have one in my archives... ;)
I'm very busy those days, so I won't have time to write one for you, nore
write a dummy C driver and decompile it.(only few minutes left to answer
you... ;) )
I only can suggest you to do it if you don't know where to start: create a C
driver, compile it with full debug options, and then decompile it. Then, try
to understand how a (C) driver is done (in asm)... and then write your own.
Ask me if you don't know how to do it.
good luck!
Fred
Selon Fikri Aydemir <facse238@fastmail.fm>:
>
> Hi,
>
> Do you have any simple device driver example written in Assembly
> language? If so, can you send it to me? I really would like to ask you
> more precise questions but I have just started to work on this subject
> and my professor is not very helpful to me? I hope soon I will have more
> precise questions to ask.
>
> Thanks a lot ,
>
> Fikri
>
>
> On Wed, 14 Jul 2004 13:39:32 +0200, fmarmond@eprocess.fr said:
> > it's kind of you, but I think that "Fikri Aydemir
> > <facse238@fastmail.fm>", the
> > original poster (and requester), may be more happy with that...
> > I was only answering his post...
> >
> > thanks touhgh... ;)
> >
> > Fred
> >
> > Selon Mark Czubin <greatbadboss@hotmail.com>:
> >
> > >
> > > http://www.freewebs.com/four-f/
> > > altough it's only for windows
> > > all the tutorials and help you need in developing drivers in assembly
> > >
> > >
> > > >From: fmarmond@eprocess.fr
> > > >To: Fikri Aydemir <facse238@fastmail.fm>
> > > >CC: linux-assembly@vger.kernel.org
> > > >Subject: Re: Device Driver Development in Assembly Language
> > > >Date: Tue, 13 Jul 2004 21:56:29 +0200
> > > >
> > > >Hi,
> > > >Hum...
> > > >You know, drivers stands in kernel stage, and must follow
'standardized'
>
> > way
> > >
> > > >for regestering to the kernel itself.
> > > >What do you teacher wants exactly?
> > > >
> > > >Do the driver's operations in assembly?
> > > >-> embed assembly into a C prog, that will take advantage of all C
> macros
> > > for
> > > >registering driver to kernel (=> teacher wants you to do assembly for
> its
> > > >speed for particular driver tasks but don't care of the glue around)
> > > >
> > > >or write a .asm that would do all the stuff (teacher wants you to learn
>
> > > >exactly what a driver must do to register, catch events, perform
> > operations,
> > >
> > > >release, ...) which is pretty much longer to write...
> > > >
> > > >I hope you have access to the sys calls at least!
> > > >One tip: if you have to write 100% assembly, write a small driver in C
> > (with
> > >
> > > >full debugger options), and decompile it, to see what it does. Then,
> > > >understand the schem, and re-write it in optimized assembly...
> > > >
> > > >If you have more precise questions, feel free to ask, I can answer in
> > nights
> > >
> > > >(french time)
> > > >
> > > >good kuck!
> > > >
> > > >Fred
> > > >
> > > >Selon Fikri Aydemir <facse238@fastmail.fm>:
> > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am making a research on device driver development in assembly
> > > > > programming language for linux systems. I know that it is easier to
>
> > > > > write a device driver in C but my professor wants me to make it in
> > > > > Assembly language, preferably in Intel syntax.
> > > > >
> > > > > Is there anyone who has worked on device driver development? Do you
> know
> > >
> > > > > any resource such as a book or web site which I can benefit from?
> Thank
> > > > > you...
> > > > >
> > > > > Fikri Aydemir
> > > > > -
> > > > > To unsubscribe from this list: send the line "unsubscribe
> > linux-assembly"
> > > in
> > > > > the body of a message to majordomo@vger.kernel.org
> > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >-------------------------------------------------
> > > >This mail sent through IMP: http://horde.org/imp/
> > > >-
> > > >To unsubscribe from this list: send the line "unsubscribe
> linux-assembly"
> > in
> > >
> > > >the body of a message to majordomo@vger.kernel.org
> > > >More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > Koop geen kat in een zak. Probeer alles 14 dagen bij jou thuis.
> > >
> > >
> >
> >
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-16 20:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-13 8:51 Device Driver Development in Assembly Language Fikri Aydemir
2004-07-13 19:56 ` fmarmond
2004-07-14 16:15 ` Daniel R. Blair
[not found] <BAY12-F28SDfvaLH05O000165b0@hotmail.com>
[not found] ` <1089805172.40f51b74aa381@intranet.eprocess.fr>
[not found] ` <1089915393.8863.200440567@webmail.messagingengine.com>
2004-07-16 20:56 ` fmarmond
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.