On Feb 25, 2008, at 9:58 AM, Jeff Erwin wrote:
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
Let me try this again.
I just went through this same exercise last week. Here is a link to
the source code of IMSAI's original paper tape loader which does
exactly what you're looking for. You will probably have to modify it
to suit your particular serial interface and memory map.
http://maben.homeip.net/static/S100/IMSAI/code/1976%20Self%20Contained%20Sy…
As an aside, here is a video of my IMSAI using this loader to bring up
a copy of Altair 4K Basic.
http://www.youtube.com/watch?v=ADplHpk33yY
-Mardy