Does Changing AL Register Affect Parallel Port Output in Assembly Language?

AI Thread Summary
When outputting data to a parallel port in assembly language, the data remains latched at the port until another output instruction changes it. After executing an output command, any subsequent changes to the AL register do not affect the output state of the port. The behavior of the output port can depend on the specific hardware implementation, but typically, it retains the last written data until modified. It is important to consult the device's data sheet for precise details regarding the output behavior and program termination scenarios. Overall, the output remains stable until explicitly altered by a new command.
muh_j18
Messages
21
Reaction score
0
when outputing data to the parallel port, after the execution of the program, and when it terminates, what happens to the data that was at the parallel port's pins? do they still the same, or do they change immediatley?
and inside the program, does changing the data in AL, changes the output? like in the following example:
.
.
.
mov dx,378h
mov al,00110011b
out dx,al; now the data on the ouput are 00110011, but do they change after this
mov al,14h ; instruction?
add al,2
.
.
.
 
Engineering news on Phys.org
Have a look at the data sheet for the device. I've never programmed in assembly, just C, and I don't know which processor you are referring to. But I can tell you that with the experience I have had with PIC processors I have NEVER had a question unanswered by the data-sheet or anything that comes with the MPLAB programming environment.
 
Many years ago I did some assembly language programming for a parallel printer port on a TRS80. If my memory serves me correct, the data sent to the port latches and remains the same until your program or another program changes it. However, as Averagesupernova advised, it is best to consult the data-sheet and documentation.
 
It also depends on how you define 'the program terminates'. PICs for instance have various modes of powering down, sleep mode, etc. Also, when your program terminates it could simply go into an endless loop and stay there until an external interrupt transfers control to another part of the program. In this case I can't see why the output register would do anything other than keep the last data written to it latched. So, (and I say this all the time) more information please. If we knew a bit more about the big picture we may come up with a better answer. Or, you may have already had it answered by the last several posts.
 
That looks like x86 (8086) code. Typically the output ports on such a processor are implemented in external hardware and not built into the processor itself. Most output port implementations will latch the data, so yes it will remain valid until another output instruction overrides it. Changing the AL register after outputing will definitely not effect the state of the output port.
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top