使用SHL eax,ecx汇编x86错误

Col*_*rst 2 x86 assembly instruction-set cpu-registers operands

我在我的代码中对于汇编x86类的编译错误有问题,

A2070:无效的指令操作数

这条线是

shl eax, ecx
Run Code Online (Sandbox Code Playgroud)

ecx应该循环(减少1)并且此时永远不会大于5,那么为什么我不能移动值?我需要将值乘以eax2 ^ n,n为值in ecx,左移.

createArray PROC   
;saving 5 multiples of the value currently in eax into an array addres that 
is ;on the stack
    push ecx       
    push eax
    push esi
    push ebp
    mov ebp, esp
    mov ecx, 5
    mov esi, [ebp+24] ;address of array
    L1:
        call multiply   ;call multiply with two numbers eax, ecx
        pop eax
        mov [esi],eax
        add esi, 4

    Loop L1
....cont
createArray endp

multiply PROC
    shl eax, ecx ; this line right here
    push eax
multiply endp
Run Code Online (Sandbox Code Playgroud)

如果我替换

shl eax, 5
Run Code Online (Sandbox Code Playgroud)

然后它工作我只是不知道为什么ecx不起作用.