A82: Re: One last thing :P


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

A82: Re: One last thing :P




As far as I remember HL points to the start of the next string after a
call to D_ZM_STR, so the following should work

LD HL,My_Cursor_Pos
LD (CURSOR_X),HL
LD HL,Str1
ROM_CALL(D_ZM_STR)
ROM_CALL(D_ZM_STR)
.
.
.

Str1:
.db "Hello ",0
Str2:
.db "World",0

Try it out, if it does not work try inserting a INC HL before the last
call.

Dines

-----Original Message-----
From: Kouri Rosenberg <kouri@juno.com>
To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
Date: 31. maj 1998 21:34
Subject: A82: One last thing :P


>
>Let's say you had a bunch of strings that you want to display in a row.
>They are not all the same length. If you make a little loop like this:
>
> ld a,5 ;starting (CURSOR_Y)
> ld hl,string1 ;point hl to the first string
>
>DISP:
> ld (CURSOR_Y),a
> ROMCALL(D_ZM_STR)
> 
>;This part is where I get stuck.
>;How would I point hl to the next string?
>
> add a,6
> cp 29 ;four strings to display
> jr nz,DISP
> ret
>
>string1:
>.db "Blahblahblah",0
>
>string2:
>.db "Yaddayaddayadda",0
>
>string3:
>.db "Boy am I bored today",0
>
>string4:
>.db "Can anyone help?",0
>
>
>_____________________________________________________________________
>You don't need to buy Internet access to use free Internet e-mail.
>Get completely free e-mail from Juno at http://www.juno.com
>Or call Juno at (800) 654-JUNO [654-5866]
>

_______________________________________

Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________