home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 5.ddi / TASMEXMP.ZIP / CONCISE.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-06-10  |  564 b   |  23 lines

  1. ; Turbo Assembler    Copyright (c) 1988, 1991 By Borland International, Inc.
  2.  
  3. ; CONCISE.ASM
  4.  
  5. ; From the Turbo Assembler Users Guide
  6.  
  7.     .MODEL   small,C
  8.     EXTRN    C IntDivide:PROC
  9.     .CODE
  10.     PUBLIC   C Average
  11. Average      PROC  C ValuePtr:DWORD,NumberOfValues:WORD
  12.     les      bx,ValuePtr
  13.     mov      cx,NumberOfValues
  14.     mov      ax,0
  15. AverageLoop:
  16.     add      ax,es:[bx]
  17.     add      bx,2              ;point to the next value
  18.     loop     AverageLoop
  19.     call     IntDivide C,ax,NumberOfValues
  20.     ret
  21. Average      ENDP
  22.     END
  23.