Re: A86: Displaying a register in decimal (base 10) on the screen
[Prev][Next][Index][Thread]
Re: A86: Displaying a register in decimal (base 10) on the screen
In a message dated 97-09-01 10:26:12 EDT, you write:
<<
> 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
Set the cursor coordinates, put A into L, put 0 into H, and call $4A33.
It displays HL as a decimal number, right-justified in a field of width 5.
>>
I used the following code and got an output of "5535<black box>". I was
trying to get "165". Interesting...
#include "asm86.h"
#include "ti86asm.inc"
.org _asm_exec_ram
Start:
call _clrLCD
ld hl,0000
ld (_curRow),hl
ld a,$A5
ld l,a
ld h,0
call $4A33
ret
.end
Follow-Ups: