Assembly Out Directive

Thread Starter

natrix

Joined Mar 24, 2009
7
Hello all,
I have an assembly project wich needs me to intrface alot of thing on the parrallel port . The question is this :
If I sent data to the port using out dx,ax and then the Instruction Pointer moved to the next instuction . Would the data which I sent to the port disappear ?
like the following :
Rich (BB code):
mov al,FFH
mov dx,378h
out dx,al
mov cx,9FFF
dec bx
What do you think ?:)
 

kohlrak

Joined Apr 7, 2010
14
I'm assuming that this is x86. 0xFF should now be at port 0x387. Whether or not you can read that 0xFF back using the in instruction on port 0x387 depends entirely on the device. However, if you're using a modern x86, you don't have to do a nop if that's what you're asking.
 

BMorse

Joined Sep 26, 2009
2,675
Hello all,
I have an assembly project wich needs me to intrface alot of thing on the parrallel port . The question is this :
If I sent data to the port using out dx,ax and then the Instruction Pointer moved to the next instuction . Would the data which I sent to the port disappear ?
like the following :
Rich (BB code):
mov al,FFH
mov dx,378h
out dx,al
mov cx,9FFF
dec bx
What do you think ?:)

The data sent to the parallel port will be latched on, they will not "disappear" when you execute the next function, the data bits will only change when you send new data to the port.

B. Morse
 
Top