home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PMC101.ZIP / LIBSRC.ZIP / DSCGET.ASM (.txt) < prev    next >
Assembly Source File  |  1994-06-05  |  1KB  |  71 lines

  1. .386p
  2. locals
  3.  
  4. public  DSC_GETBASE, DSC_GETLIMIT, DSC_GETACCESS
  5.  
  6. _TEXT           segment byte public use32 'CODE'
  7. assume  cs:_TEXT
  8.  
  9. DSC_GETBASE:
  10.         xor eax,eax
  11.         jmp short get
  12.  
  13. DSC_GETLIMIT:
  14.         mov eax,10000h
  15.         jmp short get
  16.  
  17. DSC_GETACCESS:
  18.         mov eax,20000h
  19.  
  20. get:
  21.         push ebx
  22.  
  23.         mov bx,[esp+4+4+4]
  24.         mov ax,6
  25.         int 31h
  26.         jc short @@00
  27.  
  28.         cmp eax,10006h
  29.         mov eax,[esp+4+4]
  30.         jb short @@04
  31.         ja short @@05
  32.  
  33.         lsl ecx,ebx
  34.         jnz short @@02
  35.         mov [eax],ecx
  36.  
  37.         jmp short @@03
  38.  
  39. @@05:
  40.         lar ecx,ebx
  41.         jnz short @@02
  42.         shr ecx,8
  43.         mov [eax],cx
  44.  
  45.         jmp short @@03
  46.  
  47. @@04:
  48.         mov [eax],dx
  49.         mov [eax+2],cx
  50.  
  51. @@03:
  52.         xor eax,eax
  53.         jmp short @@01
  54.  
  55. @@02:
  56.         mov ax,-32734
  57.  
  58. @@00:
  59.         movsx eax,ax
  60.         cmp ah,80h
  61.         je short @@01
  62.         mov eax,-32768
  63.  
  64. @@01:
  65.         pop ebx
  66.         ret 8
  67.  
  68. _TEXT           ends
  69. end
  70.  
  71.