1st stage loader for IMSAI - need ascii to binary conversion

Jeff Erwin jefferwin at gmail.com
Mon Feb 25 08:58:49 CST 2008


I am in the process of rebuilding an IMSAI 8080 and am using my Mac Pro as a
dumb terminal.  I have it all to the point where I can type a character and
see the ascii appear on the front panel.  What I need to do is write a
simple 1st stage loader that will take the HEX output from the ASM80
assembler, send it over the serial connection and put it in memory.  This
way I can write a more sophisticated loader and not have to key it in by
hand.

The question is, what is the algorithm, in assembly language, for converting
an ascii character to its binary equivalent.  By this, I mean converting an
'a'  to 1010, not 041H which is the ascii value.  I remember writing such a
thing 30 years ago but simply cannot get my head around it now.

The algorithm has to deal with taking an ascii string like
AF67DBFF6FF9AF81C2130053DBFF5FAAC2210039D20600780747D3FFAF4 and converting
each ascii character into the binary value it represents.  The sting above
would convert, one character at a time, to:

1010
1111
0110
0111
1101

well, you get the point...It has to work only for 0-9 and A-F which should
make it easier.


Anyone out there remember how to do this?

Jeff Erwin



More information about the cctalk mailing list