Hi,
Thanks to everyone who would be reading this post.
I would like to know how to write programs in C to control Hardware for modems, printers and how to get the basic concepts for writing device drivers.

thanks once again !!

Prithwish

Printers have a language that you can control them with. Unfortunately, they don't all use the same langauge!

Unless the printer you want to control is speaking your language, you won't be able to make it do what you want.

Maybe start by reading up on PCL (Printer Control Language):

http://www.google.com/#q=printer+control+language

Read the Wiki article, then dive into the PDF that's listed on the above page, and see a lot more details.

Modems are about the same way. They have a language that many use, but not every modem, uses the same exact one.

In the DOS days you had full freedom as a user, to control all your peripherals, but those days are long gone. Controlling who has the authorization to mess with the peripherals is very important, these days.

So don't skip over the part about getting authorization or all the right control codes you send, will be for naught.

@Adak
100% correct. Most of the time, you connect to the device and then send it text strings or codes to control the device. This is considered "high level" control. For low-level control, you can use direct hardware I/O instructions, which depend upon the device connectivity, such as RS-232 serial port, parallel port, USB, etc. These days, only device drivers need the low-level stuff, though "back in the day" we had to do the low-level bit twiddling ourselves... :-)

One common printer protocol that Adak did not mention is PostScript (created by Adobe and first adopted for printers by Apple), which in reality is its own high-level programming language. The original Sun workstations even used it as a display-rendering language (before X-Windows)!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.