skullblock
Programmer
I am sorry to bother everyone but I am struggling with this how do I get a hex value from the user input and display the hex value. This is my display code for the hex value.
mov bl, al
shr al, 4
cmp al, 10
sbb al, 105
das
_PutCh al
mov al, bl
and al, 00001111b
cmp al, 10
sbb al, 105
das
_PutCh al
This works for entering a decimal number and displaying the hex value. But if I enter the hex value it returns a decimal value. I guess I am asking how do you have a user enter 4 byte hex value and get that value and retrun the same value as hex to the screen? Thanks
mov bl, al
shr al, 4
cmp al, 10
sbb al, 105
das
_PutCh al
mov al, bl
and al, 00001111b
cmp al, 10
sbb al, 105
das
_PutCh al
This works for entering a decimal number and displaying the hex value. But if I enter the hex value it returns a decimal value. I guess I am asking how do you have a user enter 4 byte hex value and get that value and retrun the same value as hex to the screen? Thanks