A83: Re: Re: Displaying hex.


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

A83: Re: Re: Displaying hex.




i assume in asm since its on this list. for a binary number you will have to
do some bit testing and output the correct value to the screen as you go

ex:
 ld a,(number)
 push af
 bit 0,a
 call z,one
 call nz,zero
 pop af
 bit 1,a
 call z,one
 call nz,zero
.
.
.
zero:
 ld a,'0'
 call _putc (not sure what its called for the 83 inc files but u know the
one that puts the character in a)
one
 ret
one:
 ld a,'1'
 call _putc
 ret

if you want to store the number in a string then do the same but use hl to
load the numbers into the string+offset

>What do you mean? In ASM, or are you just wanting a program?
>Please Xplain? (sorry Australian Joke)
>
>-----Original Message-----
>From: James Matthews <matthews@tkb.att.ne.jp>
>To: Asm Help <assembly-83@lists.ticalc.org>
>Date: Sunday, 3 May 1998 19:43
>Subject: A83: Displaying hex.
>
>
>>
>>How can you display a number in its hex or bin form?
>>
>>James.
>>
>>____________________
>>
>>James Matthews.
>>E-mail (family):    matthews@tkb.att.ne.jp
>>E-mail (private):  james_matthews@hotmail.com
>>
>>Homepage:  http://home.att.ne.jp/gold/tomcat21/index2.html
>>ICQ:  7413754
>>____________________________________
>


Follow-Ups: