Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Converting Hexadecimal to ASCII - Whats the logic?

Status
Not open for further replies.

purifier

Full Member level 4
Joined
Nov 30, 2004
Messages
220
Helped
9
Reputation
18
Reaction score
8
Trophy points
1,298
Activity points
2,570
Can someone tell me the logic of converting a hexadecimal format to ASCII format in Assembly please?
 

Hi purifier,
Thought I might have something local, but couldn't find it. You didn't say which processor you are using, and that makes a difference with assembly. However, I do have some links which will probably help:
for PIC micro:**broken link removed**

About 10-15 years ago in a Bulgarian magazine 'Computer' there was a
contest on
shortest HEX to ASCII routine for several processors.
Here is the routine for '51, in fact only 6 bytes long not counting ret.
Please
comment.

hex1d:
add A#090h
da A
addc A,#040h
da A
ret
Found at:http://forums.semiconductors.com/forums/viewtopic.php?t=687&sid=0c53db7bab463131a36e03470fb8b937

And another for the 51 is halfway down this page on Myke Predco's site - #3:
http://www.myke.com/51-snip.htm

A discussion on the conversion which may be useful:
**broken link removed**

And a discussion on this board can be found here:



I hope this is of some help to you, but if you have questions, just ask.
Regards,
Robert
 

    purifier

    Points: 2
    Helpful Answer Positive Rating
Wow...Thank you so much... I'm using the logic for an 8086 processor...Will get back to you if i have any doubts...thank you..
 

"Convert HEX to ASCII - ASM/8086"
**broken link removed**

Regards,
IanP
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top