Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Java + Assembly Language

korismith

New Coder
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:

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom