Assembly Out Directive

Discussion in 'Programmer's Corner' started by natrix, Apr 2, 2010.

  1. natrix

    Thread Starter New Member

    Mar 24, 2009
    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 :
    Code ( (Unknown Language)):
    1. mov al,FFH
    2. mov dx,378h
    3. out dx,al
    4. mov cx,9FFF
    5. dec bx
    What do you think ?:)
  2. kohlrak

    New Member

    Apr 7, 2010
    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.
  3. BMorse

    AAC Fanatic!

    Sep 26, 2009

    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