home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / clipper / rettig / source / lptswap.asm < prev    next >
Assembly Source File  |  1990-10-21  |  1KB  |  42 lines

  1. ; LPTSWAP.ASM
  2. ;
  3. ; by Ralph Davis
  4. ; modified by Rick Spence
  5. ;
  6. ; Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7. ;
  8.  
  9.          PUBLIC   LPTSWAP
  10.  
  11. ;****************************************
  12. LPTSWAP_TEXT SEGMENT BYTE PUBLIC 'CODE'
  13.          ASSUME   CS:LPTSWAP_TEXT
  14. ;----------------------------------------
  15. LPTSWAP  PROC     FAR
  16.          PUSH     BP 
  17.          PUSH     SI
  18.          PUSH     DI
  19.          PUSH     DS
  20.          PUSH     ES
  21.          MOV      AX,40H   ; Point to system data segment
  22.          MOV      DS,AX
  23.          MOV      ES,AX
  24.          MOV      SI,8     ; Point to address of LPT1
  25.          MOV      DI,8
  26.          CLD
  27.          LODSW             ; Pick up LPT1 port address
  28.          XCHG     AX,[SI]  ; SI now pointing to LPT2, exchange
  29.          STOSW             ; DI points to LPT1
  30.          POP      ES
  31.          POP      DS
  32.          POP      DI
  33.          POP      SI
  34.          POP      BP
  35.          RET
  36. LPTSWAP  ENDP
  37. ;------------------------------------
  38. LPTSWAP_TEXT    ENDS
  39. ;************************************
  40.          END
  41.  
  42.