home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn30h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.0 KB  |  19 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;           Function 30H: Get MS-DOS Version Number          ;
  4.         ;                                                            ;
  5.         ;           int DOS_version()                                ;
  6.         ;                                                            ;
  7.         ;           Returns number of MS-DOS version, with           ;
  8.         ;              major version in high byte,                   ;
  9.         ;              minor version in low byte.                    ;
  10.         ;                                                            ;
  11.         ;************************************************************;
  12.  
  13. cProc   DOS_version,PUBLIC
  14. cBegin
  15.         mov     ax,3000H        ; Set function code and clear AL.
  16.         int     21h             ; Ask MS-DOS for version number.
  17.         xchg    al,ah           ; Swap major and minor numbers.
  18. cEnd
  19.