Does VC7 support direct output? 
Author Message
 Does VC7 support direct output?

I had tried to use inline assembly instruction to control printer port but
it doesn't work. This is because VC7 (under WinXP) doesn't support
instruction or my code wrong?
My sample code to set all data bit to zero is
__asm{
    mov al,0
    mov dx,0x378
    out   dx,al
Quote:
}

This is inserted in main function generated by wizard (win32 console
application).
When I compiled this code ,all pass without problem but at runtime it error
at
"out dx,al" instruction.

Any help will be really appreciated!
Zart



Mon, 28 Mar 2005 18:20:54 GMT  
 Does VC7 support direct output?

Quote:
> I had tried to use inline assembly instruction to control printer port but
> it doesn't work. This is because VC7 (under WinXP) doesn't support
> instruction or my code wrong?

That has nothing to do with VC7. Your problem is that no NT-based OS,
including XP, supports that kind of manipulations from user mode to ensure
the stability and memory protection of the OS. To accomplish what you want,
you'll need to use a special parallel port driver.

--
Tomas Restrepo



Mon, 28 Mar 2005 18:56:04 GMT  
 Does VC7 support direct output?

Quote:
> I had tried to use inline assembly instruction to control printer port but
> it doesn't work. This is because VC7 (under WinXP) doesn't support
> instruction or my code wrong?

As Tom already replied, you just can't do that under XP (or win2k or NT),
and you'll need a special device driver to directly access the printer port.

See http://www.lvr.com/ for articles and drivers and lots more information
about direct control of ports of all kinds.

-cd



Mon, 28 Mar 2005 21:09:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Simpler way of doing things in VC7 ATL?

2. directing unix system call "system"s output

3. Directing output to the cursor?

4. Direct output

5. directing output to a printer

6. Please help me direct my output...

7. Direct output to printer

8. Directing output to Printer

9. direct screen output

10. ***Directing output to word processor***

11. indexed sequential, indexed, inverted, hash or direct file support

12. vc7 Build Output creates NULL characters

 

 
Powered by phpBB® Forum Software