Re: A83: ZiLOG App Dev question on multi-line text


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

Re: A83: ZiLOG App Dev question on multi-line text




Well, you have a few choices.  You can either extend each line of the string
so that it's sixteen characters long (you can pad them with spaces), or do
what James said and use NewLine (which will move the cursor to the next
line...like pressing Enter on a computer).  If you use Newline, you'll have
to split each of your lines of text into different strings, each with a zero
terminator.  Then you'll have to display them individually with the B_CALL
to NewLine in between.  Unless your strings are near sixteen characters
already, the latter option is probably the better one.

Just as a suggestion though, copying text to RAM to use the PutS entry point
is a waste of space and time.  It makes much more sense to have a call
internal to your application (I usually call it PutSApp) which will display
the string directly from your ROM page.  Here's an example for code of such
a call:
PutSApp:
    ld    a,(hl)
    or    a
    ret    z
    B_CALL    PutC
    inc    hl
    jr    PutSApp

Hope this helps,
-Dan Englender

----- Original Message -----
From: "James Matthews" <jmatthews@generation5.org>
To: <assembly-83@lists.ticalc.org>
Sent: Monday, December 18, 2000 3:02 PM
Subject: RE: A83: ZiLOG App Dev question on multi-line text


>
>
> Hey there,
>
> Check your ti83plus.inc for _NewLine...if it isn't in there, the equate
is:
>
> _NewLine EQU  452Eh
>
> Regards,
>
> James.
>
> > -----Original Message-----
> > From: owner-assembly-83@lists.ticalc.org
> > [mailto:owner-assembly-83@lists.ticalc.org]On Behalf Of Zac
> > Sent: 18 December 2000 19:37
> > To: assembly-83@lists.ticalc.org
> > Subject: A83: ZiLOG App Dev question on multi-line text
> >
> >
> >
> > When i use ZiLOG's Dev program for TI-83+ APPS i can display text but
> > i cant get it to do multi-line text? How do you display multiline text
> > with this compiler?
> >
> > My current source code is:
> >
> > (header)
> >   B_CALL ClrLCDFull
> >   xor a
> >   ld (curCol),a
> >   ld a, 3
> >   ld (curRow),a
> >   ld hl, TEXT
> >   ld de, OP1
> >   B_CALL StrCopy
> >   ld hl, OP1
> >   B_CALL PutS
> >   B_CALL GetKey
> >   B_JUMP JForceCmdNoChar
> > TEXT:
> >   DB "Text Test"
> >
> > But putting:
> > TEXT:
> >   DB "Line 1"
> >   DB "Line 2",0
> > Just outputs "Line 1Line 2"
> >
> >
>




References: