Outputting to the parallel port (assembly 8086)

  • Thread starter Thread starter snoggerT
  • Start date Start date
  • Tags Tags
    Parallel
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues related to outputting data to a parallel port using Assembly language (8086). Participants explore potential reasons for the failure of a down counter circuit to function correctly with the expected port address.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant describes a problem with their Assembly code that is intended to output to the parallel port at address 378H, noting that it only works partially with 3BCH.
  • Another participant suggests that the parallel port address can vary and may be configurable in the BIOS, indicating that 378H is not the only possible address.
  • A participant mentions that the issue may be related to the control bits for the parallel port not being set by the operating system, suggesting that manual configuration might be necessary.
  • Concerns are raised about why only two groups out of fifteen are experiencing issues with port 378H, despite others successfully using the same setup.
  • One participant notes that the hardware profile indicates the port address as 378H, raising questions about the reliability of this information in the context of their issues.

Areas of Agreement / Disagreement

Participants express uncertainty about the reasons for the malfunction, with multiple competing views on the cause of the issue. There is no consensus on a definitive solution or explanation.

Contextual Notes

Participants acknowledge potential limitations related to hardware configuration, software settings, and the variability of port addresses, but do not resolve these issues.

snoggerT
Messages
183
Reaction score
0
So I'm having a problem in some code I'm working on in Assembly(8086). I've tried everything I can think of, but I can't seem to figure out the problem. So I have a circuit that I built with a DB25 plug so that it can communicate with the parallel port on the computer. All we had to do is make a simple down counter that was displayed to the LEDs on the circuit. The problem is that I can't get the correct port to work. The port should be 378H, but it only seems to sort of work with 3BCH. I've even tried the following simple code to just get a single number to output using port 378H:

.MODEL SMALL
.STACK 64
.DATA

.CODE

MAIN PROC FAR
MOV AL, 55H
MOV DX, 378H
OUT DX, AL

mov AH,4Ch ; return to DOS
int 21h

MAIN ENDP
END MAIN

Can anyone think of a reason that this won't work? Also, I have tested the circuit, and it seems to be working correctly.
 
Physics news on Phys.org
There is no rule that says the parallel port must be at 378, it can also be at 3BC or even 278. Check in the bios you can probably choose what address to set it to.
 
mgb_phys said:
There is no rule that says the parallel port must be at 378, it can also be at 3BC or even 278. Check in the bios you can probably choose what address to set it to.

Well, we think the port address issue is why the program won't work. Every other person in the class has had it work fine using port 378H except our group and one other, and they are having the same problem as we are. We even compiled/ran a friends program that worked at his lab station, but it didn't work on ours. I guess something could be wrong with the circuit, but then I don't know that that would explain why I can get it to output single numbers using 3BCH and not 378.

edit- Also, the actual hardware profile is showing the port address as 378H.
 
Also, if your OS isn't setting the control bits for the parallel port, then you might need to write them yourself to tell the chip that you want those pins to be outputs. The control register is at port number base+3. 'Course that wouldn't directly explain why others are getting it to work, though.
 
Can any of you think of why only 2 groups out of 15 would have a problem using port 378H? Even using the simple code I posted above is not working.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
6K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 4 ·
Replies
4
Views
4K