home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / 5 / ioctl_1.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  884 b   |  18 lines

  1. info    dw      ?               ; save device information word here
  2.         .
  3.         .
  4.         .
  5.         mov     ax,4400h        ; AH = function 44H, IOCTL
  6.                                 ; AL = subfunction 00H, get device
  7.                                 ; information word
  8.         mov     bx,0            ; BX = handle for standard input
  9.         int     21h             ; transfer to MS-DOS
  10.         mov     info,dx         ; save device information word
  11.                                 ; (assumes DS = data segment)
  12.         or      dl,20h          ; set raw mode bit
  13.         mov     dh,0            ; and clear DH as MS-DOS requires
  14.         mov     ax,4401h        ; AL = subfunction 01H, set device
  15.                                 ; information word
  16.                                 ; (BX still contains handle)
  17.         int     21h             ; transfer to MS-DOS
  18.