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

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;         Function 38H: Get/Set Current Country Data         ;
  4.         ;                                                            ;
  5.         ;         int country_info(country,pbuffer)                  ;
  6.         ;             char country,*pbuffer;                         ;
  7.         ;                                                            ;
  8.         ;         Returns -1 if the "country" code is invalid.       ;
  9.         ;                                                            ;
  10.         ;************************************************************;
  11.  
  12. cProc   country_info,PUBLIC,ds
  13. parmB   country
  14. parmDP  pbuffer
  15. cBegin
  16.         mov     al,country      ; Get country code.
  17.         loadDP  ds,dx,pbuffer   ; Get buffer pointer (or -1).
  18.         mov     ah,38h          ; Set function code.
  19.         int     21h             ; Ask MS-DOS to get country
  20.                                 ; information.
  21.         jnb     cc_ok           ; Branch if country code OK.
  22.         mov     ax,-1           ; Else return -1.
  23. cc_ok:
  24. cEnd
  25.