home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
usoftlib
/
pa.asm
< prev
next >
Wrap
Assembly Source File
|
1987-07-30
|
388b
|
18 lines
.MODEL medium
.CODE
PUBLIC Power2
Power2 PROC
push bp ; Entry sequence - save old BP
mov bp,sp ; Set stack framepointer
mov ax,[bp+8] ; Load Arg1 into AX
mov cx,[bp+6] ; Load Arg2 into CX
shl ax,cl ; AX = AX * (2 to power of CX)
; Leave return value in AX
pop bp ; Restore old framepointer
ret 4 ; Exit, and restore 4 bytes of args
Power2 ENDP
END