home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PMC101.ZIP / LIBSRC.ZIP / MEMCHK.ASM (.txt) < prev    next >
Assembly Source File  |  1994-06-27  |  664b  |  46 lines

  1. .386p
  2. locals
  3.  
  4. public  MEMCHK
  5.  
  6. _TEXT           segment byte public use32 'CODE'
  7. assume  cs:_TEXT
  8.  
  9. MEMCHK:
  10.         push edi
  11.         cld
  12.  
  13.         mov edi,[esp+4+4+08h]
  14.         mov ecx,[esp+4+4+00h]
  15.         mov al,[esp+4+4+04h]
  16.         mov ah,al
  17.         mov edx,eax
  18.         shl eax,16
  19.         mov ax,dx
  20.  
  21.         mov dl,cl
  22.         shr ecx,2
  23.         jz short @@02
  24.         repe scasd
  25.         jne short @@01
  26.  
  27. @@02:
  28.         mov cl,dl
  29.         and cl,3
  30.         repe scasb
  31.         jne short @@01
  32.  
  33.         mov eax,1
  34.         jmp short @@00
  35.  
  36. @@01:
  37.         xor eax,eax
  38.  
  39. @@00:
  40.         pop edi
  41.         ret 0ch
  42.  
  43. _TEXT           ends
  44. end
  45.  
  46.