Archived

This topic is now archived and is closed to further replies.

wank8734

Help with (Intel) assembly language, converting hex to binary and back...

Recommended Posts

wank8734    122
I am trying to write a hex calculator where you input two hex numbers and then a operation (+, -, *, /). To do this I need to first convert the hex numbers to binary then do the calculation then convert back, yet I am stuck doing the conversions. I know how to do it on paper, but not in assembly language. Somehow I don''t see being able to just say if the hex is "a" then make "1010"

Share this post


Link to post
Share on other sites
amag    152
Hm, I''m kind of confused, do you want to convert the string "a" into the string "1010"? Or do you want to convert the string "a" into something you can do arithmetic (easily) on?
Sounds mysteriously much like your average homework to me...

Share this post


Link to post
Share on other sites
stevie56    145
If you don''t know assembly language well enough to figure out an approach for yourself, why not use a lookup table?

It''s the method I used until I got adventurous enough to do it ''properly'' in assembler.





Stevie

Don''t follow me, I''m lost.

Share this post


Link to post
Share on other sites