home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / usoftpd.zip / FA.ASM < prev    next >
Assembly Source File  |  1987-07-31  |  426b  |  20 lines

  1.  
  2. .MODEL large
  3. .CODE
  4.     PUBLIC    Power2
  5. Power2    PROC
  6.     push    bp        ; Entry sequence - save old BP
  7.     mov     bp,sp        ; Set stack framepointer
  8.  
  9.     les    bx,[bp+10]    ; Load Arg1 into
  10.     mov    ax,[bx]        ;   AX
  11.     les    bx,[bp+6]    ; Load Arg2 into
  12.     mov    cx,[bx]        ;   CX
  13.     shl    ax,cl        ; AX = AX * (2 to power of CX)
  14.                 ; Leave return value in AX
  15.  
  16.     pop    bp        ; Restore old framepointer
  17.     ret    4        ; Exit, and restore 4 bytes of args
  18. Power2  ENDP
  19.     END
  20.