home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / asmutl / usoftpd.arc / PA.ASM < prev    next >
Assembly Source File  |  1987-07-31  |  388b  |  18 lines

  1.  
  2. .MODEL medium
  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.     mov    ax,[bp+8]    ; Load Arg1 into AX
  10.     mov    cx,[bp+6]    ; Load Arg2 into CX
  11.     shl    ax,cl        ; AX = AX * (2 to power of CX)
  12.                 ; Leave return value in AX
  13.  
  14.     pop    bp        ; Restore old framepointer
  15.     ret    4        ; Exit, and restore 4 bytes of args
  16. Power2  ENDP
  17.     END
  18.