Hello, I am just starting and introductory course in Assembly. We are using 8086, and I am having trouble with the assignment.
We are to start with the number 1, and then double that number 18 times, and print out each number in hex. For example, output should look like:
I have the convert to hex function already, i just dont understand how to loop 18 times to multiply by the constant (2) in assembly.
Maybe create a function and call it like this?
loop: call multiply_nums ;Multiply by 2 call display_hex ;Convert and display in hex cmp Ax, 18 ; loop 18 times? jnz loop ;start loop again multiply_nums: mov al, 2 mov bl, 1 imul bl ;stores 2 in AX? ret