Need help Java + Assembly Language

korismith

New Coder
Dec 13, 2019
2
0
1
I need help with a few things here. Basically, I need to convert Java to Assembly Language (like with TASM), and I also need to display what two registries would contain after a specific code is executed.

Java to Assembly:

Java:
int number1 = 5;

int number2 = 10;

int result = 0;

    if ( number1 == 10 && number2 == 20) {

        result = number1 * number2;

    }

    else     

        result = number1 + number2

--------------------

AND

----------------------

int count = 10;

int number = 0;



while (count >= 0)

{

     number += 8;

     count--;

}

------------------------------------------------------
Assembly Registries:

mov CX, 1456
mov AX,CX
add CH, 2
div CH
mov CX,AX

What is stored in CH and CL
 
Last edited by a moderator: