小编Col*_*rst的帖子

使用SHL eax,ecx汇编x86错误

我在我的代码中对于汇编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, …
Run Code Online (Sandbox Code Playgroud)

x86 assembly instruction-set cpu-registers operands

2
推荐指数
1
解决办法
265
查看次数

仅使用javascript更改选择选项的顺序

我点击按钮时试图颠倒字体选择选项的顺序.我在网上看到的一切都是使用jquery,有什么方法可以用js做到吗?

<button class="gray" type="button" onclick="sortFont();" > click </button>
<select id="fontMenu" >
   <option value="Arial">Arial</option>
   <option value="Times New Roman">Times New Roman</option>
</select>
Run Code Online (Sandbox Code Playgroud)

html javascript css fonts

1
推荐指数
1
解决办法
135
查看次数