Re: A85: Temporary variables


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

Re: A85: Temporary variables




On Sat, 28 Mar 1998 23:52:37 -0500, you wrote:

>
>How about a single character, not a string?  Do you do something like
>this:
>
>SomeChar=$80df
>ld a, 'X'
>ld (SomeChar), a
>
>And if so, what will SomeChar contain?  If you try to print SomeChar to
>the screen, how do you print the letter 'X' and how do you print 'X's
>hex, decimal, binary values?

yes, somechar contains 'X', as for the best way to print out a single
character, you can use zero strings as follows:


SomeChar=TEXT_MEM
StringTerm=TEXT_MEM+1

ld a,0			;end of string (use "xor a" to make smaller)
ld (StringTerm),a
ld a,'X'
ld (SomeChar),a
ld hl,SomeChar
call D_ZT_STR		;ROM_CALL in ZShell? i can't remember

i think you will have to write your own routines to write in other
formats.

-mike pearce


References: