Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

assembly Aprendendo Ajudem

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    assembly Aprendendo Ajudem

    Por favor gostaria de tirar algumas duvidas, estou aprendendo assembly e estou com dificuldade em alguma operações matematicas.

    Segue a equacao que eu quero representar e o codigo que estou montando.
    Agradeço a ajuda.

    CX = 0;
    do {
    AX = 3;
    BX = 4;
    if (AX <= BX)
    CX++;
    else
    CX = CX + 2;
    } while (CX <= 10);



    start:
    mov ax, 3 ;ax = 3
    mov bx, 4 ;bx = 4
    mov cx, 0 ;cx = 0

    cmp cx,10
    jgec fim
    cmp Ax, bx
    jle after ;menor ou igual
    :
    :
    :add cx,2
    :
    jmp ;apos

    islessorequal:
    :
    :inc cx ;aumenta cx em 1
    :
    after:
    :
    fim:

    Não acredito que esteja correto hehehe alguem pode me ajudar ?
    Similar Threads
X
Working...
X