Domanda

1) Convert a decimal number to hex.

I dont know how to convert decimal to hex. I just input a number but i have no clue how to start next. Any help is appreciated.

TITLE   
include irvine32.inc
.data
a dword ?
b dword ?
final dword ?
count dword 0
prompt1 byte ,'Enter a number',0
.code
main PROC
    mov edx,offset prompt1
    call writestring
    call readint
    mov a,eax
main ENDP

END main
È stato utile?

Soluzione

Probably what they want from you is to write a loop that divides by 16 and gets the remainder of division by 16. It is not very clear, however, what you're asking. What is "prompt1"?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top