Re: A86: Re: Number Printing


[Prev][Next][Index][Thread]

Re: A86: Re: Number Printing




I just figured that out...I was using "or a" instead of "xor a" when
initializing the variable.  Why not just use:

ld hl,(memloc)

And why clear A before you load the number to HL?  And where is _dispAHL
defined?

At 07:38 PM 5/5/98 -0400, you wrote:
>
>>Simple question, but:
>>
>>What's the best way to print a 16-bit number that's stored in a memory
>>location to the screen?
>
>
>Thus:
>
>xor a ; Clear A
>ld hl, MemoryLocation ; The 16-bit mem location goes here
>call  _ldhlhl                    ; Now HL = 16-bit number
>xor a                              ; Clear A register
>call _dispAHL
>
>-Matt
>
>I did not test this but it should work.
>
>


----------------
David Phillips
electrum@tfs.net


References: