A86: Displaying a register in decimal (base 10) on the screen
[Prev][Next][Index][Thread]
A86: Displaying a register in decimal (base 10) on the screen
If I have a hex number (say $A5) in the A register, is there any simple way
to display it in decimal (as opposed to hex) on the screen (as 165)? I
looked at the ZTetris (by Jimmy Mardell) source and it call a routine called
UNPACK_HL which was not defined _anywhere_ in the source, nor was it in
ti86asm.inc or asm86.h. The only other include file used was for link
routines (not sure of the filename...), but I'm almost positive that it
wasn't there. I believe UNPACK_HL puts (HL mod 10) in A and (HL div 10) in
HL, but using the (unofficial) routines that Dan Eble posted, _multHLby10 and
_divHLby10, it always printed 0. Anyway, I want to stay away from the OP
registers on this matter, in order to keep it more simple, and before I start
to babble more, if anyone knows how to print a register to the screen in
decimal, or about anything else I said, please post it.
~Stephen Hicks
<a href="mailto:steve86asm@aol.com">mailto:steve86asm@aol.com</a>
Follow-Ups: