[the code fragments are image files, which I won't retype just to make a
point.]
A more experienced programmer, would likely have asked for a routine
that is not passed a value in the A (accumulator) register, but in some
register useful as a temporary register. C or B are useful for that
purpose, as DE and HL are more useful as 16-bit registers and operands
on the 8080.
We know this stuff; but AI's 1) may not know and 2) they don't know what
they know and don't know. However, I may be wrong, or this idea may be
debatable. I do not pretend to be very knowledgable about AI's.
I also suspect, that a million people using AI's, and telling them what
their errors are, will make the AI's "better" by the metric of "whatever
people tell me is an error and is correct". I am reluctant to be an AI
teacher.
Regards Herb Johnson
--
Herb Johnson, New Jersey USA
http://www.retrotechnology.com or .net
preserve and restore 1970's personal computing
email: hjohnson @ retrotechnology dot com
or try later at herbjohnson @ comcast dot net