Hey I'm currently taking assembly language and I got stuck for understanding the conversion routine any Hex/bi/oct number to decimal
program ConvertToDecimal;
#include( "stdlib.hhf" )
static
value: int32;
begin ConvertToDecimal;
stdout.put( "Input a hexadecimal value: " );
stdin.get( ebx );
mov( ebx, value );
stdout.put( "The value $", ebx, " converted to decimal is ", value, nl );
end ConvertToDecimal;
This is the code provided in textbook and I'm quite confused in which part and how does a hex number convert to decimal number
Also
program ConvertToDecimal2;
#include( "stdlib.hhf" )
begin ConvertToDecimal2;
stdout.put( "Input a hexadecimal value: " );
stdin.get( ebx );
stdout.put( "The value $", ebx, " converted to decimal is " );
stdout.puti32( ebx );
stdout.newln();
end ConvertToDecimal2;
I wonder how this one converts as well. What I thought was input a hex number, but where it gets converted to decimal number?