|
-
May 10th, 2005, 12:32 AM
#1
Thread Starter
Addicted Member
working with lpt
How do I send the commands to lpt in winnt-xp
like _outp,_outd
-
May 10th, 2005, 05:11 AM
#2
Re: working with lpt
Do you want to talk to the parallel port or to a printer?
Try opening the file "LPT1:" and writing to it.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 10th, 2005, 06:50 AM
#3
Thread Starter
Addicted Member
Re: working with lpt
As the following codes but that works only with win9x.
# include <dos.h>
main( )
{
int i = 0 ;
unsigned char seg[ ] = {
64 | 1 | 2 | 4 | 16 | 32, /* 0 */
16 | 4, /* 1 */
32 | 16 | 128 | 1 | 2, /* 2 */
32 | 16 | 128 | 4 | 2, /* 3 */
64 | 128 | 16 | 4, /* 4 */
32 | 64 | 128 | 4 | 2, /* 5 */
32 | 64 | 1 | 2 | 4 | 128, /* 6 */
32 | 16 | 4, /* 7 */
32 | 64 | 128 | 4 | 2 | 1 | 16, /* 8 */
32 | 64 | 128 | 16 | 4 | 2 /* 9 */
} ;
while ( ! kbhit( ) )
{
outportb ( 0x378, seg[ i ] ) ;
delay ( 1000 ) ;
i++ ;
if ( i == 10 )
i = 0 ;
}
outportb ( 0x378, 0 ) ;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|