0

Hi I am having problem in interfacing Parallel port using Assembly Language and TASM for assembly.

Here is the sample source code:

.model small
.stack
.data
.code

main:           
    mov dx, 378h
    mov al, 00001000b 
    out dx, al ; output

    mov ah, 4ch
    int 21h

end main 

The problem is the out command doesn't work or change the status of the parallel port. I have an LED circuit to test the output of the parallel port and it's not working. I have tried other program available in the net to check the status of the parallel port and I confirmed that the status of the port is not changing.

Do I have to do something to make this work like enabling debug mode in kernel or something like that? Thank you!

ChaosDarky
  • 37
  • 1
  • 10
  • 1
    What are you running this under? – Ross Ridge Jul 26 '15 at 03:18
  • Hi thank you for the reply Ross. I'm running this under Windows 7 32-bit and my processor is AMD. – ChaosDarky Jul 27 '15 at 00:34
  • The Windows MS-DOS emulator may not support what you're trying to do here. It doesn't give you direct access to the hardware. Instead your OUT instruction will be handled by a virtual parallel port driver. It's only designed to handle normal printing operations, and probably has to access the real parallel port through standard Windows APIs. – Ross Ridge Jul 27 '15 at 02:07
  • @RossRidge, thank you for the fast reply. Is there any way to make my MS-DOS emulator get an access to my hardware? I was able to used this before in a different PC years ago without any problem but I can't use it now on my current PC. – ChaosDarky Jul 27 '15 at 02:15
  • With such current computer which no more LPT or serial port, how do we know the address we can assign to output to a device? – AirCraft Lover Apr 29 '19 at 03:08

1 Answers1

0

Win-7 (32bit) needs UP Driver for it to access parallel port.
Windows XP does not need it.

UPDriver for Win7-32Bit

Source is YouTube.
Its a bit late, but sure will help someone. Have tested it.