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

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;    Function 5FH Subfunction 03H:                           ;
  4.         ;                  Make Assign-List Entry                    ;
  5.         ;    int add_alist_entry(psrcname,pdestname,uservalue,type)  ;
  6.         ;        char *psrcname,*pdestname;                          ;
  7.         ;        int  uservalue,type;                                ;
  8.         ;                                                            ;
  9.         ;    Returns 0 if new assign-list entry is made, otherwise   ;
  10.         ;    returns error code.                                     ;
  11.         ;                                                            ;
  12.         ;************************************************************;
  13.  
  14. cProc   add_alist_entry,PUBLIC,<ds,si,di>
  15. parmDP  psrcname
  16. parmDP  pdestname
  17. parmW   uservalue
  18. parmW   type
  19. cBegin
  20.         mov     bx,type         ; Get device type.
  21.         mov     cx,uservalue    ; Get uservalue.
  22.         loadDP  ds,si,psrcname  ; DS:SI = pointer to source name.
  23.         loadDP  es,di,pdestname ; ES:DI = pointer to destination name.
  24.         mov     ax,5f03h        ; Set function code.
  25.         int     21h             ; Make assign-list entry.
  26.         jb      aa_err          ; Exit if there was some error.
  27.         xor     ax,ax           ; Else return 0.
  28. aa_err:
  29. cEnd
  30.